Merge branch 'develop' into vehicle-update

Conflicts:
	openrct2.vcxproj.filters
This commit is contained in:
Michał Janiszewski 2015-12-27 18:11:13 +01:00
commit 4c6ee9570c
77 changed files with 1595 additions and 752 deletions

View File

@ -86,8 +86,8 @@ else (WIN32)
PKG_CHECK_MODULES(SPEEX REQUIRED speexdsp)
endif (WIN32)
# Include libdl for dlopen
if (UNIX)
# Include libdl for dlopen
set(DLLIB dl)
endif (UNIX)
@ -113,6 +113,13 @@ if (APPLE)
TARGET_LINK_LIBRARIES(${PROJECT} ${ICONV_LIBRARIES})
endif (APPLE)
if (UNIX AND NOT APPLE)
# FontConfig for TrueType fonts.
PKG_CHECK_MODULES(FONTCONFIG REQUIRED fontconfig)
INCLUDE_DIRECTORIES(${FONTCONFIG_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${PROJECT} ${FONTCONFIG_LIBRARIES})
endif (UNIX AND NOT APPLE)
# Handle creating the rct2 text and data files on OS X and Linux
# See details in src/openrct2.c:openrct2_setup_rct2_segment for how the values
# were derived.

View File

@ -11,6 +11,7 @@
D41B73F11C21018C0080A7B9 /* libssl.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B73F01C21018C0080A7B9 /* libssl.tbd */; };
D41B741D1C210A7A0080A7B9 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = D41B741C1C210A7A0080A7B9 /* libiconv.tbd */; };
D41B74731C2125E50080A7B9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D41B74721C2125E50080A7B9 /* Assets.xcassets */; };
D4ABAB061C2F812B0080CAD9 /* news_options.c in Sources */ = {isa = PBXBuildFile; fileRef = D4ABAB051C2F812B0080CAD9 /* news_options.c */; };
D4EC47DF1C26342F0024B507 /* addresses.c in Sources */ = {isa = PBXBuildFile; fileRef = D4EC46D61C26342F0024B507 /* addresses.c */; };
D4EC47E01C26342F0024B507 /* audio.c in Sources */ = {isa = PBXBuildFile; fileRef = D4EC46D91C26342F0024B507 /* audio.c */; };
D4EC47E11C26342F0024B507 /* mixer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4EC46DB1C26342F0024B507 /* mixer.cpp */; };
@ -215,6 +216,7 @@
D41B74721C2125E50080A7B9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = distribution/osx/Assets.xcassets; sourceTree = SOURCE_ROOT; };
D4895D321C23EFDD000CD788 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = distribution/osx/Info.plist; sourceTree = SOURCE_ROOT; };
D497D0781C20FD52002BF46A /* OpenRCT2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenRCT2.app; sourceTree = BUILT_PRODUCTS_DIR; };
D4ABAB051C2F812B0080CAD9 /* news_options.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = news_options.c; sourceTree = "<group>"; };
D4EC46D61C26342F0024B507 /* addresses.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = addresses.c; path = src/addresses.c; sourceTree = "<group>"; };
D4EC46D71C26342F0024B507 /* addresses.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = addresses.h; path = src/addresses.h; sourceTree = "<group>"; };
D4EC46D91C26342F0024B507 /* audio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = audio.c; sourceTree = "<group>"; };
@ -923,6 +925,7 @@
D4EC479A1C26342F0024B507 /* network_status.c */,
D4EC479B1C26342F0024B507 /* new_campaign.c */,
D4EC479C1C26342F0024B507 /* new_ride.c */,
D4ABAB051C2F812B0080CAD9 /* news_options.c */,
D4EC479D1C26342F0024B507 /* news.c */,
D4EC479E1C26342F0024B507 /* options.c */,
D4EC479F1C26342F0024B507 /* park.c */,
@ -1335,6 +1338,7 @@
D4EC48651C26342F0024B507 /* title_editor.c in Sources */,
D4EC47EC1C26342F0024B507 /* rect.c in Sources */,
D4EC48101C26342F0024B507 /* http.cpp in Sources */,
D4ABAB061C2F812B0080CAD9 /* news_options.c in Sources */,
D4EC47F21C26342F0024B507 /* game.c in Sources */,
D4EC48761C26342F0024B507 /* footpath.c in Sources */,
D4EC48031C26342F0024B507 /* currency.c in Sources */,

View File

@ -1815,7 +1815,7 @@ STR_1812 :{SMALLFONT}{BLACK}{STRINGID}
STR_1813 :Overige objecten
STR_1814 :Acties
STR_1815 :Gedachten
STR_1816 :{SMALLFONT}{BLACK}Selecteer het type informatie dat je in de gastenlijst wilt zien
STR_1816 :{SMALLFONT}{BLACK}Selecteer het type informatie dat je in de bezoekerslijst wilt zien
STR_1817 :({COMMA16})
STR_1818 :{WINDOW_COLOUR_2}Alle bezoekers
STR_1819 :{WINDOW_COLOUR_2}Alle bezoekers (samengevat)
@ -1862,10 +1862,10 @@ STR_1859 :klusjesmannen
STR_1860 :monteurs
STR_1861 :bewakers
STR_1862 :entertainers
STR_1863 :Klusjesman
STR_1864 :Monteur
STR_1865 :Bewaker
STR_1866 :Entertainer
STR_1863 :klusjesman
STR_1864 :monteur
STR_1865 :bewaker
STR_1866 :entertainer
STR_1867 :{BLACK}{COMMA16} {STRINGID}
STR_1868 :Kan het aantal rotaties niet aanpassen...
STR_1869 :{WINDOW_COLOUR_2}Aantal rotaties:
@ -1945,7 +1945,7 @@ STR_1940 :{SMALLFONT}{BLACK}Stemming, energie, hongerniveau e.d. van deze bez
STR_1941 :{SMALLFONT}{BLACK}Tonen in welke attracties deze bezoeker is geweest
STR_1942 :{SMALLFONT}{BLACK}Financiële informatie over deze bezoeker tonen
STR_1943 :{SMALLFONT}{BLACK}Recente gedachten van deze bezoeker tonen
STR_1944 :{SMALLFONT}{BLACK}Toon de dingen die de gast bij zich heeft
STR_1944 :{SMALLFONT}{BLACK}Toon de dingen die de bezoeker bij zich heeft
STR_1945 :{SMALLFONT}{BLACK}Orders en opties voor deze werknemer tonen
STR_1946 :{SMALLFONT}{BLACK}Kostuum van deze entertainer selecteren
STR_1947 :{SMALLFONT}{BLACK}Werkgebieden van het geselecteerde type werknemer weergeven en de dichtstbijzijnde werknemer lokaliseren
@ -3511,7 +3511,7 @@ STR_5175 :Voer de naam van je Twitch-kanaal in
STR_5176 :Twitch-integratie inschakelen
STR_5177 :Schermmodus:
STR_5178 :{SMALLFONT}{BLACK}Cheats voor financiën
STR_5179 :{SMALLFONT}{BLACK}Cheats voor gasten
STR_5179 :{SMALLFONT}{BLACK}Cheats voor bezoekers
STR_5180 :{SMALLFONT}{BLACK}Cheats voor park
STR_5181 :{SMALLFONT}{BLACK}Cheats voor attracties
STR_5182 :{INT32}
@ -3618,7 +3618,7 @@ STR_5282 :Attracties openen/sluiten via RCT1-stoplichten
STR_5283 :Park openen/sluiten via RCT1-stoplichten
STR_5284 :Scenarioselectie-lettertype in RCT1-stijl
STR_5285 :KABOEM!
STR_5286 :{SMALLFONT}{BLACK}Laat sommige gasten exploderen
STR_5286 :{SMALLFONT}{BLACK}Laat sommige bezoekers exploderen
STR_5287 :Attractie is al defect
STR_5288 :Attractie is gesloten
STR_5289 :Deze attractie kan niet defect raken
@ -3918,6 +3918,9 @@ STR_5582 :Aanwijzer in venster vasthouden
STR_5583 :{COMMA1DP16} m/s
STR_5584 :SI
STR_5585 :{SMALLFONT}{BLACK}Heft de limieten op het tabblad Bedrijfsopties van een attractie op, waardoor je bijvoorbeeld kettingsheuvels met snelheden tot {VELOCITY} kunt hebben.
STR_5586 :Winkels en kraampjes automatisch openen
STR_5587 :{SMALLFONT}{BLACK}Als deze optie is ingeschakeld zullen winkels en kraampjes na plaatsing automatisch worden geopend.
STR_5588 :{SMALLFONT}{BLACK}Multiplayer
#############
# Scenarios #
@ -4285,7 +4288,7 @@ STR_CPTY :2 passagiers per boot
#CC
[AE-SWIM]
STR_NAME :Zwembad
STR_DESC :Een steiger waarvan gasten het water in kunnen om een stukje te zwemmen. Door "The Amazing Earl".
STR_DESC :Een steiger waarvan bezoekers het water in kunnen om een stukje te zwemmen. Door "The Amazing Earl".
STR_CPTY :1 bezoeker per "boot"
# End of Boat Ride / Bootverhuur
@ -5636,12 +5639,12 @@ STR_DESC :Toiletten in een gebouw in blokhutstijl.
# Information Kiosks
[INFOK]
STR_NAME :Informatiekiosk
STR_DESC :Een kiosk waar gasten kaarten van het park en paraplu's kunnen kopen.
STR_DESC :Een kiosk waar bezoekers kaarten van het park en paraplu's kunnen kopen.
#CC
[INFO1MKY]
STR_NAME :Informatiekiosk
STR_DESC :Een kiosk waar gasten kaarten van het park en paraplu's kunnen kopen.
STR_DESC :Een kiosk waar bezoekers kaarten van het park en paraplu's kunnen kopen.
# End of Information Kiosks
@ -5654,7 +5657,7 @@ STR_DESC :Een geldautomaat die de bezoekers kunnen gebruiken als ze bijna doo
# First Aid
[FAID1]
STR_NAME :Eerste hulp
STR_DESC :Een gebouw waar misselijke gasten sneller kunnen opknappen.
STR_DESC :Een gebouw waar misselijke bezoekers sneller kunnen opknappen.
# End of First Aid
#################################
@ -5944,6 +5947,56 @@ STR_NAME : 'Donkere eeuwen'-thema
[SCGMYTHO]
STR_NAME : Mythologisch thema
#################
# Small objects #
#################
[BRBASE]
STR_NAME :Basisblok
[BRBASE2]
STR_NAME :Basisblok
[BRBASE3]
STR_NAME :Basisblok
[TAL]
STR_NAME :Boom in alligatorvorm
[TCB]
STR_NAME :Klaverenboom
[TDF]
STR_NAME :Dolfijnenfontein
[TDM]
STR_NAME :Ruitenboom
[TEF]
STR_NAME :Olifantenfontein
[TGS]
STR_NAME :Giraffenstandbeeld
[THRS]
STR_NAME :Ruiterstandbeeld
[THT]
STR_NAME :Hartenboom
[TQF]
STR_NAME :Cupidofonteinen
[TSD]
STR_NAME :Schoppenboom
[TSH]
STR_NAME :Paardenstandbeeld
[TSTD]
STR_NAME :Dolfijnenstandbeeld
[TUS]
STR_NAME :Eenhoornstandbeeld
#################
# Large objects #
#################
@ -5962,9 +6015,129 @@ STR_NAME :Rijtjeshuis
#########
# Walls #
#########
[WALLBB34]
STR_NAME :Stenen muur
[WALLCBPC]
STR_NAME :Muur met valhek
[WALLCFAR]
STR_NAME :Muur met boog
[WALLCFPC]
STR_NAME :Muur met valhek
[WALLCO16]
STR_NAME :Geplooide stalen muur
[WALLIG16]
STR_NAME :Iglomuur
[WALLIG24]
STR_NAME :Iglomuur
[WALLJB16]
STR_NAME :Muur van zuurtjes
[WALLLT32]
STR_NAME :Stalen traliewerk
[WALLNT32]
STR_NAME :Tennisnetmuur
[WALLNT33]
STR_NAME :Tennisnetmuur
[WALLPOST]
STR_NAME :Paal
[WALLST16]
STR_NAME :Stalen muur
[WALLST32]
STR_NAME :Stalen muur
[WALLST8]
STR_NAME :Stalen muur
[WALLSTFN]
STR_NAME :Stalen hek
[WALLTXGT]
STR_NAME :'Texas Giant'-bord
[WALLWDPS]
STR_NAME :Hek van houten palen
[WBR2]
STR_NAME :Stenen muur
[WBR2A]
STR_NAME :Stenen muur
[WBR3]
STR_NAME :Stenen muur
[WC3]
STR_NAME :Romeinse zuilenmuur
[WC16]
STR_NAME :Besneeuwd hek
[WC17]
STR_NAME :Besneeuwde houten schutting
[WC18]
STR_NAME :Besneeuwd hek van houten palen
[WBW]
STR_NAME :Hek van botten
[WCW1]
STR_NAME :Muur van speelkaarten
[WCW2]
STR_NAME :Muur van speelkaarten
[WEW]
STR_NAME :Egyptische muur
[WFW1]
STR_NAME :Houten schutting
[WFWG]
STR_NAME :Houten schutting
[WJF]
STR_NAME :Junglehek
[WMW]
STR_NAME :Muur in Marsstijl
[WMWW]
STR_NAME :Houten hek
[WPW1]
STR_NAME :Hek van houten palen
[WPW2]
STR_NAME :Hek van houten palen
[WPW3]
STR_NAME :Houten hek
[WRW]
STR_NAME :Romeinse muur
[WRWA]
STR_NAME :Romeinse muur
[WWTW]
STR_NAME :Hoog houten hek
[WWTWA]
STR_NAME :Houten hek
##################
# Path additions #
##################

View File

@ -3924,6 +3924,27 @@ STR_5582 :Trap mouse cursor in window
STR_5583 :{COMMA1DP16}ms{POWERNEGATIVEONE}
STR_5584 :SI
STR_5585 :{SMALLFONT}{BLACK}Unlocks ride operation limits, allowing for things like {VELOCITY} lift hills
STR_5586 :Automatically open shops and stalls
STR_5587 :{SMALLFONT}{BLACK}When enabled, shops and stalls will be automatically opened after building them
STR_5588 :{SMALLFONT}{BLACK}Play with other players
STR_5589 :Notification Settings
STR_5590 :Park awards
STR_5591 :Marketing campaign has finished
STR_5592 :Park warnings
STR_5593 :Park rating warnings
STR_5594 :Ride has broken down
STR_5595 :Ride has crashed
STR_5596 :Ride warnings
STR_5597 :Ride / scenery researched
STR_5598 :Guest warnings
STR_5599 :Guest is lost
STR_5600 :Guest has left the park
STR_5601 :Guest is queuing for ride
STR_5602 :Guest is on ride
STR_5603 :Guest has left ride
STR_5604 :Guest has bought item
STR_5605 :Guest has used facility
STR_5606 :Guest has died
#####################
# Rides/attractions #

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,9 @@
- Feature: Add displaying of frames per second (FPS).
- Feature: Changing the number of trains no longer requires retesting.
- Feature: Add SI units as a new measurement system for distance / speed.
- Fix: [#2126] Ferris Wheels set to "backward rotation" stop working (original
bug)
- Feature: Update alternative font selection mechanism for all platforms.
- Feature: Allow enabling / disabling of different notifications.
- Fix: [#2126] Ferris Wheels set to "backward rotation" stop working (original bug)
- Fix: [#2449] Turning off Day/Night Circle while it is night doesn't reset back to day
0.0.3.1-beta (2015-12-04)

View File

@ -1,3 +1,9 @@
param (
[Parameter(Position = 1)]
[string]$BuildNumber = "",
[string]$GitBranch = ""
)
$path = Split-Path $Script:MyInvocation.MyCommand.Path
Write-Output "Building Windows Installer (NSIS script)";
makensis /DVERSION_INCLUDE=$path\win32.txt $path\install.nsi > $path\win32.log;
Write-Host "Building Windows Installer (NSIS script)";
makensis /DAPPV_BUILD=$BuildNumber /DAPPV_EXTRA=-$GitBranch-b$BuildNumber /DVERSION_INCLUDE=$path\win32.txt $path\install.nsi > $path\win32.log;

View File

@ -111,13 +111,9 @@ Section "!OpenRCT2" Section1
SetShellVarContext all
; Copy language files
SetOutPath "$INSTDIR\data\language\"
File ${PATH_ROOT}data\language\*.txt
; Copy data files
SetOutPath "$INSTDIR\data\"
File /r ${PATH_ROOT}data\*
File /r ${PATH_ROOT}bin\data\*
; Copy the rest of the stuff
SetOutPath "$INSTDIR\"
@ -125,13 +121,13 @@ Section "!OpenRCT2" Section1
; Copy curl ca file
File ..\..\curl-ca-bundle.crt
; Copy curl ca file
File ..\..\curl-ca-bundle.crt
; Copy text files
File ..\changelog.txt
Push "$INSTDIR\changelog.txt"
Call unix2dos
File ..\known_issues.txt
Push "$INSTDIR\known_issues.txt"
Call unix2dos
File ..\..\licence.txt
Push "$INSTDIR\licence.txt"
Call unix2dos

View File

@ -1,5 +1,5 @@
!define APPBITS 32 ; Define number of bits for the architecture
!define EXTRA_VERSION "Vista, 7, 8.1 and 10"
!define APPARCH "win32" ; Define the application architecture
!define BINARY_DIR "${PATH_ROOT}build\Release"
!define BINARY_DIR "${PATH_ROOT}bin"
InstallDir "$PROGRAMFILES32\OpenRCT2\"

View File

@ -26,4 +26,4 @@ RUN pacman -R --noconfirm gcc
RUN yes | pacman -S gcc-libs-multilib
RUN pacman -S --noconfirm gcc-multilib
USER travis
RUN yaourt -S --noconfirm lib32-jansson lib32-curl lib32-sdl2 lib32-sdl2_ttf lib32-speex
RUN yaourt -S --noconfirm lib32-jansson lib32-curl lib32-sdl2 lib32-sdl2_ttf lib32-speex lib32-fontconfig

View File

@ -104,6 +104,7 @@
<ClCompile Include="src\scenario_list.c" />
<ClCompile Include="src\windows\changelog.c" />
<ClCompile Include="src\windows\network_status.c" />
<ClCompile Include="src\windows\news_options.c" />
<ClCompile Include="src\windows\player_list.c" />
<ClCompile Include="src\windows\server_list.c" />
<ClCompile Include="src\windows\server_start.c" />
@ -376,7 +377,7 @@
<PreprocessorDefinitions>$(OpenRCT2_DEFINES);DEBUG;_CRT_SECURE_NO_WARNINGS;HAVE_CONFIG_H;_USE_MATH_DEFINES;CURL_STATICLIB;SDL_MAIN_HANDLED;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ObjectFileName>$(IntDir)fake\%(RelativeDir)</ObjectFileName>
<ObjectFileName>$(IntDir)\%(RelativeDir)</ObjectFileName>
<TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
<MinimalRebuild>false</MinimalRebuild>
</ClCompile>

View File

@ -552,12 +552,13 @@
<ClCompile Include="src\addresses.c">
<Filter>Source</Filter>
</ClCompile>
<ClCompile Include="..\src\ride\cable_lift.c">
<ClCompile Include="src\ride\cable_lift.c">
<Filter>Source\Ride</Filter>
</ClCompile>
<ClCompile Include="..\src\drawing\supports.c">
<ClCompile Include="src\drawing\supports.c">
<Filter>Source\Drawing</Filter>
</ClCompile>
<ClCompile Include="src\windows\news_options.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\management\award.h">

BIN
resources/g2/60.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -171,7 +171,7 @@ elif [[ $(uname) == "Linux" ]]; then
"linux")
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install --no-install-recommends -y --force-yes cmake libsdl2-dev:i386 libsdl2-ttf-dev:i386 gcc-4.8 pkg-config:i386 g++-4.8-multilib gcc-4.8-multilib libjansson-dev:i386 libspeex-dev:i386 libspeexdsp-dev:i386 libcurl4-openssl-dev:i386 libcrypto++-dev:i386 clang
sudo apt-get install --no-install-recommends -y --force-yes cmake libsdl2-dev:i386 libsdl2-ttf-dev:i386 gcc-4.8 pkg-config:i386 g++-4.8-multilib gcc-4.8-multilib libjansson-dev:i386 libspeex-dev:i386 libspeexdsp-dev:i386 libcurl4-openssl-dev:i386 libcrypto++-dev:i386 clang libfontconfig1-dev:i386 libfreetype6-dev:i386 libpng-dev:i386
download https://launchpad.net/ubuntu/+archive/primary/+files/libjansson4_2.7-1ubuntu1_i386.deb libjansson4_2.7-1ubuntu1_i386.deb
download https://launchpad.net/ubuntu/+archive/primary/+files/libjansson-dev_2.7-1ubuntu1_i386.deb libjansson-dev_2.7-1ubuntu1_i386.deb
sudo dpkg -i libjansson4_2.7-1ubuntu1_i386.deb

View File

@ -2,7 +2,8 @@
# Script to install the latest dependencies for OpenRCT2
#########################################################
param (
[switch]$Force
[switch]$Force,
[switch]$Quiet
)
Write-Host "Installing OpenRCT2 development environment for Windows" -ForegroundColor Cyan
@ -37,7 +38,7 @@ if ($currentLibsVersion -ge $libsVersion)
$libsPathExists = Test-Path $libsPath
if ($libsPathExists -and -not $updateLibs -and -not $Force)
{
if (Prompt-User "Dependencies already exists, reinstall?")
if (-not $Quiet -and (Prompt-User "Dependencies already exists, reinstall?"))
{
$updateLibs = $true
}

View File

@ -5,6 +5,9 @@
# - Creates a ZIP for distribution
#########################################################
param (
[Parameter(Position = 1)]
[string]$Task = "all",
[string]$Server = "",
[string]$BuildNumber = "",
[string]$GitBranch = "",
@ -20,7 +23,7 @@ Import-Module "$scriptsPath\common.psm1" -DisableNameChecking
$rootPath = Get-RootPath
# Set build attributes
function do-prepareSource()
function Do-PrepareSource()
{
Write-Host "Setting build #defines..." -ForegroundColor Cyan
if ($GitBranch -eq "")
@ -48,19 +51,21 @@ function do-prepareSource()
# Set the environment variable which the msbuild project will use
$env:OPENRCT2_DEFINES = $defineString;
return 0
}
# Building OpenRCT2
function do-build()
function Do-Build()
{
Write-Host "Building OpenRCT2..." -ForegroundColor Cyan
& "$scriptsPath\build.ps1" all -Rebuild
return $LASTEXITCODE
}
# Package
function do-package()
function Do-Package()
{
Write-Host "Publishing OpenRCT2..." -ForegroundColor Cyan
Write-Host "Publishing OpenRCT2 as zip..." -ForegroundColor Cyan
$releaseDir = "$rootPath\bin"
$distDir = "$rootPath\distribution"
$tempDir = "$rootPath\artifacts\temp"
@ -79,6 +84,8 @@ function do-package()
Copy-Item -Force "$distDir\changelog.txt" $tempDir -ErrorAction Stop
Copy-Item -Force "$distDir\known_issues.txt" $tempDir -ErrorAction Stop
Copy-Item -Force "$distDir\readme.txt" $tempDir -ErrorAction Stop
Copy-Item -Force "$rootPath\contributors.md" $tempDir -ErrorAction Stop
Copy-Item -Force "$rootPath\licence.txt" $tempDir -ErrorAction Stop
# Create archive using 7z (renowned for speed and compression)
$7zcmd = "7za"
@ -89,19 +96,25 @@ function do-package()
if (-not (AppExists($7zcmd)))
{
Write-Host "Publish script requires 7z to be in PATH" -ForegroundColor Red
exit 1
return 1
}
}
& $7zcmd a -tzip -mx9 $outZip "$tempDir\*"
& $7zcmd a -tzip -mx9 $outZip "$tempDir\*" | Write-Host
if ($LASTEXITCODE -ne 0)
{
Write-Host "Failed to create zip." -ForegroundColor Red
return 1
}
# Remove temp directory
Remove-Item -Force -Recurse $tempDir -ErrorAction SilentlyContinue
return 0
}
# Installer
function do-installer()
function Do-Installer()
{
Write-Host "Publishing OpenRCT2..." -ForegroundColor Cyan
Write-Host "Publishing OpenRCT2 as installer..." -ForegroundColor Cyan
$artifactsDir = "$rootPath\artifacts"
$installerDir = "$rootPath\distribution\windows"
@ -109,30 +122,62 @@ function do-installer()
New-Item -Force -ItemType Directory $artifactsDir > $null
# Create installer
& "$installerDir\build.ps1"
& "$installerDir\build.ps1" -BuildNumber $BuildNumber -GitBranch $GitBranch
if ($LASTEXITCODE -ne 0)
{
Write-Host "Failed to create installer." -ForegroundColor Red
exit 1
if (Test-Path -PathType Leaf "$installerDir\win32.log")
{
Get-Content "$installerDir\win32.log" | Write-Host
}
return 1
}
$binaries = (Get-ChildItem "$installerDir\*.exe" | Sort-Object -Property LastWriteTime -Descending)
if ($binaries -eq 0)
{
Write-Host "Unable to find created installer." -ForegroundColor Red
exit 1
return 1
}
Copy-Item $binaries[0].FullName $artifactsDir
Move-Item $binaries[0].FullName $artifactsDir
return 0
}
do-prepareSource
do-build
if ($Installer)
function Do-Task-Build()
{
do-installer
if (($result = (Do-PrepareSource)) -ne 0) { return $result }
if (($result = (Do-Build )) -ne 0) { return $result }
return 0
}
else
function Do-Task-Package()
{
do-package
if ($Installer)
{
if (($result = (Do-Installer)) -ne 0) { return $result }
}
else
{
if (($result = (Do-Package)) -ne 0) { return $result }
}
return 0
}
function Do-Task-All()
{
if (($result = (Do-Task-Build )) -ne 0) { return $result }
if (($result = (Do-Task-Package)) -ne 0) { return $result }
return 0
}
# Script entry point
switch ($Task)
{
"build" { $result = Do-Task-Build }
"package" { $result = Do-Task-Package }
"all" { $result = Do-Task-All }
default { Write-Host "Unknown publish task." -ForegroundColor Red
$result = 1 }
}
exit $result

View File

@ -202,6 +202,7 @@ config_property_definition _generalDefinitions[] = {
{ offsetof(general_configuration, window_scale), "window_scale", CONFIG_VALUE_TYPE_FLOAT, { .value_float = 1.0f }, NULL },
{ offsetof(general_configuration, show_fps), "show_fps", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
{ offsetof(general_configuration, trap_cursor), "trap_cursor", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
{ offsetof(general_configuration, auto_open_shops), "auto_open_shops", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
};
config_property_definition _interfaceDefinitions[] = {
@ -259,13 +260,34 @@ config_property_definition _networkDefinitions[] = {
{ offsetof(network_configuration, provider_website), "provider_website", CONFIG_VALUE_TYPE_STRING, {.value_string = NULL }, NULL }
};
config_property_definition _notificationsDefinitions[] = {
{ offsetof(notification_configuration, park_award), "park_award", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, park_marketing_campaign_finished), "park_marketing_campaign_finished", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, park_warnings), "park_warnings", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, park_rating_warnings), "park_rating_warnings", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, ride_broken_down), "ride_broken_down", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, ride_crashed), "ride_crashed", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, ride_warnings), "ride_warnings", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, ride_researched), "ride_researched", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_warnings), "guest_warnings", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_lost), "guest_lost", CONFIG_VALUE_TYPE_BOOLEAN, false, NULL },
{ offsetof(notification_configuration, guest_left_park), "guest_entered_left_park", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_queuing_for_ride), "guest_queuing_for_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_on_ride), "guest_on_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_left_ride), "guest_left_ride", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_bought_item), "guest_bought_item", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_used_facility), "guest_used_facility", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
{ offsetof(notification_configuration, guest_died), "guest_died", CONFIG_VALUE_TYPE_BOOLEAN, true, NULL },
};
config_section_definition _sectionDefinitions[] = {
{ &gConfigGeneral, "general", _generalDefinitions, countof(_generalDefinitions) },
{ &gConfigInterface, "interface", _interfaceDefinitions, countof(_interfaceDefinitions) },
{ &gConfigSound, "sound", _soundDefinitions, countof(_soundDefinitions) },
{ &gConfigCheat, "cheat", _cheatDefinitions, countof(_cheatDefinitions) },
{ &gConfigTwitch, "twitch", _twitchDefinitions, countof(_twitchDefinitions) },
{ &gConfigNetwork, "network", _networkDefinitions, countof(_networkDefinitions) }
{ &gConfigNetwork, "network", _networkDefinitions, countof(_networkDefinitions) },
{ &gConfigNotifications, "notifications", _notificationsDefinitions, countof(_notificationsDefinitions) },
};
#pragma endregion
@ -276,6 +298,7 @@ sound_configuration gConfigSound;
cheat_configuration gConfigCheat;
twitch_configuration gConfigTwitch;
network_configuration gConfigNetwork;
notification_configuration gConfigNotifications;
themes_configuration gConfigThemes;
title_sequences_configuration gConfigTitleSequences;

View File

@ -171,6 +171,7 @@ typedef struct {
float window_scale;
uint8 show_fps;
uint8 trap_cursor;
uint8 auto_open_shops;
} general_configuration;
typedef struct {
@ -228,6 +229,26 @@ typedef struct {
utf8string provider_website;
} network_configuration;
typedef struct {
bool park_award;
bool park_marketing_campaign_finished;
bool park_warnings;
bool park_rating_warnings;
bool ride_broken_down;
bool ride_crashed;
bool ride_warnings;
bool ride_researched;
bool guest_warnings;
bool guest_lost;
bool guest_left_park;
bool guest_queuing_for_ride;
bool guest_on_ride;
bool guest_left_ride;
bool guest_bought_item;
bool guest_used_facility;
bool guest_died;
} notification_configuration;
typedef struct theme_window {
uint8 colours[6];
@ -302,6 +323,7 @@ extern sound_configuration gConfigSound;
extern cheat_configuration gConfigCheat;
extern twitch_configuration gConfigTwitch;
extern network_configuration gConfigNetwork;
extern notification_configuration gConfigNotifications;
extern themes_configuration gConfigThemes;
extern title_sequences_configuration gConfigTitleSequences;

View File

@ -23,6 +23,7 @@ enum {
typedef struct {
const utf8 *filename;
const utf8 *font_name;
int ptSize;
int offset_x;
int offset_y;

View File

@ -888,8 +888,11 @@ bool ttf_initialise()
for (int i = 0; i < 4; i++) {
TTFFontDescriptor *fontDesc = &(gCurrentTTFFontSet->size[i]);
utf8 fontPath[MAX_PATH] = "C:\\Windows\\Fonts\\";
strcat(fontPath, fontDesc->filename);
utf8 fontPath[MAX_PATH];
if (!platform_get_font_path(fontDesc, fontPath)) {
log_error("Unable to load font '%s'", fontDesc->font_name);
return false;
}
fontDesc->font = TTF_OpenFont(fontPath, fontDesc->ptSize);
if (fontDesc->font == NULL) {

View File

@ -746,7 +746,7 @@ static void editor_load_selected_objects_console()
static int cc_load_object(const utf8 **argv, int argc) {
if (argc > 0) {
utf8 path[260];
utf8 path[MAX_PATH];
substitute_path(path, RCT2_ADDRESS(RCT2_ADDRESS_OBJECT_DATA_PATH, char), argv[0]);
// Require pointer to start of filename

View File

@ -36,7 +36,7 @@ static void graph_draw_months_uint8(rct_drawpixelinfo *dpi, uint8 *history, int
if (history[i] != 0 && history[i] != 255 && yearOver32 % 4 == 0) {
// Draw month text
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = ((yearOver32 / 4) + 8) % 8 + STR_MONTH_SHORT_MAR;
gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, (void*)0x013CE952);
gfx_draw_string_centred(dpi, 2222, x, y - 10, 0, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS);
// Draw month mark
gfx_fill_rect(dpi, x, y, x, y + 3, 10);

View File

@ -57,7 +57,7 @@ void screenshot_check()
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
// RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_SCR_BMP;
// RCT2_GLOBAL(0x013CE952 + 2, uint16) = screenshotIndex;
// RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = screenshotIndex;
RCT2_GLOBAL(0x009A8C29, uint8) |= 1;
window_error_open(STR_SCREENSHOT_SAVED_AS, -1);

View File

@ -440,7 +440,7 @@ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widge
gfx_draw_string_left_clipped(
dpi,
stringId,
(void*)0x013CE952,
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
colour,
l + 1,
t,
@ -453,7 +453,7 @@ static void widget_text_unknown(rct_drawpixelinfo *dpi, rct_window *w, int widge
gfx_draw_string_centred_clipped(
dpi,
stringId,
(void*)0x013CE952,
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
colour,
(w->x + w->x + widget->left + widget->right + 1) / 2 - 1,
t,
@ -489,7 +489,7 @@ static void widget_text(rct_drawpixelinfo *dpi, rct_window *w, int widgetIndex)
if (widget_is_disabled(w, widgetIndex))
colour |= 0x40;
gfx_draw_string_left(dpi, widget->image, (void*)0x013CE952, colour, l + 1, t);
gfx_draw_string_left(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l + 1, t);
}
/**
@ -576,7 +576,7 @@ static void widget_groupbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
colour = w->colours[widget->colour] & 0x7F;
if (widget_is_disabled(w, widgetIndex))
colour |= 0x40;
gfx_draw_string_left(dpi, widget->image, (void*)0x013CE952, colour, l, t);
gfx_draw_string_left(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l, t);
textRight = l + gfx_get_string_width((char*)RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER) + 1;
}
@ -679,7 +679,7 @@ static void widget_caption_draw(rct_drawpixelinfo *dpi, rct_window *w, int widge
width -= 10;
}
l += width / 2;
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)0x013CE952, 34, l, t, width);
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 34, l, t, width);
}
/**
@ -723,7 +723,7 @@ static void widget_closebox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
if (widget_is_disabled(w, widgetIndex))
colour |= 0x40;
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)0x013CE952, colour, l, t, widget->right - widget->left - 2);
gfx_draw_string_centred_clipped(dpi, widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l, t, widget->right - widget->left - 2);
}
/**
@ -767,7 +767,7 @@ static void widget_checkbox_draw(rct_drawpixelinfo *dpi, rct_window *w, int widg
colour |= 0x40;
}
gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, (void*)0x013CE952, colour, l + 14, yMid);
gfx_draw_string_left_centred(dpi, (rct_string_id)widget->image, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, colour, l + 14, yMid);
}
/**

View File

@ -264,7 +264,7 @@ typedef struct rct_window {
uint16 frame_no; // 0x48E updated every tic for motion in windows sprites
uint16 list_information_type; // 0x490 0 for none, Used as current position of marquee in window_peep
sint16 var_492;
uint32 var_494;
uint32 highlighted_item; // 0x494
uint8 var_498[0x14];
sint16 selected_tab; // 0x4AC
sint16 var_4AE;
@ -434,6 +434,7 @@ enum {
WC_TRACK_DELETE_PROMPT = 48,
WC_INSTALL_TRACK = 49,
WC_CLEAR_SCENERY = 50,
WC_NOTIFICATION_OPTIONS = 109,
WC_CHEATS = 110,
WC_RESEARCH = 111,
WC_VIEWPORT = 112,
@ -627,6 +628,7 @@ void window_install_track_open(const char* path);
void window_banner_open(rct_windownumber number);
void window_sign_open(rct_windownumber number);
void window_sign_small_open(rct_windownumber number);
void window_news_options_open();
void window_cheats_open();
void window_player_list_open();
void window_network_status_open(const char* text);

View File

@ -48,31 +48,31 @@ enum {
};
static TTFFontSetDescriptor TTFFontMingLiu = {{
{ "msjh.ttc", 9, -1, -3, 6, nullptr },
{ "mingliu.ttc", 11, 1, 1, 12, nullptr },
{ "mingliu.ttc", 12, 1, 0, 12, nullptr },
{ "mingliu.ttc", 13, 1, 0, 20, nullptr },
{ "msjh.ttc", "JhengHei", 9, -1, -3, 6, nullptr },
{ "mingliu.ttc", "MingLiU", 11, 1, 1, 12, nullptr },
{ "mingliu.ttc", "MingLiU", 12, 1, 0, 12, nullptr },
{ "mingliu.ttc", "MingLiU", 13, 1, 0, 20, nullptr },
}};
static TTFFontSetDescriptor TTFFontSimSun = {{
{ "msyh.ttc", 9, -1, -3, 6, nullptr },
{ "simsun.ttc", 11, 1, -1, 14, nullptr },
{ "simsun.ttc", 12, 1, -2, 14, nullptr },
{ "simsun.ttc", 13, 1, 0, 20, nullptr },
{ "msyh.ttc", "YaHei", 9, -1, -3, 6, nullptr },
{ "simsun.ttc", "SimSun", 11, 1, -1, 14, nullptr },
{ "simsun.ttc", "SimSun", 12, 1, -2, 14, nullptr },
{ "simsun.ttc", "SimSun", 13, 1, 0, 20, nullptr },
}};
static TTFFontSetDescriptor TTFFontGulim = {{
{ "gulim.ttc", 11, 1, 0, 15, nullptr },
{ "gulim.ttc", 12, 1, 0, 17, nullptr },
{ "gulim.ttc", 12, 1, 0, 17, nullptr },
{ "gulim.ttc", 13, 1, 0, 20, nullptr },
{ "gulim.ttc", "Gulim", 11, 1, 0, 15, nullptr },
{ "gulim.ttc", "Gulim", 12, 1, 0, 17, nullptr },
{ "gulim.ttc", "Gulim", 12, 1, 0, 17, nullptr },
{ "gulim.ttc", "Gulim", 13, 1, 0, 20, nullptr },
}};
static TTFFontSetDescriptor TTFFontArial = {{
{ "arial.ttf", 8, 0, -1, 6, nullptr },
{ "arial.ttf", 10, 0, -1, 12, nullptr },
{ "arial.ttf", 11, 0, -1, 12, nullptr },
{ "arial.ttf", 12, 0, -1, 20, nullptr },
{ "arial.ttf", "Arial", 8, 0, -1, 6, nullptr },
{ "arial.ttf", "Arial", 10, 0, -1, 12, nullptr },
{ "arial.ttf", "Arial", 11, 0, -1, 12, nullptr },
{ "arial.ttf", "Arial", 12, 0, -1, 20, nullptr },
}};
const language_descriptor LanguagesDescriptors[LANGUAGE_COUNT] = {
@ -173,10 +173,18 @@ int language_open(int id)
ttf_dispose();
gUseTrueTypeFont = true;
gCurrentTTFFontSet = LanguagesDescriptors[id].font;
if (!ttf_initialise()) {
log_warning("Unable to initialise TrueType fonts.");
bool font_initialised = ttf_initialise();
// Fall back to sprite font
// Have we tried Arial yet?
if (!font_initialised && gCurrentTTFFontSet != &TTFFontArial) {
log_warning("Unable to initialise prefered TrueType font -- falling back to Arial.");
gCurrentTTFFontSet = &TTFFontArial;
font_initialised = ttf_initialise();
}
// Fall back to sprite font.
if (!font_initialised) {
log_warning("Falling back to sprite font.");
gUseTrueTypeFont = false;
gCurrentTTFFontSet = nullptr;
return 0;

View File

@ -868,8 +868,16 @@ enum {
STR_CONTINUE_SAVED_GAME_TIP = 1922,
STR_SHOW_TUTORIAL_TIP = 1923,
STR_EXIT = 1924,
STR_RIDE_HAS_CRASHED = 1928,
STR_RIDE_IS_BROKEN_DOWN = 1927,
STR_RIDE_HAS_CRASHED = 1928,
STR_RIDE_IS_STILL_NOT_FIXED = 1929,
STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X = 1931,
STR_PEEP_TRACKING_PEEP_IS_ON_X = 1932,
STR_PEEP_TRACKING_PEEP_IS_IN_X = 1933,
STR_PEEP_TRACKING_LEFT_RIDE_X = 1934,
STR_PEEP_TRACKING_LEFT_PARK = 1935,
STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X = 1936,
STR_SHOW_SUBJECT_TIP = 1937,
@ -1134,6 +1142,9 @@ enum {
STR_CANT_DEMOLISH_RIDE = 2248,
STR_NEWS_ITEM_RESEARCH_NEW_RIDE_AVAILABLE = 2249,
STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE = 2250,
STR_CAN_ONLY_BE_BUILT_ACROSS_PATHS = 2252,
STR_RESEARCH_TRANSPORT_RIDES = 2253,
@ -1222,6 +1233,8 @@ enum {
STR_METRIC = 2345,
STR_DISPLAY = 2346,
STR_NEWS_ITEM_GUEST_DROWNED = 2347,
STR_STAFF_STATS_TIP = 2348,
//STR_UNITS = 2358,
@ -2155,6 +2168,9 @@ enum {
STR_KICK_PLAYER = 5556,
STR_STAY_CONNECTED_AFTER_DESYNC = 5557,
STR_AUTO_OPEN_SHOPS = 5586,
STR_AUTO_OPEN_SHOPS_TIP = 5587,
STR_RESTART_REQUIRED = 5558,
STR_LANGUAGE_LOAD_FAILED = 5561,
@ -2192,6 +2208,27 @@ enum {
STR_CHEAT_UNLOCK_OPERATING_LIMITS_TIP = 5585,
STR_SHOW_MULTIPLAYER_TIP = 5588,
STR_NOTIFICATION_SETTINGS = 5589,
STR_NOTIFICATION_PARK_AWARD = 5590,
STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED = 5591,
STR_NOTIFICATION_PARK_WARNINGS = 5592,
STR_NOTIFICATION_PARK_RATING_WARNINGS = 5593,
STR_NOTIFICATION_RIDE_BROKEN_DOWN = 5594,
STR_NOTIFICATION_RIDE_CRASHED = 5595,
STR_NOTIFICATION_RIDE_WARNINGS = 5596,
STR_NOTIFICATION_RIDE_RESEARCHED = 5597,
STR_NOTIFICATION_GUEST_WARNINGS = 5598,
STR_NOTIFICATION_GUEST_LOST = 5599,
STR_NOTIFICATION_GUEST_LEFT_PARK = 5600,
STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE = 5601,
STR_NOTIFICATION_GUEST_ON_RIDE = 5602,
STR_NOTIFICATION_GUEST_LEFT_RIDE = 5603,
STR_NOTIFICATION_GUEST_BOUGHT_ITEM = 5604,
STR_NOTIFICATION_GUEST_USED_FACILITY = 5605,
STR_NOTIFICATION_GUEST_DIED = 5606,
// Have to include resource strings (from scenarios and objects) for the time being now that language is partially working
STR_COUNT = 32768
};

View File

@ -19,6 +19,7 @@
*****************************************************************************/
#include "../addresses.h"
#include "../config.h"
#include "../interface/window.h"
#include "../localisation/localisation.h"
#include "../peep/peep.h"
@ -619,7 +620,9 @@ void award_update_all()
// Add award
gCurrentAwards[freeAwardEntryIndex].type = awardType;
gCurrentAwards[freeAwardEntryIndex].time = 5;
news_item_add_to_queue(NEWS_ITEM_AWARD, STR_NEWS_ITEM_AWARD_MOST_UNTIDY + awardType, 0);
if (gConfigNotifications.park_award) {
news_item_add_to_queue(NEWS_ITEM_AWARD, STR_NEWS_ITEM_AWARD_MOST_UNTIDY + awardType, 0);
}
window_invalidate_by_class(WC_PARK_INFORMATION);
}
}

View File

@ -19,6 +19,7 @@
*****************************************************************************/
#include "../addresses.h"
#include "../config.h"
#include "../game.h"
#include "../interface/window.h"
#include "../localisation/localisation.h"
@ -100,7 +101,9 @@ void marketing_update()
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[campaignItem].plural;
}
news_item_add_to_queue(NEWS_ITEM_MONEY, STR_MARKETING_FINISHED_BASE + campaign, 0);
if (gConfigNotifications.park_marketing_campaign_finished) {
news_item_add_to_queue(NEWS_ITEM_MONEY, STR_MARKETING_FINISHED_BASE + campaign, 0);
}
}
}

View File

@ -301,7 +301,7 @@ void news_item_get_subject_location(int type, int subject, int *x, int *y, int *
void news_item_add_to_queue(uint8 type, rct_string_id string_id, uint32 assoc)
{
utf8 *buffer = (char*)0x0141EF68;
void *args = (void*)0x013CE952;
void *args = (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS;
format_string(buffer, string_id, args); // overflows possible?
news_item_add_to_queue_raw(type, buffer, assoc);

View File

@ -19,9 +19,11 @@
*****************************************************************************/
#include "../addresses.h"
#include "../config.h"
#include "../game.h"
#include "../interface/window.h"
#include "../localisation/date.h"
#include "../localisation/string_ids.h"
#include "../management/finance.h"
#include "../scenario.h"
#include "../rct1.h"
@ -202,8 +204,11 @@ void research_finish_item(sint32 entryIndex)
if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = ((rideEntry->flags & RIDE_ENTRY_FLAG_SEPARATE_RIDE_NAME)) ?
rideEntry->name : base_ride_type + 2;
if (!gSilentResearch)
news_item_add_to_queue(NEWS_ITEM_RESEARCH, 2249, entryIndex);
if (!gSilentResearch) {
if (gConfigNotifications.ride_researched) {
news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_RIDE_AVAILABLE, entryIndex);
}
}
}
research_invalidate_related_windows();
@ -218,8 +223,11 @@ void research_finish_item(sint32 entryIndex)
// I don't think 0x009AC06C is ever not 0, so probably redundant
if (RCT2_GLOBAL(0x009AC06C, uint8) == 0) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, rct_string_id) = scenerySetEntry->name;
if (!gSilentResearch)
news_item_add_to_queue(NEWS_ITEM_RESEARCH, 2250, entryIndex);
if (!gSilentResearch) {
if (gConfigNotifications.ride_researched) {
news_item_add_to_queue(NEWS_ITEM_RESEARCH, STR_NEWS_ITEM_RESEARCH_NEW_SCENERY_SET_AVAILABLE, entryIndex);
}
}
}
research_invalidate_related_windows();

View File

@ -921,7 +921,7 @@ void Network::AdvertiseHeartbeat()
json_object_set_new(body, "players", json_integer(network_get_num_players()));
json_t *gameInfo = json_object();
json_object_set_new(gameInfo, "mapSize", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint8) - 2));
json_object_set_new(gameInfo, "mapSize", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_MINUS_2, sint16)));
json_object_set_new(gameInfo, "day", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_TICKS, uint16)));
json_object_set_new(gameInfo, "month", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16)));
json_object_set_new(gameInfo, "guests", json_integer(RCT2_GLOBAL(RCT2_ADDRESS_GUESTS_IN_PARK, uint16)));

View File

@ -92,6 +92,10 @@ void openrct2_write_full_version_info(utf8 *buffer, size_t bufferSize)
if (!str_is_null_or_empty(OPENRCT2_BUILD_SERVER)) {
sprintf(strchr(buffer, 0), " provided by %s", OPENRCT2_BUILD_SERVER);
}
#if DEBUG
sprintf(strchr(buffer, 0), " (DEBUG)");
#endif
}
static void openrct2_copy_files_over(const utf8 *originalDirectory, const utf8 *newDirectory, const utf8 *extension)

View File

@ -22,6 +22,7 @@
#define _OPENRCT2_H_
#include "common.h"
#include "platform/platform.h"
enum {
STARTUP_ACTION_INTRO,

View File

@ -1327,11 +1327,13 @@ void peep_update_falling(rct_peep* peep){
peep_update_action(&x, &y, &xy_distance, peep);
if (peep->action == PEEP_ACTION_DROWNING) return;
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & 0x80000)){
if (gConfigNotifications.guest_died) {
RCT2_GLOBAL(0x13CE952, uint16) = peep->name_string_idx;
RCT2_GLOBAL(0x13CE954, uint32) = peep->id;
news_item_add_to_queue(NEWS_ITEM_BLANK, 2347, peep->x | (peep->y << 16));
news_item_add_to_queue(NEWS_ITEM_BLANK, STR_NEWS_ITEM_GUEST_DROWNED, peep->x | (peep->y << 16));
}
RCT2_GLOBAL(0x135882E, uint16) += 25;
if (RCT2_GLOBAL(0x135882E, uint16) > 1000){
RCT2_GLOBAL(0x135882E, uint16) = 1000;
@ -2120,11 +2122,13 @@ static void peep_update_ride_sub_state_2_enter_ride(rct_peep* peep, rct_ride* ri
rct_string_id msg_string;
if (RCT2_ADDRESS(RCT2_ADDRESS_RIDE_FLAGS, uint32)[ride->type * 2] & RIDE_TYPE_FLAG_IN_RIDE)
msg_string = 1932;
msg_string = STR_PEEP_TRACKING_PEEP_IS_IN_X;
else
msg_string = 1933;
msg_string = STR_PEEP_TRACKING_PEEP_IS_ON_X;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, msg_string, peep->sprite_index);
if (gConfigNotifications.guest_on_ride) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, msg_string, peep->sprite_index);
}
}
if (ride->type == RIDE_TYPE_SPIRAL_SLIDE){
@ -3169,7 +3173,9 @@ static void peep_update_ride_sub_state_18(rct_peep* peep){
RCT2_GLOBAL(0x13CE958, uint16) = ride->name;
RCT2_GLOBAL(0x13CE95A, uint32) = ride->name_arguments;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, 1934, peep->sprite_index);
if (gConfigNotifications.guest_left_ride) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_RIDE_X, peep->sprite_index);
}
}
peep->var_79 = 0xFF;
@ -5264,52 +5270,68 @@ void peep_problem_warnings_update()
--warning_throttle[0];
else if ( hunger_counter >= PEEP_HUNGER_WARNING_THRESHOLD && hunger_counter >= guests_in_park / 16) {
warning_throttle[0] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_HUNGRY, 20);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_HUNGRY, 20);
}
}
if (warning_throttle[1])
--warning_throttle[1];
else if (thirst_counter >= PEEP_THIRST_WARNING_THRESHOLD && thirst_counter >= guests_in_park / 16) {
warning_throttle[1] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_THIRSTY, 21);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_ARE_THIRSTY, 21);
}
}
if (warning_throttle[2])
--warning_throttle[2];
else if (bathroom_counter >= PEEP_BATHROOM_WARNING_THRESHOLD && bathroom_counter >= guests_in_park / 16) {
warning_throttle[2] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_CANT_FIND_BATHROOM, 22);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_CANT_FIND_BATHROOM, 22);
}
}
if (warning_throttle[3])
--warning_throttle[3];
else if (litter_counter >= PEEP_LITTER_WARNING_THRESHOLD && litter_counter >= guests_in_park / 32) {
warning_throttle[3] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_LITTER, 26);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_LITTER, 26);
}
}
if (warning_throttle[4])
--warning_throttle[4];
else if (disgust_counter >= PEEP_DISGUST_WARNING_THRESHOLD && disgust_counter >= guests_in_park / 32) {
warning_throttle[4] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISGUSTED_BY_PATHS, 31);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISGUSTED_BY_PATHS, 31);
}
}
if (warning_throttle[5])
--warning_throttle[5];
else if (vandalism_counter >= PEEP_VANDALISM_WARNING_THRESHOLD && vandalism_counter >= guests_in_park / 32) {
warning_throttle[5] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_VANDALISM, 33);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_DISLIKE_VANDALISM, 33);
}
}
if (warning_throttle[6])
--warning_throttle[6];
else if (noexit_counter >= PEEP_NOEXIT_WARNING_THRESHOLD) {
warning_throttle[6] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 27);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 27);
}
} else if (lost_counter >= PEEP_LOST_WARNING_THRESHOLD) {
warning_throttle[6] = 4;
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 16);
if (gConfigNotifications.guest_warnings) {
news_item_add_to_queue(NEWS_ITEM_PEEPS, STR_PEEPS_GETTING_LOST_OR_STUCK, 16);
}
}
}
@ -6297,7 +6319,9 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m
RCT2_GLOBAL(0x0013CE954, uint32) = peep->id;
RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name;
RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, 1931, peep->sprite_index);
if (gConfigNotifications.guest_queuing_for_ride) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index);
}
}
return 1;
}
@ -6339,7 +6363,9 @@ static int peep_interact_with_entrance(rct_peep* peep, sint16 x, sint16 y, rct_m
if (peep->flags & PEEP_FLAGS_TRACKING){
RCT2_GLOBAL(0x0013CE952, rct_string_id) = peep->name_string_idx;
RCT2_GLOBAL(0x0013CE954, uint32) = peep->id;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, 1935, peep->sprite_index);
if (gConfigNotifications.guest_left_park) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_LEFT_PARK, peep->sprite_index);
}
}
return 1;
}
@ -6674,7 +6700,9 @@ static int peep_interact_with_path(rct_peep* peep, sint16 x, sint16 y, rct_map_e
RCT2_GLOBAL(0x0013CE954, uint32) = peep->id;
RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name;
RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, 1931, peep->sprite_index);
if (gConfigNotifications.guest_queuing_for_ride) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, STR_PEEP_TRACKING_PEEP_JOINED_QUEUE_FOR_X, peep->sprite_index);
}
}
return peep_footpath_move_forward(peep, x, y, map_element, vandalism_present);
@ -6746,7 +6774,9 @@ static int peep_interact_with_shop(rct_peep* peep, sint16 x, sint16 y, rct_map_e
RCT2_GLOBAL(0x0013CE958, rct_string_id) = ride->name;
RCT2_GLOBAL(0x0013CE95A, uint32) = ride->name_arguments;
rct_string_id string_id = ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IN_RIDE) ? 1933 : 1932;
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, string_id, peep->sprite_index);
if (gConfigNotifications.guest_used_facility) {
news_item_add_to_queue(NEWS_ITEM_PEEP_ON_RIDE, string_id, peep->sprite_index);
}
}
return 1;
}
@ -8287,7 +8317,9 @@ loc_69B221:
RCT2_GLOBAL(0x13CE952,uint16) = peep->name_string_idx;
RCT2_GLOBAL((0x13CE952 + 2), uint32) = peep->id;
RCT2_GLOBAL((0x13CE956 + 2), uint16) = (shopItem >= 32 ? STR_SHOP_ITEM_INDEFINITE_PHOTO2 + (shopItem - 32) : STR_SHOP_ITEM_INDEFINITE_BALLOON + shopItem);
news_item_add_to_queue(2, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, peep->sprite_index);
if (gConfigNotifications.guest_bought_item) {
news_item_add_to_queue(2, STR_PEEP_TRACKING_NOTIFICATION_BOUGHT_X, peep->sprite_index);
}
}
if (shop_item_is_food(shopItem))

View File

@ -24,6 +24,7 @@
#include <dlfcn.h>
#include <stdlib.h>
#include "../util/util.h"
#include "fontconfig/fontconfig.h"
// See http://syprog.blogspot.ru/2011/12/listing-loaded-shared-objects-in-linux.html
struct lmap {
@ -163,4 +164,46 @@ int platform_open_common_file_dialog(int type, utf8 *title, utf8 *filename, utf8
return 0;
}
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer)
{
assert(buffer != NULL);
assert(font != NULL);
log_verbose("Looking for font %s with FontConfig.", font->font_name);
FcConfig* config = FcInitLoadConfigAndFonts();
if (!config)
{
log_error("Failed to initialize FontConfig library");
FcFini();
return false;
}
FcPattern* pat = FcNameParse((const FcChar8*) font->font_name);
FcConfigSubstitute(config, pat, FcMatchPattern);
FcDefaultSubstitute(pat);
bool found = false;
FcResult result = FcResultNoMatch;
FcPattern* match = FcFontMatch(config, pat, &result);
if (match)
{
FcChar8* filename = NULL;
if (FcPatternGetString(match, FC_FILE, 0, &filename) == FcResultMatch)
{
found = true;
safe_strncpy(buffer, (utf8*) filename, MAX_PATH);
log_verbose("FontConfig provided font %s", filename);
}
FcPatternDestroy(match);
} else {
log_warning("Failed to find required font.");
}
FcPatternDestroy(pat);
FcConfigDestroy(config);
FcFini();
return found;
}
#endif

View File

@ -172,4 +172,20 @@ int platform_open_common_file_dialog(int type, utf8 *title, utf8 *filename, utf8
}
}
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer)
{
@autoreleasepool
{
CTFontDescriptorRef fontRef = CTFontDescriptorCreateWithNameAndSize((CFStringRef)[NSString stringWithUTF8String:font->font_name], 0.0);
CFURLRef url = (CFURLRef)CTFontDescriptorCopyAttribute(fontRef, kCTFontURLAttribute);
if (url) {
NSString *fontPath = [NSString stringWithString:[(NSURL *)CFBridgingRelease(url) path]];
strcpy(buffer, fontPath.UTF8String);
return true;
} else {
return false;
}
}
}
#endif

View File

@ -28,6 +28,7 @@
#include <SDL.h>
#include "../common.h"
#include "../drawing/font.h"
#ifndef MAX_PATH
#define MAX_PATH 260
@ -161,6 +162,7 @@ uint8 platform_get_locale_currency();
uint16 platform_get_locale_language();
uint8 platform_get_locale_measurement_format();
uint8 platform_get_locale_temperature_format();
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer);
bool platform_check_steam_overlay_attached();

View File

@ -443,7 +443,7 @@ void platform_process_messages()
SDL_RestoreWindow(gWindow);
SDL_MaximizeWindow(gWindow);
}
if (SDL_GetWindowFlags(gWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP) {
if ((SDL_GetWindowFlags(gWindow) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN_DESKTOP) {
SDL_RestoreWindow(gWindow);
SDL_SetWindowFullscreen(gWindow, SDL_WINDOW_FULLSCREEN_DESKTOP);
}

View File

@ -897,4 +897,36 @@ void platform_get_exe_path(utf8 *outPath)
_wfullpath(exePath, tempPath, MAX_PATH);
WideCharToMultiByte(CP_UTF8, 0, exePath, countof(exePath), outPath, MAX_PATH, NULL, NULL);
}
bool platform_get_font_path(TTFFontDescriptor *font, utf8 *buffer)
{
#ifndef __MINGW32__
wchar_t *fontFolder;
if (SUCCEEDED(SHGetKnownFolderPath(&FOLDERID_Fonts, 0, NULL, &fontFolder)))
{
// Convert wchar to utf8, then copy the font folder path to the buffer.
utf8 *outPathTemp = widechar_to_utf8(fontFolder);
strcpy(buffer, outPathTemp);
free(outPathTemp);
CoTaskMemFree(fontFolder);
// Append the requested font's file name.
const char separator[2] = { platform_get_path_separator(), 0 };
strcat(buffer, separator);
strcat(buffer, font->filename);
return true;
}
else
{
return false;
}
#else
log_warning("MINGW-compatibility hack: falling back to C:\\Windows\\Fonts");
strcat(buffer, "C:\\Windows\\Fonts\\");
strcat(buffer, font->filename);
return true;
#endif
}
#endif

View File

@ -139,9 +139,6 @@ typedef fixed32_1dp money32;
#define MONEY_FREE MONEY(0,00)
#define MONEY32_UNDEFINED ((money32)0x80000000)
#ifndef MAX_PATH
#define MAX_PATH 260
#endif
typedef void (EMPTY_ARGS_VOID_POINTER)();
typedef unsigned short rct_string_id;

View File

@ -812,15 +812,15 @@ void reset_all_ride_build_dates()
static int ride_check_if_construction_allowed(rct_ride *ride)
{
if (ride->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN) {
RCT2_GLOBAL(0x013CE952 + 6, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments;
window_error_open(STR_CANT_START_CONSTRUCTION_ON, STR_HAS_BROKEN_DOWN_AND_REQUIRES_FIXING);
return 0;
}
if (ride->status != RIDE_STATUS_CLOSED) {
RCT2_GLOBAL(0x013CE952 + 6, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments;
window_error_open(STR_CANT_START_CONSTRUCTION_ON, STR_MUST_BE_CLOSED_FIRST);
return 0;
}
@ -1667,8 +1667,8 @@ int ride_modify(rct_xy_element *input)
return 0;
if (ride->lifecycle_flags & RIDE_LIFECYCLE_INDESTRUCTIBLE) {
RCT2_GLOBAL(0x013CE952 + 6, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments;
window_error_open(STR_CANT_START_CONSTRUCTION_ON, STR_LOCAL_AUTHORITY_FORBIDS_DEMOLITION_OR_MODIFICATIONS_TO_THIS_RIDE);
return 0;
}
@ -2300,7 +2300,9 @@ void ride_breakdown_add_news_item(int rideIndex)
RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments;
news_item_add_to_queue(NEWS_ITEM_RIDE, 1927, rideIndex);
if (gConfigNotifications.ride_broken_down) {
news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_BROKEN_DOWN, rideIndex);
}
}
/**
@ -2324,7 +2326,9 @@ static void ride_breakdown_status_update(int rideIndex)
) {
RCT2_GLOBAL(0x0013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x0013CE952 + 2, uint32) = ride->name_arguments;
news_item_add_to_queue(NEWS_ITEM_RIDE, 1929, rideIndex);
if (gConfigNotifications.ride_warnings) {
news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_IS_STILL_NOT_FIXED, rideIndex);
}
}
}
@ -2890,7 +2894,7 @@ rct_ride_measurement *ride_get_measurement(int rideIndex, rct_string_id *message
return measurement;
} else {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RideNameConvention[ride->type].vehicle_name;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = RideNameConvention[ride->type].station_name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = RideNameConvention[ride->type].station_name;
if (message != NULL) *message = STR_DATA_LOGGING_WILL_START_WHEN_NEXT_LEAVES;
return NULL;
}
@ -3049,7 +3053,9 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx)
// name of ride is parameter of the format string
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name;
RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments;
if (gConfigNotifications.ride_warnings) {
news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx);
}
ride->connected_message_throttle = 3;
}
@ -3057,7 +3063,9 @@ static void ride_entrance_exit_connected(rct_ride* ride, int ride_idx)
// name of ride is parameter of the format string
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name;
RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments;
if (gConfigNotifications.ride_warnings) {
news_item_add_to_queue(1, STR_EXIT_NOT_CONNECTED, ride_idx);
}
ride->connected_message_throttle = 3;
}
@ -3123,7 +3131,9 @@ static void ride_shop_connected(rct_ride* ride, int ride_idx)
// Name of ride is parameter of the format string
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name;
RCT2_GLOBAL(0x013CE954, uint32) = ride->name_arguments;
if (gConfigNotifications.ride_warnings) {
news_item_add_to_queue(1, STR_ENTRANCE_NOT_CONNECTED, ride_idx);
}
ride->connected_message_throttle = 3;
}
@ -7342,8 +7352,10 @@ void ride_crash(uint8 rideIndex, uint8 vehicleIndex)
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, rct_string_id) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
if (gConfigNotifications.ride_crashed) {
news_item_add_to_queue(NEWS_ITEM_RIDE, STR_RIDE_HAS_CRASHED, rideIndex);
}
}
bool ride_type_is_intamin(int rideType)
{

View File

@ -511,7 +511,9 @@ void scenario_entrance_fee_too_high_check()
}
packed_xy = (y << 16) | x;
news_item_add_to_queue(NEWS_ITEM_BLANK, STR_ENTRANCE_FEE_TOO_HI, packed_xy);
if (gConfigNotifications.park_warnings) {
news_item_add_to_queue(NEWS_ITEM_BLANK, STR_ENTRANCE_FEE_TOO_HI, packed_xy);
}
}
}
@ -1330,13 +1332,21 @@ static void scenario_objective_check_guests_and_rating()
if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_PARK_RATING, uint16) < 700 && RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16) >= 1) {
RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16)++;
if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 1) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0);
if (gConfigNotifications.park_rating_warnings) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_4_WEEKS_REMAINING, 0);
}
} else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 8) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0);
if (gConfigNotifications.park_rating_warnings) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_3_WEEKS_REMAINING, 0);
}
} else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 15) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0);
if (gConfigNotifications.park_rating_warnings) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_2_WEEKS_REMAINING, 0);
}
} else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 22) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0);
if (gConfigNotifications.park_rating_warnings) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_RATING_WARNING_1_WEEK_REMAINING, 0);
}
} else if (RCT2_GLOBAL(RCT2_ADDRESS_PARK_RATING_WARNING_DAYS, uint16) == 29) {
news_item_add_to_queue(NEWS_ITEM_GRAPH, STR_PARK_HAS_BEEN_CLOSED_DOWN, 0);
RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) &= ~PARK_FLAGS_PARK_OPEN;

View File

@ -192,7 +192,7 @@ enum {
SPR_TAB_RIDE_14 = SPR_TAB_RIDE_0 + 14,
SPR_TAB_RIDE_15 = SPR_TAB_RIDE_0 + 15,
STR_TAB_PARK = 5466,
SPR_TAB_PARK = 5466,
SPR_AWARD_MOST_UNTIDY = 5469,
SPR_MOST_TIDY = SPR_AWARD_MOST_UNTIDY + 1,
@ -393,6 +393,7 @@ enum {
SPR_G2_TAB_NEWS = SPR_G2_BEGIN + 58,
SPR_G2_LOCKED = SPR_G2_BEGIN + 59,
SPR_G2_MENU_MULTIPLAYER = SPR_G2_BEGIN + 60,
};
#endif

View File

@ -1166,7 +1166,7 @@ static void window_cheats_draw_tab_images(rct_drawpixelinfo *dpi, rct_window *w)
// Misc tab
if (!(w->disabled_widgets & (1 << WIDX_TAB_3))) {
sprite_idx = STR_TAB_PARK;
sprite_idx = SPR_TAB_PARK;
gfx_draw_sprite(dpi, sprite_idx, w->x + w->widgets[WIDX_TAB_3].left, w->y + w->widgets[WIDX_TAB_3].top, 0);
}

View File

@ -155,7 +155,7 @@ static rct_window_event_list window_editor_inventions_list_drag_events = {
rct_research_item *_editorInventionsListDraggedItem;
#define WindowHighlightedItem(w) *((rct_research_item**)&(w->var_494))
#define WindowHighlightedItem(w) *((rct_research_item**)&(w->highlighted_item))
static void window_editor_inventions_list_drag_open(rct_research_item *researchItem);
static void move_research_item(rct_research_item *beforeItem);

View File

@ -419,7 +419,7 @@ void window_editor_object_selection_open()
window->var_4AE = 0;
window->selected_tab = 0;
window->selected_list_item = -1;
window->var_494 = 0xFFFFFFFF;
window->highlighted_item = 0xFFFFFFFF;
window->min_width = 600;
window->min_height = 400;
window->max_width = 1200;
@ -836,7 +836,7 @@ static void window_editor_object_selection_mouseup(rct_window *w, int widgetInde
visible_list_refresh(w);
w->selected_list_item = -1;
w->var_494 = 0xFFFFFFFF;
w->highlighted_item = 0xFFFFFFFF;
w->scrolls[0].v_top = 0;
object_free_scenario_text();
window_invalidate(w);
@ -856,7 +856,7 @@ static void window_editor_object_selection_mouseup(rct_window *w, int widgetInde
visible_list_refresh(w);
w->selected_list_item = -1;
w->var_494 = 0xFFFFFFFF;
w->highlighted_item = 0xFFFFFFFF;
w->scrolls[0].v_top = 0;
object_free_scenario_text();
window_invalidate(w);
@ -1051,7 +1051,7 @@ static void window_editor_object_selection_scroll_mouseover(rct_window *w, int s
return;
w->selected_list_item = selectedObject;
w->var_494 = (uint32)installedEntry;
w->highlighted_item = (uint32)installedEntry;
object_free_scenario_text();
if (selectedObject != -1)
object_get_scenario_text(installedEntry);
@ -1342,7 +1342,7 @@ static void window_editor_object_selection_paint(rct_window *w, rct_drawpixelinf
if (w->selected_list_item == -1 || stex_entry == NULL)
return;
highlightedEntry = (rct_object_entry*)w->var_494;
highlightedEntry = (rct_object_entry*)w->highlighted_item;
type = highlightedEntry->flags & 0x0F;
// Draw preview
@ -1458,7 +1458,7 @@ static void window_editor_object_selection_scrollpaint(rct_window *w, rct_drawpi
// Highlight background
colour = 142;
if (listItem->entry == (rct_object_entry*)w->var_494 && !(*listItem->flags & OBJECT_SELECTION_FLAG_6)) {
if (listItem->entry == (rct_object_entry*)w->highlighted_item && !(*listItem->flags & OBJECT_SELECTION_FLAG_6)) {
gfx_fill_rect(dpi, 0, y, w->width, y + 11, 0x2000031);
colour = 14;
}
@ -1515,7 +1515,7 @@ static void window_editor_object_set_page(rct_window *w, int page)
w->selected_tab = page;
w->selected_list_item = -1;
w->var_494 = 0xFFFFFFFF;
w->highlighted_item = 0xFFFFFFFF;
w->scrolls[0].v_top = 0;
object_free_scenario_text();

View File

@ -988,12 +988,12 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
width = w->widgets[WIDX_PARK_NAME].left - 16;
if (stex != NULL) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = stex->park_name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = stex->park_name;
} else {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
}
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_clipped(dpi, 3298, (void*)0x013CE952, 0, x, y, width);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_clipped(dpi, 3298, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width);
// Scenario name
x = w->x + 8;
@ -1001,13 +1001,13 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
width = w->widgets[WIDX_SCENARIO_NAME].left - 16;
if (stex != NULL) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = stex->scenario_name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = stex->scenario_name;
} else {
safe_strncpy((char*)0x009BC677, s6Info->name, 64);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 3165;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 3165;
}
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_clipped(dpi, 3300, (void*)0x013CE952, 0, x, y, width);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_clipped(dpi, 3300, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, width);
// Scenario details label
x = w->x + 8;
@ -1020,13 +1020,13 @@ static void window_editor_objective_options_main_paint(rct_window *w, rct_drawpi
width = w->widgets[WIDX_DETAILS].left - 4;
if (stex != NULL) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = stex->details;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = stex->details;
} else {
safe_strncpy((char*)0x009BC677, s6Info->details, 256);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 3165;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 3165;
}
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, width, 1191, 0);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(0x0013573D8, uint32);
gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, width, 1191, 0);
// Scenario category label
x = w->x + 8;

View File

@ -399,7 +399,7 @@ static void window_editor_scenario_options_draw_tab_images(rct_window *w, rct_dr
// Tab 3
widget = &w->widgets[WIDX_TAB_3];
spriteIndex = STR_TAB_PARK;
spriteIndex = SPR_TAB_PARK;
gfx_draw_sprite(dpi, spriteIndex, w->x + widget->left, w->y + widget->top, 0);
}

View File

@ -640,7 +640,7 @@ static void window_finances_summary_invalidate(rct_window *w)
}
window_finances_set_pressed_tab(w);
RCT2_GLOBAL(0x013CE952 + 6, money32) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, money32) = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_LOAN, money32);
}
/**
@ -1183,7 +1183,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp
noCampaignsActive = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
// Set special parameters
switch (i) {
@ -1191,7 +1191,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp
case ADVERTISING_CAMPAIGN_RIDE:
ride = GET_RIDE(gMarketingCampaignRideIndex[i]);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
break;
case ADVERTISING_CAMPAIGN_FOOD_OR_DRINK_FREE:
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = ShopItemStringIds[gMarketingCampaignRideIndex[i]].plural;
@ -1199,7 +1199,7 @@ static void window_finances_marketing_paint(rct_window *w, rct_drawpixelinfo *dp
}
// Advertisement
gfx_draw_string_left_clipped(dpi, STR_VOUCHERS_FOR_FREE_ENTRY_TO + i, (void*)0x013CE952, 0, x + 4, y, 296);
gfx_draw_string_left_clipped(dpi, STR_VOUCHERS_FOR_FREE_ENTRY_TO + i, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x + 4, y, 296);
// Duration
weeksRemaining = (gMarketingCampaignDaysLeft[i] % 128);

View File

@ -388,7 +388,7 @@ static void window_game_bottom_toolbar_draw_left_panel(rct_drawpixelinfo *dpi, r
(RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) < 0 ? 1391 : 1390),
x, y - 3,
(RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WINDOWCLASS, rct_windowclass) == 2 && RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WIDGETINDEX, sint32) == WIDX_MONEY ? 2 : w->colours[0] & 0x7F),
(void*)0x013CE952
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
);
y += 7;
}
@ -466,7 +466,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi,
x,
y,
(RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WINDOWCLASS, rct_windowclass) == 2 && RCT2_GLOBAL(RCT2_ADDRESS_CURSOR_OVER_WIDGETINDEX, sint32) == WIDX_DATE ? 2 : w->colours[0] & 0x7F),
(void*)0x013CE952
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
);
// Temperature
@ -480,7 +480,7 @@ static void window_game_bottom_toolbar_draw_right_panel(rct_drawpixelinfo *dpi,
format = STR_FAHRENHEIT_VALUE;
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = temperature;
gfx_draw_string_left(dpi, format, (void*)0x013CE952, 0, x, y + 6);
gfx_draw_string_left(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y + 6);
x += 30;
// Current weather

View File

@ -504,7 +504,7 @@ void window_guest_open(rct_peep* peep){
window->frame_no = 0;
window->list_information_type = 0;
window->var_492 = 0;
window->var_494 = 0;
window->highlighted_item = 0;
window_guest_disable_widgets(window);
window->min_width = 192;
window->min_height = 157;
@ -835,7 +835,7 @@ void window_guest_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi){
int eax = 0;
if (w->page == WINDOW_GUEST_OVERVIEW){
eax = w->var_494>>16;
eax = w->highlighted_item>>16;
eax &= 0xFFFC;
}
ebx += eax;
@ -1111,27 +1111,27 @@ void window_guest_overview_invalidate(rct_window *w)
* rct2: 0x696F45
*/
void window_guest_overview_update(rct_window* w){
int var_496 = w->var_494 >> 16;
int var_496 = w->highlighted_item >> 16;
var_496++;
var_496 %= 24;
w->var_494 &= 0x0000FFFF;
w->var_494 |= var_496 << 16;
w->highlighted_item &= 0x0000FFFF;
w->highlighted_item |= var_496 << 16;
widget_invalidate(w, WIDX_TAB_1);
widget_invalidate(w, WIDX_TAB_2);
w->list_information_type += 2;
if ((w->var_494 & 0xFFFF) == 0xFFFF)
w->var_494 &= 0xFFFF0000;
if ((w->highlighted_item & 0xFFFF) == 0xFFFF)
w->highlighted_item &= 0xFFFF0000;
else
w->var_494++;
w->highlighted_item++;
// Disable peep watching thought for multiplayer as its client specific
if (network_get_mode() == NETWORK_MODE_NONE) {
// Create the "I have the strangest feeling I am being watched thought"
if ((w->var_494 & 0xFFFF) >= 3840) {
if (!(w->var_494 & 0x3FF)) {
if ((w->highlighted_item & 0xFFFF) >= 3840) {
if (!(w->highlighted_item & 0x3FF)) {
int random = util_rand() & 0xFFFF;
if (random <= 0x2AAA) {
rct_peep* peep = GET_PEEP(w->number);
@ -2186,7 +2186,7 @@ void window_guest_inventory_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (y >= maxY) break;
if (!peep_has_item(peep, item)) continue;
void *args = (void*)0x013CE952;
void *args = (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS;
rct_string_id stringId = window_guest_inventory_format_item(peep, item, (uint8*)args);
y += gfx_draw_string_left_wrapped(dpi, args, x, y, itemNameWidth, stringId, 0);
numItems++;

View File

@ -630,7 +630,7 @@ static void window_guest_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
x = w->x + 4;
y = w->y + window_guest_list_widgets[WIDX_GUEST_LIST].bottom + 2;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, sint16) = w->var_492;
gfx_draw_string_left(dpi, (w->var_492 == 1 ? 1755 : 1754), (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, (w->var_492 == 1 ? 1755 : 1754), (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
}
}
@ -683,7 +683,7 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
// Guest name
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx;
RCT2_GLOBAL(0x013CE954, uint32) = peep->id;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 113);
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1, 113);
switch (_window_guest_list_selected_view) {
case VIEW_ACTIONS:
@ -699,8 +699,8 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
get_arguments_from_action(peep, &argument_1, &argument_2);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1;
RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 133, y - 1, 314);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 133, y - 1, 314);
break;
case VIEW_THOUGHTS:
// For each thought
@ -716,8 +716,8 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
get_arguments_from_thought(peep->thoughts[j], &argument_1, &argument_2);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1;
RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 118, y - 1, 329);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 118, y - 1, 329);
break;
}
break;
@ -754,9 +754,9 @@ static void window_guest_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
// Draw action
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = _window_guest_list_groups_argument_1[i];
RCT2_GLOBAL(0x013CE952 + 4, uint32) = _window_guest_list_groups_argument_2[i];
RCT2_GLOBAL(0x013CE952 + 10, uint32) = numGuests;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 414);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = _window_guest_list_groups_argument_2[i];
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, uint32) = numGuests;
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1, 414);
// Draw guest count
RCT2_GLOBAL(0x013CE95A, uint16) = STR_GUESTS_COUNT_COMMA_SEP;

View File

@ -380,9 +380,9 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
// Ride length
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 1345;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = track_td6->ride_length;
gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, (void*)0x013CE952, 0, x, y, 214);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 1345;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = track_td6->ride_length;
gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, 214);
y += 10;
}
@ -437,9 +437,9 @@ static void window_install_track_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (track_td6->space_required_x != 0xFF) {
// Space required
RCT2_GLOBAL(0x013CE952 + 0, uint16) = track_td6->space_required_x;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = track_td6->space_required_y;
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, (void*)0x013CE952, 0, x, y);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = track_td6->space_required_x;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = track_td6->space_required_y;
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
}

View File

@ -408,6 +408,6 @@ static void window_land_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (price != 0 && !(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, sint32) = price;
gfx_draw_string_centred(dpi, 986, x, y, 0, (void*)0x013CE952);
gfx_draw_string_centred(dpi, 986, x, y, 0, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS);
}
}

View File

@ -699,7 +699,6 @@ static void window_loadsave_populate_list(rct_window *w, int includeNewItem, con
_listItemsCount++;
}
platform_enumerate_files_end(fileEnumHandle);
window_loadsave_sort_list(sortStartIndex, _listItemsCount - 1);
fileEnumHandle = platform_enumerate_files_begin(filter);
while (platform_enumerate_files_next(fileEnumHandle, &fileInfo)) {
@ -728,6 +727,7 @@ static void window_loadsave_populate_list(rct_window *w, int includeNewItem, con
_listItemsCount++;
}
platform_enumerate_files_end(fileEnumHandle);
window_loadsave_sort_list(sortStartIndex, _listItemsCount - 1);
}
}

View File

@ -930,7 +930,7 @@ static void window_map_show_default_scenario_editor_buttons(rct_window *w) {
w->widgets[WIDX_MAP_SIZE_SPINNER].type = WWT_SPINNER;
w->widgets[WIDX_MAP_SIZE_SPINNER_UP].type = WWT_DROPDOWN_BUTTON;
w->widgets[WIDX_MAP_SIZE_SPINNER_DOWN].type = WWT_DROPDOWN_BUTTON;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) - 2;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE, uint16) - 2;
}
static void window_map_inputsize_land(rct_window *w)
@ -1399,7 +1399,8 @@ static const uint16 ElementTypeMaskColour[] = {
0x0000, // MAP_ELEMENT_TYPE_ENTRANCE
0xFFFF, // MAP_ELEMENT_TYPE_FENCE
0x0000, // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
0xFFFF // MAP_ELEMENT_TYPE_BANNER
0xFFFF, // MAP_ELEMENT_TYPE_BANNER
0x0000, // MAP_ELEMENT_TYPE_CORRUPT
};
static const uint16 ElementTypeAddColour[] = {
@ -1410,7 +1411,8 @@ static const uint16 ElementTypeAddColour[] = {
0xBABA, // MAP_ELEMENT_TYPE_ENTRANCE
0x0000, // MAP_ELEMENT_TYPE_FENCE
0x6363, // MAP_ELEMENT_TYPE_SCENERY_MULTIPLE
0x0000 // MAP_ELEMENT_TYPE_BANNER
0x0000, // MAP_ELEMENT_TYPE_BANNER
0x4444, // MAP_ELEMENT_TYPE_CORRUPT
};
enum {
@ -1545,10 +1547,15 @@ static uint16 map_window_get_pixel_colour_peep(int x, int y)
if (!(mapElement->properties.surface.ownership & OWNERSHIP_OWNED))
colour = 10 | (colour & 0xFF00);
const size_t count = countof(ElementTypeAddColour);
while (!map_element_is_last_for_tile(mapElement++)) {
int mapElementType = map_element_get_type(mapElement);
colour &= ElementTypeMaskColour[mapElementType >> 2];
colour |= ElementTypeAddColour[mapElementType >> 2];
int mapElementType = map_element_get_type(mapElement) >> 2;
if (mapElementType >= count)
{
mapElementType = MAP_ELEMENT_TYPE_CORRUPT >> 2;
}
colour &= ElementTypeMaskColour[mapElementType];
colour |= ElementTypeAddColour[mapElementType];
}
return colour;

View File

@ -19,20 +19,21 @@
*****************************************************************************/
#include "../addresses.h"
#include "../config.h"
#include "../audio/audio.h"
#include "../config.h"
#include "../game.h"
#include "../management/news_item.h"
#include "../management/research.h"
#include "../object.h"
#include "../rct1.h"
#include "../ride/ride.h"
#include "../localisation/localisation.h"
#include "../world/scenery.h"
#include "../ride/track.h"
#include "../interface/widget.h"
#include "../interface/window.h"
#include "../interface/themes.h"
#include "../localisation/localisation.h"
#include "../management/news_item.h"
#include "../management/research.h"
#include "../network/network.h"
#include "../object.h"
#include "../rct1.h"
#include "../ride/ride.h"
#include "../ride/track.h"
#include "../world/scenery.h"
#define _window_new_ride_current_tab RCT2_GLOBAL(RCT2_ADDRESS_WINDOW_RIDE_LIST_SELECTED_TAB, uint8)
@ -873,9 +874,9 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
rideDescription = item.type + 512;
}
RCT2_GLOBAL(0x013CE952 + 0, rct_string_id) = rideName;
RCT2_GLOBAL(0x013CE952 + 2, rct_string_id) = rideDescription;
gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, width, 1690, 0);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, rct_string_id) = rideName;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, rct_string_id) = rideDescription;
gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, width, 1690, 0);
// Number of designs available
if (ride_type_has_flag(item.type, RIDE_TYPE_FLAG_HAS_TRACK)) {
@ -933,7 +934,16 @@ static void window_new_ride_select(rct_window *w)
window_close(w);
window_close_construction_windows();
if (ride_type_has_flag(item.type, RIDE_TYPE_FLAG_HAS_TRACK)) {
bool allowTrackDesigns = true;
#ifndef NETWORK_DISABLE
// TODO: FIX NETWORK TRACKS
// Until tracks work with the network this will disable them
if (network_get_mode() != NETWORK_MODE_NONE) {
allowTrackDesigns = false;
}
#endif
if (allowTrackDesigns && ride_type_has_flag(item.type, RIDE_TYPE_FLAG_HAS_TRACK)) {
track_load_list(item);
char *trackDesignList = RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, char);

View File

@ -33,6 +33,7 @@ enum WINDOW_NEWS_WIDGET_IDX {
WIDX_BACKGROUND,
WIDX_TITLE,
WIDX_CLOSE,
WIDX_SETTINGS,
WIDX_SCROLL
};
@ -40,7 +41,8 @@ static rct_widget window_news_widgets[] = {
{ WWT_FRAME, 0, 0, 399, 0, 299, 0x0FFFFFFFF, STR_NONE }, // panel / background
{ WWT_CAPTION, 0, 1, 398, 1, 14, STR_RECENT_MESSAGES, STR_WINDOW_TITLE_TIP }, // title bar
{ WWT_CLOSEBOX, 0, 387, 397, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button
{ WWT_SCROLL, 0, 4, 395, 18, 295, 2, STR_NONE }, // scroll
{ WWT_FLATBTN, 0, 372, 395, 18, 41, 5201, STR_NONE }, // settings
{ WWT_SCROLL, 0, 4, 395, 44, 295, 2, STR_NONE }, // scroll
{ WIDGETS_END },
};
@ -103,7 +105,7 @@ void window_news_open()
0
);
window->widgets = window_news_widgets;
window->enabled_widgets = (1 << WIDX_CLOSE);
window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_SETTINGS);
window_init_scroll_widgets(window);
window->news.var_480 = -1;
}
@ -130,6 +132,9 @@ static void window_news_mouseup(rct_window *w, int widgetIndex)
case WIDX_CLOSE:
window_close(w);
break;
case WIDX_SETTINGS:
window_news_options_open();
break;
}
}
@ -291,8 +296,8 @@ static void window_news_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int s
// Date text
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_DATE_DAY_1 + newsItem->day - 1;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_MONTH_MARCH + (newsItem->month_year % 8);
gfx_draw_string_left(dpi, 2235, (void*)0x013CE952, 2, 4, y);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = STR_MONTH_MARCH + (newsItem->month_year % 8);
gfx_draw_string_left(dpi, 2235, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 2, 4, y);
// Item text
utf8 buffer[400];

279
src/windows/news_options.c Normal file
View File

@ -0,0 +1,279 @@
#include "../config.h"
#include "../interface/widget.h"
#include "../interface/window.h"
#include "../localisation/localisation.h"
enum {
NOTIFICATION_CATEGORY_PARK,
NOTIFICATION_CATEGORY_RIDE,
NOTIFICATION_CATEGORY_GUEST
};
typedef struct {
uint8 category;
rct_string_id caption;
size_t config_offset;
} notification_def;
static const notification_def NewsItemOptionDefinitions[] = {
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_AWARD, offsetof(notification_configuration, park_award) },
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_MARKETING_CAMPAIGN_FINISHED, offsetof(notification_configuration, park_marketing_campaign_finished) },
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_WARNINGS, offsetof(notification_configuration, park_warnings) },
{ NOTIFICATION_CATEGORY_PARK, STR_NOTIFICATION_PARK_RATING_WARNINGS, offsetof(notification_configuration, park_rating_warnings) },
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_BROKEN_DOWN, offsetof(notification_configuration, ride_broken_down) },
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_CRASHED, offsetof(notification_configuration, ride_crashed) },
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_WARNINGS, offsetof(notification_configuration, ride_warnings) },
{ NOTIFICATION_CATEGORY_RIDE, STR_NOTIFICATION_RIDE_RESEARCHED, offsetof(notification_configuration, ride_researched) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_WARNINGS, offsetof(notification_configuration, guest_warnings) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LOST, offsetof(notification_configuration, guest_lost) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_PARK, offsetof(notification_configuration, guest_left_park) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_QUEUING_FOR_RIDE, offsetof(notification_configuration, guest_queuing_for_ride) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_ON_RIDE, offsetof(notification_configuration, guest_on_ride) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_LEFT_RIDE, offsetof(notification_configuration, guest_left_ride) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_BOUGHT_ITEM, offsetof(notification_configuration, guest_bought_item) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_USED_FACILITY, offsetof(notification_configuration, guest_used_facility) },
{ NOTIFICATION_CATEGORY_GUEST, STR_NOTIFICATION_GUEST_DIED, offsetof(notification_configuration, guest_died) },
};
enum WINDOW_NEWS_WIDGET_IDX {
WIDX_BACKGROUND,
WIDX_TITLE,
WIDX_CLOSE,
WIDX_TAB_CONTENT_PANEL,
WIDX_TAB_PARK,
WIDX_TAB_RIDE,
WIDX_TAB_GUEST,
WIDX_CHECKBOX_0
};
static rct_widget window_news_options_widgets[] = {
{ WWT_FRAME, 0, 0, 399, 0, 299, 0x0FFFFFFFF, STR_NONE }, // panel / background
{ WWT_CAPTION, 0, 1, 398, 1, 14, STR_NOTIFICATION_SETTINGS, STR_WINDOW_TITLE_TIP }, // title bar
{ WWT_CLOSEBOX, 0, 387, 397, 2, 13, STR_CLOSE_X, STR_CLOSE_WINDOW_TIP }, // close x button
{ WWT_RESIZE, 1, 0, 399, 43, 299, 0x0FFFFFFFF, STR_NONE }, // tab content panel
{ WWT_TAB, 1, 3, 33, 17, 43, 0x02000144E, STR_NONE }, // tab 1
{ WWT_TAB, 1, 34, 64, 17, 43, 0x02000144E, STR_NONE }, // tab 2
{ WWT_TAB, 1, 65, 95, 17, 43, 0x02000144E, STR_NONE }, // tab 2
{ WWT_CHECKBOX, 2, 3, 349, 46, 59, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WWT_CHECKBOX, 2, 0, 0, 0, 0, STR_NONE, STR_NONE },
{ WIDGETS_END },
};
static void window_news_options_mouseup(rct_window *w, int widgetIndex);
static void window_news_options_update(rct_window *w);
static void window_news_options_invalidate(rct_window *w);
static void window_news_options_paint(rct_window *w, rct_drawpixelinfo *dpi);
static rct_window_event_list window_news_options_events = {
NULL,
window_news_options_mouseup,
NULL,
NULL,
NULL,
NULL,
window_news_options_update,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
window_news_options_invalidate,
window_news_options_paint,
NULL
};
static void window_news_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi);
static bool *get_notification_value_ptr(const notification_def *ndef);
void window_news_options_open()
{
rct_window* window;
// Check if window is already open
window = window_bring_to_front_by_class(WC_NOTIFICATION_OPTIONS);
if (window == NULL) {
window = window_create_centred(
400,
300,
&window_news_options_events,
WC_NOTIFICATION_OPTIONS,
0
);
window->widgets = window_news_options_widgets;
window->enabled_widgets =
(1 << WIDX_CLOSE) |
(1 << WIDX_TAB_PARK) |
(1 << WIDX_TAB_RIDE) |
(1 << WIDX_TAB_GUEST);
window_init_scroll_widgets(window);
window->colours[0] = COLOUR_GREY;
window->colours[1] = COLOUR_LIGHT_BLUE;
window->colours[2] = COLOUR_LIGHT_BLUE;
}
}
static void window_news_options_mouseup(rct_window *w, int widgetIndex)
{
switch (widgetIndex) {
case WIDX_CLOSE:
window_close(w);
break;
case WIDX_TAB_PARK:
case WIDX_TAB_RIDE:
case WIDX_TAB_GUEST:
w->page = widgetIndex - WIDX_TAB_PARK;
w->frame_no = 0;
window_invalidate(w);
break;
default:
{
int checkBoxIndex = widgetIndex - WIDX_CHECKBOX_0;
if (checkBoxIndex >= 0) {
int matchIndex = 0;
for (int i = 0; i < countof(NewsItemOptionDefinitions); i++) {
const notification_def *ndef = &NewsItemOptionDefinitions[i];
if (ndef->category != w->page) continue;
if (matchIndex == checkBoxIndex) {
// Toggle value
bool *configValue = get_notification_value_ptr(ndef);
*configValue = !(*configValue);
config_save_default();
widget_invalidate(w, widgetIndex);
break;
}
matchIndex++;
}
}
break;
}
}
}
static void window_news_options_update(rct_window *w)
{
w->frame_no++;
widget_invalidate(w, WIDX_TAB_PARK + w->page);
}
static void window_news_options_invalidate(rct_window *w)
{
// colour_scheme_update(w);
// Set pressed tab
w->pressed_widgets &= ~(1ULL << WIDX_TAB_PARK);
w->pressed_widgets &= ~(1ULL << WIDX_TAB_RIDE);
w->pressed_widgets &= ~(1ULL << WIDX_TAB_GUEST);
w->pressed_widgets |= (1ULL << (WIDX_TAB_PARK + w->page));
// Set checkboxes
rct_widget *baseCheckBox = &w->widgets[WIDX_CHECKBOX_0];
int y = baseCheckBox->top;
int checkboxWidgetIndex = WIDX_CHECKBOX_0;
rct_widget *checkboxWidget = &w->widgets[checkboxWidgetIndex];
for (int i = 0; i < countof(NewsItemOptionDefinitions); i++) {
const notification_def *ndef = &NewsItemOptionDefinitions[i];
if (ndef->category != w->page) continue;
w->enabled_widgets |= (1ULL << checkboxWidgetIndex);
checkboxWidget->type = WWT_CHECKBOX;
checkboxWidget->left = baseCheckBox->left;
checkboxWidget->right = baseCheckBox->right;
checkboxWidget->top = y;
checkboxWidget->bottom = checkboxWidget->top + 13;
checkboxWidget->image = ndef->caption;
const bool *configValue = get_notification_value_ptr(ndef);
widget_set_checkbox_value(w, checkboxWidgetIndex, *configValue);
checkboxWidgetIndex++;
checkboxWidget++;
y += 13;
}
// Remove unused checkboxes
while (checkboxWidget->type != WWT_LAST) {
w->enabled_widgets &= ~(1ULL << checkboxWidgetIndex);
checkboxWidget->type = WWT_EMPTY;
checkboxWidgetIndex++;
checkboxWidget++;
}
// Resize window to fit checkboxes exactly
y += 3;
if (w->height != y) {
window_invalidate(w);
w->height = y;
w->widgets[WIDX_BACKGROUND].bottom = y - 1;
w->widgets[WIDX_TAB_CONTENT_PANEL].bottom = y - 1;
window_invalidate(w);
}
}
static void window_news_options_paint(rct_window *w, rct_drawpixelinfo *dpi)
{
window_draw_widgets(w, dpi);
window_news_options_draw_tab_images(w, dpi);
}
const int window_news_option_tab_animation_divisor[] = { 1, 4, 4 };
const int window_news_option_tab_animation_frames[] = { 1, 16, 8 };
static void window_news_options_draw_tab_image(rct_window *w, rct_drawpixelinfo *dpi, int page, int spriteIndex)
{
int widgetIndex = WIDX_TAB_PARK + page;
if (!(w->disabled_widgets & (1LL << widgetIndex))) {
if (w->page == page) {
int numFrames = window_news_option_tab_animation_frames[w->page];
if (numFrames > 1) {
int frame = w->frame_no / window_news_option_tab_animation_divisor[w->page];
spriteIndex += (frame % numFrames);
}
}
gfx_draw_sprite(dpi, spriteIndex, w->x + w->widgets[widgetIndex].left, w->y + w->widgets[widgetIndex].top, 0);
}
}
static void window_news_options_draw_tab_images(rct_window *w, rct_drawpixelinfo *dpi)
{
window_news_options_draw_tab_image(w, dpi, NOTIFICATION_CATEGORY_PARK, 5466);
window_news_options_draw_tab_image(w, dpi, NOTIFICATION_CATEGORY_RIDE, 5442);
window_news_options_draw_tab_image(w, dpi, NOTIFICATION_CATEGORY_GUEST, 5568);
}
static bool *get_notification_value_ptr(const notification_def *ndef)
{
bool *configValue = (bool*)((size_t)&gConfigNotifications + ndef->config_offset);
return configValue;
}

View File

@ -150,6 +150,7 @@ enum WINDOW_OPTIONS_WIDGET_IDX {
WIDX_TITLE_SEQUENCE_BUTTON,
WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM,
WIDX_STAY_CONNECTED_AFTER_DESYNC,
WIDX_AUTO_OPEN_SHOPS,
// Twitch
WIDX_CHANNEL_BUTTON = WIDX_PAGE_START,
@ -270,6 +271,7 @@ static rct_widget window_options_misc_widgets[] = {
{ WWT_DROPDOWN_BUTTON, 1, 26, 185, 189, 200, STR_EDIT_TITLE_SEQUENCES_BUTTON, STR_NONE }, // Title sequences button
{ WWT_CHECKBOX, 2, 10, 299, 204, 215, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, STR_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM_TIP }, // Allow loading with incorrect checksum
{ WWT_CHECKBOX, 2, 10, 299, 219, 230, STR_STAY_CONNECTED_AFTER_DESYNC, STR_NONE }, // Do not disconnect after the client desynchronises with the server
{ WWT_CHECKBOX, 2, 10, 299, 234, 245, STR_AUTO_OPEN_SHOPS, STR_AUTO_OPEN_SHOPS_TIP }, // Automatically open shops & stalls
{ WIDGETS_END },
};
@ -431,7 +433,8 @@ static uint32 window_options_page_enabled_widgets[] = {
(1 << WIDX_TITLE_SEQUENCE_DROPDOWN) |
(1 << WIDX_TITLE_SEQUENCE_BUTTON) |
(1 << WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM) |
(1 << WIDX_STAY_CONNECTED_AFTER_DESYNC),
(1 << WIDX_STAY_CONNECTED_AFTER_DESYNC) |
(1 << WIDX_AUTO_OPEN_SHOPS),
MAIN_OPTIONS_ENABLED_WIDGETS |
(1 << WIDX_CHANNEL_BUTTON) |
@ -687,6 +690,11 @@ static void window_options_mouseup(rct_window *w, int widgetIndex)
gConfigNetwork.stay_connected = !gConfigNetwork.stay_connected;
config_save_default();
window_invalidate(w);
break;
case WIDX_AUTO_OPEN_SHOPS:
gConfigGeneral.auto_open_shops = !gConfigGeneral.auto_open_shops;
config_save_default();
window_invalidate(w);
}
break;
@ -1179,9 +1187,9 @@ static void window_options_invalidate(rct_window *w)
switch (w->page) {
case WINDOW_OPTIONS_PAGE_DISPLAY:
RCT2_GLOBAL(0x013CE952 + 16, uint16) = (uint16)gConfigGeneral.fullscreen_width;
RCT2_GLOBAL(0x013CE952 + 18, uint16) = (uint16)gConfigGeneral.fullscreen_height;
RCT2_GLOBAL(0x013CE952 + 12, uint16) = 2773 + gConfigGeneral.fullscreen_mode;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 16, uint16) = (uint16)gConfigGeneral.fullscreen_width;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 18, uint16) = (uint16)gConfigGeneral.fullscreen_height;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 12, uint16) = 2773 + gConfigGeneral.fullscreen_mode;
// disable resolution dropdown on "Fullscreen (desktop)"
if (gConfigGeneral.fullscreen_mode == 2){
@ -1225,7 +1233,7 @@ static void window_options_invalidate(rct_window *w)
case WINDOW_OPTIONS_PAGE_CULTURE:
// currency: pounds, dollars, etc. (10 total)
RCT2_GLOBAL(0x013CE952 + 12, uint16) = CurrencyDescriptors[gConfigGeneral.currency_format].stringId;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 12, uint16) = CurrencyDescriptors[gConfigGeneral.currency_format].stringId;
// distance: metric / imperial / si
{
@ -1236,14 +1244,14 @@ static void window_options_invalidate(rct_window *w)
case MEASUREMENT_FORMAT_METRIC: stringId = STR_METRIC; break;
case MEASUREMENT_FORMAT_SI: stringId = STR_SI; break;
}
RCT2_GLOBAL(0x013CE952 + 14, uint16) = stringId;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 14, uint16) = stringId;
}
// temperature: celsius/fahrenheit
RCT2_GLOBAL(0x013CE952 + 20, uint16) = STR_CELSIUS + gConfigGeneral.temperature_format;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 20, uint16) = STR_CELSIUS + gConfigGeneral.temperature_format;
// height: units/real values
RCT2_GLOBAL(0x013CE952 + 6, uint16) = gConfigGeneral.show_height_as_units ? STR_UNITS : STR_REAL_VALUES;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = gConfigGeneral.show_height_as_units ? STR_UNITS : STR_REAL_VALUES;
window_options_culture_widgets[WIDX_LANGUAGE].type = WWT_DROPDOWN;
window_options_culture_widgets[WIDX_LANGUAGE_DROPDOWN].type = WWT_DROPDOWN_BUTTON;
@ -1272,11 +1280,11 @@ static void window_options_invalidate(rct_window *w)
else
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 1170;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = (uint32)gAudioDevices[currentSoundDevice].name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = (uint32)gAudioDevices[currentSoundDevice].name;
}
// music: on/off
RCT2_GLOBAL(0x013CE952 + 8, uint16) = STR_OFF + gConfigSound.ride_music;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint16) = STR_OFF + gConfigSound.ride_music;
widget_set_checkbox_value(w, WIDX_SOUND_CHECKBOX, gConfigSound.sound);
widget_set_checkbox_value(w, WIDX_MUSIC_CHECKBOX, gConfigSound.ride_music);
@ -1345,6 +1353,7 @@ static void window_options_invalidate(rct_window *w)
widget_set_checkbox_value(w, WIDX_DEBUGGING_TOOLS, gConfigGeneral.debugging_tools);
widget_set_checkbox_value(w, WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM, gConfigGeneral.allow_loading_with_incorrect_checksum);
widget_set_checkbox_value(w, WIDX_STAY_CONNECTED_AFTER_DESYNC, gConfigNetwork.stay_connected);
widget_set_checkbox_value(w, WIDX_AUTO_OPEN_SHOPS, gConfigGeneral.auto_open_shops);
window_options_misc_widgets[WIDX_REAL_NAME_CHECKBOX].type = WWT_CHECKBOX;
window_options_misc_widgets[WIDX_SAVE_PLUGIN_DATA_CHECKBOX].type = WWT_CHECKBOX;
@ -1359,6 +1368,7 @@ static void window_options_invalidate(rct_window *w)
window_options_misc_widgets[WIDX_TITLE_SEQUENCE_BUTTON].type = WWT_DROPDOWN_BUTTON;
window_options_misc_widgets[WIDX_ALLOW_LOADING_WITH_INCORRECT_CHECKSUM].type = WWT_CHECKBOX;
window_options_misc_widgets[WIDX_STAY_CONNECTED_AFTER_DESYNC].type = WWT_CHECKBOX;
window_options_misc_widgets[WIDX_AUTO_OPEN_SHOPS].type = WWT_CHECKBOX;
break;
case WINDOW_OPTIONS_PAGE_TWITCH:

View File

@ -576,7 +576,7 @@ static void window_park_set_disabled_tabs(rct_window *w)
static void window_park_prepare_window_title_text()
{
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
}
#pragma region Entrance page
@ -949,7 +949,7 @@ static void window_park_entrance_invalidate(rct_window *w)
// Set open / close park button state
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME, rct_string_id);
RCT2_GLOBAL(0x013CE952 + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_NAME_ARGS, uint32);
window_park_entrance_widgets[WIDX_OPEN_OR_CLOSE].image = park_is_open() ? SPR_OPEN : SPR_CLOSED;
window_park_entrance_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + !park_is_open() * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT);
window_park_entrance_widgets[WIDX_OPEN_LIGHT].image = SPR_G2_RCT1_OPEN_BUTTON_0 + park_is_open() * 2 + widget_is_pressed(w, WIDX_OPEN_LIGHT);
@ -1038,7 +1038,7 @@ static void window_park_entrance_paint(rct_window *w, rct_drawpixelinfo *dpi)
gfx_draw_string_centred_clipped(
dpi,
1191,
(void*)0x013CE952,
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
0,
w->x + (labelWidget->left + labelWidget->right) / 2,
w->y + labelWidget->top,
@ -1468,7 +1468,7 @@ static void window_park_price_invalidate(rct_window *w)
window_park_price_widgets[WIDX_DECREASE_PRICE].type = WWT_DROPDOWN_BUTTON;
}
RCT2_GLOBAL(0x013CE952 + 6, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint32) = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16);
window_park_price_widgets[WIDX_PRICE].image = RCT2_GLOBAL(RCT2_ADDRESS_PARK_ENTRANCE_FEE, uint16) == 0 ? STR_FREE : 1429;
window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_7);
@ -1590,20 +1590,20 @@ static void window_park_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
parkSize = squaredmetres_to_squaredfeet(parkSize);
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = parkSize;
gfx_draw_string_left(dpi, stringIndex, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, stringIndex, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
// Draw number of rides / attractions
if (w->list_information_type != (uint16)-1) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = w->list_information_type;
gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, STR_NUMBER_OF_RIDES_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
}
y += 10;
// Draw number of staff
if (w->var_48C != -1) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = w->var_48C;
gfx_draw_string_left(dpi, STR_STAFF_LABEL, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, STR_STAFF_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
}
y += 10;
@ -1748,7 +1748,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi)
y = w->y + window_park_objective_widgets[WIDX_PAGE_BACKGROUND].top + 7;
safe_strncpy((char*)0x009BC677, RCT2_ADDRESS(RCT2_ADDRESS_SCENARIO_DETAILS, char), 256);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, short) = 3165;
y += gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 222, 1191, 0);
y += gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 222, 1191, 0);
y += 5;
// Your objective:
@ -1760,7 +1760,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi)
RCT2_GLOBAL(0x013CE954, short) = date_get_total_months(MONTH_OCTOBER, RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_YEAR, uint8));
RCT2_GLOBAL(0x013CE956, int) = RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_CURRENCY, sint32);
y += gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 221, 2385 + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8), 0);
y += gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 221, 2385 + RCT2_GLOBAL(RCT2_ADDRESS_OBJECTIVE_TYPE, uint8), 0);
y += 5;
// Objective outcome
@ -1771,7 +1771,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi)
} else {
// Objective completed
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, int) = RCT2_GLOBAL(RCT2_ADDRESS_COMPLETED_COMPANY_VALUE, money32);
gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x, y, 222, 2788, 0);
gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 222, 2788, 0);
}
}
}

View File

@ -341,7 +341,7 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp
y += 15;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = STR_UNKNOWN;
gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
} else {
// Research type
stringId = STR_RESEARCH_UNKNOWN;
@ -373,11 +373,11 @@ void window_research_development_page_paint(rct_window *w, rct_drawpixelinfo *dp
uint16 expectedDay = RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_DAY, uint8);
if (expectedDay != 255) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 2289;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = STR_DATE_DAY_1 + expectedDay;
RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_MONTH_MARCH + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = STR_DATE_DAY_1 + expectedDay;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = STR_MONTH_MARCH + RCT2_GLOBAL(RCT2_ADDRESS_NEXT_RESEARCH_EXPECTED_MONTH, uint8);
}
}
gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, STR_RESEARCH_EXPECTED_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
}
// Last development

View File

@ -1183,7 +1183,7 @@ rct_window *window_ride_open(int rideIndex)
w->frame_no = 0;
w->list_information_type = 0;
w->var_492 = 0;
w->var_494 = 0;
w->highlighted_item = 0;
window_ride_disable_tabs(w);
w->min_width = 316;
w->min_height = 180;
@ -1675,8 +1675,8 @@ static void window_ride_main_mouseup(rct_window *w, int widgetIndex)
break;
}
RCT2_GLOBAL(0x013CE952 + 6, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments;
ride_set_status(w->number, status);
break;
}
@ -1916,8 +1916,8 @@ static void window_ride_main_dropdown(rct_window *w, int widgetIndex, int dropdo
break;
}
RCT2_GLOBAL(0x013CE952 + 6, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = ride->name_arguments;
ride_set_status(w->number, status);
break;
}
@ -2012,8 +2012,8 @@ static void window_ride_main_invalidate(rct_window *w)
if (ride->lifecycle_flags & (RIDE_LIFECYCLE_INDESTRUCTIBLE | RIDE_LIFECYCLE_INDESTRUCTIBLE_TRACK))
w->disabled_widgets |= (1 << 22);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
window_ride_main_widgets[WIDX_OPEN].image = SPR_CLOSED + ride->status;
window_ride_main_widgets[WIDX_CLOSE_LIGHT].image = SPR_G2_RCT1_CLOSE_BUTTON_0 + (ride->status == RIDE_STATUS_CLOSED) * 2 + widget_is_pressed(w, WIDX_CLOSE_LIGHT);
@ -2238,10 +2238,10 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (w->ride.view != 0) {
stringId = RideNameConvention[ride->type].vehicle_name + 6;
if (w->ride.view > ride->num_vehicles) {
RCT2_GLOBAL(0x013CE952 + 2, uint16) = w->ride.view - ride->num_vehicles;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = w->ride.view - ride->num_vehicles;
stringId = RideNameConvention[ride->type].station_name + 6;
} else {
RCT2_GLOBAL(0x013CE952 + 2, uint16) = w->ride.view;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = w->ride.view;
}
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
@ -2253,15 +2253,15 @@ static void window_ride_main_paint(rct_window *w, rct_drawpixelinfo *dpi)
w->x + (widget->left + widget->right - 11) / 2,
w->y + widget->top,
0,
(void*)0x013CE952
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS
);
// Status
widget = &window_ride_main_widgets[WIDX_STATUS];
gfx_draw_string_centred_clipped(
dpi,
window_ride_get_status(w, (void*)0x013CE952),
(void*)0x013CE952,
window_ride_get_status(w, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS),
(void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS,
0,
w->x + (widget->left + widget->right) / 2,
w->y + widget->top,
@ -2502,8 +2502,8 @@ static void window_ride_vehicle_invalidate(rct_window *w)
ride = GET_RIDE(w->number);
rideEntry = ride_get_entry(ride);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
// Widget setup
carsPerTrain = ride->num_cars_per_train - rideEntry->zero_cars;
@ -2540,12 +2540,12 @@ static void window_ride_vehicle_invalidate(rct_window *w)
window_ride_vehicle_widgets[WIDX_VEHICLE_CARS_PER_TRAIN_DROPDOWN].type = WWT_EMPTY;
}
RCT2_GLOBAL(0x013CE952 + 6, uint16) = carsPerTrain;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = carsPerTrain;
stringId = RideNameConvention[ride->type].vehicle_name + 4;
if (ride->num_vehicles > 1)
stringId++;
RCT2_GLOBAL(0x013CE952 + 8, uint16) = stringId;
RCT2_GLOBAL(0x013CE952 + 10, uint16) = ride->num_vehicles;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint16) = stringId;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, uint16) = ride->num_vehicles;
window_ride_anchor_border_widgets(w);
window_align_tabs(w, WIDX_TAB_1, WIDX_TAB_10);
@ -3041,8 +3041,8 @@ static void window_ride_operating_invalidate(rct_window *w)
ride = GET_RIDE(w->number);
rideEntry = ride_get_entry(ride);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
// Widget setup
w->pressed_widgets &= ~0x44700000;
@ -3120,7 +3120,7 @@ static void window_ride_operating_invalidate(rct_window *w)
window_ride_operating_widgets[WIDX_MAXIMUM_LENGTH_INCREASE].type = WWT_DROPDOWN_BUTTON;
window_ride_operating_widgets[WIDX_MAXIMUM_LENGTH_DECREASE].type = WWT_DROPDOWN_BUTTON;
RCT2_GLOBAL(0x013CE952 + 10, uint16) = 1217;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, uint16) = 1217;
RCT2_GLOBAL(0x013CE95E, uint16) = ride->min_waiting_time;
RCT2_GLOBAL(0x013CE960, uint16) = 1217;
RCT2_GLOBAL(0x013CE962, uint16) = ride->max_waiting_time;
@ -3564,8 +3564,8 @@ static void window_ride_maintenance_invalidate(rct_window *w)
window_ride_set_pressed_tab(w);
rct_ride *ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
window_ride_maintenance_widgets[WIDX_INSPECTION_INTERVAL].image = STR_EVERY_10_MINUTES + ride->inspection_interval;
@ -3675,9 +3675,9 @@ static void window_ride_maintenance_paint(rct_window *w, rct_drawpixelinfo *dpi)
} else {
mechanicSprite = &(g_sprite_list[ride->mechanic].peep);
if (peep_is_mechanic(mechanicSprite)) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = mechanicSprite->name_string_idx;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = mechanicSprite->id;
gfx_draw_string_left_wrapped(dpi, (void*)0x013CE952, x + 4, y, 280, stringId, 0);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = mechanicSprite->name_string_idx;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = mechanicSprite->id;
gfx_draw_string_left_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x + 4, y, 280, stringId, 0);
}
}
}
@ -3727,7 +3727,7 @@ static void window_ride_set_track_colour_scheme(rct_window *w, int x, int y)
uint8 newColourScheme;
int interactionType, z, direction;
newColourScheme = (uint8)(*((uint16*)&w->var_494));
newColourScheme = (uint8)(*((uint16*)&w->highlighted_item));
rct_xy16 mapCoord = { 0 };
get_map_coordinates_from_pos(x, y, VIEWPORT_INTERACTION_MASK_RIDE, &mapCoord.x, &mapCoord.y, &interactionType, &mapElement, NULL);
@ -3817,7 +3817,7 @@ static void window_ride_colour_mousedown(int widgetIndex, rct_window *w, rct_wid
ride = GET_RIDE(w->number);
rideEntry = ride_get_entry(ride);
colourSchemeIndex = *((uint16*)&w->var_494);
colourSchemeIndex = *((uint16*)&w->highlighted_item);
dropdownWidget = widget - 1;
switch (widgetIndex) {
@ -3957,20 +3957,20 @@ static void window_ride_colour_dropdown(rct_window *w, int widgetIndex, int drop
switch (widgetIndex) {
case WIDX_TRACK_COLOUR_SCHEME_DROPDOWN:
*((uint16*)&w->var_494) = dropdownIndex;
*((uint16*)&w->highlighted_item) = dropdownIndex;
window_invalidate(w);
break;
case WIDX_TRACK_MAIN_COLOUR:
game_do_command(0, (0 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->var_494), 0);
game_do_command(0, (0 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->highlighted_item), 0);
break;
case WIDX_TRACK_ADDITIONAL_COLOUR:
game_do_command(0, (1 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->var_494), 0);
game_do_command(0, (1 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->highlighted_item), 0);
break;
case WIDX_TRACK_SUPPORT_COLOUR:
game_do_command(0, (4 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->var_494), 0);
game_do_command(0, (4 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->highlighted_item), 0);
break;
case WIDX_MAZE_STYLE_DROPDOWN:
game_do_command(0, (4 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->var_494), 0);
game_do_command(0, (4 << 8) | 1, 0, (dropdownIndex << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, *((uint16*)&w->highlighted_item), 0);
break;
case WIDX_ENTRANCE_STYLE_DROPDOWN:
game_do_command(0, (6 << 8) | 1, 0, (window_ride_entrance_style_list[dropdownIndex] << 8) | w->number, GAME_COMMAND_SET_RIDE_APPEARANCE, 0, 0);
@ -4053,11 +4053,11 @@ static void window_ride_colour_invalidate(rct_window *w)
ride = GET_RIDE(w->number);
rideEntry = ride_get_entry(ride);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
// Track colours
int colourScheme = *((uint16*)&w->var_494);
int colourScheme = *((uint16*)&w->highlighted_item);
trackColour = ride_get_track_colour(ride, colourScheme);
// Maze style
@ -4172,10 +4172,10 @@ static void window_ride_colour_invalidate(rct_window *w)
window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_SCHEME].type = WWT_EMPTY;
window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_SCHEME_DROPDOWN].type = WWT_EMPTY;
}
RCT2_GLOBAL(0x013CE952 + 6, uint16) = STR_ALL_VEHICLES_IN_SAME_COLOURS + vehicleColourSchemeType;
RCT2_GLOBAL(0x013CE952 + 8, uint16) = RideNameConvention[ride->type].vehicle_name;
RCT2_GLOBAL(0x013CE952 + 10, uint16) = RideNameConvention[ride->type].vehicle_name + 2;
RCT2_GLOBAL(0x013CE952 + 12, uint16) = w->var_48C + 1;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = STR_ALL_VEHICLES_IN_SAME_COLOURS + vehicleColourSchemeType;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint16) = RideNameConvention[ride->type].vehicle_name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, uint16) = RideNameConvention[ride->type].vehicle_name + 2;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 12, uint16) = w->var_48C + 1;
// Vehicle index
if (vehicleColourSchemeType != 0) {
window_ride_colour_widgets[WIDX_VEHICLE_COLOUR_INDEX].type = WWT_DROPDOWN;
@ -4226,7 +4226,7 @@ static void window_ride_colour_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (widget->type != WWT_EMPTY)
gfx_fill_rect(dpi, w->x + widget->left + 1, w->y + widget->top + 1, w->x + widget->right - 1, w->y + widget->bottom - 1, 12);
trackColour = ride_get_track_colour(ride, *((uint16*)&w->var_494));
trackColour = ride_get_track_colour(ride, *((uint16*)&w->highlighted_item));
//
if (rideEntry->shop_item == 0xFF) {
@ -4533,8 +4533,8 @@ static void window_ride_music_invalidate(rct_window *w)
window_ride_set_pressed_tab(w);
rct_ride *ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
// Set selected music
window_ride_music_widgets[WIDX_MUSIC].image = STR_MUSIC_STYLE_START + ride->music;
@ -4818,8 +4818,8 @@ static void window_ride_measurements_invalidate(rct_window *w)
window_ride_set_pressed_tab(w);
rct_ride *ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
window_ride_measurements_widgets[WIDX_SAVE_TRACK_DESIGN].tooltip = STR_SAVE_TRACK_DESIGN_NOT_POSSIBLE;
window_ride_measurements_widgets[WIDX_SAVE_TRACK_DESIGN].type = WWT_EMPTY;
@ -4884,15 +4884,15 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
if (ride->lifecycle_flags & RIDE_LIFECYCLE_TESTED) {
// Excitement
RCT2_GLOBAL(0x013CE952 + 0, uint32) = ride->excitement;
RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_RATING_LOW + min(ride->excitement >> 8, 5);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = ride->excitement;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = STR_RATING_LOW + min(ride->excitement >> 8, 5);
stringId = ride->excitement == -1 ? STR_EXCITEMENT_RATING_NOT_YET_AVAILABLE : STR_EXCITEMENT_RATING;
gfx_draw_string_left(dpi, stringId, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, stringId, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
// Intensity
RCT2_GLOBAL(0x013CE952 + 0, uint32) = ride->intensity;
RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_RATING_LOW + min(ride->intensity >> 8, 5);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = ride->intensity;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = STR_RATING_LOW + min(ride->intensity >> 8, 5);
stringId = STR_INTENSITY_RATING;
if (ride->excitement == -1)
@ -4900,14 +4900,14 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
else if (ride->intensity >= RIDE_RATING(10,00))
stringId = STR_INTENSITY_RATING_RED;
gfx_draw_string_left(dpi, stringId, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, stringId, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
// Nausea
RCT2_GLOBAL(0x013CE952 + 0, uint32) = ride->nausea;
RCT2_GLOBAL(0x013CE952 + 4, uint16) = STR_RATING_LOW + min(ride->nausea >> 8, 5);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = ride->nausea;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = STR_RATING_LOW + min(ride->nausea >> 8, 5);
stringId = ride->excitement == -1 ? STR_NAUSEA_RATING_NOT_YET_AVAILABLE : STR_NAUSEA_RATING;
gfx_draw_string_left(dpi, stringId, (void*)0x013CE952, 0, x, y);
gfx_draw_string_left(dpi, stringId, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 20;
// Horizontal rule
@ -4935,22 +4935,22 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
for (i = 0; i < ride->num_stations; i++) {
time = ride->time[numTimes];
if (time != 0) {
RCT2_GLOBAL(0x013CE952 + 0 + (numTimes * 4), uint16) = 1343;
RCT2_GLOBAL(0x013CE952 + 2 + (numTimes * 4), uint16) = time;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0 + (numTimes * 4), uint16) = 1343;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2 + (numTimes * 4), uint16) = time;
numTimes++;
}
}
if (numTimes == 0) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 1343;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 1343;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = 0;
numTimes++;
}
RCT2_GLOBAL(0x013CE94E + (numTimes * 4), uint16) = 1342;
RCT2_GLOBAL(0x013CE952 + 0 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 2 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 4 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 6 + (numTimes * 4), uint16) = 0;
gfx_draw_string_left_clipped(dpi, STR_RIDE_TIME, (void*)0x013CE952, 0, x, y, 308);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4 + (numTimes * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6 + (numTimes * 4), uint16) = 0;
gfx_draw_string_left_clipped(dpi, STR_RIDE_TIME, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, 308);
y += 10;
}
@ -4960,22 +4960,22 @@ static void window_ride_measurements_paint(rct_window *w, rct_drawpixelinfo *dpi
length = ride->length[numLengths];
if (length != 0) {
length >>= 16;
RCT2_GLOBAL(0x013CE952 + 0 + (numLengths * 4), uint16) = 1346;
RCT2_GLOBAL(0x013CE952 + 2 + (numLengths * 4), uint16) = (length & 0xFFFF);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0 + (numLengths * 4), uint16) = 1346;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2 + (numLengths * 4), uint16) = (length & 0xFFFF);
numLengths++;
}
}
if (numLengths == 0) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 1346;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 1346;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = 0;
numLengths++;
}
RCT2_GLOBAL(0x013CE94E + (numLengths * 4), uint16) = 1345;
RCT2_GLOBAL(0x013CE952 + 0 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 2 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 4 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(0x013CE952 + 6 + (numLengths * 4), uint16) = 0;
gfx_draw_string_left_clipped(dpi, STR_RIDE_LENGTH, (void*)0x013CE952, 0, x, y, 308);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4 + (numLengths * 4), uint16) = 0;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6 + (numLengths * 4), uint16) = 0;
gfx_draw_string_left_clipped(dpi, STR_RIDE_LENGTH, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, 308);
y += 10;
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_HAS_G_FORCES)) {
@ -5186,9 +5186,9 @@ static void window_ride_graphs_tooltip(rct_window* w, int widgetIndex, rct_strin
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = 3158;
measurement = ride_get_measurement(w->number, &message);
if (measurement != NULL && (measurement->flags & RIDE_MEASUREMENT_FLAG_RUNNING)) {
RCT2_GLOBAL(0x013CE952 + 4, uint16) = measurement->vehicle_index + 1;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = measurement->vehicle_index + 1;
ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 2, uint16) = RideNameConvention[ride->type].vehicle_name + 6;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = RideNameConvention[ride->type].vehicle_name + 6;
} else {
*stringId = message;
}
@ -5219,8 +5219,8 @@ static void window_ride_graphs_invalidate(rct_window *w)
ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
// Set pressed graph button type
w->pressed_widgets &= ~(1 << WIDX_GRAPH_VELOCITY);
@ -5290,7 +5290,7 @@ static void window_ride_graphs_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi
x = (widget->right - widget->left) / 2;
y = (widget->bottom - widget->top) / 2 - 5;
width = widget->right - widget->left - 2;
gfx_draw_string_centred_wrapped(dpi, (void*)0x013CE952, x, y, width, stringId, 0);
gfx_draw_string_centred_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, width, stringId, 0);
return;
}
@ -5671,8 +5671,8 @@ static void window_ride_income_invalidate(rct_window *w)
window_ride_set_pressed_tab(w);
rct_ride *ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
rideEntry = ride_get_entry(ride);
@ -5692,7 +5692,7 @@ static void window_ride_income_invalidate(rct_window *w)
window_ride_income_widgets[WIDX_PRIMARY_PRICE_SAME_THROUGHOUT_PARK].type = WWT_EMPTY;
window_ride_income_widgets[WIDX_PRIMARY_PRICE].image = 1429;
RCT2_GLOBAL(0x013CE952 + 6, money32) = ride->price;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, money32) = ride->price;
if (ride->price == 0)
window_ride_income_widgets[WIDX_PRIMARY_PRICE].image = STR_FREE;
@ -5757,7 +5757,7 @@ static void window_ride_income_invalidate(rct_window *w)
// Set secondary item price
window_ride_income_widgets[WIDX_SECONDARY_PRICE].image = 1799;
RCT2_GLOBAL(0x013CE952 + 10, money32) = ride->price_secondary;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 10, money32) = ride->price_secondary;
if (ride->price_secondary == 0)
window_ride_income_widgets[WIDX_SECONDARY_PRICE].image = STR_FREE;
}
@ -5938,8 +5938,8 @@ static void window_ride_customer_invalidate(rct_window *w)
window_ride_set_pressed_tab(w);
rct_ride *ride = GET_RIDE(w->number);
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->name_arguments;
window_ride_customer_widgets[WIDX_SHOW_GUESTS_THOUGHTS].type = WWT_FLATBTN;
if (ride_type_has_flag(ride->type, RIDE_TYPE_FLAG_IS_SHOP)) {
@ -6012,9 +6012,9 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi)
// Primary shop items sold
shopItem = ride_get_entry(ride)->shop_item;
if (shopItem != 0xFF) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ShopItemStringIds[shopItem].plural;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->no_primary_items_sold;
gfx_draw_string_left(dpi, STR_ITEMS_SOLD, (void*)0x013CE952, 0, x, y);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ShopItemStringIds[shopItem].plural;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->no_primary_items_sold;
gfx_draw_string_left(dpi, STR_ITEMS_SOLD, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
}
@ -6023,9 +6023,9 @@ static void window_ride_customer_paint(rct_window *w, rct_drawpixelinfo *dpi)
RCT2_GLOBAL(0x0097D7CB + (ride->type * 4), uint8) :
ride_get_entry(ride)->shop_item_secondary;
if (shopItem != 0xFF) {
RCT2_GLOBAL(0x013CE952 + 0, uint16) = ShopItemStringIds[shopItem].plural;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = ride->no_secondary_items_sold;
gfx_draw_string_left(dpi, STR_ITEMS_SOLD, (void*)0x013CE952, 0, x, y);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = ShopItemStringIds[shopItem].plural;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = ride->no_secondary_items_sold;
gfx_draw_string_left(dpi, STR_ITEMS_SOLD, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
}

View File

@ -585,6 +585,12 @@ static void window_ride_construction_close(rct_window *w)
uint8 rideIndex = _currentRideIndex;
if (sub_6CAF80(rideIndex, &mapElement) || network_get_mode() == NETWORK_MODE_CLIENT) {
rct_ride *ride = GET_RIDE(rideIndex);
if (ride->mode == RIDE_MODE_SHOP_STALL && gConfigGeneral.auto_open_shops) {
ride->status = RIDE_STATUS_OPEN;
}
window_ride_main_open(rideIndex);
} else {
int eax = RCT2_GLOBAL(RCT2_ADDRESS_GAME_PAUSED, uint8);
@ -2067,17 +2073,17 @@ static void window_ride_construction_invalidate(rct_window *w)
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = stringId;
if (RCT2_GLOBAL(0x00F440D3, uint8) == 1)
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ((RCT2_GLOBAL(0x00F440CD, uint8) * 9) >> 2) & 0xFFFF;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ((RCT2_GLOBAL(0x00F440CD, uint8) * 9) >> 2) & 0xFFFF;
window_ride_construction_widgets[WIDX_SEAT_ROTATION_ANGLE_SPINNER].image =
STR_RIDE_CONSTRUCTION_SEAT_ROTATION_ANGLE_NEG_180 + RCT2_GLOBAL(0x00F440CF, uint8);
if (RCT2_GLOBAL(0x00F440D3, uint8) == 2)
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ((RCT2_GLOBAL(0x00F440CE, uint8) * 9) >> 2) & 0xFFFF;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ((RCT2_GLOBAL(0x00F440CE, uint8) * 9) >> 2) & 0xFFFF;
// Set window title arguments
RCT2_GLOBAL(0x013CE952 + 4, uint16) = ride->name;
RCT2_GLOBAL(0x013CE952 + 6, uint32) = ride->name_arguments;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint16) = ride->name;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint32) = ride->name_arguments;
}
/**

View File

@ -474,59 +474,59 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
switch (_window_ride_list_information_type) {
case INFORMATION_TYPE_STATUS:
ride_get_status(w->list_item_positions[i], &formatSecondary, &argument);
RCT2_GLOBAL(0x013CE952 + 2, sint32) = argument;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, sint32) = argument;
break;
case INFORMATION_TYPE_POPULARITY:
formatSecondary = STR_POPULARITY_UNKNOWN_LABEL;
if (ride->popularity != 255) {
formatSecondary = STR_POPULARITY_LABEL;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->popularity * 4;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride->popularity * 4;
}
break;
case INFORMATION_TYPE_SATISFACTION:
formatSecondary = STR_SATISFACTION_UNKNOWN_LABEL;
if (ride->satisfaction != 255) {
formatSecondary = STR_SATISFACTION_LABEL;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->satisfaction * 5;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride->satisfaction * 5;
}
break;
case INFORMATION_TYPE_PROFIT:
formatSecondary = 0;
if (ride->profit != MONEY32_UNDEFINED) {
formatSecondary = STR_PROFIT_LABEL;
RCT2_GLOBAL(0x013CE952 + 2, sint32) = ride->profit;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, sint32) = ride->profit;
}
break;
case INFORMATION_TYPE_QUEUE_LENGTH:
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride_get_total_queue_length(ride);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride_get_total_queue_length(ride);
formatSecondary = STR_QUEUE_EMPTY;
if (RCT2_GLOBAL(0x013CE952 + 2, uint16) == 1)
if (RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) == 1)
formatSecondary = STR_QUEUE_ONE_PERSON;
else if (RCT2_GLOBAL(0x013CE952 + 2, uint16) > 1)
else if (RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) > 1)
formatSecondary = STR_QUEUE_PEOPLE;
break;
case INFORMATION_TYPE_QUEUE_TIME:
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride_get_max_queue_time(ride);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride_get_max_queue_time(ride);
formatSecondary = STR_QUEUE_TIME_LABEL;
if (RCT2_GLOBAL(0x013CE952 + 2, uint16) > 1)
if (RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) > 1)
formatSecondary = STR_QUEUE_TIME_PLURAL_LABEL;
break;
case INFORMATION_TYPE_RELIABILITY:
// edx = RCT2_GLOBAL(0x009ACFA4 + (ride->var_001 * 4), uint32);
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->reliability >> 8;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride->reliability >> 8;
formatSecondary = STR_RELIABILITY_LABEL;
break;
case INFORMATION_TYPE_DOWN_TIME:
// edx = RCT2_GLOBAL(0x009ACFA4 + (ride->var_001 * 4), uint32);
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->downtime;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride->downtime;
formatSecondary = STR_DOWN_TIME_LABEL;
break;
case INFORMATION_TYPE_GUESTS_FAVOURITE:
formatSecondary = 0;
if (RCT2_ADDRESS(0x0097C3AF, uint8)[ride->type] == PAGE_RIDES) {
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->guests_favourite;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = ride->guests_favourite;
formatSecondary = ride->guests_favourite == 1 ? STR_GUESTS_FAVOURITE_LABEL : STR_GUESTS_FAVOURITE_PLURAL_LABEL;
}
break;
@ -537,7 +537,7 @@ static void window_ride_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi,
format = 1192;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = formatSecondary;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 160, y - 1, 157);
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 160, y - 1, 157);
y += 10;
}
}
@ -712,8 +712,8 @@ static void window_ride_list_close_all(rct_window *w)
continue;
if (ride->status == RIDE_STATUS_CLOSED)
continue;
RCT2_GLOBAL(0x013CE952 + 6, uint16) = w->scrolls[0].v_top;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = w->scrolls[0].v_bottom;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = w->scrolls[0].v_top;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = w->scrolls[0].v_bottom;
ride_set_status(i, RIDE_STATUS_CLOSED);
}
@ -729,8 +729,8 @@ static void window_ride_list_open_all(rct_window *w)
continue;
if (ride->status == RIDE_STATUS_OPEN)
continue;
RCT2_GLOBAL(0x013CE952 + 6, uint16) = w->scrolls[0].v_top;
RCT2_GLOBAL(0x013CE952 + 8, uint32) = w->scrolls[0].v_bottom;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 6, uint16) = w->scrolls[0].v_top;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 8, uint32) = w->scrolls[0].v_bottom;
ride_set_status(i, RIDE_STATUS_OPEN);
}

View File

@ -1031,12 +1031,12 @@ void window_scenery_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
// -14
gfx_draw_string_right(dpi, STR_COST_LABEL, (void*)0x013CE952, 0,
gfx_draw_string_right(dpi, STR_COST_LABEL, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,
w->x + w->width - 0x1A, w->y + w->height - 13);
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = sceneryEntry->name;
gfx_draw_string_left_clipped(dpi, 0x4A7, (void*)0x013CE952, 0,
gfx_draw_string_left_clipped(dpi, 0x4A7, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,
w->x + 3, w->y + w->height - 13, w->width - 19);
}

View File

@ -122,5 +122,5 @@ static void window_shortcut_change_paint(rct_window *w, rct_drawpixelinfo *dpi)
int y = w->y + 30;
RCT2_GLOBAL(0x13CE952, uint16) = ShortcutStringIds[RCT2_GLOBAL(0x009DE511, uint8)];
gfx_draw_string_centred_wrapped(dpi, (void*)0x013CE952, x, y, 242, 2785, RCT2_GLOBAL(0x9DEB8D, uint8));
gfx_draw_string_centred_wrapped(dpi, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, x, y, 242, 2785, RCT2_GLOBAL(0x9DEB8D, uint8));
}

View File

@ -309,8 +309,7 @@ rct_window *window_staff_open(rct_peep* peep)
w->page = 0;
w->viewport_focus_coordinates.y = 0;
w->frame_no = 0;
RCT2_GLOBAL((int*)w + 0x496, uint16) = 0; // missing, var_494 should perhaps be uint16?
w->highlighted_item = 0;
window_staff_disable_widgets(w);
@ -993,7 +992,7 @@ void window_staff_overview_tab_paint(rct_window* w, rct_drawpixelinfo* dpi)
int eax = 0;
if (w->page == WINDOW_STAFF_OVERVIEW){
eax = w->var_494 >> 16;
eax = w->highlighted_item >> 16;
eax &= 0xFFFC;
}
ebx += eax;
@ -1056,7 +1055,7 @@ void window_staff_stats_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)){
RCT2_GLOBAL(0x13CE952,uint32) = RCT2_ADDRESS(0x992A00,uint16)[peep->staff_type];
gfx_draw_string_left(dpi, 2349, (void*)0x013CE952, 0,x, y);
gfx_draw_string_left(dpi, 2349, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0,x, y);
y += 10;
}

View File

@ -591,7 +591,7 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (!(RCT2_GLOBAL(RCT2_ADDRESS_PARK_FLAGS, uint32) & PARK_FLAGS_NO_MONEY)) {
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = RCT2_ADDRESS(0x00992A00, uint16)[selectedTab];
gfx_draw_string_left(dpi, 1858, (void*)0x013CE952, 0, w->x + 0xA5, w->y + 0x20);
gfx_draw_string_left(dpi, 1858, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + 0xA5, w->y + 0x20);
}
if (selectedTab < 3) {
@ -605,9 +605,9 @@ void window_staff_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = _window_staff_list_selected_type_count;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = staffTypeStringId;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = staffTypeStringId;
gfx_draw_string_left(dpi, STR_STAFF_LIST_COUNTER, (void*)0x013CE952, 0, w->x + 4, window_staff_list_widgets[WIDX_STAFF_LIST_LIST].bottom + w->y + 2);
gfx_draw_string_left(dpi, STR_STAFF_LIST_COUNTER, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, w->x + 4, window_staff_list_widgets[WIDX_STAFF_LIST_LIST].bottom + w->y + 2);
}
/**
@ -641,13 +641,13 @@ void window_staff_list_scrollpaint(rct_window *w, rct_drawpixelinfo *dpi, int sc
}
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint16) = peep->name_string_idx;
RCT2_GLOBAL(0x013CE952 + 2, uint32) = peep->id;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 0, y - 1, 107);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint32) = peep->id;
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 0, y - 1, 107);
get_arguments_from_action(peep, &argument_1, &argument_2);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS, uint32) = argument_1;
RCT2_GLOBAL(0x013CE952 + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)0x013CE952, 0, 175, y - 1, 305);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 4, uint32) = argument_2;
gfx_draw_string_left_clipped(dpi, format, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, 175, y - 1, 305);
// True if a patrol path is set for the worker
if (RCT2_ADDRESS(RCT2_ADDRESS_STAFF_MODE_ARRAY, uint8)[peep->staff_id] & 2) {

View File

@ -390,6 +390,11 @@ static void window_tile_inspector_scrollpaint(rct_window *w, rct_drawpixelinfo *
);
type_name = buffer;
break;
case MAP_ELEMENT_TYPE_CORRUPT:
// fall-through
default:
sprintf(buffer, "Unknown (type %d)", type);
type_name = buffer;
}
gfx_draw_string(dpi, type_name, 12, x, y);

View File

@ -33,17 +33,17 @@
enum {
WIDX_START_NEW_GAME,
WIDX_CONTINUE_SAVED_GAME,
WIDX_MULTIPLAYER,
WIDX_SHOW_TUTORIAL,
WIDX_GAME_TOOLS,
WIDX_MULTIPLAYER
WIDX_GAME_TOOLS
};
static rct_widget window_title_menu_widgets[] = {
{ WWT_IMGBTN, 2, 0, 81, 0, 81, SPR_MENU_NEW_GAME, STR_START_NEW_GAME_TIP },
{ WWT_IMGBTN, 2, 82, 163, 0, 81, SPR_MENU_LOAD_GAME, STR_CONTINUE_SAVED_GAME_TIP },
{ WWT_IMGBTN, 2, 164, 245, 0, 81, SPR_MENU_TUTORIAL, STR_SHOW_TUTORIAL_TIP },
{ WWT_IMGBTN, 2, 246, 327, 0, 81, SPR_MENU_TOOLBOX, STR_GAME_TOOLS },
{ WWT_DROPDOWN_BUTTON, 2, 82, 245, 88, 99, STR_MULTIPLAYER, STR_NONE },
{ WWT_IMGBTN, 2, 0, 0, 0, 81, SPR_MENU_NEW_GAME, STR_START_NEW_GAME_TIP },
{ WWT_IMGBTN, 2, 0, 0, 0, 81, SPR_MENU_LOAD_GAME, STR_CONTINUE_SAVED_GAME_TIP },
{ WWT_IMGBTN, 2, 0, 0, 0, 81, SPR_G2_MENU_MULTIPLAYER, STR_SHOW_MULTIPLAYER_TIP },
{ WWT_IMGBTN, 2, 0, 0, 0, 81, SPR_MENU_TUTORIAL, STR_SHOW_TUTORIAL_TIP },
{ WWT_IMGBTN, 2, 0, 0, 0, 81, SPR_MENU_TOOLBOX, STR_GAME_TOOLS },
{ WIDGETS_END },
};
@ -94,8 +94,8 @@ void window_title_menu_open()
rct_window* window;
window = window_create(
(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) - 328) / 2, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16) - 142,
328, 100,
0, RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16) - 142,
0, 100,
&window_title_menu_events,
WC_TITLE_MENU,
WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND
@ -104,18 +104,29 @@ void window_title_menu_open()
window->enabled_widgets = (
(1 << WIDX_START_NEW_GAME) |
(1 << WIDX_CONTINUE_SAVED_GAME) |
(1 << WIDX_SHOW_TUTORIAL) |
(1 << WIDX_GAME_TOOLS) |
(1 << WIDX_MULTIPLAYER)
#ifndef DISABLE_NETWORK
(1 << WIDX_MULTIPLAYER) |
#endif
// Disable tutorial
// (1 << WIDX_SHOW_TUTORIAL) |
(1 << WIDX_GAME_TOOLS)
);
// Disable tutorial button
window->disabled_widgets = (1 << WIDX_SHOW_TUTORIAL);
int i = 0;
int x = 0;
for (rct_widget *widget = window->widgets; widget->type != WWT_LAST; widget++) {
if (widget_is_enabled(window, i)) {
widget->left = x;
widget->right = x + 81;
#if DISABLE_NETWORK
// Disable multiplayer
window->widgets[WIDX_MULTIPLAYER].type = WWT_EMPTY;
#endif
x += 82;
} else {
widget->type = WWT_EMPTY;
}
i++;
}
window->width = x;
window->x = (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16) - window->width) / 2;
window_init_scroll_widgets(window);
}
@ -195,18 +206,6 @@ static void window_title_menu_cursor(rct_window *w, int widgetIndex, int x, int
static void window_title_menu_paint(rct_window *w, rct_drawpixelinfo *dpi)
{
gfx_fill_rect(dpi, w->x, w->y, w->x + w->width - 1, w->y + 82 - 1, 0x2000000 | 51);
rct_widget *multiplayerButtonWidget = &window_title_menu_widgets[WIDX_MULTIPLAYER];
if (multiplayerButtonWidget->type != WWT_EMPTY) {
gfx_fill_rect(
dpi,
w->x + multiplayerButtonWidget->left,
w->y + multiplayerButtonWidget->top,
w->x + multiplayerButtonWidget->right,
w->y + multiplayerButtonWidget->bottom,
0x2000000 | 51
);
}
window_draw_widgets(w, dpi);
}

View File

@ -122,10 +122,12 @@ void window_scenarioselect_open()
);
window->widgets = window_scenarioselect_widgets;
window->enabled_widgets = 0x04 | 0x10 | 0x20 | 0x40 | 0x80 | 0x100;
window->enabled_widgets = (1 << WIDX_CLOSE) | (1 << WIDX_TAB1) | (1 << WIDX_TAB2)
| (1 << WIDX_TAB3) | (1 << WIDX_TAB4) | (1 << WIDX_TAB5);
window_init_scroll_widgets(window);
window->viewport_focus_coordinates.var_480 = -1;
window->var_494 = 0;
window->highlighted_item = 0;
window_scenarioselect_init_tabs();
@ -174,7 +176,7 @@ static void window_scenarioselect_mousedown(int widgetIndex, rct_window*w, rct_w
{
if (widgetIndex >= WIDX_TAB1 && widgetIndex <= WIDX_TAB5) {
w->selected_tab = widgetIndex - 4;
w->var_494 = 0;
w->highlighted_item = 0;
window_invalidate(w);
window_event_resize_call(w);
window_event_invalidate_call(w);
@ -248,8 +250,8 @@ static void window_scenarioselect_scrollmouseover(rct_window *w, int scrollIndex
selected = scenario;
break;
}
if (w->var_494 != (uint32)selected) {
w->var_494 = (uint32)selected;
if (w->highlighted_item != (uint32)selected) {
w->highlighted_item = (uint32)selected;
window_invalidate(w);
}
}
@ -258,7 +260,9 @@ static void window_scenarioselect_invalidate(rct_window *w)
{
colour_scheme_update(w);
w->pressed_widgets &= ~(0x10 | 0x20 | 0x40 | 0x80 | 0x100);
w->pressed_widgets &= ~( (1 << WIDX_CLOSE) | (1 << WIDX_TAB1) | (1 << WIDX_TAB2)
| (1 << WIDX_TAB3) | (1 << WIDX_TAB4) | (1 << WIDX_TAB5) );
w->pressed_widgets |= 1LL << (w->selected_tab + 4);
}
@ -285,7 +289,7 @@ static void window_scenarioselect_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
// Return if no scenario highlighted
scenario = (rct_scenario_basic*)w->var_494;
scenario = (rct_scenario_basic*)w->highlighted_item;
if (scenario == NULL)
return;
@ -341,7 +345,7 @@ static void window_scenarioselect_scrollpaint(rct_window *w, rct_drawpixelinfo *
if (y > dpi->y + dpi->height)
continue;
highlighted = w->var_494 == (int)scenario;
highlighted = w->highlighted_item == (int)scenario;
// Draw hover highlight
if (highlighted)

View File

@ -92,7 +92,7 @@ void window_tooltip_show(rct_string_id id, int x, int y)
RCT2_GLOBAL(0x0142006C, sint32) = -1;
char* buffer = RCT2_ADDRESS(RCT2_ADDRESS_COMMON_STRING_FORMAT_BUFFER, char);
format_string(buffer, id, (void*)0x013CE952);
format_string(buffer, id, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS);
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16) = FONT_SPRITE_BASE_MEDIUM;
int tooltip_text_width;

View File

@ -30,7 +30,6 @@
#include "error.h"
#include "../interface/themes.h"
#include "../rct1.h"
#include "../network/network.h"
enum {
WIDX_BACKGROUND,
@ -146,13 +145,6 @@ void window_track_list_open(ride_list_item item)
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_DESIGN_SCENERY_TOGGLE, uint8) = 0;
window_push_others_right(w);
RCT2_GLOBAL(RCT2_ADDRESS_TRACK_PREVIEW_ROTATION, uint8) = 2;
#ifndef NETWORK_DISABLE
// TODO: FIX NETWORK TRACKS
// Until tracks work with the network this will disable them
if (network_get_mode() != NETWORK_MODE_NONE)
RCT2_ADDRESS(RCT2_ADDRESS_TRACK_LIST, utf8)[0] = 0;
#endif
}
/**
@ -491,9 +483,9 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
}
// Ride length
RCT2_GLOBAL(0x013CE952 + 0, uint16) = 1345;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = track_td6->ride_length;
gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, (void*)0x013CE952, 0, x, y, 214);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = 1345;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = track_td6->ride_length;
gfx_draw_string_left_clipped(dpi, STR_TRACK_LIST_RIDE_LENGTH, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y, 214);
y += 10;
}
@ -548,9 +540,9 @@ static void window_track_list_paint(rct_window *w, rct_drawpixelinfo *dpi)
if (track_td6->space_required_x != 0xFF) {
// Space required
RCT2_GLOBAL(0x013CE952 + 0, uint16) = track_td6->space_required_x;
RCT2_GLOBAL(0x013CE952 + 2, uint16) = track_td6->space_required_y;
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, (void*)0x013CE952, 0, x, y);
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint16) = track_td6->space_required_x;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 2, uint16) = track_td6->space_required_y;
gfx_draw_string_left(dpi, STR_TRACK_LIST_SPACE_REQUIRED, (void*)RCT2_ADDRESS_COMMON_FORMAT_ARGS, 0, x, y);
y += 10;
}

View File

@ -221,7 +221,7 @@ static void window_viewport_invalidate(rct_window *w)
}
// Set title
RCT2_GLOBAL(0x013CE952 + 0, uint32) = w->number;
RCT2_GLOBAL(RCT2_ADDRESS_COMMON_FORMAT_ARGS + 0, uint32) = w->number;
// Set disabled widgets
w->disabled_widgets = 0;

View File

@ -121,7 +121,10 @@ enum {
MAP_ELEMENT_TYPE_ENTRANCE = (4 << 2),
MAP_ELEMENT_TYPE_FENCE = (5 << 2),
MAP_ELEMENT_TYPE_SCENERY_MULTIPLE = (6 << 2),
MAP_ELEMENT_TYPE_BANNER = (7 << 2)
MAP_ELEMENT_TYPE_BANNER = (7 << 2),
// The corrupt element type is used for skipping drawing other following
// elements on a given tile.
MAP_ELEMENT_TYPE_CORRUPT = (8 << 2),
};
enum {