mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-15 23:29:42 +00:00
Compare commits
116 Commits
16.0-beta1
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f2f61c49b | |||
| 162c629766 | |||
| 9bea75a8d1 | |||
| 150da36869 | |||
| e065da15ff | |||
| 2d48e82bbb | |||
| fa4b9819c0 | |||
| 7126fcafcc | |||
| 659208ab57 | |||
| 143af1098d | |||
| 68f5a8a0fd | |||
| 121df5b461 | |||
| 1d1c603494 | |||
| af60d6b7cd | |||
| fe31736981 | |||
| 80d0c7763a | |||
| 6b553caa74 | |||
| 2c48b1efb9 | |||
| e3dfd59df0 | |||
| 0366278c9d | |||
| 808ae7f270 | |||
| d1ec9f4897 | |||
| 922d38f1c0 | |||
| e4620d5832 | |||
| cf48f866eb | |||
| 3c30f962d4 | |||
| 3fb3006dff | |||
| 0ab5b6df1b | |||
| a961e64928 | |||
| 9f8ac2aaa1 | |||
| 0c6de46b4c | |||
| 83f20c3375 | |||
| 85e6f020f9 | |||
| 83ce49f6cb | |||
| 44b51a94c5 | |||
| f5e4bd1ed7 | |||
| 5303aa6516 | |||
| 5403257dca | |||
| 05e596661e | |||
| e95f43a720 | |||
| 51af63cc9f | |||
| 8e89414d9e | |||
| 24333d76a9 | |||
| ac51eab537 | |||
| 0f09b4b371 | |||
| bf7bb3efaf | |||
| 9ba2e386ac | |||
| 21d9af637a | |||
| 788e112be1 | |||
| bf70c61fb8 | |||
| c18b3a8a04 | |||
| 8e08f1a3c5 | |||
| 8303b2d694 | |||
| 4d7e1385f9 | |||
| d2a3f52257 | |||
| 01919af55b | |||
| 9c3f5bc375 | |||
| 0a9aa3d20b | |||
| 8db7db5569 | |||
| d9d7f441db | |||
| 76265b8451 | |||
| 1310531139 | |||
| 0bd12558d4 | |||
| bdbe305771 | |||
| 71ca79c6d5 | |||
| afbe2d3070 | |||
| f72a239b97 | |||
| df20fed464 | |||
| af1e9864a0 | |||
| 3f557fb673 | |||
| 36551ba6b5 | |||
| 11f46bc5f4 | |||
| 099df1054e | |||
| d3d1de822d | |||
| ef0d26f9f7 | |||
| 8a8ece49ec | |||
| a01a2f8401 | |||
| d0dcd1b134 | |||
| a5430717b1 | |||
| c367b10bde | |||
| 2934eca24a | |||
| 02becd50c5 | |||
| 3ba0706a5c | |||
| 1acbb1c654 | |||
| 6f6551c08d | |||
| b4d16d319f | |||
| 8e637cefed | |||
| 5923d105ec | |||
| a76ba0d3d4 | |||
| b7d07252e7 | |||
| f8af6bbc2f | |||
| 8b83bac31f | |||
| b02242d5fc | |||
| 4344ffb7a0 | |||
| 4e9645e9d0 | |||
| 947767a2ff | |||
| 4b93bd74ef | |||
| 061e5c9cd3 | |||
| 5b3b7995bb | |||
| 3666eb23a1 | |||
| f9e6b8b7dd | |||
| 2a6a65662d | |||
| b7e693ced6 | |||
| b9986cdadf | |||
| dc87cd3d7a | |||
| 8ca99f96ee | |||
| 790a6903af | |||
| 98dfc7376c | |||
| cc92e3d421 | |||
| 42fe1133ad | |||
| fc0ad4bb0a | |||
| 5bb87d39b7 | |||
| f8ad1a4999 | |||
| f0a1b507fe | |||
| 2f4ae80226 | |||
| 11e713ce9a |
@@ -14,30 +14,23 @@ jobs:
|
||||
container:
|
||||
# If you change this version, change the numbers in the cache step,
|
||||
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
image: emscripten/emsdk:6.0.1
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Fix dubious ownership
|
||||
run: |
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
|
||||
- name: Update to modern GCC
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y gcc-12 g++-12
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
# If you change this version, change the numbers in the image configuration step,
|
||||
# .github/workflows/preview-build.yml (2x) and os/emscripten/Dockerfile too.
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
key: 6.0.1-${{ runner.os }}
|
||||
|
||||
- name: Add liblzma support
|
||||
run: |
|
||||
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup vcpkg
|
||||
id: vcpkg
|
||||
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
xcode-version: latest-stable
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup vcpkg
|
||||
id: vcpkg
|
||||
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup MSYS2
|
||||
uses: msys2/setup-msys2@v2
|
||||
|
||||
@@ -18,7 +18,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup vcpkg
|
||||
id: vcpkg
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Setup vcpkg
|
||||
id: vcpkg
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 4
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 4
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 4
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ jobs:
|
||||
container:
|
||||
# If you change this version, change the numbers in the cache step,
|
||||
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
|
||||
image: emscripten/emsdk:3.1.57
|
||||
image: emscripten/emsdk:6.0.1
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
@@ -24,20 +24,13 @@ jobs:
|
||||
git config --global --add safe.directory ${GITHUB_WORKSPACE}
|
||||
git checkout -b pr${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Update to modern GCC
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y gcc-12 g++-12
|
||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
|
||||
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100
|
||||
|
||||
- name: Setup cache
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v6
|
||||
with:
|
||||
path: /emsdk/upstream/emscripten/cache
|
||||
# If you change this version, change the numbers in the image configuration step,
|
||||
# .github/workflows/ci-emscripten.yml (2x) and os/emscripten/Dockerfile too.
|
||||
key: 3.1.57-${{ runner.os }}
|
||||
key: 6.0.1-${{ runner.os }}
|
||||
|
||||
- name: Add liblzma support
|
||||
run: |
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
echo "number=$(cat pr/number)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Publish preview
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
uses: cloudflare/wrangler-action@v4
|
||||
with:
|
||||
apiToken: ${{ secrets.PREVIEW_CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.PREVIEW_CLOUDFLARE_ACCOUNT_ID }}
|
||||
|
||||
@@ -30,14 +30,14 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout (Release)
|
||||
if: github.event_name == 'release'
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout (Manual)
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.inputs.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
@@ -45,7 +45,7 @@ jobs:
|
||||
|
||||
- name: Checkout (Trigger)
|
||||
if: github.event_name == 'repository_dispatch'
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
# We generate a changelog; for this we need the full git log.
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Check for finding script functions that require company/deity mode enforcement/checks
|
||||
run: |
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Check for unused strings
|
||||
run: |
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@ if(EMSCRIPTEN)
|
||||
add_definitions(-s DISABLE_EXCEPTION_CATCHING=0)
|
||||
|
||||
# Export functions to Javascript.
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\"]'")
|
||||
target_link_libraries(WASM::WASM INTERFACE "-s EXPORTED_FUNCTIONS='[\"_main\", \"_em_openttd_add_server\"]' -s EXPORTED_RUNTIME_METHODS='[\"cwrap\", \"HEAPU8\"]'")
|
||||
|
||||
# Preload all the files we generate during build.
|
||||
# As we do not compile with FreeType / FontConfig, we also have no way to
|
||||
|
||||
+111
-97
@@ -1,104 +1,118 @@
|
||||
## 16.x
|
||||
|
||||
### 16.0-beta2 (2026-07-12)
|
||||
|
||||
- Feature: Allow bridges over depots (#15836)
|
||||
- Feature: Increase maximum number of vehicles per type to 10,000 (#15810)
|
||||
- Feature: Add and remove whole classes to picker collections (#15808)
|
||||
- Feature: Station list can be filtered by name (#15772)
|
||||
- Change: Use "bridge ... too low" message for bridgeable objects (#15838)
|
||||
- Fix: Use meaningful tooltips for graph range toggle buttons (#15842)
|
||||
- Fix #15826: Exclude allow any/all options for AI companies (#15834)
|
||||
- Fix #7992: Fix for catenary road and tram catenary sprites not being drawn on bridges (#15811)
|
||||
- Fix #15784: Crash due to incorrect road build toolbar when switching road tram types (#15789)
|
||||
- Fix: [NewGRF] Make 'signals on traffic side' consistent with explicit settings (#15661)
|
||||
- Fix: [Win32] Explicitly initialize COM in Win32 video driver (#15553)
|
||||
|
||||
### 16.0-beta1 (2026-06-25)
|
||||
|
||||
Feature: Add default road and tram selection (#15585)
|
||||
Feature: Trains with an engine on the rear can drive backwards when reversing (#15379)
|
||||
Feature: Add worldgen setting for average height of terrain (#14989)
|
||||
Feature: Add text filter to dropdown lists (#14842)
|
||||
Feature: User-defined collections of saved items in the picker window (#14813)
|
||||
Feature: Configurable sign text colors in scenario editor (#14743)
|
||||
Feature: Allow placing an area of 1x1 houses in scenario editor (#14708)
|
||||
Feature: Scale cargo payment aging rate (#14635)
|
||||
Feature: Support automatic detection of data from Atari's Transport Tycoon Deluxe re-release (#15483)
|
||||
Add: [NewGRF] Implement custom waypoint layouts by callback 24 (#15616)
|
||||
Add: List 'Place object' in landscaping dropdown (#15609)
|
||||
Add: Setting to disable aircraft range limit (#15433)
|
||||
Add: Show maximum reliability in vehicle info (#15401)
|
||||
Add: Lower the Send To Depot button when a vehicle is on its way to one (#15397)
|
||||
Add: Setting to disallow train magic flip, and reverse at reduced speed (#15391)
|
||||
Add: [NewGRF] Variable for when a train is driving backwards (#15379)
|
||||
Add: [NewGRF] Flag to allow unpowered wagon to lead train when backing up (#15379)
|
||||
Add: [NewGRF] Station flag to divide cargo by area instead of perimeter (#15253)
|
||||
Add: Company allow-list can be set to allow anyone (#15204)
|
||||
Add: Record history of cargo delivered to towns (#15184)
|
||||
Add: Show additional vehicle details based on sort criteria (#15158)
|
||||
Add: Setting to control minimum distance between towns (#14893)
|
||||
Change: Selecting Rail/Roadtype updates build toolbar instead of closing and reopening (#15589)
|
||||
Change: Default setting to review orders excludes stopped vehicles (#15565)
|
||||
Change: Most used rail type takes ownership into account (#15489)
|
||||
Change: Test font for eligibility before adding as fallback (#15412)
|
||||
Change: Clarify max age shown in vehicle info window (#15403)
|
||||
Change: Show "Delete All" in order window delete button when applicable (#15370)
|
||||
Change: Make continuation error messages consistent (#15328)
|
||||
Change: Distinguish between 'Flat land required' and 'Land sloped in wrong direction' for building depots (#15327)
|
||||
Change: Allow subsidies with CargoDist (#15189)
|
||||
Change: Removing river tiles reduces local authority rating (#15180)
|
||||
Change: Protect rivers from removal when terraforming (#15176)
|
||||
Change: [Script] Reformat callstack output (#15171)
|
||||
Change: Apply slightly more padding to image-text buttons (#15077)
|
||||
Change: [NewGRF] Display rail and road type speed limit text in yellow (#15076)
|
||||
Change: Make smallmap show infinite water, if enabled (#15041)
|
||||
Change: Add support for next/previous/first/last rail/road/tram type hotkeys (#15028)
|
||||
Change: Allow rocks on desert tiles (#14979)
|
||||
Change: [Script] Include Array/PriorityQueye/ScriptList contents in script memory allocation total (#14954)
|
||||
Change: [Script] Various ScriptList methods are now suspendable (#14943, #14762)
|
||||
Change: Improve generation of coasts at map edges (#14868)
|
||||
Change: Show only selected badge in badge filter dropdown buttons (#14855)
|
||||
Change: River springs must be surrounded by hills (#14845)
|
||||
Change: Vehicles loading at stations don't lose reliability (#14841)
|
||||
Change: Generate lighthouses along coasts and near towns (#14828)
|
||||
Change: Transmitter object only spawns after original base year (#14786)
|
||||
Change: Share one window for engine preview pop ups (#14703)
|
||||
Fix: [NewGRF] Town name language incorrectly decoded (#15691)
|
||||
Fix #15606: Undefined behaviour may cause buttons to be invisible (#15686)
|
||||
Fix #14975: Show correct tile for tunnel error message (#15660)
|
||||
Fix: [NewGRF] Incorrect language IDs passed to TranslateTTDPatchCodes (#15655)
|
||||
Fix: Scenario editor random industry generation (#15626)
|
||||
Fix: [NewGRF] Ignore blocked waypoint tiles (#15620)
|
||||
Fix: [NewGRF] Pylons and no-wires flags were ignored for waypoint tiles (#15619)
|
||||
Fix: Dedicated server signal handling for SIGTERM/SIGINT/SIGQUIT (#15607)
|
||||
Fix: [NewGRF] Potential out-of-bounds read when performing GRM (#15600)
|
||||
Fix: Badge offsets not ignored when determining width (#15588)
|
||||
Fix: Account for NewGRF's global train width when drawing dual-head engines (#15587)
|
||||
Fix: Station list facility buttons do not produce click sound (#15569)
|
||||
Fix #15495: Fix incorrectly built default waypoints (#15562)
|
||||
Fix #15495: Unable to build bridge over default waypoints (#15562)
|
||||
Fix #15235: Make GameScripts obey town road construction setting (#15559)
|
||||
Fix: Crash when loading crash save with no viewport coordinates (#15550)
|
||||
Fix #15520: Fix viewport snap back on stop following vehicle (#15520) (#15531)
|
||||
Fix: Buttons for choosing engine in preview window show for single engine (#15514)
|
||||
Fix #15511: Vehicle passed to commands must be a company buildable type (#15512)
|
||||
Fix #15497: [Script] ScriptController::Break not pausing in TestMode (#15498)
|
||||
Fix: Coordinate transformation for JSON town placement when anticlockwise (#15490)
|
||||
Fix: NewGRF debug handler for towns in wrong place since badges (#15467)
|
||||
Fix: Object id overrides were not reset between games (#15465)
|
||||
Fix: Debug saveload errors were clobbered (#15452)
|
||||
Fix: Refresh client list when client renames (#15439)
|
||||
Fix #15428: [Fluidsynth] Treat configured synth.gain as maximum instead of hardcoded value (#15429)
|
||||
Fix: Refresh string width cache for all loaded fonts (#15427)
|
||||
Fix: Typo in Hungarian town name suffix ("kak" -> "lak") (#15421)
|
||||
Fix: [NewGRF] Variable 0x69 has not been added for waypoints (#15396)
|
||||
Fix: Dropdown text filter could interfere with hotkeys after closing (#15395)
|
||||
Fix: Rejecting or accepting engine preview incorrectly closed preview window (#15378)
|
||||
Fix #15318: Nonsensical error message when trying to send aircraft to hangar with no usable airports (#15334)
|
||||
Fix #15234: Null pointer dereference opening sign edit window when sign 0 does not exist (#15236)
|
||||
Fix: [GS] Docs are missing or do not match the code (#15230)
|
||||
Fix: Off by one and redundant logic in snowy road checks (#15214)
|
||||
Fix #15137: Roads built on steep slopes at the minimum snow level height have inconsistent snowiness (#15190)
|
||||
Fix: Station view window fold/unfold not refreshing scrollbar (#15187)
|
||||
Fix: Use consistent description for invalid orders (#15177)
|
||||
Fix: [Script] Give GetPrimary/SecondaryLiveryColour preconditions (#15169)
|
||||
Fix: Cocoa video driver did not register (#15145)
|
||||
Fix: MacOS version detection was broken (#15145)
|
||||
Fix #13600: Make terraform click+draggable in scenario editor (#15135)
|
||||
Fix: [Script] Map some error strings to existing errors (#15113)
|
||||
Fix: Allow to build buoys at (0x0) (#14983)
|
||||
Fix #14610: Do not treat aircraft with only depot orders as having valid orders (#14961)
|
||||
Fix #12937: Allow the computer to go to sleep while the game is paused (#14948)
|
||||
Fix: Company query popups do not update in multiplayer (#14947)
|
||||
Fix #14892: Potential crash when logging fonts for survey (#14896)
|
||||
Fix #14827: Store random trigger information per-tile (#14830)
|
||||
- Feature: Add default road and tram selection (#15585)
|
||||
- Feature: Trains with an engine on the rear can drive backwards when reversing (#15379)
|
||||
- Feature: Add worldgen setting for average height of terrain (#14989)
|
||||
- Feature: Add text filter to dropdown lists (#14842)
|
||||
- Feature: User-defined collections of saved items in the picker window (#14813)
|
||||
- Feature: Configurable sign text colors in scenario editor (#14743)
|
||||
- Feature: Allow placing an area of 1x1 houses in scenario editor (#14708)
|
||||
- Feature: Scale cargo payment aging rate (#14635)
|
||||
- Feature: Support automatic detection of data from Atari's Transport Tycoon Deluxe re-release (#15483)
|
||||
- Add: [NewGRF] Implement custom waypoint layouts by callback 24 (#15616)
|
||||
- Add: List 'Place object' in landscaping dropdown (#15609)
|
||||
- Add: Setting to disable aircraft range limit (#15433)
|
||||
- Add: Show maximum reliability in vehicle info (#15401)
|
||||
- Add: Lower the Send To Depot button when a vehicle is on its way to one (#15397)
|
||||
- Add: Setting to disallow train magic flip, and reverse at reduced speed (#15391)
|
||||
- Add: [NewGRF] Variable for when a train is driving backwards (#15379)
|
||||
- Add: [NewGRF] Flag to allow unpowered wagon to lead train when backing up (#15379)
|
||||
- Add: [NewGRF] Station flag to divide cargo by area instead of perimeter (#15253)
|
||||
- Add: Company allow-list can be set to allow anyone (#15204)
|
||||
- Add: Record history of cargo delivered to towns (#15184)
|
||||
- Add: Show additional vehicle details based on sort criteria (#15158)
|
||||
- Add: Setting to control minimum distance between towns (#14893)
|
||||
- Change: Selecting Rail/Roadtype updates build toolbar instead of closing and reopening (#15589)
|
||||
- Change: Default setting to review orders excludes stopped vehicles (#15565)
|
||||
- Change: Most used rail type takes ownership into account (#15489)
|
||||
- Change: Test font for eligibility before adding as fallback (#15412)
|
||||
- Change: Clarify max age shown in vehicle info window (#15403)
|
||||
- Change: Show "Delete All" in order window delete button when applicable (#15370)
|
||||
- Change: Make continuation error messages consistent (#15328)
|
||||
- Change: Distinguish between 'Flat land required' and 'Land sloped in wrong direction' for building depots (#15327)
|
||||
- Change: Allow subsidies with CargoDist (#15189)
|
||||
- Change: Removing river tiles reduces local authority rating (#15180)
|
||||
- Change: Protect rivers from removal when terraforming (#15176)
|
||||
- Change: [Script] Reformat callstack output (#15171)
|
||||
- Change: Apply slightly more padding to image-text buttons (#15077)
|
||||
- Change: [NewGRF] Display rail and road type speed limit text in yellow (#15076)
|
||||
- Change: Make smallmap show infinite water, if enabled (#15041)
|
||||
- Change: Add support for next/previous/first/last rail/road/tram type hotkeys (#15028)
|
||||
- Change: Allow rocks on desert tiles (#14979)
|
||||
- Change: [Script] Include Array/PriorityQueye/ScriptList contents in script memory allocation total (#14954)
|
||||
- Change: [Script] Various ScriptList methods are now suspendable (#14943, #14762)
|
||||
- Change: Improve generation of coasts at map edges (#14868)
|
||||
- Change: Show only selected badge in badge filter dropdown buttons (#14855)
|
||||
- Change: River springs must be surrounded by hills (#14845)
|
||||
- Change: Vehicles loading at stations don't lose reliability (#14841)
|
||||
- Change: Generate lighthouses along coasts and near towns (#14828)
|
||||
- Change: Transmitter object only spawns after original base year (#14786)
|
||||
- Change: Share one window for engine preview pop ups (#14703)
|
||||
- Fix: [NewGRF] Town name language incorrectly decoded (#15691)
|
||||
- Fix #15606: Undefined behaviour may cause buttons to be invisible (#15686)
|
||||
- Fix #14975: Show correct tile for tunnel error message (#15660)
|
||||
- Fix: [NewGRF] Incorrect language IDs passed to TranslateTTDPatchCodes (#15655)
|
||||
- Fix: Scenario editor random industry generation (#15626)
|
||||
- Fix: [NewGRF] Ignore blocked waypoint tiles (#15620)
|
||||
- Fix: [NewGRF] Pylons and no-wires flags were ignored for waypoint tiles (#15619)
|
||||
- Fix: Dedicated server signal handling for SIGTERM/SIGINT/SIGQUIT (#15607)
|
||||
- Fix: [NewGRF] Potential out-of-bounds read when performing GRM (#15600)
|
||||
- Fix: Badge offsets not ignored when determining width (#15588)
|
||||
- Fix: Account for NewGRF's global train width when drawing dual-head engines (#15587)
|
||||
- Fix: Station list facility buttons do not produce click sound (#15569)
|
||||
- Fix #15495: Fix incorrectly built default waypoints (#15562)
|
||||
- Fix #15495: Unable to build bridge over default waypoints (#15562)
|
||||
- Fix #15235: Make GameScripts obey town road construction setting (#15559)
|
||||
- Fix: Crash when loading crash save with no viewport coordinates (#15550)
|
||||
- Fix #15520: Fix viewport snap back on stop following vehicle (#15520) (#15531)
|
||||
- Fix: Buttons for choosing engine in preview window show for single engine (#15514)
|
||||
- Fix #15511: Vehicle passed to commands must be a company buildable type (#15512)
|
||||
- Fix #15497: [Script] ScriptController::Break not pausing in TestMode (#15498)
|
||||
- Fix: Coordinate transformation for JSON town placement when anticlockwise (#15490)
|
||||
- Fix: NewGRF debug handler for towns in wrong place since badges (#15467)
|
||||
- Fix: Object id overrides were not reset between games (#15465)
|
||||
- Fix: Debug saveload errors were clobbered (#15452)
|
||||
- Fix: Refresh client list when client renames (#15439)
|
||||
- Fix #15428: [Fluidsynth] Treat configured synth.gain as maximum instead of hardcoded value (#15429)
|
||||
- Fix: Refresh string width cache for all loaded fonts (#15427)
|
||||
- Fix: Typo in Hungarian town name suffix ("kak" -> "lak") (#15421)
|
||||
- Fix: [NewGRF] Variable 0x69 has not been added for waypoints (#15396)
|
||||
- Fix: Dropdown text filter could interfere with hotkeys after closing (#15395)
|
||||
- Fix: Rejecting or accepting engine preview incorrectly closed preview window (#15378)
|
||||
- Fix #15318: Nonsensical error message when trying to send aircraft to hangar with no usable airports (#15334)
|
||||
- Fix #15234: Null pointer dereference opening sign edit window when sign 0 does not exist (#15236)
|
||||
- Fix: [GS] Docs are missing or do not match the code (#15230)
|
||||
- Fix: Off by one and redundant logic in snowy road checks (#15214)
|
||||
- Fix #15137: Roads built on steep slopes at the minimum snow level height have inconsistent snowiness (#15190)
|
||||
- Fix: Station view window fold/unfold not refreshing scrollbar (#15187)
|
||||
- Fix: Use consistent description for invalid orders (#15177)
|
||||
- Fix: [Script] Give GetPrimary/SecondaryLiveryColour preconditions (#15169)
|
||||
- Fix: Cocoa video driver did not register (#15145)
|
||||
- Fix: MacOS version detection was broken (#15145)
|
||||
- Fix #13600: Make terraform click+draggable in scenario editor (#15135)
|
||||
- Fix: [Script] Map some error strings to existing errors (#15113)
|
||||
- Fix: Allow to build buoys at (0x0) (#14983)
|
||||
- Fix #14610: Do not treat aircraft with only depot orders as having valid orders (#14961)
|
||||
- Fix #12937: Allow the computer to go to sleep while the game is paused (#14948)
|
||||
- Fix: Company query popups do not update in multiplayer (#14947)
|
||||
- Fix #14892: Potential crash when logging fonts for survey (#14896)
|
||||
- Fix #14827: Store random trigger information per-tile (#14830)
|
||||
|
||||
## 15.x
|
||||
|
||||
|
||||
@@ -56,11 +56,6 @@ macro(compile_flags)
|
||||
# This flag disables the broken optimisation to work around the bug
|
||||
add_compile_options(/d2ssa-rse-)
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(
|
||||
-Wno-multichar
|
||||
)
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
add_compile_options(
|
||||
-W
|
||||
@@ -78,9 +73,6 @@ macro(compile_flags)
|
||||
-Wnon-virtual-dtor
|
||||
-Wsuggest-override
|
||||
|
||||
# We use 'ABCD' multichar for SaveLoad chunks identifiers
|
||||
-Wno-multichar
|
||||
|
||||
# Prevent optimisation supposing enums are in a range specified by the standard
|
||||
# For details, see http://gcc.gnu.org/PR43680 and PR#5246.
|
||||
-fno-strict-enums
|
||||
@@ -126,18 +118,6 @@ macro(compile_flags)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
|
||||
add_compile_options(
|
||||
-Wall
|
||||
# warning #873: function ... ::operator new ... has no corresponding operator delete ...
|
||||
-wd873
|
||||
# warning #1292: unknown attribute "fallthrough"
|
||||
-wd1292
|
||||
# warning #1899: multicharacter character literal (potential portability problem)
|
||||
-wd1899
|
||||
# warning #2160: anonymous union qualifier is ignored
|
||||
-wd2160
|
||||
)
|
||||
else()
|
||||
message(FATAL_ERROR "No warning flags are set for this compiler yet; please consider creating a Pull Request to add support for this compiler.")
|
||||
endif()
|
||||
|
||||
@@ -191,17 +191,26 @@ elseif(UNIX)
|
||||
set(PLATFORM "unknown")
|
||||
else()
|
||||
if(EXISTS "/etc/os-release")
|
||||
file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=")
|
||||
string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS})
|
||||
set(DISTRO_ID ${CMAKE_MATCH_1})
|
||||
if(DISTRO_ID STREQUAL "arch")
|
||||
file(STRINGS "/etc/os-release" OS_RELEASE_LIKE_CONTENTS REGEX "^ID_LIKE=")
|
||||
if (OS_RELEASE_LIKE_CONTENTS)
|
||||
string(REGEX MATCH "ID_LIKE=\\\"?([^\\\"]+)" _ ${OS_RELEASE_LIKE_CONTENTS})
|
||||
string(REGEX MATCHALL "([^ ]+)" DISTRO_LIKE_IDS ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if (DISTRO_LIKE_IDS)
|
||||
set(DISTRO_IDS ${DISTRO_LIKE_IDS})
|
||||
else()
|
||||
file(STRINGS "/etc/os-release" OS_RELEASE_CONTENTS REGEX "^ID=")
|
||||
string(REGEX MATCH "ID=(.*)" _ ${OS_RELEASE_CONTENTS})
|
||||
set(DISTRO_IDS ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if("arch" IN_LIST DISTRO_IDS)
|
||||
set(PLATFORM "arch")
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
elseif(DISTRO_ID STREQUAL "fedora" OR DISTRO_ID STREQUAL "rhel")
|
||||
elseif("fedora" IN_LIST DISTRO_IDS OR "rhel" IN_LIST DISTRO_IDS)
|
||||
set(PLATFORM "fedora")
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
include(PackageRPM)
|
||||
elseif(DISTRO_ID STREQUAL "ubuntu" OR DISTRO_ID STREQUAL "debian" OR DISTRO_ID STREQUAL "linuxmint")
|
||||
elseif("debian" IN_LIST DISTRO_IDS OR "ubuntu" IN_LIST DISTRO_IDS OR "linuxmint" IN_LIST DISTRO_IDS)
|
||||
file(STRINGS "/etc/os-release" OS_RELEASE_CODENAME REGEX "^VERSION_CODENAME=")
|
||||
string(REGEX MATCH "VERSION_CODENAME=(.*)" _ ${OS_RELEASE_CODENAME})
|
||||
set(RELEASE_CODENAME ${CMAKE_MATCH_1})
|
||||
|
||||
+16
-16
@@ -69,19 +69,19 @@ An example of a valid tag is `PLYR` when looking at it via ASCII, which contains
|
||||
`[4..4]` - Next follows a byte where the lower 4 bits contain the type.
|
||||
The possible valid types are:
|
||||
|
||||
- `0` - `CH_RIFF` - This chunk is a binary blob.
|
||||
- `1` - `CH_ARRAY` - This chunk is a list of items.
|
||||
- `2` - `CH_SPARSE_ARRAY` - This chunk is a list of items.
|
||||
- `3` - `CH_TABLE` - This chunk is self-describing list of items.
|
||||
- `4` - `CH_SPARSE_TABLE` - This chunk is self-describing list of items.
|
||||
- `0` - `ChunkType::Riff` - This chunk is a binary blob.
|
||||
- `1` - `ChunkType::Array` - This chunk is a list of items.
|
||||
- `2` - `ChunkType::SparseArray` - This chunk is a list of items.
|
||||
- `3` - `ChunkType::Table` - This chunk is self-describing list of items.
|
||||
- `4` - `ChunkType::SparseTable` - This chunk is self-describing list of items.
|
||||
|
||||
Now per type the format is (slightly) different.
|
||||
|
||||
### CH_RIFF
|
||||
### ChunkType::Riff
|
||||
|
||||
(since savegame version 295, this chunk type is only used for MAP-chunks, containing bit-information about each tile on the map)
|
||||
|
||||
A `CH_RIFF` starts with an `uint24` which together with the upper-bits of the type defines the length of the chunk.
|
||||
A `ChunkType::Riff` starts with an `uint24` which together with the upper-bits of the type defines the length of the chunk.
|
||||
In pseudo-code:
|
||||
|
||||
```
|
||||
@@ -94,11 +94,11 @@ if type == 0
|
||||
The next `length` bytes are part of the chunk.
|
||||
What those bytes mean depends on the tag of the chunk; further details per chunk can be found in the source-code.
|
||||
|
||||
### CH_ARRAY / CH_SPARSE_ARRAY
|
||||
### ChunkType::Array / ChunkType::SparseArray
|
||||
|
||||
(this chunk type is deprecated since savegame version 295 and is no longer in use)
|
||||
|
||||
`[0..G1]` - A `CH_ARRAY` / `CH_SPARSE_ARRAY` starts with a `gamma`, indicating the size of the next item plus one.
|
||||
`[0..G1]` - A `ChunkType::Array` / `ChunkType::SparseArray` starts with a `gamma`, indicating the size of the next item plus one.
|
||||
If this size value is zero, it indicates the end of the list.
|
||||
This indicates the full length of the next item minus one.
|
||||
In psuedo-code:
|
||||
@@ -111,21 +111,21 @@ loop
|
||||
read <size> bytes
|
||||
```
|
||||
|
||||
`[]` - For `CH_ARRAY` there is an implicit index.
|
||||
`[]` - For `ChunkType::Array` there is an implicit index.
|
||||
The loop starts at zero, and every iteration adds one to the index.
|
||||
For entries in the game that were not allocated, the `size` will be zero.
|
||||
|
||||
`[G1+1..G2]` - For `CH_SPARSE_ARRAY` there is an explicit index.
|
||||
`[G1+1..G2]` - For `ChunkType::SparseArray` there is an explicit index.
|
||||
The `gamma` following the size indicates the index.
|
||||
|
||||
The content of the item is a binary blob, and similar to `CH_RIFF`, it depends on the tag of the chunk what it means.
|
||||
The content of the item is a binary blob, and similar to `ChunkType::Riff`, it depends on the tag of the chunk what it means.
|
||||
Please check the source-code for further details.
|
||||
|
||||
### CH_TABLE / CH_SPARSE_TABLE
|
||||
### ChunkType::Table / ChunkType::SparseTable
|
||||
|
||||
(this chunk type only exists since savegame version 295)
|
||||
|
||||
Both `CH_TABLE` and `CH_SPARSE_TABLE` are very similar to `CH_ARRAY` / `CH_SPARSE_ARRAY` respectively.
|
||||
Both `ChunkType::Table` and `ChunkType::SparseTable` are very similar to `ChunkType::Array` / `ChunkType::SparseArray` respectively.
|
||||
The only change is that the chunk starts with a header.
|
||||
This header describes the chunk in details; with the header you know the meaning of each byte in the binary blob that follows.
|
||||
|
||||
@@ -168,7 +168,7 @@ struct | substruct3
|
||||
The headers will be, in order: `table`, `substruct1`, `substruct3`, `substruct2`, each ending with a `type` is zero field.
|
||||
|
||||
After reading all the fields of all the headers, there is a list of records.
|
||||
To read this, see `CH_ARRAY` / `CH_SPARSE_ARRAY` for details.
|
||||
To read this, see `ChunkType::Array` / `ChunkType::SparseArray` for details.
|
||||
|
||||
As each `type` has a well defined length, you can read the records even without knowing anything about the chunk-tag yourself.
|
||||
|
||||
@@ -187,7 +187,7 @@ The prefix is strongly advised to avoid conflicts with future-settings in an unp
|
||||
|
||||
## Scripts custom data format
|
||||
|
||||
Script chunks (`AIPL` and `GSDT`) use `CH_TABLE` chunk type.
|
||||
Script chunks (`AIPL` and `GSDT`) use `ChunkType::Table` chunk type.
|
||||
|
||||
At the end of each record there's an `uint8` to indicate if there's custom data (1) or not (0).
|
||||
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
# If you change this version, change the numbers in .github/workflows/ci-emscripten.yml (2x)
|
||||
# and .github/workflows/preview-build.yml (2x) too.
|
||||
FROM emscripten/emsdk:3.1.57
|
||||
FROM emscripten/emsdk:6.0.1
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gcc-12 g++-12 \
|
||||
&& update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 \
|
||||
&& update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -2300,6 +2300,67 @@ function Regression::PriorityQueue()
|
||||
print(" Count(): " + queue.Count());
|
||||
}
|
||||
|
||||
function Regression::Terraforming()
|
||||
{
|
||||
print("");
|
||||
print("--Terraforming--");
|
||||
print(" DemolishTile(): " + AITile.DemolishTile(4033));
|
||||
print(" DemolishTile(): " + AITile.DemolishTile(60766));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LowerTile(): " + AITile.LowerTile(8205, AITile.SLOPE_ENW));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(8205, AITile.SLOPE_ENW));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LowerTile(): " + AITile.LowerTile(8205, AITile.SLOPE_ENW));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LowerTile(): " + AITile.LowerTile(4113, AITile.SLOPE_SW));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(5902, AITile.SLOPE_NE));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(7958, AITile.SLOPE_SE));
|
||||
print(" LowerTile(): " + AITile.LowerTile(7958, AITile.SLOPE_NE));
|
||||
print(" LowerTile(): " + AITile.LowerTile(7958, AITile.SLOPE_SE));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(7958, AITile.SLOPE_SE));
|
||||
print(" LowerTile(): " + AITile.LowerTile(7958, AITile.SLOPE_EW));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LowerTile(): " + AITile.LowerTile(33924, AITile.SLOPE_ELEVATED));
|
||||
print(" LowerTile(): " + AITile.LowerTile(33923, AITile.SLOPE_ELEVATED));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(34193, AITile.SLOPE_ELEVATED));
|
||||
print(" LowerTile(): " + AITile.LowerTile(34193, AITile.SLOPE_ELEVATED));
|
||||
print(" LowerTile(): " + AITile.LowerTile(34192, AITile.SLOPE_NE));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(34193, AITile.SLOPE_ELEVATED));
|
||||
print(" LowerTile(): " + AITile.LowerTile(34192, AITile.SLOPE_NE));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(5687, AITile.SLOPE_N));
|
||||
print(" LowerTile(): " + AITile.LowerTile(5687, AITile.SLOPE_SE));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(23596, AITile.SLOPE_NE));
|
||||
print(" LowerTile(): " + AITile.LowerTile(23596, AITile.SLOPE_NE));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(28536, AITile.SLOPE_E));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(28536, AITile.SLOPE_E));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LevelTiles(): " + AITile.LevelTiles(28536, 29053));
|
||||
print(" LevelTiles(): " + AITile.LevelTiles(28536, 29053));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LevelTiles(): " + AITile.LevelTiles(22348, 24405));
|
||||
print(" LevelTiles(): " + AITile.LevelTiles(27717, 29772));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" LowerTile(): " + AITile.LowerTile(61534, AITile.SLOPE_W));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(61534, AITile.SLOPE_NE));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(61534, AITile.SLOPE_N));
|
||||
print(" LowerTile(): " + AITile.LowerTile(61534, AITile.SLOPE_W));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(61534, AITile.SLOPE_N));
|
||||
print(" LowerTile(): " + AITile.LowerTile(61533, AITile.SLOPE_E));
|
||||
print(" LowerTile(): " + AITile.LowerTile(61534, AITile.SLOPE_E));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(4033, AITile.SLOPE_S));
|
||||
print(" LowerTile(): " + AITile.LowerTile(4033, AITile.SLOPE_S));
|
||||
print(" LowerTile(): " + AITile.LowerTile(4033, AITile.SLOPE_E));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(4033, AITile.SLOPE_E));
|
||||
print(" RaiseTile(): " + AITile.RaiseTile(4033, AITile.SLOPE_NWS));
|
||||
print(" GetBankBalance(): " + AICompany.GetBankBalance(AICompany.COMPANY_SELF));
|
||||
}
|
||||
|
||||
function Regression::Start()
|
||||
{
|
||||
this.TestInit();
|
||||
@@ -2398,6 +2459,7 @@ function Regression::Start()
|
||||
|
||||
this.Math();
|
||||
this.PriorityQueue();
|
||||
this.Terraforming();
|
||||
|
||||
/* Check Valuate() is actually limited, MUST BE THE LAST TEST. */
|
||||
print("--Valuate() with excessive CPU usage--")
|
||||
|
||||
@@ -10872,6 +10872,63 @@ ERROR: IsEnd() is invalid as Begin() is never called
|
||||
Clear(): (null : 0x00000000)
|
||||
IsEmpty(): true
|
||||
Count(): 0
|
||||
|
||||
--Terraforming--
|
||||
DemolishTile(): true
|
||||
DemolishTile(): true
|
||||
GetBankBalance(): 1999216685
|
||||
LowerTile(): false
|
||||
RaiseTile(): true
|
||||
GetBankBalance(): 1999156124
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1999155563
|
||||
LowerTile(): true
|
||||
RaiseTile(): true
|
||||
GetBankBalance(): 1999124603
|
||||
RaiseTile(): false
|
||||
LowerTile(): false
|
||||
LowerTile(): true
|
||||
RaiseTile(): true
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1999122125
|
||||
LowerTile(): false
|
||||
LowerTile(): true
|
||||
RaiseTile(): false
|
||||
LowerTile(): true
|
||||
LowerTile(): false
|
||||
RaiseTile(): true
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1999116574
|
||||
RaiseTile(): true
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1999100519
|
||||
RaiseTile(): false
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1999098443
|
||||
RaiseTile(): true
|
||||
RaiseTile(): true
|
||||
GetBankBalance(): 1999088221
|
||||
LevelTiles(): true
|
||||
LevelTiles(): false
|
||||
GetBankBalance(): 1999078593
|
||||
LevelTiles(): true
|
||||
LevelTiles(): true
|
||||
GetBankBalance(): 1998792514
|
||||
LowerTile(): false
|
||||
RaiseTile(): true
|
||||
RaiseTile(): false
|
||||
LowerTile(): true
|
||||
GetBankBalance(): 1998786415
|
||||
RaiseTile(): true
|
||||
LowerTile(): true
|
||||
LowerTile(): false
|
||||
GetBankBalance(): 1998785248
|
||||
RaiseTile(): false
|
||||
LowerTile(): true
|
||||
LowerTile(): false
|
||||
RaiseTile(): false
|
||||
RaiseTile(): true
|
||||
GetBankBalance(): 1998738752
|
||||
--Valuate() with excessive CPU usage--
|
||||
constructor failed with: excessive CPU usage in list filter function
|
||||
Your script made an error: excessive CPU usage in valuator function
|
||||
@@ -10880,7 +10937,7 @@ CALLSTACK WITH LOCALS
|
||||
*FUNCTION [Valuate()] Valuate line [5]
|
||||
[args] ARRAY
|
||||
[this] INSTANCE
|
||||
*FUNCTION [Start()] regression/main.nut line [2412]
|
||||
*FUNCTION [Start()] regression/main.nut line [2474]
|
||||
[Infinite] CLOSURE
|
||||
[list] INSTANCE
|
||||
[this] INSTANCE
|
||||
|
||||
@@ -336,6 +336,7 @@ add_files(
|
||||
newgrf_town.h
|
||||
newgrf_townname.cpp
|
||||
newgrf_townname.h
|
||||
newgrf_type.h
|
||||
news_cmd.h
|
||||
news_func.h
|
||||
news_gui.cpp
|
||||
|
||||
+13
-3
@@ -69,6 +69,16 @@
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the \c PerformanceElement for the AI of the given company.
|
||||
* @param company The company to get the PerformanceElement for.
|
||||
* @return The \c PerformanceElement.
|
||||
*/
|
||||
static constexpr PerformanceElement GetAIPerformanceElement(CompanyID company)
|
||||
{
|
||||
return static_cast<PerformanceElement>(PerformanceElement::AI0 + company);
|
||||
}
|
||||
|
||||
/* static */ void AI::GameLoop()
|
||||
{
|
||||
/* If we are in networking, only servers run this function, and that only if it is allowed */
|
||||
@@ -81,7 +91,7 @@
|
||||
|
||||
for (const Company *c : Company::Iterate()) {
|
||||
if (c->is_ai) {
|
||||
PerformanceMeasurer framerate((PerformanceElement)(PFE_AI0 + c->index));
|
||||
PerformanceMeasurer framerate(GetAIPerformanceElement(c->index));
|
||||
AutoRestoreBackup cur_company(_current_company, c->index);
|
||||
c->ai_instance->GameLoop();
|
||||
/* Occasionally collect garbage; every 255 ticks do one company.
|
||||
@@ -90,7 +100,7 @@
|
||||
c->ai_instance->CollectGarbage();
|
||||
}
|
||||
} else {
|
||||
PerformanceMeasurer::SetInactive((PerformanceElement)(PFE_AI0 + c->index));
|
||||
PerformanceMeasurer::SetInactive(GetAIPerformanceElement(c->index));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,7 +113,7 @@
|
||||
/* static */ void AI::Stop(CompanyID company)
|
||||
{
|
||||
if (_networking && !_network_server) return;
|
||||
PerformanceMeasurer::SetInactive((PerformanceElement)(PFE_AI0 + company));
|
||||
PerformanceMeasurer::SetInactive(GetAIPerformanceElement(company));
|
||||
|
||||
AutoRestoreBackup cur_company(_current_company, company);
|
||||
Company *c = Company::Get(company);
|
||||
|
||||
+5
-5
@@ -70,11 +70,11 @@ static constexpr std::initializer_list<NWidgetPart> _nested_ai_config_widgets =
|
||||
NWidget(NWID_VERTICAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_OPEN_URL), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_CONTENT_OPEN_URL, STR_CONTENT_OPEN_URL_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TFT_README), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_README, STR_TEXTFILE_VIEW_README_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TextfileType::Readme), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_README, STR_TEXTFILE_VIEW_README_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_TEXTFILE_VIEW_CHANGELOG_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_LICENCE, STR_TEXTFILE_VIEW_LICENCE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TextfileType::Changelog), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_TEXTFILE_VIEW_CHANGELOG_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_AIC_TEXTFILE + TextfileType::License), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_LICENCE, STR_TEXTFILE_VIEW_LICENCE_TOOLTIP),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -215,7 +215,7 @@ struct AIConfigWindow : public Window {
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
if (widget >= WID_AIC_TEXTFILE && widget < WID_AIC_TEXTFILE + TFT_CONTENT_END) {
|
||||
if (widget >= WID_AIC_TEXTFILE && widget < WID_AIC_TEXTFILE + TextfileType::ContentEnd) {
|
||||
if (this->selected_slot == CompanyID::Invalid() || AIConfig::GetConfig(this->selected_slot) == nullptr) return;
|
||||
|
||||
ShowScriptTextfileWindow(this, static_cast<TextfileType>(widget - WID_AIC_TEXTFILE), this->selected_slot);
|
||||
@@ -326,7 +326,7 @@ struct AIConfigWindow : public Window {
|
||||
this->SetWidgetDisabledState(WID_AIC_MOVE_DOWN, !IsEditable(this->selected_slot) || !IsEditable(static_cast<CompanyID>(this->selected_slot + 1)));
|
||||
|
||||
this->SetWidgetDisabledState(WID_AIC_OPEN_URL, this->selected_slot == CompanyID::Invalid() || config->GetInfo() == nullptr || config->GetInfo()->GetURL().empty());
|
||||
for (TextfileType tft : EnumRange(TFT_CONTENT_BEGIN, TFT_CONTENT_END)) {
|
||||
for (TextfileType tft : EnumRange(TextfileType::ContentBegin, TextfileType::ContentEnd)) {
|
||||
this->SetWidgetDisabledState(WID_AIC_TEXTFILE + tft, this->selected_slot == CompanyID::Invalid() || !config->GetTextfile(tft, this->selected_slot).has_value());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2141,7 +2141,7 @@ bool Aircraft::Tick()
|
||||
{
|
||||
if (!this->IsNormalAircraft()) return true;
|
||||
|
||||
PerformanceAccumulator framerate(PFE_GL_AIRCRAFT);
|
||||
PerformanceAccumulator framerate(PerformanceElement::GameLoopAircraft);
|
||||
|
||||
this->tick_counter++;
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ void AddAnimatedTile(TileIndex tile, bool mark_dirty)
|
||||
*/
|
||||
void AnimateAnimatedTiles()
|
||||
{
|
||||
PerformanceAccumulator landscape_framerate(PFE_GL_LANDSCAPE);
|
||||
PerformanceAccumulator landscape_framerate(PerformanceElement::GameLoopLandscape);
|
||||
|
||||
for (auto it = std::begin(_animated_tiles); it != std::end(_animated_tiles); /* nothing */) {
|
||||
TileIndex &tile = *it;
|
||||
|
||||
@@ -357,7 +357,7 @@ static CommandCost BuildReplacementVehicle(Vehicle *old_veh, Vehicle **new_vehic
|
||||
|
||||
/* Build the new vehicle */
|
||||
VehicleID new_veh_id;
|
||||
std::tie(cost, new_veh_id, std::ignore, std::ignore, std::ignore) = Command<Commands::BuildVehicle>::Do({DoCommandFlag::Execute, DoCommandFlag::AutoReplace}, old_veh->tile, e, true, INVALID_CARGO, INVALID_CLIENT_ID);
|
||||
std::tie(cost, new_veh_id, std::ignore, std::ignore, std::ignore) = Command<Commands::BuildVehicle>::Do({DoCommandFlag::Execute, DoCommandFlag::AutoReplace}, old_veh->tile, e, true, INVALID_CARGO, ClientID::Invalid);
|
||||
if (cost.Failed()) return cost;
|
||||
|
||||
Vehicle *new_veh = Vehicle::Get(new_veh_id);
|
||||
@@ -489,11 +489,11 @@ static CommandCost ReplaceFreeUnit(Vehicle **single_unit, DoCommandFlags flags,
|
||||
}
|
||||
|
||||
/* Sell the old vehicle */
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(flags, old_v->index, false, false, INVALID_CLIENT_ID));
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(flags, old_v->index, false, false, ClientID::Invalid));
|
||||
|
||||
/* If we are not in DoCommandFlag::Execute undo everything */
|
||||
if (!flags.Test(DoCommandFlag::Execute)) {
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, new_v->index, false, false, INVALID_CLIENT_ID);
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, new_v->index, false, false, ClientID::Invalid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,7 +633,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlags flags, bool wago
|
||||
assert(RailVehInfo(wagon->engine_type)->railveh_type == RailVehicleType::Wagon);
|
||||
|
||||
/* Sell wagon */
|
||||
[[maybe_unused]] CommandCost ret = Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, wagon->index, false, false, INVALID_CLIENT_ID);
|
||||
[[maybe_unused]] CommandCost ret = Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, wagon->index, false, false, ClientID::Invalid);
|
||||
assert(ret.Succeeded());
|
||||
it->new_veh = nullptr;
|
||||
|
||||
@@ -665,7 +665,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlags flags, bool wago
|
||||
/* Sell the vehicle.
|
||||
* Note: This might temporarily construct new trains, so use DoCommandFlag::AutoReplace to prevent
|
||||
* it from failing due to engine limits. */
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(DoCommandFlags{flags}.Set(DoCommandFlag::AutoReplace), w->index, false, false, INVALID_CLIENT_ID));
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(DoCommandFlags{flags}.Set(DoCommandFlag::AutoReplace), w->index, false, false, ClientID::Invalid));
|
||||
if (flags.Test(DoCommandFlag::Execute)) {
|
||||
it->old_veh = nullptr;
|
||||
if (it == std::begin(replacements)) old_head = nullptr;
|
||||
@@ -696,7 +696,7 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlags flags, bool wago
|
||||
if (!flags.Test(DoCommandFlag::Execute)) {
|
||||
for (auto it = std::rbegin(replacements); it != std::rend(replacements); ++it) {
|
||||
if (it->new_veh != nullptr) {
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, it->new_veh->index, false, false, INVALID_CLIENT_ID);
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, it->new_veh->index, false, false, ClientID::Invalid);
|
||||
it->new_veh = nullptr;
|
||||
}
|
||||
}
|
||||
@@ -723,12 +723,12 @@ static CommandCost ReplaceChain(Vehicle **chain, DoCommandFlags flags, bool wago
|
||||
}
|
||||
|
||||
/* Sell the old vehicle */
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(flags, old_head->index, false, false, INVALID_CLIENT_ID));
|
||||
cost.AddCost(Command<Commands::SellVehicle>::Do(flags, old_head->index, false, false, ClientID::Invalid));
|
||||
}
|
||||
|
||||
/* If we are not in DoCommandFlag::Execute undo everything */
|
||||
if (!flags.Test(DoCommandFlag::Execute)) {
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, new_head->index, false, false, INVALID_CLIENT_ID);
|
||||
Command<Commands::SellVehicle>::Do(DoCommandFlag::Execute, new_head->index, false, false, ClientID::Invalid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
str = GetString(STR_REPLACE_NOT_REPLACING_VEHICLE_SELECTED);
|
||||
}
|
||||
|
||||
DrawString(r.Shrink(WidgetDimensions::scaled.frametext, WidgetDimensions::scaled.framerect), std::move(str), TextColour::Black, SA_HOR_CENTER);
|
||||
DrawString(r.Shrink(WidgetDimensions::scaled.frametext, WidgetDimensions::scaled.framerect), std::move(str), TextColour::Black, AlignmentH::Centre);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+21
-7
@@ -47,6 +47,22 @@ const IniItem *BaseSet<T>::GetMandatoryItem(std::string_view full_filename, cons
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to decode a 4 character short name into an uint32_t representation.
|
||||
* @param shortname The short name.
|
||||
* @return The uint32_t representation.
|
||||
*/
|
||||
constexpr uint32_t DecodeShortName(std::string_view shortname)
|
||||
{
|
||||
/* The short name is documented to be exactly 4 characters long, see docs/ob[gms]_format.txt. */
|
||||
shortname = shortname.substr(0, 4);
|
||||
uint32_t encoded = 0;
|
||||
for (size_t i = 0; i < shortname.size(); i++) {
|
||||
encoded |= static_cast<uint8_t>(shortname[i]) << (i * 8);
|
||||
}
|
||||
return encoded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Read the set information from a loaded ini.
|
||||
* @param ini the ini to read from
|
||||
@@ -85,9 +101,7 @@ bool BaseSet<T>::FillSetDetails(const IniFile &ini, const std::string &path, con
|
||||
|
||||
item = this->GetMandatoryItem(full_filename, *metadata, "shortname");
|
||||
if (item == nullptr) return false;
|
||||
for (uint i = 0; (*item->value)[i] != '\0' && i < 4; i++) {
|
||||
this->shortname |= ((uint8_t)(*item->value)[i]) << (i * 8);
|
||||
}
|
||||
this->shortname = DecodeShortName(*item->value);
|
||||
|
||||
item = this->GetMandatoryItem(full_filename, *metadata, "version");
|
||||
if (item == nullptr) return false;
|
||||
@@ -111,10 +125,10 @@ bool BaseSet<T>::FillSetDetails(const IniFile &ini, const std::string &path, con
|
||||
const IniGroup *origin = ini.GetGroup("origin");
|
||||
auto file_names = BaseSet<T>::GetFilenames();
|
||||
bool original_set =
|
||||
std::byteswap(this->shortname) == 'TTDD' || // TTD DOS graphics, TTD DOS music
|
||||
std::byteswap(this->shortname) == 'TTDW' || // TTD WIN graphics, TTD WIN music
|
||||
std::byteswap(this->shortname) == 'TTDO' || // TTD sound
|
||||
std::byteswap(this->shortname) == 'TTOD'; // TTO music
|
||||
this->shortname == DecodeShortName("TTDD") || // TTD DOS graphics, TTD DOS music
|
||||
this->shortname == DecodeShortName("TTDW") || // TTD WIN graphics, TTD WIN music
|
||||
this->shortname == DecodeShortName("TTDO") || // TTD sound
|
||||
this->shortname == DecodeShortName("TTOD"); // TTO music
|
||||
|
||||
for (uint i = 0; i < BaseSet<T>::NUM_FILES; i++) {
|
||||
MD5File *file = &this->files[i];
|
||||
|
||||
@@ -22,7 +22,7 @@ extern StationPool _station_pool;
|
||||
template <typename T>
|
||||
struct SpecMapping {
|
||||
const T *spec = nullptr; ///< Custom spec.
|
||||
uint32_t grfid = 0; ///< GRF ID of this custom spec.
|
||||
GrfID grfid{}; ///< GRF ID of this custom spec.
|
||||
uint16_t localidx = 0; ///< Local ID within GRF of this custom spec.
|
||||
};
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ inline void Blitter_32bppSSE4_Anim::Draw(const BlitterParams *bp, ZoomLevel zoom
|
||||
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
||||
const Colour *src_rgba_line = (const Colour *) ((const uint8_t *) &sd->data[si->sprite_offset] + bp->skip_top * si->sprite_line_size);
|
||||
|
||||
if (read_mode != RM_WITH_MARGIN) {
|
||||
if (read_mode != ReadMode::WithMargin) {
|
||||
src_rgba_line += bp->skip_left;
|
||||
src_mv_line += bp->skip_left;
|
||||
}
|
||||
@@ -61,8 +61,8 @@ inline void Blitter_32bppSSE4_Anim::Draw(const BlitterParams *bp, ZoomLevel zoom
|
||||
if (mode != BlitterMode::Transparent) src_mv = src_mv_line;
|
||||
uint16_t *anim = anim_line;
|
||||
|
||||
if (read_mode == RM_WITH_MARGIN) {
|
||||
assert(bt_last == BT_NONE); // or you must ensure block type is preserved
|
||||
if (read_mode == ReadMode::WithMargin) {
|
||||
assert(bt_last == BlockType::None); // or you must ensure block type is preserved
|
||||
anim += src_rgba_line[0].data;
|
||||
src += src_rgba_line[0].data;
|
||||
dst += src_rgba_line[0].data;
|
||||
@@ -155,7 +155,7 @@ bmno_full_transparency:
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && effective_width & 1) || bt_last == BlockType::Odd) {
|
||||
if (src->a == 0) {
|
||||
/* Complete transparency. */
|
||||
} else if (src->a == 255) {
|
||||
@@ -266,7 +266,7 @@ bmcr_full_transparency:
|
||||
anim += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && effective_width & 1) || bt_last == BlockType::Odd) {
|
||||
/* In case the m-channel is zero, do not remap this pixel in any way. */
|
||||
__m128i srcABCD;
|
||||
if (src->a == 0) break;
|
||||
@@ -309,7 +309,7 @@ bmcr_alpha_blend_single:
|
||||
if (src[-1].a) anim[-1] = 0;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && bp->width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && bp->width & 1) || bt_last == BlockType::Odd) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(DarkenTwoPixels(srcABCD, dstABCD, a_cm, tr_nom_base));
|
||||
@@ -373,6 +373,25 @@ next_line:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. It is templated to allow faster operation.
|
||||
*
|
||||
* @tparam mode blitter mode
|
||||
* @param bp further blitting parameters
|
||||
* @param zoom zoom level at which we are drawing
|
||||
* @param animated Whether the sprite is animated.
|
||||
*/
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
|
||||
inline void Blitter_32bppSSE4_Anim::Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom, bool animated)
|
||||
{
|
||||
if (animated) {
|
||||
this->Draw<mode, read_mode, bt_last, translucent, true>(bp, zoom);
|
||||
} else {
|
||||
this->Draw<mode, read_mode, bt_last, translucent, false>(bp, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Draws a sprite to a (screen) buffer. Calls adequate templated function.
|
||||
*
|
||||
@@ -394,25 +413,20 @@ void Blitter_32bppSSE4_Anim::Draw(Blitter::BlitterParams *bp, BlitterMode mode,
|
||||
bm_normal:
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_NORMAL_THRESHOLD) {
|
||||
const BlockType bt_last = (BlockType) (bp->width & 1);
|
||||
if (bt_last == BT_EVEN) {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_EVEN, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_EVEN, true, true>(bp, zoom);
|
||||
if (bt_last == BlockType::Even) {
|
||||
Draw<BlitterMode::Normal, ReadMode::WithSkip, BlockType::Even, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
} else {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_ODD, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_ODD, true, true>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithSkip, BlockType::Odd, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
}
|
||||
} else {
|
||||
#ifdef POINTER_IS_64BIT
|
||||
if (sprite_flags.Test(SpriteFlag::Translucent)) {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithMargin, BlockType::None, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
} else {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, false, false>(bp, zoom);
|
||||
else Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, false, true>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithMargin, BlockType::None, false>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
}
|
||||
#else
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithMargin, BlockType::None, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@@ -420,17 +434,15 @@ bm_normal:
|
||||
case BlitterMode::ColourRemap:
|
||||
if (sprite_flags.Test(SpriteFlag::NoRemap)) goto bm_normal;
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::ColourRemap, RM_WITH_SKIP, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::ColourRemap, RM_WITH_SKIP, BT_NONE, true, true>(bp, zoom);
|
||||
Draw<BlitterMode::ColourRemap, ReadMode::WithSkip, BlockType::None, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
} else {
|
||||
if (sprite_flags.Test(SpriteFlag::NoAnim)) Draw<BlitterMode::ColourRemap, RM_WITH_MARGIN, BT_NONE, true, false>(bp, zoom);
|
||||
else Draw<BlitterMode::ColourRemap, RM_WITH_MARGIN, BT_NONE, true, true>(bp, zoom);
|
||||
Draw<BlitterMode::ColourRemap, ReadMode::WithMargin, BlockType::None, true>(bp, zoom, !sprite_flags.Test(SpriteFlag::NoAnim));
|
||||
}
|
||||
break;
|
||||
case BlitterMode::Transparent: Draw<BlitterMode::Transparent, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
case BlitterMode::TransparentRemap: Draw<BlitterMode::TransparentRemap, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
case BlitterMode::CrashRemap: Draw<BlitterMode::CrashRemap, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
case BlitterMode::BlackRemap: Draw<BlitterMode::BlackRemap, RM_NONE, BT_NONE, true, true>(bp, zoom); return;
|
||||
case BlitterMode::Transparent: Draw<BlitterMode::Transparent, ReadMode::None, BlockType::None, true, true>(bp, zoom); return;
|
||||
case BlitterMode::TransparentRemap: Draw<BlitterMode::TransparentRemap, ReadMode::None, BlockType::None, true, true>(bp, zoom); return;
|
||||
case BlitterMode::CrashRemap: Draw<BlitterMode::CrashRemap, ReadMode::None, BlockType::None, true, true>(bp, zoom); return;
|
||||
case BlitterMode::BlackRemap: Draw<BlitterMode::BlackRemap, ReadMode::None, BlockType::None, true, true>(bp, zoom); return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ private:
|
||||
public:
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent, bool animated>
|
||||
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom);
|
||||
template <BlitterMode mode, Blitter_32bppSSE_Base::ReadMode read_mode, Blitter_32bppSSE_Base::BlockType bt_last, bool translucent>
|
||||
void Draw(const Blitter::BlitterParams *bp, ZoomLevel zoom, bool animated);
|
||||
void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom) override;
|
||||
|
||||
Sprite *Encode(SpriteType sprite_type, const SpriteLoader::SpriteCollection &sprite, SpriteAllocator &allocator) override
|
||||
|
||||
@@ -39,17 +39,17 @@ public:
|
||||
static_assert(sizeof(MapValue) == 2);
|
||||
|
||||
/** Helper for creating specialised functions for specific optimisations. */
|
||||
enum ReadMode : uint8_t {
|
||||
RM_WITH_SKIP, ///< Use normal code for skipping empty pixels.
|
||||
RM_WITH_MARGIN, ///< Use cached number of empty pixels at begin and end of line to reduce work.
|
||||
RM_NONE, ///< No specialisation.
|
||||
enum class ReadMode : uint8_t {
|
||||
WithSkip, ///< Use normal code for skipping empty pixels.
|
||||
WithMargin, ///< Use cached number of empty pixels at begin and end of line to reduce work.
|
||||
None, ///< No specialisation.
|
||||
};
|
||||
|
||||
/** Helper for creating specialised functions for the case where the sprite width is odd or even. */
|
||||
enum BlockType : uint8_t {
|
||||
BT_EVEN, ///< An even number of pixels in the width; no need for a special case for the last pixel.
|
||||
BT_ODD, ///< An odd number of pixels in the width; special case for the last pixel.
|
||||
BT_NONE, ///< No specialisation for either case.
|
||||
enum class BlockType : uint8_t {
|
||||
Even, ///< An even number of pixels in the width; no need for a special case for the last pixel.
|
||||
Odd, ///< An odd number of pixels in the width; special case for the last pixel.
|
||||
None, ///< No specialisation for either case.
|
||||
};
|
||||
|
||||
/** Helper for using specialised functions designed to prevent whenever it's possible things like:
|
||||
|
||||
@@ -231,7 +231,7 @@ inline void Blitter_32bppSSE4::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
const MapValue *src_mv_line = (const MapValue *) &sd->data[si->mv_offset] + bp->skip_top * si->sprite_width;
|
||||
const Colour *src_rgba_line = (const Colour *) ((const uint8_t *) &sd->data[si->sprite_offset] + bp->skip_top * si->sprite_line_size);
|
||||
|
||||
if (read_mode != RM_WITH_MARGIN) {
|
||||
if (read_mode != ReadMode::WithMargin) {
|
||||
src_rgba_line += bp->skip_left;
|
||||
src_mv_line += bp->skip_left;
|
||||
}
|
||||
@@ -261,8 +261,8 @@ inline void Blitter_32bppSSE4::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
const Colour *src = src_rgba_line + META_LENGTH;
|
||||
if (mode == BlitterMode::ColourRemap || mode == BlitterMode::CrashRemap) src_mv = src_mv_line;
|
||||
|
||||
if (read_mode == RM_WITH_MARGIN) {
|
||||
assert(bt_last == BT_NONE); // or you must ensure block type is preserved
|
||||
if (read_mode == ReadMode::WithMargin) {
|
||||
assert(bt_last == BlockType::None); // or you must ensure block type is preserved
|
||||
src += src_rgba_line[0].data;
|
||||
dst += src_rgba_line[0].data;
|
||||
if (mode == BlitterMode::ColourRemap || mode == BlitterMode::CrashRemap) src_mv += src_rgba_line[0].data;
|
||||
@@ -293,7 +293,7 @@ inline void Blitter_32bppSSE4::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && effective_width & 1) || bt_last == BlockType::Odd) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(AlphaBlendTwoPixels(srcABCD, dstABCD, ALPHA_BLEND_PARAM_1, ALPHA_BLEND_PARAM_2, ALPHA_BLEND_PARAM_3));
|
||||
@@ -347,7 +347,7 @@ inline void Blitter_32bppSSE4::Draw(const Blitter::BlitterParams *bp, ZoomLevel
|
||||
src_mv += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && effective_width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && effective_width & 1) || bt_last == BlockType::Odd) {
|
||||
#else
|
||||
for (uint x = (uint) effective_width; x > 0; x--) {
|
||||
#endif
|
||||
@@ -392,7 +392,7 @@ bmcr_alpha_blend_single:
|
||||
dst += 2;
|
||||
}
|
||||
|
||||
if ((bt_last == BT_NONE && bp->width & 1) || bt_last == BT_ODD) {
|
||||
if ((bt_last == BlockType::None && bp->width & 1) || bt_last == BlockType::Odd) {
|
||||
__m128i srcABCD = _mm_cvtsi32_si128(src->data);
|
||||
__m128i dstABCD = _mm_cvtsi32_si128(dst->data);
|
||||
dst->data = _mm_cvtsi128_si32(DarkenTwoPixels(srcABCD, dstABCD, DARKEN_PARAM_1, DARKEN_PARAM_2));
|
||||
@@ -468,14 +468,14 @@ void Blitter_32bppSSE4::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomL
|
||||
bm_normal:
|
||||
const BlockType bt_last = (BlockType) (bp->width & 1);
|
||||
switch (bt_last) {
|
||||
default: Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_EVEN, true>(bp, zoom); return;
|
||||
case BT_ODD: Draw<BlitterMode::Normal, RM_WITH_SKIP, BT_ODD, true>(bp, zoom); return;
|
||||
default: Draw<BlitterMode::Normal, ReadMode::WithSkip, BlockType::Even, true>(bp, zoom); return;
|
||||
case BlockType::Odd: Draw<BlitterMode::Normal, ReadMode::WithSkip, BlockType::Odd, true>(bp, zoom); return;
|
||||
}
|
||||
} else {
|
||||
if (((const Blitter_32bppSSE_Base::SpriteData *) bp->sprite)->flags.Test(SpriteFlag::Translucent)) {
|
||||
Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithMargin, BlockType::None, true>(bp, zoom);
|
||||
} else {
|
||||
Draw<BlitterMode::Normal, RM_WITH_MARGIN, BT_NONE, false>(bp, zoom);
|
||||
Draw<BlitterMode::Normal, ReadMode::WithMargin, BlockType::None, false>(bp, zoom);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -484,14 +484,14 @@ bm_normal:
|
||||
case BlitterMode::ColourRemap:
|
||||
if (((const Blitter_32bppSSE_Base::SpriteData *) bp->sprite)->flags.Test(SpriteFlag::NoRemap)) goto bm_normal;
|
||||
if (bp->skip_left != 0 || bp->width <= MARGIN_REMAP_THRESHOLD) {
|
||||
Draw<BlitterMode::ColourRemap, RM_WITH_SKIP, BT_NONE, true>(bp, zoom); return;
|
||||
Draw<BlitterMode::ColourRemap, ReadMode::WithSkip, BlockType::None, true>(bp, zoom); return;
|
||||
} else {
|
||||
Draw<BlitterMode::ColourRemap, RM_WITH_MARGIN, BT_NONE, true>(bp, zoom); return;
|
||||
Draw<BlitterMode::ColourRemap, ReadMode::WithMargin, BlockType::None, true>(bp, zoom); return;
|
||||
}
|
||||
case BlitterMode::Transparent: Draw<BlitterMode::Transparent, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BlitterMode::TransparentRemap: Draw<BlitterMode::TransparentRemap, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BlitterMode::CrashRemap: Draw<BlitterMode::CrashRemap, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BlitterMode::BlackRemap: Draw<BlitterMode::BlackRemap, RM_NONE, BT_NONE, true>(bp, zoom); return;
|
||||
case BlitterMode::Transparent: Draw<BlitterMode::Transparent, ReadMode::None, BlockType::None, true>(bp, zoom); return;
|
||||
case BlitterMode::TransparentRemap: Draw<BlitterMode::TransparentRemap, ReadMode::None, BlockType::None, true>(bp, zoom); return;
|
||||
case BlitterMode::CrashRemap: Draw<BlitterMode::CrashRemap, ReadMode::None, BlockType::None, true>(bp, zoom); return;
|
||||
case BlitterMode::BlackRemap: Draw<BlitterMode::BlackRemap, ReadMode::None, BlockType::None, true>(bp, zoom); return;
|
||||
}
|
||||
}
|
||||
#endif /* FULL_ANIMATION */
|
||||
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
void DrawWidget(const Rect &r, WidgetID widget) const override
|
||||
{
|
||||
if (widget == WID_BEM_MESSAGE) {
|
||||
DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_ERROR, TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_ERROR, TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
{
|
||||
if (widget != WID_BAFD_QUESTION) return;
|
||||
|
||||
DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_SET_MESSAGE, TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(r.Shrink(WidgetDimensions::scaled.frametext), STR_MISSING_GRAPHICS_SET_MESSAGE, TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
|
||||
+1
-1
@@ -250,7 +250,7 @@ public:
|
||||
auto [first, last] = this->vscroll->GetVisibleRangeIterators(this->bridges);
|
||||
for (auto it = first; it != last; ++it) {
|
||||
const BridgeSpec *b = it->spec;
|
||||
DrawSpriteIgnorePadding(b->sprite, b->pal, tr.WithWidth(this->icon_width, rtl), SA_HOR_CENTER | SA_BOTTOM);
|
||||
DrawSpriteIgnorePadding(b->sprite, b->pal, tr.WithWidth(this->icon_width, rtl), {AlignmentH::Centre, AlignmentV::Bottom});
|
||||
DrawStringMultiLineWithClipping(tr.Indent(this->icon_width + WidgetDimensions::scaled.hsep_normal, rtl), GetBridgeSelectString(*it));
|
||||
tr = tr.Translate(0, this->resize.step_height);
|
||||
}
|
||||
|
||||
+15
-10
@@ -962,7 +962,7 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
const int offset = (rtl ? -circle_width : circle_width) / 2;
|
||||
const int level_width = rtl ? -WidgetDimensions::scaled.hsep_indent : WidgetDimensions::scaled.hsep_indent;
|
||||
|
||||
for (auto it = first; it != last; ++it) {
|
||||
for (auto it = first; it != last; ++it, ir = ir.Translate(0, step_size)) {
|
||||
const auto &item = *it;
|
||||
const Engine *e = Engine::Get(item.engine_id);
|
||||
|
||||
@@ -971,6 +971,13 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
bool is_folded = item.flags.Test(EngineDisplayFlag::IsFolded);
|
||||
bool shaded = item.flags.Test(EngineDisplayFlag::Shaded);
|
||||
|
||||
/* Set up clipping area for the row, keeping coordinates relative to the window. */
|
||||
DrawPixelInfo tmp_dpi;
|
||||
if (!FillDrawPixelInfo(&tmp_dpi, ir)) continue;
|
||||
tmp_dpi.left += ir.left;
|
||||
tmp_dpi.top += ir.top;
|
||||
AutoRestoreBackup dpi_backup(_cur_dpi, &tmp_dpi);
|
||||
|
||||
Rect textr = ir.Shrink(WidgetDimensions::scaled.matrix);
|
||||
Rect tr = ir.Indent(indent, rtl);
|
||||
|
||||
@@ -989,7 +996,7 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
|
||||
if (has_variants) {
|
||||
Rect fr = tr.WithWidth(circle_width, rtl);
|
||||
DrawSpriteIgnorePadding(is_folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED, PAL_NONE, fr.WithY(textr), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(is_folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED, PAL_NONE, fr.WithY(textr), {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
tr = tr.Indent(circle_width + WidgetDimensions::scaled.hsep_normal, rtl);
|
||||
@@ -1023,10 +1030,10 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
Rect cr = tr.WithWidth(count_width, !rtl);
|
||||
tr = tr.Indent(count_width + WidgetDimensions::scaled.hsep_normal, !rtl);
|
||||
|
||||
DrawString(cr.left, cr.right, textr.top + small_text_y_offset, GetString(STR_JUST_COMMA, num_engines), TextColour::Black, SA_RIGHT | SA_FORCE, false, FontSize::Small);
|
||||
DrawString(cr.left, cr.right, textr.top + small_text_y_offset, GetString(STR_JUST_COMMA, num_engines), TextColour::Black, AlignmentH::ForceRight, false, FontSize::Small);
|
||||
|
||||
if (EngineHasReplacementForCompany(Company::Get(_local_company), item.engine_id, selected_group)) {
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_ACTIVE, num_engines == 0 ? PALETTE_CRASH : PAL_NONE, rr, SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_ACTIVE, num_engines == 0 ? PALETTE_CRASH : PAL_NONE, rr, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1133,7 +1140,7 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
|
||||
int sort_detail_width = 0;
|
||||
if (!sort_prop_detail.empty()) {
|
||||
DrawString(tr.left, tr.right, textr.top + normal_text_y_offset, sort_prop_detail, tc, SA_RIGHT, false, FontSize::Small);
|
||||
DrawString(tr.left, tr.right, textr.top + normal_text_y_offset, sort_prop_detail, tc, AlignmentH::End, false, FontSize::Small);
|
||||
|
||||
/* If we have sort detail to show, also measure its width so that we can adjust the
|
||||
* main name drawing rectangle to not overlap. */
|
||||
@@ -1146,8 +1153,6 @@ void DrawEngineList(VehicleType type, const Rect &r, const GUIEngineList &eng_li
|
||||
|
||||
/* The left/right bounds are adjusted to not overlap with the sort detail that is on the left/right depending on the RTL setting. */
|
||||
DrawString(tr.left + (rtl ? sort_detail_width : 0), tr.right - (rtl ? 0 : sort_detail_width), textr.top + normal_text_y_offset, name, tc);
|
||||
|
||||
ir = ir.Translate(0, step_size);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1375,7 +1380,7 @@ struct BuildVehicleWindow : Window {
|
||||
|
||||
if (!this->listview_mode) {
|
||||
/* Query for cost and refitted capacity */
|
||||
auto [ret, veh_id, refit_capacity, refit_mail, cargo_capacities] = Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, TileIndex(this->window_number), this->sel_engine, true, cargo, INVALID_CLIENT_ID);
|
||||
auto [ret, veh_id, refit_capacity, refit_mail, cargo_capacities] = Command<Commands::BuildVehicle>::Do(DoCommandFlag::QueryCost, TileIndex(this->window_number), this->sel_engine, true, cargo, ClientID::Invalid);
|
||||
if (ret.Succeeded()) {
|
||||
this->te.cost = ret.GetCost() - e->GetCost();
|
||||
this->te.capacity = refit_capacity;
|
||||
@@ -1697,9 +1702,9 @@ struct BuildVehicleWindow : Window {
|
||||
CargoType cargo = this->cargo_filter_criteria;
|
||||
if (cargo == CargoFilterCriteria::CF_ANY || cargo == CargoFilterCriteria::CF_ENGINES || cargo == CargoFilterCriteria::CF_NONE) cargo = INVALID_CARGO;
|
||||
if (this->vehicle_type == VehicleType::Train && RailVehInfo(sel_eng)->railveh_type == RailVehicleType::Wagon) {
|
||||
Command<Commands::BuildVehicle>::Post(GetCmdBuildVehMsg(this->vehicle_type), CcBuildWagon, TileIndex(this->window_number), sel_eng, true, cargo, INVALID_CLIENT_ID);
|
||||
Command<Commands::BuildVehicle>::Post(GetCmdBuildVehMsg(this->vehicle_type), CcBuildWagon, TileIndex(this->window_number), sel_eng, true, cargo, ClientID::Invalid);
|
||||
} else {
|
||||
Command<Commands::BuildVehicle>::Post(GetCmdBuildVehMsg(this->vehicle_type), CcBuildPrimaryVehicle, TileIndex(this->window_number), sel_eng, true, cargo, INVALID_CLIENT_ID);
|
||||
Command<Commands::BuildVehicle>::Post(GetCmdBuildVehMsg(this->vehicle_type), CcBuildPrimaryVehicle, TileIndex(this->window_number), sel_eng, true, cargo, ClientID::Invalid);
|
||||
}
|
||||
|
||||
/* Update last used variant in hierarchy and refresh if necessary. */
|
||||
|
||||
+34
-34
@@ -10,11 +10,11 @@
|
||||
#ifndef CARGO_TYPE_H
|
||||
#define CARGO_TYPE_H
|
||||
|
||||
#include "core/strong_typedef_type.hpp"
|
||||
#include "core/label_type.hpp"
|
||||
#include "core/enum_type.hpp"
|
||||
|
||||
/** Globally unique label of a cargo type. */
|
||||
using CargoLabel = StrongType::Typedef<uint32_t, struct CargoLabelTag, StrongType::Compare>;
|
||||
using CargoLabel = Label<struct CargoLabelTag>;
|
||||
|
||||
/**
|
||||
* Cargo slots to indicate a cargo type within a game.
|
||||
@@ -28,48 +28,48 @@ DECLARE_INCREMENT_DECREMENT_OPERATORS(CargoType)
|
||||
*/
|
||||
|
||||
/* Temperate */
|
||||
static constexpr CargoLabel CT_PASSENGERS{'PASS'};
|
||||
static constexpr CargoLabel CT_COAL{'COAL'};
|
||||
static constexpr CargoLabel CT_MAIL{'MAIL'};
|
||||
static constexpr CargoLabel CT_OIL{'OIL_'};
|
||||
static constexpr CargoLabel CT_LIVESTOCK{'LVST'};
|
||||
static constexpr CargoLabel CT_GOODS{'GOOD'};
|
||||
static constexpr CargoLabel CT_GRAIN{'GRAI'};
|
||||
static constexpr CargoLabel CT_WOOD{'WOOD'};
|
||||
static constexpr CargoLabel CT_IRON_ORE{'IORE'};
|
||||
static constexpr CargoLabel CT_STEEL{'STEL'};
|
||||
static constexpr CargoLabel CT_VALUABLES{'VALU'};
|
||||
static constexpr CargoLabel CT_PASSENGERS{"PASS"};
|
||||
static constexpr CargoLabel CT_COAL{"COAL"};
|
||||
static constexpr CargoLabel CT_MAIL{"MAIL"};
|
||||
static constexpr CargoLabel CT_OIL{"OIL_"};
|
||||
static constexpr CargoLabel CT_LIVESTOCK{"LVST"};
|
||||
static constexpr CargoLabel CT_GOODS{"GOOD"};
|
||||
static constexpr CargoLabel CT_GRAIN{"GRAI"};
|
||||
static constexpr CargoLabel CT_WOOD{"WOOD"};
|
||||
static constexpr CargoLabel CT_IRON_ORE{"IORE"};
|
||||
static constexpr CargoLabel CT_STEEL{"STEL"};
|
||||
static constexpr CargoLabel CT_VALUABLES{"VALU"};
|
||||
|
||||
/* Arctic */
|
||||
static constexpr CargoLabel CT_WHEAT{'WHEA'};
|
||||
static constexpr CargoLabel CT_PAPER{'PAPR'};
|
||||
static constexpr CargoLabel CT_GOLD{'GOLD'};
|
||||
static constexpr CargoLabel CT_FOOD{'FOOD'};
|
||||
static constexpr CargoLabel CT_WHEAT{"WHEA"};
|
||||
static constexpr CargoLabel CT_PAPER{"PAPR"};
|
||||
static constexpr CargoLabel CT_GOLD{"GOLD"};
|
||||
static constexpr CargoLabel CT_FOOD{"FOOD"};
|
||||
|
||||
/* Tropic */
|
||||
static constexpr CargoLabel CT_RUBBER{'RUBR'};
|
||||
static constexpr CargoLabel CT_FRUIT{'FRUT'};
|
||||
static constexpr CargoLabel CT_MAIZE{'MAIZ'};
|
||||
static constexpr CargoLabel CT_COPPER_ORE{'CORE'};
|
||||
static constexpr CargoLabel CT_WATER{'WATR'};
|
||||
static constexpr CargoLabel CT_DIAMONDS{'DIAM'};
|
||||
static constexpr CargoLabel CT_RUBBER{"RUBR"};
|
||||
static constexpr CargoLabel CT_FRUIT{"FRUT"};
|
||||
static constexpr CargoLabel CT_MAIZE{"MAIZ"};
|
||||
static constexpr CargoLabel CT_COPPER_ORE{"CORE"};
|
||||
static constexpr CargoLabel CT_WATER{"WATR"};
|
||||
static constexpr CargoLabel CT_DIAMONDS{"DIAM"};
|
||||
|
||||
/* Toyland */
|
||||
static constexpr CargoLabel CT_SUGAR{'SUGR'};
|
||||
static constexpr CargoLabel CT_TOYS{'TOYS'};
|
||||
static constexpr CargoLabel CT_BATTERIES{'BATT'};
|
||||
static constexpr CargoLabel CT_CANDY{'SWET'};
|
||||
static constexpr CargoLabel CT_TOFFEE{'TOFF'};
|
||||
static constexpr CargoLabel CT_COLA{'COLA'};
|
||||
static constexpr CargoLabel CT_COTTON_CANDY{'CTCD'};
|
||||
static constexpr CargoLabel CT_BUBBLES{'BUBL'};
|
||||
static constexpr CargoLabel CT_PLASTIC{'PLST'};
|
||||
static constexpr CargoLabel CT_FIZZY_DRINKS{'FZDR'};
|
||||
static constexpr CargoLabel CT_SUGAR{"SUGR"};
|
||||
static constexpr CargoLabel CT_TOYS{"TOYS"};
|
||||
static constexpr CargoLabel CT_BATTERIES{"BATT"};
|
||||
static constexpr CargoLabel CT_CANDY{"SWET"};
|
||||
static constexpr CargoLabel CT_TOFFEE{"TOFF"};
|
||||
static constexpr CargoLabel CT_COLA{"COLA"};
|
||||
static constexpr CargoLabel CT_COTTON_CANDY{"CTCD"};
|
||||
static constexpr CargoLabel CT_BUBBLES{"BUBL"};
|
||||
static constexpr CargoLabel CT_PLASTIC{"PLST"};
|
||||
static constexpr CargoLabel CT_FIZZY_DRINKS{"FZDR"};
|
||||
|
||||
/** Dummy label for engines that carry no cargo; they actually carry 0 passengers. */
|
||||
static constexpr CargoLabel CT_NONE = CT_PASSENGERS;
|
||||
|
||||
static constexpr CargoLabel CT_INVALID{UINT32_MAX}; ///< Invalid cargo type.
|
||||
static constexpr CargoLabel CT_INVALID{"\xFF\xFF\xFF\xFF"}; ///< Invalid cargo type.
|
||||
|
||||
static constexpr CargoType NUM_ORIGINAL_CARGO{12}; ///< Original number of cargo types.
|
||||
static constexpr CargoType NUM_CARGO{64}; ///< Maximum number of cargo types in a game.
|
||||
|
||||
+13
-13
@@ -192,7 +192,7 @@ typedef int32_t CheckButtonClick(int32_t new_value, int32_t change_direction);
|
||||
|
||||
/** Information of a cheat. */
|
||||
struct CheatEntry {
|
||||
VarType type; ///< type of selector
|
||||
VarMemType type; ///< type of selector
|
||||
StringID str; ///< string with descriptive text
|
||||
void *variable; ///< pointer to the variable
|
||||
bool *been_used; ///< has this cheat been used before?
|
||||
@@ -204,15 +204,15 @@ struct CheatEntry {
|
||||
* Order matches with the values of #CheatNumbers
|
||||
*/
|
||||
static const CheatEntry _cheats_ui[] = {
|
||||
{SLE_INT32, STR_CHEAT_MONEY, &_money_cheat_amount, &_cheats.money.been_used, &ClickMoneyCheat },
|
||||
{SLE_UINT8, STR_CHEAT_CHANGE_COMPANY, &_local_company, &_cheats.switch_company.been_used, &ClickChangeCompanyCheat },
|
||||
{SLE_BOOL, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used, nullptr },
|
||||
{SLE_BOOL, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value, &_cheats.crossing_tunnels.been_used, nullptr },
|
||||
{SLE_BOOL, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, nullptr },
|
||||
{SLE_BOOL, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, &ClickSetProdCheat },
|
||||
{SLE_BOOL, STR_CHEAT_STATION_RATING, &_cheats.station_rating.value, &_cheats.station_rating.been_used, nullptr },
|
||||
{SLE_UINT8, STR_CHEAT_EDIT_MAX_HL, &_settings_game.construction.map_height_limit, &_cheats.edit_max_hl.been_used, &ClickChangeMaxHlCheat },
|
||||
{SLE_INT32, STR_CHEAT_CHANGE_DATE, &TimerGameCalendar::year, &_cheats.change_date.been_used, &ClickChangeDateCheat },
|
||||
{ VarMemType::I32, STR_CHEAT_MONEY, &_money_cheat_amount, &_cheats.money.been_used, &ClickMoneyCheat },
|
||||
{ VarMemType::U8, STR_CHEAT_CHANGE_COMPANY, &_local_company, &_cheats.switch_company.been_used, &ClickChangeCompanyCheat },
|
||||
{ VarMemType::Bool, STR_CHEAT_EXTRA_DYNAMITE, &_cheats.magic_bulldozer.value, &_cheats.magic_bulldozer.been_used, nullptr },
|
||||
{ VarMemType::Bool, STR_CHEAT_CROSSINGTUNNELS, &_cheats.crossing_tunnels.value, &_cheats.crossing_tunnels.been_used, nullptr },
|
||||
{ VarMemType::Bool, STR_CHEAT_NO_JETCRASH, &_cheats.no_jetcrash.value, &_cheats.no_jetcrash.been_used, nullptr },
|
||||
{ VarMemType::Bool, STR_CHEAT_SETUP_PROD, &_cheats.setup_prod.value, &_cheats.setup_prod.been_used, &ClickSetProdCheat },
|
||||
{ VarMemType::Bool, STR_CHEAT_STATION_RATING, &_cheats.station_rating.value, &_cheats.station_rating.been_used, nullptr },
|
||||
{ VarMemType::U8, STR_CHEAT_EDIT_MAX_HL, &_settings_game.construction.map_height_limit, &_cheats.edit_max_hl.been_used, &ClickChangeMaxHlCheat },
|
||||
{ VarMemType::I32, STR_CHEAT_CHANGE_DATE, &TimerGameCalendar::year, &_cheats.change_date.been_used, &ClickChangeDateCheat },
|
||||
};
|
||||
|
||||
static_assert(CHT_NUM_CHEATS == lengthof(_cheats_ui));
|
||||
@@ -283,7 +283,7 @@ struct CheatWindow : Window {
|
||||
|
||||
std::string str;
|
||||
switch (ce->type) {
|
||||
case SLE_BOOL: {
|
||||
case VarMemType::Bool: {
|
||||
bool on = (*(bool*)ce->variable);
|
||||
|
||||
DrawBoolButton(button_left, y + button_y_offset, Colours::Yellow, Colours::Grey, on, true);
|
||||
@@ -380,7 +380,7 @@ struct CheatWindow : Window {
|
||||
uint width = 0;
|
||||
for (const auto &ce : _cheats_ui) {
|
||||
switch (ce.type) {
|
||||
case SLE_BOOL:
|
||||
case VarMemType::Bool:
|
||||
width = std::max(width, GetStringBoundingBox(GetString(ce.str, STR_CONFIG_SETTING_ON)).width);
|
||||
width = std::max(width, GetStringBoundingBox(GetString(ce.str, STR_CONFIG_SETTING_OFF)).width);
|
||||
break;
|
||||
@@ -466,7 +466,7 @@ struct CheatWindow : Window {
|
||||
*ce->been_used = true;
|
||||
|
||||
switch (ce->type) {
|
||||
case SLE_BOOL:
|
||||
case VarMemType::Bool:
|
||||
value ^= 1;
|
||||
if (ce->proc != nullptr) ce->proc(value, 0);
|
||||
break;
|
||||
|
||||
+18
-7
@@ -53,12 +53,21 @@ static CommandCost ClearTile_Clear(TileIndex tile, DoCommandFlags flags)
|
||||
return price;
|
||||
}
|
||||
|
||||
void DrawClearLandTile(const TileInfo *ti, uint8_t set)
|
||||
/**
|
||||
* Draw a ClearGround::Grass tile.
|
||||
* @param ti The tile to draw.
|
||||
* @param density The density of the dirt -> grass transition to draw.
|
||||
*/
|
||||
void DrawClearLandTile(const TileInfo *ti, uint8_t density)
|
||||
{
|
||||
DrawGroundSprite(SPR_FLAT_BARE_LAND + SlopeToSpriteOffset(ti->tileh) + set * 19, PAL_NONE);
|
||||
DrawGroundSprite(_clear_land_sprites_grass[density] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
|
||||
}
|
||||
|
||||
void DrawHillyLandTile(const TileInfo *ti)
|
||||
/**
|
||||
* Draw a ClearGround::Rough tile.
|
||||
* @param ti The tile to draw.
|
||||
*/
|
||||
void DrawRoughLandTile(const TileInfo *ti)
|
||||
{
|
||||
if (ti->tileh != SLOPE_FLAT) {
|
||||
DrawGroundSprite(SPR_FLAT_ROUGH_LAND + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
|
||||
@@ -67,6 +76,10 @@ void DrawHillyLandTile(const TileInfo *ti)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw the fences atop a ClearGround::Fields tile.
|
||||
* @param ti The tile to draw.
|
||||
*/
|
||||
static void DrawClearLandFence(const TileInfo *ti)
|
||||
{
|
||||
/* combine fences into one sprite object */
|
||||
@@ -123,9 +136,7 @@ static void DrawTile_Clear(TileInfo *ti)
|
||||
uint8_t density = GetClearDensity(ti->tile);
|
||||
DrawGroundSprite(_clear_land_sprites_snow_desert[density] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
|
||||
if (GetClearGround(ti->tile) == ClearGround::Rocks) {
|
||||
/* There 4 levels of snowy overlay rocks, each with 19 sprites. */
|
||||
++density;
|
||||
DrawGroundSprite(SPR_OVERLAY_ROCKS_BASE + (density * 19) + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
|
||||
DrawGroundSprite(_clear_land_sprites_snowy_rocks[density] + SlopeToSpriteOffset(ti->tileh), PAL_NONE);
|
||||
}
|
||||
|
||||
DrawBridgeMiddle(ti, {});
|
||||
@@ -138,7 +149,7 @@ static void DrawTile_Clear(TileInfo *ti)
|
||||
break;
|
||||
|
||||
case ClearGround::Rough:
|
||||
DrawHillyLandTile(ti);
|
||||
DrawRoughLandTile(ti);
|
||||
break;
|
||||
|
||||
case ClearGround::Rocks:
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "tile_cmd.h"
|
||||
|
||||
void DrawHillyLandTile(const TileInfo *ti);
|
||||
void DrawRoughLandTile(const TileInfo *ti);
|
||||
void DrawClearLandTile(const TileInfo *ti, uint8_t set);
|
||||
|
||||
#endif /* CLEAR_FUNC_H */
|
||||
|
||||
+2
-2
@@ -285,7 +285,7 @@ protected:
|
||||
static inline void SetClientIdHelper([[maybe_unused]] T &data)
|
||||
{
|
||||
if constexpr (std::is_same_v<ClientID, T>) {
|
||||
if (data == INVALID_CLIENT_ID) data = CLIENT_ID_SERVER;
|
||||
if (data == ClientID::Invalid) data = ClientID::Server;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ protected:
|
||||
static inline bool ClientIdIsSet([[maybe_unused]] T &data)
|
||||
{
|
||||
if constexpr (std::is_same_v<ClientID, T>) {
|
||||
return data != INVALID_CLIENT_ID;
|
||||
return data != ClientID::Invalid;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -671,7 +671,7 @@ TimeoutTimer<TimerGameTick> _new_competitor_timeout({ TimerGameTick::Priority::C
|
||||
|
||||
/* Send a command to all clients to start up a new AI.
|
||||
* Works fine for Multiplayer and Singleplayer */
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), CompanyRemoveReason::None, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), CompanyRemoveReason::None, ClientID::Invalid);
|
||||
});
|
||||
|
||||
/** Start of a new game. */
|
||||
@@ -792,7 +792,7 @@ void OnTick_Companies()
|
||||
for (auto i = 0; i < _settings_game.difficulty.max_no_competitors; i++) {
|
||||
if (_networking && num_companies++ >= _settings_client.network.max_companies) break;
|
||||
if (num_ais++ >= _settings_game.difficulty.max_no_competitors) break;
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), {}, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), {}, ClientID::Invalid);
|
||||
}
|
||||
timeout = 10 * 60 * Ticks::TICKS_PER_SECOND;
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
#include "company_type.h"
|
||||
#include "livery.h"
|
||||
|
||||
enum ClientID : uint32_t;
|
||||
enum class ClientID : uint32_t;
|
||||
enum class Colours : uint8_t;
|
||||
|
||||
CommandCost CmdCompanyCtrl(DoCommandFlags flags, CompanyCtrlAction cca, CompanyID company_id, CompanyRemoveReason reason, ClientID client_id);
|
||||
|
||||
+18
-18
@@ -188,12 +188,12 @@ static void DrawCategories(const Rect &r)
|
||||
{
|
||||
int y = r.top;
|
||||
/* Draw description of 12-minute economic period. */
|
||||
DrawString(r.left, r.right, y, (TimerGameEconomy::UsingWallclockUnits() ? STR_FINANCES_PERIOD_CAPTION : STR_FINANCES_YEAR_CAPTION), TextColour::FromString, SA_LEFT, true);
|
||||
DrawString(r.left, r.right, y, (TimerGameEconomy::UsingWallclockUnits() ? STR_FINANCES_PERIOD_CAPTION : STR_FINANCES_YEAR_CAPTION), TextColour::FromString, AlignmentH::Start, true);
|
||||
y += GetCharacterHeight(FontSize::Normal) + WidgetDimensions::scaled.vsep_wide;
|
||||
|
||||
for (const ExpensesList &list : _expenses_list_types) {
|
||||
/* Draw category title and advance y */
|
||||
DrawString(r.left, r.right, y, list.title, TextColour::FromString, SA_LEFT);
|
||||
DrawString(r.left, r.right, y, list.title, TextColour::FromString, AlignmentH::Start);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
|
||||
/* Draw category items and advance y */
|
||||
@@ -204,7 +204,7 @@ static void DrawCategories(const Rect &r)
|
||||
y += WidgetDimensions::scaled.vsep_normal;
|
||||
|
||||
/* Draw category total and advance y */
|
||||
DrawString(r.left, r.right, y, STR_FINANCES_TOTAL_CAPTION, TextColour::FromString, SA_RIGHT);
|
||||
DrawString(r.left, r.right, y, STR_FINANCES_TOTAL_CAPTION, TextColour::FromString, AlignmentH::End);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
|
||||
/* Advance y by a blockspace after this category block */
|
||||
@@ -213,7 +213,7 @@ static void DrawCategories(const Rect &r)
|
||||
|
||||
/* Draw total profit/loss */
|
||||
y += WidgetDimensions::scaled.vsep_normal;
|
||||
DrawString(r.left, r.right, y, STR_FINANCES_PROFIT, TextColour::FromString, SA_LEFT);
|
||||
DrawString(r.left, r.right, y, STR_FINANCES_PROFIT, TextColour::FromString, AlignmentH::Start);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -233,7 +233,7 @@ static void DrawPrice(Money amount, int left, int right, int top, TextColour col
|
||||
amount = -amount;
|
||||
str = STR_FINANCES_POSITIVE_INCOME;
|
||||
}
|
||||
DrawString(left, right, top, GetString(str, amount), colour, SA_RIGHT | SA_FORCE);
|
||||
DrawString(left, right, top, GetString(str, amount), colour, AlignmentH::ForceRight);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -279,7 +279,7 @@ static void DrawYearColumn(const Rect &r, TimerGameEconomy::Year year, const Exp
|
||||
Money sum;
|
||||
|
||||
/* Year header */
|
||||
DrawString(r.left, r.right, y, GetString(STR_FINANCES_YEAR, year), TextColour::FromString, SA_RIGHT | SA_FORCE, true);
|
||||
DrawString(r.left, r.right, y, GetString(STR_FINANCES_YEAR, year), TextColour::FromString, AlignmentH::ForceRight, true);
|
||||
y += GetCharacterHeight(FontSize::Normal) + WidgetDimensions::scaled.vsep_wide;
|
||||
|
||||
/* Categories */
|
||||
@@ -322,10 +322,10 @@ static constexpr std::initializer_list<NWidgetPart> _nested_company_finances_wid
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_FINANCES_BANK_BALANCE_TITLE), SetPadding(WidgetDimensions::unscaled.vsep_normal, 0, 0, 0),
|
||||
EndContainer(),
|
||||
NWidget(NWID_VERTICAL), // Vertical column with bank balance amount, loan amount, and total.
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_OWN_VALUE), SetAlignment(SA_VERT_CENTER | SA_RIGHT | SA_FORCE),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_LOAN_VALUE), SetAlignment(SA_VERT_CENTER | SA_RIGHT | SA_FORCE),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_OWN_VALUE), SetAlignment({AlignmentH::ForceRight, AlignmentV::Middle}),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_LOAN_VALUE), SetAlignment({AlignmentH::ForceRight, AlignmentV::Middle}),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_CF_BALANCE_LINE), SetMinimalSize(0, WidgetDimensions::unscaled.vsep_normal),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_BALANCE_VALUE), SetAlignment(SA_VERT_CENTER | SA_RIGHT | SA_FORCE),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_CF_BALANCE_VALUE), SetAlignment({AlignmentH::ForceRight, AlignmentV::Middle}),
|
||||
EndContainer(),
|
||||
NWidget(NWID_SELECTION, Colours::Invalid, WID_CF_SEL_MAXLOAN),
|
||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1), // Max loan information
|
||||
@@ -1794,14 +1794,14 @@ struct CompanyInfrastructureWindow : Window
|
||||
case InfrastructureItemType::Total:
|
||||
/* Draw line in the spacer above the total. */
|
||||
GfxFillRect(costr.Translate(0, -WidgetDimensions::scaled.vsep_normal).WithHeight(WidgetDimensions::scaled.fullbevel.top), PC_WHITE);
|
||||
DrawString(costr, GetString(TimerGameEconomy::UsingWallclockUnits() ? STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_PERIOD : STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_YEAR, it->cost * 12), TextColour::Black, SA_RIGHT | SA_FORCE);
|
||||
DrawString(costr, GetString(TimerGameEconomy::UsingWallclockUnits() ? STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_PERIOD : STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_YEAR, it->cost * 12), TextColour::Black, AlignmentH::ForceRight);
|
||||
break;
|
||||
|
||||
case InfrastructureItemType::Value:
|
||||
DrawString(labelr.Indent(WidgetDimensions::scaled.hsep_indent, rtl), GetString(it->label), TextColour::White);
|
||||
DrawString(countr, GetString(STR_JUST_COMMA, it->count), TextColour::White, SA_RIGHT | SA_FORCE);
|
||||
DrawString(countr, GetString(STR_JUST_COMMA, it->count), TextColour::White, AlignmentH::ForceRight);
|
||||
if (_settings_game.economy.infrastructure_maintenance) {
|
||||
DrawString(costr, GetString(TimerGameEconomy::UsingWallclockUnits() ? STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_PERIOD : STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_YEAR, it->cost * 12), TextColour::Black, SA_RIGHT | SA_FORCE);
|
||||
DrawString(costr, GetString(TimerGameEconomy::UsingWallclockUnits() ? STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_PERIOD : STR_COMPANY_INFRASTRUCTURE_VIEW_TOTAL_YEAR, it->cost * 12), TextColour::Black, AlignmentH::ForceRight);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1875,7 +1875,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_company_widgets = {
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_C_DESC_COLOUR_SCHEME_EXAMPLE), SetMinimalSize(30, 0), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_C_DESC_VEHICLE), SetStringTip(STR_COMPANY_VIEW_VEHICLES_TITLE), SetAlignment(SA_LEFT | SA_TOP),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_C_DESC_VEHICLE), SetStringTip(STR_COMPANY_VIEW_VEHICLES_TITLE), SetAlignment({AlignmentH::Start, AlignmentV::Top}),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_C_DESC_VEHICLE_COUNTS), SetMinimalTextLines(4, 0), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1894,7 +1894,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_company_widgets = {
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_C_DESC_COMPANY_VALUE), SetFill(1, 0),
|
||||
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_C_DESC_INFRASTRUCTURE), SetStringTip(STR_COMPANY_VIEW_INFRASTRUCTURE), SetAlignment(SA_LEFT | SA_TOP),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_C_DESC_INFRASTRUCTURE), SetStringTip(STR_COMPANY_VIEW_INFRASTRUCTURE), SetAlignment({AlignmentH::Start, AlignmentV::Top}),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_C_DESC_INFRASTRUCTURE_COUNTS), SetMinimalTextLines(5, 0), SetFill(1, 0),
|
||||
NWidget(NWID_VERTICAL), SetPIPRatio(0, 0, 1),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Grey, WID_C_VIEW_INFRASTRUCTURE), SetStringTip(STR_COMPANY_VIEW_INFRASTRUCTURE_BUTTON, STR_COMPANY_VIEW_INFRASTRUCTURE_TOOLTIP),
|
||||
@@ -2021,7 +2021,7 @@ struct CompanyWindow : Window
|
||||
break;
|
||||
|
||||
case WID_C_DESC_VEHICLE_COUNTS: {
|
||||
uint64_t max_value = GetParamMaxValue(5000); // Maximum number of vehicles
|
||||
uint64_t max_value = GetParamMaxValue(10000); // Maximum number of vehicles
|
||||
for (const auto &count_string : _company_view_vehicle_count_strings) {
|
||||
size.width = std::max(size.width, GetStringBoundingBox(GetString(count_string, max_value)).width + padding.width);
|
||||
}
|
||||
@@ -2123,7 +2123,7 @@ struct CompanyWindow : Window
|
||||
break;
|
||||
|
||||
case WID_C_FACE_TITLE:
|
||||
DrawStringMultiLine(r, GetString(STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE, c->index), TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawStringMultiLine(r, GetString(STR_COMPANY_VIEW_PRESIDENT_MANAGER_TITLE, c->index), TextColour::FromString, AlignmentH::Centre);
|
||||
break;
|
||||
|
||||
case WID_C_DESC_COLOUR_SCHEME_EXAMPLE: {
|
||||
@@ -2244,7 +2244,7 @@ struct CompanyWindow : Window
|
||||
this->query_widget = WID_C_COMPANY_JOIN;
|
||||
CompanyID company = this->window_number;
|
||||
if (_network_server) {
|
||||
NetworkServerDoMove(CLIENT_ID_SERVER, company);
|
||||
NetworkServerDoMove(ClientID::Server, company);
|
||||
MarkWholeScreenDirty();
|
||||
} else {
|
||||
/* just send the join command */
|
||||
@@ -2389,7 +2389,7 @@ struct BuyCompanyWindow : Window {
|
||||
|
||||
case WID_BC_QUESTION: {
|
||||
const Company *c = Company::Get(this->window_number);
|
||||
DrawStringMultiLine(r, GetString(this->hostile_takeover ? STR_BUY_COMPANY_HOSTILE_TAKEOVER : STR_BUY_COMPANY_MESSAGE, c->index, this->company_value), TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(r, GetString(this->hostile_takeover ? STR_BUY_COMPANY_HOSTILE_TAKEOVER : STR_BUY_COMPANY_MESSAGE, c->index, this->company_value), TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ std::optional<FileHandle> _iconsole_output_file;
|
||||
void IConsoleInit()
|
||||
{
|
||||
_iconsole_output_file = std::nullopt;
|
||||
_redirect_console_to_client = INVALID_CLIENT_ID;
|
||||
_redirect_console_to_client = ClientID::Invalid;
|
||||
_redirect_console_to_admin = AdminID::Invalid();
|
||||
|
||||
IConsoleGUIInit();
|
||||
@@ -91,7 +91,7 @@ void IConsolePrint(ExtendedTextColour colour_code, const std::string &string)
|
||||
{
|
||||
assert(IsValidConsoleColour(colour_code));
|
||||
|
||||
if (_redirect_console_to_client != INVALID_CLIENT_ID) {
|
||||
if (_redirect_console_to_client != ClientID::Invalid) {
|
||||
/* Redirect the string to the client */
|
||||
NetworkServerSendRcon(_redirect_console_to_client, colour_code, string);
|
||||
return;
|
||||
|
||||
+22
-38
@@ -698,7 +698,7 @@ static bool ConKickOrBan(std::string_view arg, bool ban, std::string_view reason
|
||||
* kicking frees closes and subsequently free the connection related instances, which we
|
||||
* would be reading from and writing to after returning. So we would read or write data
|
||||
* from freed memory up till the segfault triggers. */
|
||||
if (*client_id == CLIENT_ID_SERVER || *client_id == _redirect_console_to_client) {
|
||||
if (*client_id == ClientID::Server || *client_id == _redirect_console_to_client) {
|
||||
IConsolePrint(CC_ERROR, "You can not {} yourself!", ban ? "ban" : "kick");
|
||||
return true;
|
||||
}
|
||||
@@ -945,7 +945,7 @@ static bool ConClientNickChange(std::span<std::string_view> argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*client_id == CLIENT_ID_SERVER) {
|
||||
if (*client_id == ClientID::Server) {
|
||||
IConsolePrint(CC_ERROR, "Please use the command 'name' to change your own name!");
|
||||
return true;
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ static bool ConJoinCompany(std::span<std::string_view> argv)
|
||||
|
||||
/* non-dedicated server may just do the move! */
|
||||
if (_network_server) {
|
||||
NetworkServerDoMove(CLIENT_ID_SERVER, *company_id);
|
||||
NetworkServerDoMove(ClientID::Server, *company_id);
|
||||
} else {
|
||||
NetworkClientRequestMove(*company_id);
|
||||
}
|
||||
@@ -1070,7 +1070,7 @@ static bool ConMoveClient(std::span<std::string_view> argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (ci->client_id == CLIENT_ID_SERVER && _network_dedicated) {
|
||||
if (ci->client_id == ClientID::Server && _network_dedicated) {
|
||||
IConsolePrint(CC_ERROR, "You cannot move the server!");
|
||||
return true;
|
||||
}
|
||||
@@ -1118,7 +1118,7 @@ static bool ConResetCompany(std::span<std::string_view> argv)
|
||||
IConsolePrint(CC_ERROR, "Cannot remove company: a client is connected to that company.");
|
||||
return false;
|
||||
}
|
||||
const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(CLIENT_ID_SERVER);
|
||||
const NetworkClientInfo *ci = NetworkClientInfo::GetByClientID(ClientID::Server);
|
||||
assert(ci != nullptr);
|
||||
if (ci->client_playas == *index) {
|
||||
IConsolePrint(CC_ERROR, "Cannot remove company: the server is connected to that company.");
|
||||
@@ -1126,7 +1126,7 @@ static bool ConResetCompany(std::span<std::string_view> argv)
|
||||
}
|
||||
|
||||
/* It is safe to remove this company */
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *index, CompanyRemoveReason::Manual, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *index, CompanyRemoveReason::Manual, ClientID::Invalid);
|
||||
IConsolePrint(CC_DEFAULT, "Company deleted.");
|
||||
|
||||
return true;
|
||||
@@ -1563,7 +1563,7 @@ static bool ConStartAI(std::span<std::string_view> argv)
|
||||
}
|
||||
|
||||
/* Start a new AI company */
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), CompanyRemoveReason::None, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, CompanyID::Invalid(), CompanyRemoveReason::None, ClientID::Invalid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -1605,8 +1605,8 @@ static bool ConReloadAI(std::span<std::string_view> argv)
|
||||
}
|
||||
|
||||
/* First kill the company of the AI, then start a new one. This should start the current AI again */
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *company_id, CompanyRemoveReason::Manual, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, *company_id, CompanyRemoveReason::None, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *company_id, CompanyRemoveReason::Manual, ClientID::Invalid);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::NewAI, *company_id, CompanyRemoveReason::None, ClientID::Invalid);
|
||||
IConsolePrint(CC_DEFAULT, "AI reloaded.");
|
||||
|
||||
return true;
|
||||
@@ -1649,7 +1649,7 @@ static bool ConStopAI(std::span<std::string_view> argv)
|
||||
}
|
||||
|
||||
/* Now kill the company of the AI. */
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *company_id, CompanyRemoveReason::Manual, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, *company_id, CompanyRemoveReason::Manual, ClientID::Invalid);
|
||||
IConsolePrint(CC_DEFAULT, "AI stopped, company deleted.");
|
||||
|
||||
return true;
|
||||
@@ -2050,7 +2050,7 @@ static bool ConSay(std::span<std::string_view> argv)
|
||||
NetworkClientSendChat(NetworkAction::ChatBroadcast, NetworkChatDestinationType::Broadcast, 0 /* param does not matter */, argv[1]);
|
||||
} else {
|
||||
bool from_admin = (_redirect_console_to_admin < AdminID::Invalid());
|
||||
NetworkServerSendChat(NetworkAction::ChatBroadcast, NetworkChatDestinationType::Broadcast, 0, argv[1], CLIENT_ID_SERVER, from_admin);
|
||||
NetworkServerSendChat(NetworkAction::ChatBroadcast, NetworkChatDestinationType::Broadcast, 0, argv[1], ClientID::Server, from_admin);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2082,7 +2082,7 @@ static bool ConSayCompany(std::span<std::string_view> argv)
|
||||
NetworkClientSendChat(NetworkAction::ChatTeam, NetworkChatDestinationType::Team, company_id->base(), argv[2]);
|
||||
} else {
|
||||
bool from_admin = (_redirect_console_to_admin < AdminID::Invalid());
|
||||
NetworkServerSendChat(NetworkAction::ChatTeam, NetworkChatDestinationType::Team, company_id->base(), argv[2], CLIENT_ID_SERVER, from_admin);
|
||||
NetworkServerSendChat(NetworkAction::ChatTeam, NetworkChatDestinationType::Team, company_id->base(), argv[2], ClientID::Server, from_admin);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2106,10 +2106,10 @@ static bool ConSayClient(std::span<std::string_view> argv)
|
||||
}
|
||||
|
||||
if (!_network_server) {
|
||||
NetworkClientSendChat(NetworkAction::ChatClient, NetworkChatDestinationType::Client, *client_id, argv[2]);
|
||||
NetworkClientSendChat(NetworkAction::ChatClient, NetworkChatDestinationType::Client, to_underlying(*client_id), argv[2]);
|
||||
} else {
|
||||
bool from_admin = (_redirect_console_to_admin < AdminID::Invalid());
|
||||
NetworkServerSendChat(NetworkAction::ChatClient, NetworkChatDestinationType::Client, *client_id, argv[2], CLIENT_ID_SERVER, from_admin);
|
||||
NetworkServerSendChat(NetworkAction::ChatClient, NetworkChatDestinationType::Client, to_underlying(*client_id), argv[2], ClientID::Server, from_admin);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2792,22 +2792,6 @@ static bool ConFramerateWindow(std::span<std::string_view> argv)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a label as a string.
|
||||
* If all elements are visible ASCII (excluding space) then the label will be formatted as a string of 4 characters,
|
||||
* otherwise it will be output as an 8-digit hexadecimal value.
|
||||
* @param label Label to format.
|
||||
* @return string representation of label.
|
||||
**/
|
||||
static std::string FormatLabel(uint32_t label)
|
||||
{
|
||||
if (std::isgraph(GB(label, 24, 8)) && std::isgraph(GB(label, 16, 8)) && std::isgraph(GB(label, 8, 8)) && std::isgraph(GB(label, 0, 8))) {
|
||||
return fmt::format("{:c}{:c}{:c}{:c}", GB(label, 24, 8), GB(label, 16, 8), GB(label, 8, 8), GB(label, 0, 8));
|
||||
}
|
||||
|
||||
return fmt::format("{:08X}", label);
|
||||
}
|
||||
|
||||
/** List all road types and their configuration. */
|
||||
static void ConDumpRoadTypes()
|
||||
{
|
||||
@@ -2821,8 +2805,8 @@ static void ConDumpRoadTypes()
|
||||
std::map<uint32_t, const GRFFile *> grfs;
|
||||
for (RoadType rt : EnumRange(ROADTYPE_END)) {
|
||||
const RoadTypeInfo *rti = GetRoadTypeInfo(rt);
|
||||
if (rti->label == 0) continue;
|
||||
uint32_t grfid = 0;
|
||||
if (rti->label.Empty()) continue;
|
||||
GrfID grfid{};
|
||||
const GRFFile *grf = rti->grffile[RoadSpriteType::Ground];
|
||||
if (grf != nullptr) {
|
||||
grfid = grf->grfid;
|
||||
@@ -2831,7 +2815,7 @@ static void ConDumpRoadTypes()
|
||||
IConsolePrint(CC_DEFAULT, " {:02d} {} {}, Flags: {}{}{}{}{}, GRF: {:08X}, {}",
|
||||
(uint)rt,
|
||||
RoadTypeIsTram(rt) ? "Tram" : "Road",
|
||||
FormatLabel(rti->label),
|
||||
rti->label.AsString(),
|
||||
rti->flags.Test(RoadTypeFlag::Catenary) ? 'c' : '-',
|
||||
rti->flags.Test(RoadTypeFlag::NoLevelCrossing) ? 'l' : '-',
|
||||
rti->flags.Test(RoadTypeFlag::NoHouses) ? 'X' : '-',
|
||||
@@ -2860,8 +2844,8 @@ static void ConDumpRailTypes()
|
||||
std::map<uint32_t, const GRFFile *> grfs;
|
||||
for (RailType rt : EnumRange(RAILTYPE_END)) {
|
||||
const RailTypeInfo *rti = GetRailTypeInfo(rt);
|
||||
if (rti->label == 0) continue;
|
||||
uint32_t grfid = 0;
|
||||
if (rti->label.Empty()) continue;
|
||||
GrfID grfid{};
|
||||
const GRFFile *grf = rti->grffile[RailSpriteType::Ground];
|
||||
if (grf != nullptr) {
|
||||
grfid = grf->grfid;
|
||||
@@ -2869,7 +2853,7 @@ static void ConDumpRailTypes()
|
||||
}
|
||||
IConsolePrint(CC_DEFAULT, " {:02d} {}, Flags: {}{}{}{}{}{}, GRF: {:08X}, {}",
|
||||
(uint)rt,
|
||||
FormatLabel(rti->label),
|
||||
rti->label.AsString(),
|
||||
rti->flags.Test(RailTypeFlag::Catenary) ? 'c' : '-',
|
||||
rti->flags.Test(RailTypeFlag::NoLevelCrossing) ? 'l' : '-',
|
||||
rti->flags.Test(RailTypeFlag::Hidden) ? 'h' : '-',
|
||||
@@ -2908,7 +2892,7 @@ static void ConDumpCargoTypes()
|
||||
|
||||
std::map<uint32_t, const GRFFile *> grfs;
|
||||
for (const CargoSpec *spec : CargoSpec::Iterate()) {
|
||||
uint32_t grfid = 0;
|
||||
GrfID grfid{};
|
||||
const GRFFile *grf = spec->grffile;
|
||||
if (grf != nullptr) {
|
||||
grfid = grf->grfid;
|
||||
@@ -2917,7 +2901,7 @@ static void ConDumpCargoTypes()
|
||||
IConsolePrint(CC_DEFAULT, " {:02d} Bit: {:2d}, Label: {}, Callback mask: 0x{:02X}, Cargo class: {}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}, GRF: {:08X}, {}",
|
||||
spec->Index(),
|
||||
spec->bitnum,
|
||||
FormatLabel(spec->label.base()),
|
||||
spec->label.AsString(),
|
||||
spec->callback_mask.base(),
|
||||
spec->classes.Test(CargoClass::Passengers) ? 'p' : '-',
|
||||
spec->classes.Test(CargoClass::Mail) ? 'm' : '-',
|
||||
|
||||
+4
-4
@@ -200,23 +200,23 @@ struct IConsoleWindow : Window
|
||||
int ypos = this->height - this->line_height - WidgetDimensions::scaled.hsep_normal;
|
||||
for (size_t line_index = IConsoleWindow::scroll; line_index < _iconsole_buffer.size(); line_index++) {
|
||||
const IConsoleLine &print = _iconsole_buffer[line_index];
|
||||
ypos = DrawStringMultiLine(WidgetDimensions::scaled.frametext.left, right, -this->line_height, ypos, GetString(STR_JUST_RAW_STRING, print.buffer), print.colour, SA_LEFT | SA_BOTTOM | SA_FORCE) - WidgetDimensions::scaled.hsep_normal;
|
||||
ypos = DrawStringMultiLine(WidgetDimensions::scaled.frametext.left, right, -this->line_height, ypos, GetString(STR_JUST_RAW_STRING, print.buffer), print.colour, {AlignmentH::ForceLeft, AlignmentV::Bottom}) - WidgetDimensions::scaled.hsep_normal;
|
||||
if (ypos < 0) break;
|
||||
}
|
||||
/* If the text is longer than the window, don't show the starting ']' */
|
||||
int delta = this->width - WidgetDimensions::scaled.frametext.right - cursor_width - this->line_offset - _iconsole_cmdline.pixels - ICON_RIGHT_BORDERWIDTH;
|
||||
if (delta > 0) {
|
||||
DrawString(WidgetDimensions::scaled.frametext.left, right, this->height - this->line_height, "]", CC_COMMAND, SA_LEFT | SA_FORCE);
|
||||
DrawString(WidgetDimensions::scaled.frametext.left, right, this->height - this->line_height, "]", CC_COMMAND, AlignmentH::ForceLeft);
|
||||
delta = 0;
|
||||
}
|
||||
|
||||
/* If we have a marked area, draw a background highlight. */
|
||||
if (_iconsole_cmdline.marklength != 0) GfxFillRect(this->line_offset + delta + _iconsole_cmdline.markxoffs, this->height - this->line_height, this->line_offset + delta + _iconsole_cmdline.markxoffs + _iconsole_cmdline.marklength, this->height - 1, PC_DARK_RED);
|
||||
|
||||
DrawString(this->line_offset + delta, right, this->height - this->line_height, _iconsole_cmdline.GetText(), CC_COMMAND, SA_LEFT | SA_FORCE);
|
||||
DrawString(this->line_offset + delta, right, this->height - this->line_height, _iconsole_cmdline.GetText(), CC_COMMAND, AlignmentH::ForceLeft);
|
||||
|
||||
if (_focused_window == this && _iconsole_cmdline.caret) {
|
||||
DrawString(this->line_offset + delta + _iconsole_cmdline.caretxoffs, right, this->height - this->line_height, "_", TextColour::White, SA_LEFT | SA_FORCE);
|
||||
DrawString(this->line_offset + delta + _iconsole_cmdline.caretxoffs, right, this->height - this->line_height, "_", TextColour::White, AlignmentH::ForceLeft);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ add_files(
|
||||
geometry_func.hpp
|
||||
geometry_type.hpp
|
||||
kdtree.hpp
|
||||
label.cpp
|
||||
label_type.hpp
|
||||
math_func.cpp
|
||||
math_func.hpp
|
||||
multimap.hpp
|
||||
|
||||
@@ -10,9 +10,24 @@
|
||||
#include "../stdafx.h"
|
||||
#include "geometry_func.hpp"
|
||||
#include "math_func.hpp"
|
||||
#include "../strings_func.h"
|
||||
#include "../strings_type.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* Resolve horizontal alignment for the current text direction.
|
||||
* @return The resolved horizontal alignment.
|
||||
*/
|
||||
AlignmentH Alignment::ResolveRTL() const
|
||||
{
|
||||
switch (this->h) {
|
||||
case AlignmentH::Start: return _current_text_dir == TD_RTL ? AlignmentH::ForceRight : AlignmentH::ForceLeft;
|
||||
case AlignmentH::End: return _current_text_dir == TD_RTL ? AlignmentH::ForceLeft : AlignmentH::ForceRight;
|
||||
default: return this->h;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute bounding box of both dimensions.
|
||||
* @param d1 First dimension.
|
||||
|
||||
@@ -16,6 +16,43 @@
|
||||
# define Point OTTD_Point
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/** Horizontal alignments. */
|
||||
enum class AlignmentH : uint8_t {
|
||||
Start, ///< Align to the start, LTR/RTL aware.
|
||||
Centre, ///< Align to the centre.
|
||||
End, ///< Align to the end, LTR/RTL aware.
|
||||
ForceLeft, ///< Force align to the left.
|
||||
ForceRight, ///< Force align to the right.
|
||||
};
|
||||
|
||||
/** Vertical alignments. */
|
||||
enum class AlignmentV : uint8_t {
|
||||
Top, ///< Align to the top.
|
||||
Middle, ///< Align to the middle.
|
||||
Bottom, ///< Align to the bottom.
|
||||
};
|
||||
|
||||
/** Horizontal and vertical alignment. */
|
||||
struct Alignment {
|
||||
AlignmentH h; ///< Horizontal alignment.
|
||||
AlignmentV v; ///< Vertical alignment.
|
||||
|
||||
/**
|
||||
* Construct an alignment with the specified horizontal and vertical alignment.
|
||||
* @param h The horizontal alignment.
|
||||
* @param v The vertical alignment.
|
||||
*/
|
||||
constexpr Alignment(AlignmentH h, AlignmentV v) : h(h), v(v) {}
|
||||
|
||||
/**
|
||||
* Construct an alignment with the specific horizontal alignment.
|
||||
* @param h The horizontal alignment.
|
||||
*/
|
||||
constexpr Alignment(AlignmentH h) : Alignment(h, AlignmentV::Top) {}
|
||||
|
||||
AlignmentH ResolveRTL() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* Determine where to position a centred object.
|
||||
* @param min The top or left coordinate.
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
|
||||
*/
|
||||
|
||||
/** @file label.cpp Implementation of label functions. */
|
||||
|
||||
#include "../stdafx.h"
|
||||
#include "label_type.hpp"
|
||||
#include "../string_func.h"
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
/**
|
||||
* Get the label as a \c std::string.
|
||||
* If the label is all \c std::isgraph characters, it will return these characters as string,
|
||||
* otherwise it will format it as a 8-digit hexadecimal.
|
||||
* @return The label as string.
|
||||
*/
|
||||
std::string BaseLabel::AsString() const
|
||||
{
|
||||
if (std::ranges::all_of(*this, [](uint8_t c) { return std::isgraph(c); })) {
|
||||
return std::string{reinterpret_cast<const char *>(this->data()), this->size()};
|
||||
}
|
||||
|
||||
return FormatArrayAsHex(*this);
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* This file is part of OpenTTD.
|
||||
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
||||
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
|
||||
*/
|
||||
|
||||
/** @file label_type.hpp A type for 4 character labels/tags/ids in files that should be read/shown as is. */
|
||||
|
||||
#ifndef LABEL_TYPE_HPP
|
||||
#define LABEL_TYPE_HPP
|
||||
|
||||
/** Base for a four character label/tag/id. */
|
||||
struct BaseLabel : std::array<uint8_t, 4> {
|
||||
/**
|
||||
* Check whether the label is empty.
|
||||
* @return \c true iff the label is empty, i.e. all zeros.
|
||||
*/
|
||||
constexpr inline bool Empty() const
|
||||
{
|
||||
return std::ranges::all_of(*this, [](uint8_t b) { return b == 0; });
|
||||
};
|
||||
|
||||
/**
|
||||
* Get the label as a \c std::string.
|
||||
* If the label is all \c std::isgraph characters, it will return these characters as string,
|
||||
* otherwise it will format it as a 8-digit hexadecimal.
|
||||
* @return The label as string.
|
||||
*/
|
||||
std::string AsString() const;
|
||||
};
|
||||
|
||||
/**
|
||||
* A four character label/tag/id.
|
||||
* @tparam Tag Type to distinguish labels/tags/ids of different types.
|
||||
*/
|
||||
template <typename Tag>
|
||||
struct Label : BaseLabel {
|
||||
/** Create an empty label, i.e. all zeros. */
|
||||
constexpr Label()
|
||||
{
|
||||
std::ranges::fill(*this, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a label with the given 4 letter character string.
|
||||
* @param label The label value.
|
||||
* @note This defines 5 characters, but the 5th character is assumed to null-terminator.
|
||||
*/
|
||||
constexpr Label(const char (&label)[5])
|
||||
{
|
||||
std::copy(label, label + this->size(), this->begin());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a label with the given 4 bytes.
|
||||
* @param label The label value.
|
||||
*/
|
||||
constexpr Label(const uint8_t (&label)[4])
|
||||
{
|
||||
std::copy(label, label + this->size(), this->begin());
|
||||
}
|
||||
|
||||
/**
|
||||
* Default spaceship operator.
|
||||
* @param other The label to compare to.
|
||||
* @return The comparison ordering.
|
||||
*/
|
||||
constexpr std::strong_ordering operator<=>(const Label<Tag> &other) const = default;
|
||||
};
|
||||
|
||||
#endif /* LABEL_TYPE_HPP */
|
||||
+13
-9
@@ -176,7 +176,7 @@ static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_typ
|
||||
{
|
||||
int max_extend_left = 0;
|
||||
int max_extend_right = 0;
|
||||
uint max_height = 0;
|
||||
uint height = 0;
|
||||
|
||||
for (const Engine *e : Engine::IterateType(type)) {
|
||||
if (!e->IsEnabled()) continue;
|
||||
@@ -192,7 +192,7 @@ static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_typ
|
||||
case VehicleType::Ship: GetShipSpriteSize(eid, x, y, x_offs, y_offs, image_type); break;
|
||||
case VehicleType::Aircraft: GetAircraftSpriteSize(eid, x, y, x_offs, y_offs, image_type); break;
|
||||
}
|
||||
if (y > max_height) max_height = y;
|
||||
if (y > height) height = y;
|
||||
if (-x_offs > max_extend_left) max_extend_left = -x_offs;
|
||||
if ((int)x + x_offs > max_extend_right) max_extend_right = x + x_offs;
|
||||
}
|
||||
@@ -200,15 +200,19 @@ static void InitBlocksizeForVehicles(VehicleType type, EngineImageType image_typ
|
||||
int min_extend = ScaleSpriteTrad(16);
|
||||
int max_extend = ScaleSpriteTrad(98);
|
||||
|
||||
/* Limit sprite height to limits based on original design height to prevent window size running away. */
|
||||
int min_height = ScaleSpriteTrad(GetVehicleHeight(type));
|
||||
int max_height = min_height + min_height / 2;
|
||||
|
||||
switch (image_type) {
|
||||
case EngineImageType::InDepot:
|
||||
_base_block_sizes_depot[type].height = std::max<uint>(ScaleSpriteTrad(GetVehicleHeight(type)), max_height);
|
||||
_base_block_sizes_depot[type].extend_left = Clamp(max_extend_left, min_extend, max_extend);
|
||||
_base_block_sizes_depot[type].height = Clamp(height, min_height, max_height);
|
||||
_base_block_sizes_depot[type].extend_left = Clamp(max_extend_left, min_extend, max_extend);
|
||||
_base_block_sizes_depot[type].extend_right = Clamp(max_extend_right, min_extend, max_extend);
|
||||
break;
|
||||
case EngineImageType::Purchase:
|
||||
_base_block_sizes_purchase[type].height = std::max<uint>(ScaleSpriteTrad(GetVehicleHeight(type)), max_height);
|
||||
_base_block_sizes_purchase[type].extend_left = Clamp(max_extend_left, min_extend, max_extend);
|
||||
_base_block_sizes_purchase[type].height = Clamp(height, min_height, max_height);
|
||||
_base_block_sizes_purchase[type].extend_left = Clamp(max_extend_left, min_extend, max_extend);
|
||||
_base_block_sizes_purchase[type].extend_right = Clamp(max_extend_right, min_extend, max_extend);
|
||||
break;
|
||||
|
||||
@@ -365,7 +369,7 @@ struct DepotWindow : Window {
|
||||
Rect count = text.WithWidth(this->count_width - WidgetDimensions::scaled.hsep_normal, !rtl);
|
||||
DrawString(count.left, count.right, count.bottom - GetCharacterHeight(FontSize::Small) + 1,
|
||||
GetString(STR_JUST_DECIMAL, CeilDiv(length * 10, TILE_SIZE), 1),
|
||||
TextColour::Black, SA_RIGHT | SA_FORCE, false, FontSize::Small); // Draw the counter
|
||||
TextColour::Black, AlignmentH::ForceRight, false, FontSize::Small); // Draw the counter
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -391,7 +395,7 @@ struct DepotWindow : Window {
|
||||
DrawString(text, STR_DEPOT_NO_ENGINE);
|
||||
} else {
|
||||
Rect flag = r.WithWidth(this->flag_size.width, rtl).WithHeight(this->flag_size.height).Translate(0, diff_y);
|
||||
DrawSpriteIgnorePadding((v->vehstatus.Test(VehState::Stopped)) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, flag, SA_CENTER);
|
||||
DrawSpriteIgnorePadding((v->vehstatus.Test(VehState::Stopped)) ? SPR_FLAG_VEH_STOPPED : SPR_FLAG_VEH_RUNNING, PAL_NONE, flag, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
|
||||
DrawString(text, GetString(STR_JUST_COMMA, v->unitnumber), (v->max_age - CalendarTime::DAYS_IN_LEAP_YEAR) >= v->age ? TextColour::Black : TextColour::Red);
|
||||
}
|
||||
@@ -1107,7 +1111,7 @@ struct DepotWindow : Window {
|
||||
this->SetDirty();
|
||||
|
||||
bool sell_cmd = (v->type == VehicleType::Train && (widget == WID_D_SELL_CHAIN || _ctrl_pressed));
|
||||
Command<Commands::SellVehicle>::Post(GetCmdSellVehMsg(v->type), v->tile, v->index, sell_cmd, true, INVALID_CLIENT_ID);
|
||||
Command<Commands::SellVehicle>::Post(GetCmdSellVehMsg(v->type), v->tile, v->index, sell_cmd, true, ClientID::Invalid);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,7 @@ struct Depot;
|
||||
|
||||
static const uint MAX_LENGTH_DEPOT_NAME_CHARS = 32; ///< The maximum length of a depot name in characters including '\0'
|
||||
|
||||
/** Minimal height for a bridge above any depot tile. */
|
||||
static constexpr uint8_t MINIMAL_DEPOT_BRIDGE_HEIGHT = 3;
|
||||
|
||||
#endif /* DEPOT_TYPE_H */
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
void Draw(const Rect &full, const Rect &r, bool sel, int click_result, Colours bg_colour) const override
|
||||
{
|
||||
bool rtl = TEnd ^ (_current_text_dir == TD_RTL);
|
||||
DrawStringMultiLine(r.WithWidth(this->dim.width, rtl), this->string, this->GetColour(sel), SA_CENTER, false, TFs);
|
||||
DrawStringMultiLine(r.WithWidth(this->dim.width, rtl), this->string, this->GetColour(sel), {AlignmentH::Centre, AlignmentV::Middle}, false, TFs);
|
||||
this->TBase::Draw(full, r.Indent(this->dim.width, rtl), sel, click_result, bg_colour);
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
{
|
||||
bool rtl = TEnd ^ (_current_text_dir == TD_RTL);
|
||||
if (this->checked) {
|
||||
DrawStringMultiLine(r.WithWidth(this->dim.width, rtl), STR_JUST_CHECKMARK, this->GetColour(sel), SA_CENTER, false, TFs);
|
||||
DrawStringMultiLine(r.WithWidth(this->dim.width, rtl), STR_JUST_CHECKMARK, this->GetColour(sel), {AlignmentH::Centre, AlignmentV::Middle}, false, TFs);
|
||||
}
|
||||
this->TBase::Draw(full, r.Indent(this->dim.width + WidgetDimensions::scaled.hsep_wide, rtl), sel, click_result, bg_colour);
|
||||
}
|
||||
|
||||
+1
-1
@@ -620,7 +620,7 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
* player we are sure (the above check) that we are not the local
|
||||
* company and thus we won't be moved. */
|
||||
if (!_networking || _network_server) {
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, c->index, CompanyRemoveReason::Bankrupt, INVALID_CLIENT_ID);
|
||||
Command<Commands::CompanyControl>::Post(CompanyCtrlAction::Delete, c->index, CompanyRemoveReason::Bankrupt, ClientID::Invalid);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
+6
-6
@@ -181,7 +181,7 @@ static TrackBits MaskWireBits(TileIndex t, TrackBits tracks)
|
||||
* @param context The context to get the sprite for.
|
||||
* @return The wire sprite.
|
||||
*/
|
||||
static inline SpriteID GetWireBase(TileIndex tile, TileContext context = TCX_NORMAL)
|
||||
static inline SpriteID GetWireBase(TileIndex tile, TileContext context = TileContext::Normal)
|
||||
{
|
||||
const RailTypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
|
||||
SpriteID wires = GetCustomRailSprite(rti, tile, RailSpriteType::Wires, context);
|
||||
@@ -194,7 +194,7 @@ static inline SpriteID GetWireBase(TileIndex tile, TileContext context = TCX_NOR
|
||||
* @param context The context to get the sprite for.
|
||||
* @return The pylon sprite.
|
||||
*/
|
||||
static inline SpriteID GetPylonBase(TileIndex tile, TileContext context = TCX_NORMAL)
|
||||
static inline SpriteID GetPylonBase(TileIndex tile, TileContext context = TileContext::Normal)
|
||||
{
|
||||
const RailTypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
|
||||
SpriteID pylons = GetCustomRailSprite(rti, tile, RailSpriteType::Pylons, context);
|
||||
@@ -308,7 +308,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
|
||||
AdjustTileh(ti->tile, &tileh[TileSource::Home]);
|
||||
|
||||
SpriteID pylon_normal = GetPylonBase(ti->tile);
|
||||
SpriteID pylon_halftile = IsValidCorner(halftile_corner) ? GetPylonBase(ti->tile, TCX_UPPER_HALFTILE) : pylon_normal;
|
||||
SpriteID pylon_halftile = IsValidCorner(halftile_corner) ? GetPylonBase(ti->tile, TileContext::UpperHalftile) : pylon_normal;
|
||||
|
||||
for (DiagDirection i : EnumRange(DiagDirection::End)) {
|
||||
SpriteID pylon_base = (IsValidCorner(halftile_corner) && HasBit(InclinedSlope(i), halftile_corner)) ? pylon_halftile : pylon_normal;
|
||||
@@ -451,7 +451,7 @@ static void DrawRailCatenaryRailway(const TileInfo *ti)
|
||||
if (HasStationTileRail(ti->tile) && !CanStationTileHaveWires(ti->tile)) return;
|
||||
|
||||
SpriteID wire_normal = GetWireBase(ti->tile);
|
||||
SpriteID wire_halftile = IsValidCorner(halftile_corner) ? GetWireBase(ti->tile, TCX_UPPER_HALFTILE) : wire_normal;
|
||||
SpriteID wire_halftile = IsValidCorner(halftile_corner) ? GetWireBase(ti->tile, TileContext::UpperHalftile) : wire_normal;
|
||||
Track halftile_track;
|
||||
switch (halftile_corner) {
|
||||
case CORNER_W: halftile_track = Track::Left; break;
|
||||
@@ -515,11 +515,11 @@ void DrawRailCatenaryOnBridge(const TileInfo *ti)
|
||||
|
||||
uint height = GetBridgePixelHeight(end);
|
||||
|
||||
SpriteID wire_base = GetWireBase(end, TCX_ON_BRIDGE);
|
||||
SpriteID wire_base = GetWireBase(end, TileContext::OnBridge);
|
||||
|
||||
AddSortableSpriteToDraw(wire_base + sss->image_offset, PAL_NONE, ti->x, ti->y, height, *sss, IsTransparencySet(TransparencyOption::Catenary));
|
||||
|
||||
SpriteID pylon_base = GetPylonBase(end, TCX_ON_BRIDGE);
|
||||
SpriteID pylon_base = GetPylonBase(end, TileContext::OnBridge);
|
||||
|
||||
static constexpr SpriteBounds pylon_bounds{{-1, -1, 0}, {1, 1, BB_HEIGHT_UNDER_BRIDGE}, {1, 1, 0}};
|
||||
|
||||
|
||||
+13
-5
@@ -179,10 +179,10 @@ bool Engine::IsEnabled() const
|
||||
* This is the GRF providing the Action 3.
|
||||
* @return GRF ID of the associated NewGRF.
|
||||
*/
|
||||
uint32_t Engine::GetGRFID() const
|
||||
GrfID Engine::GetGRFID() const
|
||||
{
|
||||
const GRFFile *file = this->GetGRF();
|
||||
return file == nullptr ? 0 : file->grfid;
|
||||
return file == nullptr ? GrfID{} : file->grfid;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -553,7 +553,7 @@ void EngineOverrideManager::ResetToDefaultMapping()
|
||||
* If dynamic_engines is disabled, all newgrf share the same ID scope identified by INVALID_GRFID.
|
||||
* @return The engine ID if present, or EngineID::Invalid() if not.
|
||||
*/
|
||||
EngineID EngineOverrideManager::GetID(VehicleType type, uint16_t grf_local_id, uint32_t grfid)
|
||||
EngineID EngineOverrideManager::GetID(VehicleType type, uint16_t grf_local_id, GrfID grfid)
|
||||
{
|
||||
const auto &map = this->mappings[type];
|
||||
const auto key = EngineIDMapping::Key(grfid, grf_local_id);
|
||||
@@ -572,7 +572,7 @@ EngineID EngineOverrideManager::GetID(VehicleType type, uint16_t grf_local_id, u
|
||||
* @param static_access Whether to actually reserve the EngineID.
|
||||
* @return The engine ID if present and now reserved, or EngineID::Invalid() if not.
|
||||
*/
|
||||
EngineID EngineOverrideManager::UseUnreservedID(VehicleType type, uint16_t grf_local_id, uint32_t grfid, bool static_access)
|
||||
EngineID EngineOverrideManager::UseUnreservedID(VehicleType type, uint16_t grf_local_id, GrfID grfid, bool static_access)
|
||||
{
|
||||
auto &map = _engine_mngr.mappings[type];
|
||||
const auto key = EngineIDMapping::Key(INVALID_GRFID, grf_local_id);
|
||||
@@ -591,7 +591,15 @@ EngineID EngineOverrideManager::UseUnreservedID(VehicleType type, uint16_t grf_l
|
||||
return it->engine;
|
||||
}
|
||||
|
||||
void EngineOverrideManager::SetID(VehicleType type, uint16_t grf_local_id, uint32_t grfid, uint8_t substitute_id, EngineID engine)
|
||||
/**
|
||||
* Create an override to the given engine. If the override already exists, it will be overwritten.
|
||||
* @param type The vehicle type.
|
||||
* @param grf_local_id The NewGRF internal identifier.
|
||||
* @param grfid The unique identifier of the NewGRF.
|
||||
* @param substitute_id The fallback original engine.
|
||||
* @param engine The engine this override is for.
|
||||
*/
|
||||
void EngineOverrideManager::SetID(VehicleType type, uint16_t grf_local_id, GrfID grfid, uint8_t substitute_id, EngineID engine)
|
||||
{
|
||||
auto &map = this->mappings[type];
|
||||
const auto key = EngineIDMapping::Key(grfid, grf_local_id);
|
||||
|
||||
+27
-7
@@ -168,7 +168,7 @@ public:
|
||||
return this->grf_prop.grffile;
|
||||
}
|
||||
|
||||
uint32_t GetGRFID() const;
|
||||
GrfID GetGRFID() const;
|
||||
|
||||
struct EngineTypeFilter {
|
||||
VehicleType vt;
|
||||
@@ -201,18 +201,38 @@ public:
|
||||
};
|
||||
|
||||
struct EngineIDMapping {
|
||||
uint32_t grfid = 0; ///< The GRF ID of the file the entity belongs to
|
||||
GrfID grfid{}; ///< The GRF ID of the file the entity belongs to
|
||||
uint16_t internal_id = 0; ///< The internal ID within the GRF file
|
||||
VehicleType type{}; ///< The engine type
|
||||
uint8_t substitute_id = 0; ///< The (original) entity ID to use if this GRF is not available (currently not used)
|
||||
EngineID engine{};
|
||||
|
||||
static inline uint64_t Key(uint32_t grfid, uint16_t internal_id) { return static_cast<uint64_t>(grfid) << 32 | internal_id; }
|
||||
/**
|
||||
* Create a 64 bit key from the GRFID and internal ID for mappings.
|
||||
* @param grfid The NewGRF id.
|
||||
* @param internal_id The internal ID within the GRF file.
|
||||
* @return The key.
|
||||
*/
|
||||
static inline uint64_t Key(GrfID grfid, uint16_t internal_id) { return static_cast<uint64_t>(grfid) << 32 | internal_id; }
|
||||
|
||||
/**
|
||||
* Create a 64 bit key from this mapping.
|
||||
* @return The key.
|
||||
*/
|
||||
inline uint64_t Key() const { return Key(this->grfid, this->internal_id); }
|
||||
|
||||
/** Create a new mapping. */
|
||||
EngineIDMapping() {}
|
||||
EngineIDMapping(uint32_t grfid, uint16_t internal_id, VehicleType type, uint8_t substitute_id, EngineID engine)
|
||||
|
||||
/**
|
||||
* Create the mapping.
|
||||
* @param grfid The unique identifer of the NewGRF.
|
||||
* @param internal_id The internal identifier of the engine within the NewGRF.
|
||||
* @param type The vehicle type.
|
||||
* @param substitute_id The original vehicle to fall back to.
|
||||
* @param engine The engine the mapping is for.
|
||||
*/
|
||||
EngineIDMapping(GrfID grfid, uint16_t internal_id, VehicleType type, uint8_t substitute_id, EngineID engine)
|
||||
: grfid(grfid), internal_id(internal_id), type(type), substitute_id(substitute_id), engine(engine) {}
|
||||
};
|
||||
|
||||
@@ -229,9 +249,9 @@ struct EngineOverrideManager {
|
||||
VehicleTypeIndexArray<std::vector<EngineIDMapping>> mappings;
|
||||
|
||||
void ResetToDefaultMapping();
|
||||
EngineID GetID(VehicleType type, uint16_t grf_local_id, uint32_t grfid);
|
||||
EngineID UseUnreservedID(VehicleType type, uint16_t grf_local_id, uint32_t grfid, bool static_access);
|
||||
void SetID(VehicleType type, uint16_t grf_local_id, uint32_t grfid, uint8_t substitute_id, EngineID engine);
|
||||
EngineID GetID(VehicleType type, uint16_t grf_local_id, GrfID grfid);
|
||||
EngineID UseUnreservedID(VehicleType type, uint16_t grf_local_id, GrfID grfid, bool static_access);
|
||||
void SetID(VehicleType type, uint16_t grf_local_id, GrfID grfid, uint8_t substitute_id, EngineID engine);
|
||||
|
||||
static bool ResetToCurrentNewGRFConfig();
|
||||
};
|
||||
|
||||
+3
-3
@@ -169,15 +169,15 @@ struct EnginePreviewWindow : Window {
|
||||
if (this->selected_index >= this->engines.size()) return;
|
||||
|
||||
EngineID engine = this->engines[selected_index];
|
||||
int y = DrawStringMultiLine(r, GetString(STR_ENGINE_PREVIEW_MESSAGE, GetEngineCategoryName(engine)), TextColour::FromString, SA_HOR_CENTER | SA_TOP) + WidgetDimensions::scaled.vsep_wide;
|
||||
int y = DrawStringMultiLine(r, GetString(STR_ENGINE_PREVIEW_MESSAGE, GetEngineCategoryName(engine)), TextColour::FromString, {AlignmentH::Centre, AlignmentV::Top}) + WidgetDimensions::scaled.vsep_wide;
|
||||
|
||||
DrawString(r.left, r.right, y, GetString(STR_ENGINE_NAME, PackEngineNameDParam(engine, EngineNameContext::PreviewNews)), TextColour::Black, SA_HOR_CENTER);
|
||||
DrawString(r.left, r.right, y, GetString(STR_ENGINE_NAME, PackEngineNameDParam(engine, EngineNameContext::PreviewNews)), TextColour::Black, AlignmentH::Centre);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
|
||||
DrawVehicleEngine(r.left, r.right, this->width >> 1, y + this->vehicle_space / 2, engine, GetEnginePalette(engine, _local_company), EngineImageType::Preview);
|
||||
|
||||
y += this->vehicle_space;
|
||||
DrawStringMultiLine(r.left, r.right, y, r.bottom, GetEngineInfoString(engine), TextColour::Black, SA_CENTER);
|
||||
DrawStringMultiLine(r.left, r.right, y, r.bottom, GetEngineInfoString(engine), TextColour::Black, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
|
||||
+6
-6
@@ -192,14 +192,14 @@ public:
|
||||
|
||||
case WID_EM_MESSAGE:
|
||||
if (this->detailed_msg.empty()) {
|
||||
DrawStringMultiLineWithClipping(r, this->summary_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(r, this->summary_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
} else if (this->extra_msg.empty()) {
|
||||
/* Extra space when message is shorter than company face window */
|
||||
int extra = (r.Height() - this->height_summary - this->height_detailed - WidgetDimensions::scaled.vsep_wide) / 2;
|
||||
|
||||
/* Note: NewGRF supplied error message often do not start with a colour code, so default to white. */
|
||||
DrawStringMultiLineWithClipping(r.WithHeight(this->height_summary + extra, false), this->summary_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(r.WithHeight(this->height_detailed + extra, true), this->detailed_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(r.WithHeight(this->height_summary + extra, false), this->summary_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
DrawStringMultiLineWithClipping(r.WithHeight(this->height_detailed + extra, true), this->detailed_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
} else {
|
||||
/* Extra space when message is shorter than company face window */
|
||||
int extra = (r.Height() - this->height_summary - this->height_detailed - this->height_extra - (WidgetDimensions::scaled.vsep_wide * 2)) / 3;
|
||||
@@ -208,9 +208,9 @@ public:
|
||||
Rect top_section = r.WithHeight(this->height_summary + extra, false);
|
||||
Rect bottom_section = r.WithHeight(this->height_extra + extra, true);
|
||||
Rect middle_section = top_section.WithY(top_section.bottom, bottom_section.top);
|
||||
DrawStringMultiLineWithClipping(top_section, this->summary_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(middle_section, this->detailed_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(bottom_section, this->extra_msg.GetDecodedString(), TextColour::White, SA_CENTER);
|
||||
DrawStringMultiLineWithClipping(top_section, this->summary_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
DrawStringMultiLineWithClipping(middle_section, this->detailed_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
DrawStringMultiLineWithClipping(bottom_section, this->extra_msg.GetDecodedString(), TextColour::White, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
+1
-1
@@ -574,7 +574,7 @@ public:
|
||||
|
||||
/* Create the nice lighter rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(HEADER_HEIGHT).Shrink(WidgetDimensions::scaled.bevel.left, WidgetDimensions::scaled.bevel.top, WidgetDimensions::scaled.bevel.right, 0), GetColourGradient(Colours::Grey, Shade::Lightest));
|
||||
DrawString(hr.left, hr.right, hr.top, STR_SAVELOAD_DETAIL_CAPTION, TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawString(hr.left, hr.right, hr.top, STR_SAVELOAD_DETAIL_CAPTION, TextColour::FromString, AlignmentH::Centre);
|
||||
|
||||
if (this->selected == nullptr) return;
|
||||
|
||||
|
||||
+116
-98
@@ -214,22 +214,22 @@ namespace {
|
||||
* Elements are initialized with the expected rate in recorded values per second.
|
||||
* @hideinitializer
|
||||
*/
|
||||
PerformanceData _pf_data[PFE_MAX] = {
|
||||
PerformanceData(GL_RATE), // PFE_GAMELOOP
|
||||
PerformanceData(1), // PFE_ACC_GL_ECONOMY
|
||||
PerformanceData(1), // PFE_ACC_GL_TRAINS
|
||||
PerformanceData(1), // PFE_ACC_GL_ROADVEHS
|
||||
PerformanceData(1), // PFE_ACC_GL_SHIPS
|
||||
PerformanceData(1), // PFE_ACC_GL_AIRCRAFT
|
||||
PerformanceData(1), // PFE_GL_LANDSCAPE
|
||||
PerformanceData(1), // PFE_GL_LINKGRAPH
|
||||
PerformanceData(1000.0 / 30), // PFE_DRAWING
|
||||
PerformanceData(1), // PFE_ACC_DRAWWORLD
|
||||
PerformanceData(60.0), // PFE_VIDEO
|
||||
PerformanceData(1000.0 * 8192 / 44100), // PFE_SOUND
|
||||
PerformanceData(1), // PFE_ALLSCRIPTS
|
||||
PerformanceData(1), // PFE_GAMESCRIPT
|
||||
PerformanceData(1), // PFE_AI0 ...
|
||||
static EnumIndexArray<PerformanceData, PerformanceElement, PerformanceElement::End> _pf_data = {
|
||||
PerformanceData(GL_RATE), // PerformanceElement::GameLoop
|
||||
PerformanceData(1), // PerformanceElement::GameLoopEconomy
|
||||
PerformanceData(1), // PerformanceElement::GameLoopTrains
|
||||
PerformanceData(1), // PerformanceElement::GameLoopRoadVehicles
|
||||
PerformanceData(1), // PerformanceElement::GameLoopShips
|
||||
PerformanceData(1), // PerformanceElement::GameLoopAircraft
|
||||
PerformanceData(1), // PerformanceElement::GameLoopLandscape
|
||||
PerformanceData(1), // PerformanceElement::GameLoopLinkGraph
|
||||
PerformanceData(1000.0 / 30), // PerformanceElement::Drawing
|
||||
PerformanceData(1), // PerformanceElement::ViewportDrawing
|
||||
PerformanceData(60.0), // PerformanceElement::Video
|
||||
PerformanceData(1000.0 * 8192 / 44100), // PerformanceElement::Sound
|
||||
PerformanceData(1), // PerformanceElement::AllScripts
|
||||
PerformanceData(1), // PerformanceElement::GameScript
|
||||
PerformanceData(1), // PerformanceElement::AI0 ...
|
||||
PerformanceData(1),
|
||||
PerformanceData(1),
|
||||
PerformanceData(1),
|
||||
@@ -243,7 +243,7 @@ namespace {
|
||||
PerformanceData(1),
|
||||
PerformanceData(1),
|
||||
PerformanceData(1),
|
||||
PerformanceData(1), // PFE_AI14
|
||||
PerformanceData(1), // PerformanceElement::AI14
|
||||
};
|
||||
|
||||
}
|
||||
@@ -268,7 +268,7 @@ static TimingMeasurement GetPerformanceTimer()
|
||||
*/
|
||||
PerformanceMeasurer::PerformanceMeasurer(PerformanceElement elem)
|
||||
{
|
||||
assert(elem < PFE_MAX);
|
||||
assert(elem < PerformanceElement::End);
|
||||
|
||||
this->elem = elem;
|
||||
this->start_time = GetPerformanceTimer();
|
||||
@@ -277,17 +277,17 @@ PerformanceMeasurer::PerformanceMeasurer(PerformanceElement elem)
|
||||
/** Finish a cycle of a measured element and store the measurement taken. */
|
||||
PerformanceMeasurer::~PerformanceMeasurer()
|
||||
{
|
||||
if (this->elem == PFE_ALLSCRIPTS) {
|
||||
if (this->elem == PerformanceElement::AllScripts) {
|
||||
/* Hack to not record scripts total when no scripts are active */
|
||||
bool any_active = _pf_data[PFE_GAMESCRIPT].num_valid > 0;
|
||||
for (PerformanceElement e : EnumRange(PFE_AI0, PFE_MAX)) any_active |= _pf_data[e].num_valid > 0;
|
||||
bool any_active = _pf_data[PerformanceElement::GameScript].num_valid > 0;
|
||||
for (PerformanceElement e : EnumRange(PerformanceElement::AI0, PerformanceElement::End)) any_active |= _pf_data[e].num_valid > 0;
|
||||
if (!any_active) {
|
||||
PerformanceMeasurer::SetInactive(PFE_ALLSCRIPTS);
|
||||
PerformanceMeasurer::SetInactive(PerformanceElement::AllScripts);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this->elem == PFE_SOUND) {
|
||||
/* PFE_SOUND measurements are made from the mixer thread.
|
||||
if (this->elem == PerformanceElement::Sound) {
|
||||
/* PerformanceElement::Sound measurements are made from the mixer thread.
|
||||
* _pf_data cannot be concurrently accessed from the mixer thread
|
||||
* and the main thread, so store the measurement results in a
|
||||
* mutex-protected queue which is drained by the main thread.
|
||||
@@ -340,7 +340,7 @@ void PerformanceMeasurer::SetExpectedRate(double rate)
|
||||
*/
|
||||
PerformanceAccumulator::PerformanceAccumulator(PerformanceElement elem)
|
||||
{
|
||||
assert(elem < PFE_MAX);
|
||||
assert(elem < PerformanceElement::End);
|
||||
|
||||
this->elem = elem;
|
||||
this->start_time = GetPerformanceTimer();
|
||||
@@ -366,42 +366,59 @@ void PerformanceAccumulator::Reset(PerformanceElement elem)
|
||||
void ShowFrametimeGraphWindow(PerformanceElement elem);
|
||||
|
||||
|
||||
static const PerformanceElement DISPLAY_ORDER_PFE[PFE_MAX] = {
|
||||
PFE_GAMELOOP,
|
||||
PFE_GL_ECONOMY,
|
||||
PFE_GL_TRAINS,
|
||||
PFE_GL_ROADVEHS,
|
||||
PFE_GL_SHIPS,
|
||||
PFE_GL_AIRCRAFT,
|
||||
PFE_GL_LANDSCAPE,
|
||||
PFE_ALLSCRIPTS,
|
||||
PFE_GAMESCRIPT,
|
||||
PFE_AI0,
|
||||
PFE_AI1,
|
||||
PFE_AI2,
|
||||
PFE_AI3,
|
||||
PFE_AI4,
|
||||
PFE_AI5,
|
||||
PFE_AI6,
|
||||
PFE_AI7,
|
||||
PFE_AI8,
|
||||
PFE_AI9,
|
||||
PFE_AI10,
|
||||
PFE_AI11,
|
||||
PFE_AI12,
|
||||
PFE_AI13,
|
||||
PFE_AI14,
|
||||
PFE_GL_LINKGRAPH,
|
||||
PFE_DRAWING,
|
||||
PFE_DRAWWORLD,
|
||||
PFE_VIDEO,
|
||||
PFE_SOUND,
|
||||
/** Order of the performance elements in the user interface. */
|
||||
static constexpr EnumIndexArray<PerformanceElement, PerformanceElement, PerformanceElement::End> DISPLAY_ORDER_PFE = {
|
||||
PerformanceElement::GameLoop,
|
||||
PerformanceElement::GameLoopEconomy,
|
||||
PerformanceElement::GameLoopTrains,
|
||||
PerformanceElement::GameLoopRoadVehicles,
|
||||
PerformanceElement::GameLoopShips,
|
||||
PerformanceElement::GameLoopAircraft,
|
||||
PerformanceElement::GameLoopLandscape,
|
||||
PerformanceElement::AllScripts,
|
||||
PerformanceElement::GameScript,
|
||||
PerformanceElement::AI0,
|
||||
PerformanceElement::AI1,
|
||||
PerformanceElement::AI2,
|
||||
PerformanceElement::AI3,
|
||||
PerformanceElement::AI4,
|
||||
PerformanceElement::AI5,
|
||||
PerformanceElement::AI6,
|
||||
PerformanceElement::AI7,
|
||||
PerformanceElement::AI8,
|
||||
PerformanceElement::AI9,
|
||||
PerformanceElement::AI10,
|
||||
PerformanceElement::AI11,
|
||||
PerformanceElement::AI12,
|
||||
PerformanceElement::AI13,
|
||||
PerformanceElement::AI14,
|
||||
PerformanceElement::GameLoopLinkGraph,
|
||||
PerformanceElement::Drawing,
|
||||
PerformanceElement::ViewportDrawing,
|
||||
PerformanceElement::Video,
|
||||
PerformanceElement::Sound,
|
||||
};
|
||||
|
||||
static std::string_view GetAIName(int ai_index)
|
||||
/**
|
||||
* Get the \c CompanyID associated with the AI of the given \c PerformanceElement.
|
||||
* @param e The element to convert.
|
||||
* @return The \c CompanyID.
|
||||
*/
|
||||
static constexpr CompanyID GetAIIndex(PerformanceElement e)
|
||||
{
|
||||
if (!Company::IsValidAiID(ai_index)) return {};
|
||||
return Company::Get(ai_index)->ai_info->GetName();
|
||||
return CompanyID(e - PerformanceElement::AI0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name of the AI of the given \c PerformanceElement.
|
||||
* @param e The element to get the name for.
|
||||
* @return The name of an empty string.
|
||||
*/
|
||||
static std::string_view GetAIName(PerformanceElement e)
|
||||
{
|
||||
CompanyID c = GetAIIndex(e);
|
||||
if (!Company::IsValidAiID(c)) return {};
|
||||
return Company::Get(c)->ai_info->GetName();
|
||||
}
|
||||
|
||||
/** @hideinitializer */
|
||||
@@ -469,8 +486,9 @@ struct FramerateWindow : Window {
|
||||
CachedDecimal rate_gameloop{}; ///< cached game loop tick rate
|
||||
CachedDecimal rate_drawing{}; ///< cached drawing frame rate
|
||||
CachedDecimal speed_gameloop{}; ///< cached game loop speed factor
|
||||
std::array<CachedDecimal, PFE_MAX> times_shortterm{}; ///< cached short term average times
|
||||
std::array<CachedDecimal, PFE_MAX> times_longterm{}; ///< cached long term average times
|
||||
using CachedDecimalArray = EnumIndexArray<CachedDecimal, PerformanceElement, PerformanceElement::End>; ///< Array of cached decimals
|
||||
CachedDecimalArray times_shortterm{}; ///< cached short term average times
|
||||
CachedDecimalArray times_longterm{}; ///< cached long term average times
|
||||
|
||||
static constexpr int MIN_ELEMENTS = 5; ///< smallest number of elements to display
|
||||
|
||||
@@ -492,15 +510,15 @@ struct FramerateWindow : Window {
|
||||
|
||||
void UpdateData()
|
||||
{
|
||||
double gl_rate = _pf_data[PFE_GAMELOOP].GetRate();
|
||||
this->rate_gameloop.SetRate(gl_rate, _pf_data[PFE_GAMELOOP].expected_rate);
|
||||
this->speed_gameloop.SetRate(gl_rate / _pf_data[PFE_GAMELOOP].expected_rate, 1.0);
|
||||
double gl_rate = _pf_data[PerformanceElement::GameLoop].GetRate();
|
||||
this->rate_gameloop.SetRate(gl_rate, _pf_data[PerformanceElement::GameLoop].expected_rate);
|
||||
this->speed_gameloop.SetRate(gl_rate / _pf_data[PerformanceElement::GameLoop].expected_rate, 1.0);
|
||||
if (this->IsShaded()) return; // in small mode, this is everything needed
|
||||
|
||||
this->rate_drawing.SetRate(_pf_data[PFE_DRAWING].GetRate(), _settings_client.gui.refresh_rate);
|
||||
this->rate_drawing.SetRate(_pf_data[PerformanceElement::Drawing].GetRate(), _settings_client.gui.refresh_rate);
|
||||
|
||||
int new_active = 0;
|
||||
for (PerformanceElement e : EnumRange(PFE_MAX)) {
|
||||
for (PerformanceElement e : EnumRange(PerformanceElement::End)) {
|
||||
this->times_shortterm[e].SetTime(_pf_data[e].GetAverageDurationMilliseconds(8), MILLISECONDS_PER_TICK);
|
||||
this->times_longterm[e].SetTime(_pf_data[e].GetAverageDurationMilliseconds(NUM_FRAMERATE_POINTS), MILLISECONDS_PER_TICK);
|
||||
if (_pf_data[e].num_valid > 0) {
|
||||
@@ -563,10 +581,10 @@ struct FramerateWindow : Window {
|
||||
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
|
||||
if (_pf_data[e].num_valid == 0) continue;
|
||||
Dimension line_size;
|
||||
if (e < PFE_AI0) {
|
||||
line_size = GetStringBoundingBox(STR_FRAMERATE_GAMELOOP + e);
|
||||
if (e < PerformanceElement::AI0) {
|
||||
line_size = GetStringBoundingBox(STR_FRAMERATE_GAMELOOP + to_underlying(e));
|
||||
} else {
|
||||
line_size = GetStringBoundingBox(GetString(STR_FRAMERATE_AI, e - PFE_AI0 + 1, GetAIName(e - PFE_AI0)));
|
||||
line_size = GetStringBoundingBox(GetString(STR_FRAMERATE_AI, GetAIIndex(e) + 1, GetAIName(e)));
|
||||
}
|
||||
size.width = std::max(size.width, line_size.width);
|
||||
}
|
||||
@@ -593,20 +611,20 @@ struct FramerateWindow : Window {
|
||||
* @param heading_str The header of the column.
|
||||
* @param values The values to draw.
|
||||
*/
|
||||
void DrawElementTimesColumn(const Rect &r, StringID heading_str, std::span<const CachedDecimal> values) const
|
||||
void DrawElementTimesColumn(const Rect &r, StringID heading_str, const CachedDecimalArray &values) const
|
||||
{
|
||||
const Scrollbar *sb = this->GetScrollbar(WID_FRW_SCROLLBAR);
|
||||
int32_t skip = sb->GetPosition();
|
||||
int drawable = this->num_displayed;
|
||||
int y = r.top;
|
||||
DrawString(r.left, r.right, y, heading_str, TextColour::FromString, SA_CENTER, true);
|
||||
DrawString(r.left, r.right, y, heading_str, TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle}, true);
|
||||
y += GetCharacterHeight(FontSize::Normal) + WidgetDimensions::scaled.vsep_normal;
|
||||
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
|
||||
if (_pf_data[e].num_valid == 0) continue;
|
||||
if (skip > 0) {
|
||||
skip--;
|
||||
} else {
|
||||
DrawString(r.left, r.right, y, GetString(values[e].strid, values[e].GetValue(), values[e].GetDecimals()), TextColour::FromString, SA_RIGHT | SA_FORCE);
|
||||
DrawString(r.left, r.right, y, GetString(values[e].strid, values[e].GetValue(), values[e].GetDecimals()), TextColour::FromString, AlignmentH::ForceRight);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
drawable--;
|
||||
if (drawable == 0) break;
|
||||
@@ -620,20 +638,20 @@ struct FramerateWindow : Window {
|
||||
int32_t skip = sb->GetPosition();
|
||||
int drawable = this->num_displayed;
|
||||
int y = r.top;
|
||||
DrawString(r.left, r.right, y, STR_FRAMERATE_MEMORYUSE, TextColour::FromString, SA_CENTER, true);
|
||||
DrawString(r.left, r.right, y, STR_FRAMERATE_MEMORYUSE, TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle}, true);
|
||||
y += GetCharacterHeight(FontSize::Normal) + WidgetDimensions::scaled.vsep_normal;
|
||||
for (PerformanceElement e : DISPLAY_ORDER_PFE) {
|
||||
if (_pf_data[e].num_valid == 0) continue;
|
||||
if (skip > 0) {
|
||||
skip--;
|
||||
} else if (e == PFE_GAMESCRIPT || e >= PFE_AI0) {
|
||||
uint64_t value = e == PFE_GAMESCRIPT ? Game::GetInstance()->GetAllocatedMemory() : Company::Get(e - PFE_AI0)->ai_instance->GetAllocatedMemory();
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_BYTES_GOOD, value), TextColour::FromString, SA_RIGHT | SA_FORCE);
|
||||
} else if (e == PerformanceElement::GameScript || e >= PerformanceElement::AI0) {
|
||||
uint64_t value = e == PerformanceElement::GameScript ? Game::GetInstance()->GetAllocatedMemory() : Company::Get(GetAIIndex(e))->ai_instance->GetAllocatedMemory();
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_BYTES_GOOD, value), TextColour::FromString, AlignmentH::ForceRight);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
drawable--;
|
||||
if (drawable == 0) break;
|
||||
} else if (e == PFE_SOUND) {
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_BYTES_GOOD, GetSoundPoolAllocatedMemory()), TextColour::FromString, SA_RIGHT | SA_FORCE);
|
||||
} else if (e == PerformanceElement::Sound) {
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_BYTES_GOOD, GetSoundPoolAllocatedMemory()), TextColour::FromString, AlignmentH::ForceRight);
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
drawable--;
|
||||
if (drawable == 0) break;
|
||||
@@ -660,10 +678,10 @@ struct FramerateWindow : Window {
|
||||
if (skip > 0) {
|
||||
skip--;
|
||||
} else {
|
||||
if (e < PFE_AI0) {
|
||||
DrawString(r.left, r.right, y, STR_FRAMERATE_GAMELOOP + e, TextColour::FromString, SA_LEFT);
|
||||
if (e < PerformanceElement::AI0) {
|
||||
DrawString(r.left, r.right, y, STR_FRAMERATE_GAMELOOP + to_underlying(e), TextColour::FromString, AlignmentH::Start);
|
||||
} else {
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_AI, e - PFE_AI0 + 1, GetAIName(e - PFE_AI0)), TextColour::FromString, SA_LEFT);
|
||||
DrawString(r.left, r.right, y, GetString(STR_FRAMERATE_AI, GetAIIndex(e) + 1, GetAIName(e)), TextColour::FromString, AlignmentH::Start);
|
||||
}
|
||||
y += GetCharacterHeight(FontSize::Normal);
|
||||
drawable--;
|
||||
@@ -759,10 +777,10 @@ struct FrametimeGraphWindow : Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_FGW_CAPTION:
|
||||
if (this->element < PFE_AI0) {
|
||||
return GetString(STR_FRAMETIME_CAPTION_GAMELOOP + this->element);
|
||||
if (this->element < PerformanceElement::AI0) {
|
||||
return GetString(STR_FRAMETIME_CAPTION_GAMELOOP + to_underlying(this->element));
|
||||
}
|
||||
return GetString(STR_FRAMETIME_CAPTION_AI, this->element - PFE_AI0 + 1, GetAIName(this->element - PFE_AI0));
|
||||
return GetString(STR_FRAMETIME_CAPTION_AI, GetAIIndex(this->element) + 1, GetAIName(this->element));
|
||||
|
||||
default:
|
||||
return this->Window::GetWidgetString(widget, stringid);
|
||||
@@ -792,7 +810,7 @@ struct FrametimeGraphWindow : Window {
|
||||
* this lands exactly on the scale = 2 vs scale = 4 boundary.
|
||||
* To avoid excessive switching of the horizontal scale, bias these performance
|
||||
* categories away from this scale boundary. */
|
||||
if (this->element == PFE_DRAWING || this->element == PFE_DRAWWORLD) range += (range / 2);
|
||||
if (this->element == PerformanceElement::Drawing || this->element == PerformanceElement::ViewportDrawing) range += (range / 2);
|
||||
|
||||
/* Determine horizontal scale based on period covered by 60 points
|
||||
* (slightly less than 2 seconds at full game speed) */
|
||||
@@ -931,11 +949,11 @@ struct FrametimeGraphWindow : Window {
|
||||
if ((TimingMeasurement)this->vertical_scale > TIMESTAMP_PRECISION) {
|
||||
DrawString(r.left, x_zero - WidgetDimensions::scaled.hsep_normal, y - GetCharacterHeight(FontSize::Small),
|
||||
GetString(STR_FRAMERATE_GRAPH_SECONDS, this->vertical_scale * division / 10 / TIMESTAMP_PRECISION),
|
||||
TextColour::Grey, SA_RIGHT | SA_FORCE, false, FontSize::Small);
|
||||
TextColour::Grey, AlignmentH::ForceRight, false, FontSize::Small);
|
||||
} else {
|
||||
DrawString(r.left, x_zero - WidgetDimensions::scaled.hsep_normal, y - GetCharacterHeight(FontSize::Small),
|
||||
GetString(STR_FRAMERATE_GRAPH_MILLISECONDS, this->vertical_scale * division / 10 * 1000 / TIMESTAMP_PRECISION),
|
||||
TextColour::Grey, SA_RIGHT | SA_FORCE, false, FontSize::Small);
|
||||
TextColour::Grey, AlignmentH::ForceRight, false, FontSize::Small);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -946,7 +964,7 @@ struct FrametimeGraphWindow : Window {
|
||||
if (division % 2 == 0) {
|
||||
DrawString(x, x_max, y_zero + WidgetDimensions::scaled.vsep_normal,
|
||||
GetString(STR_FRAMERATE_GRAPH_SECONDS, division * horz_div_scl / 2),
|
||||
TextColour::Grey, SA_LEFT | SA_FORCE, false, FontSize::Small);
|
||||
TextColour::Grey, AlignmentH::ForceLeft, false, FontSize::Small);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1006,9 +1024,9 @@ struct FrametimeGraphWindow : Window {
|
||||
uint64_t value = peak_value * 1000 / TIMESTAMP_PRECISION;
|
||||
int label_y = std::max(y_max, peak_point.y - GetCharacterHeight(FontSize::Small));
|
||||
if (peak_point.x - x_zero > (int)this->graph_size.width / 2) {
|
||||
DrawString(x_zero, peak_point.x - WidgetDimensions::scaled.hsep_normal, label_y, GetString(STR_FRAMERATE_GRAPH_MILLISECONDS, value), tc_peak, SA_RIGHT | SA_FORCE, false, FontSize::Small);
|
||||
DrawString(x_zero, peak_point.x - WidgetDimensions::scaled.hsep_normal, label_y, GetString(STR_FRAMERATE_GRAPH_MILLISECONDS, value), tc_peak, AlignmentH::ForceRight, false, FontSize::Small);
|
||||
} else {
|
||||
DrawString(peak_point.x + WidgetDimensions::scaled.hsep_normal, x_max, label_y, GetString(STR_FRAMERATE_GRAPH_MILLISECONDS, value), tc_peak, SA_LEFT | SA_FORCE, false, FontSize::Small);
|
||||
DrawString(peak_point.x + WidgetDimensions::scaled.hsep_normal, x_max, label_y, GetString(STR_FRAMERATE_GRAPH_MILLISECONDS, value), tc_peak, AlignmentH::ForceLeft, false, FontSize::Small);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1037,7 +1055,7 @@ void ShowFramerateWindow()
|
||||
*/
|
||||
void ShowFrametimeGraphWindow(PerformanceElement elem)
|
||||
{
|
||||
if (elem < PFE_FIRST || elem >= PFE_MAX) return; // maybe warn?
|
||||
if (elem >= PerformanceElement::End) return; // maybe warn?
|
||||
AllocateWindowDescFront<FrametimeGraphWindow>(_frametime_graph_window_desc, elem);
|
||||
}
|
||||
|
||||
@@ -1050,7 +1068,7 @@ void ConPrintFramerate()
|
||||
|
||||
IConsolePrint(TextColour::Silver, "Based on num. data points: {} {} {}", count1, count2, count3);
|
||||
|
||||
static const std::array<std::string_view, PFE_MAX> MEASUREMENT_NAMES = {
|
||||
static const EnumIndexArray<std::string_view, PerformanceElement, PerformanceElement::End> MEASUREMENT_NAMES = {
|
||||
"Game loop",
|
||||
" GL station ticks",
|
||||
" GL train ticks",
|
||||
@@ -1070,7 +1088,7 @@ void ConPrintFramerate()
|
||||
|
||||
bool printed_anything = false;
|
||||
|
||||
for (const auto &e : { PFE_GAMELOOP, PFE_DRAWING, PFE_VIDEO }) {
|
||||
for (const auto &e : { PerformanceElement::GameLoop, PerformanceElement::Drawing, PerformanceElement::Video }) {
|
||||
auto &pf = _pf_data[e];
|
||||
if (pf.num_valid == 0) continue;
|
||||
IConsolePrint(TextColour::Green, "{} rate: {:.2f}fps (expected: {:.2f}fps)",
|
||||
@@ -1080,14 +1098,14 @@ void ConPrintFramerate()
|
||||
printed_anything = true;
|
||||
}
|
||||
|
||||
for (PerformanceElement e : EnumRange(PFE_MAX)) {
|
||||
for (PerformanceElement e : EnumRange(PerformanceElement::End)) {
|
||||
auto &pf = _pf_data[e];
|
||||
if (pf.num_valid == 0) continue;
|
||||
std::string_view name;
|
||||
if (e < PFE_AI0) {
|
||||
if (e < PerformanceElement::AI0) {
|
||||
name = MEASUREMENT_NAMES[e];
|
||||
} else {
|
||||
ai_name_buf = fmt::format("AI {} {}", e - PFE_AI0 + 1, GetAIName(e - PFE_AI0));
|
||||
ai_name_buf = fmt::format("AI {} {}", GetAIIndex(e) + 1, GetAIName(e));
|
||||
name = ai_name_buf;
|
||||
}
|
||||
IConsolePrint(TextColour::LightBlue, "{} times: {:.2f}ms {:.2f}ms {:.2f}ms",
|
||||
@@ -1104,8 +1122,8 @@ void ConPrintFramerate()
|
||||
}
|
||||
|
||||
/**
|
||||
* This drains the PFE_SOUND measurement data queue into _pf_data.
|
||||
* PFE_SOUND measurements are made by the mixer thread and so cannot be stored
|
||||
* This drains the PerformanceElement::Sound measurement data queue into _pf_data.
|
||||
* PerformanceElement::Sound measurements are made by the mixer thread and so cannot be stored
|
||||
* into _pf_data directly, because this would not be thread safe and would violate
|
||||
* the invariants of the FPS and frame graph windows.
|
||||
* @see PerformanceMeasurement::~PerformanceMeasurement()
|
||||
@@ -1115,7 +1133,7 @@ void ProcessPendingPerformanceMeasurements()
|
||||
if (_sound_perf_pending.load(std::memory_order_acquire)) {
|
||||
std::lock_guard lk(_sound_perf_lock);
|
||||
for (size_t i = 0; i < _sound_perf_measurements.size(); i += 2) {
|
||||
_pf_data[PFE_SOUND].Add(_sound_perf_measurements[i], _sound_perf_measurements[i + 1]);
|
||||
_pf_data[PerformanceElement::Sound].Add(_sound_perf_measurements[i], _sound_perf_measurements[i + 1]);
|
||||
}
|
||||
_sound_perf_measurements.clear();
|
||||
_sound_perf_pending.store(false, std::memory_order_relaxed);
|
||||
|
||||
+33
-33
@@ -11,7 +11,7 @@
|
||||
* @par Adding new measurements
|
||||
* Adding a new measurement requires multiple steps, which are outlined here.
|
||||
* The first thing to do is add a new member of the #PerformanceElement enum.
|
||||
* It must be added before \c PFE_MAX and should be added in a logical place.
|
||||
* It must be added before \c PerformanceElement::End and should be added in a logical place.
|
||||
* For example, an element of the game loop would be added next to the other game loop elements, and a rendering element next to the other rendering elements.
|
||||
*
|
||||
* @par
|
||||
@@ -43,39 +43,39 @@
|
||||
* @note When adding new elements here, make sure to also update all other locations depending on the length and order of this enum.
|
||||
* See <em>Adding new measurements</em> above.
|
||||
*/
|
||||
enum PerformanceElement : uint8_t {
|
||||
PFE_FIRST = 0,
|
||||
PFE_GAMELOOP = 0, ///< Speed of gameloop processing.
|
||||
PFE_GL_ECONOMY, ///< Time spent processing cargo movement
|
||||
PFE_GL_TRAINS, ///< Time spent processing trains
|
||||
PFE_GL_ROADVEHS, ///< Time spend processing road vehicles
|
||||
PFE_GL_SHIPS, ///< Time spent processing ships
|
||||
PFE_GL_AIRCRAFT, ///< Time spent processing aircraft
|
||||
PFE_GL_LANDSCAPE, ///< Time spent processing other world features
|
||||
PFE_GL_LINKGRAPH, ///< Time spent waiting for link graph background jobs
|
||||
PFE_DRAWING, ///< Speed of drawing world and GUI.
|
||||
PFE_DRAWWORLD, ///< Time spent drawing world viewports in GUI
|
||||
PFE_VIDEO, ///< Speed of painting drawn video buffer.
|
||||
PFE_SOUND, ///< Speed of mixing audio samples
|
||||
PFE_ALLSCRIPTS, ///< Sum of all GS/AI scripts
|
||||
PFE_GAMESCRIPT, ///< Game script execution
|
||||
PFE_AI0, ///< AI execution for player slot 1
|
||||
PFE_AI1, ///< AI execution for player slot 2
|
||||
PFE_AI2, ///< AI execution for player slot 3
|
||||
PFE_AI3, ///< AI execution for player slot 4
|
||||
PFE_AI4, ///< AI execution for player slot 5
|
||||
PFE_AI5, ///< AI execution for player slot 6
|
||||
PFE_AI6, ///< AI execution for player slot 7
|
||||
PFE_AI7, ///< AI execution for player slot 8
|
||||
PFE_AI8, ///< AI execution for player slot 9
|
||||
PFE_AI9, ///< AI execution for player slot 10
|
||||
PFE_AI10, ///< AI execution for player slot 11
|
||||
PFE_AI11, ///< AI execution for player slot 12
|
||||
PFE_AI12, ///< AI execution for player slot 13
|
||||
PFE_AI13, ///< AI execution for player slot 14
|
||||
PFE_AI14, ///< AI execution for player slot 15
|
||||
PFE_MAX, ///< End of enum, must be last.
|
||||
enum class PerformanceElement : uint8_t {
|
||||
GameLoop, ///< Speed of gameloop processing.
|
||||
GameLoopEconomy, ///< Time spent processing cargo movement
|
||||
GameLoopTrains, ///< Time spent processing trains
|
||||
GameLoopRoadVehicles, ///< Time spend processing road vehicles
|
||||
GameLoopShips, ///< Time spent processing ships
|
||||
GameLoopAircraft, ///< Time spent processing aircraft
|
||||
GameLoopLandscape, ///< Time spent processing other world features
|
||||
GameLoopLinkGraph, ///< Time spent waiting for link graph background jobs
|
||||
Drawing, ///< Speed of drawing world and GUI.
|
||||
ViewportDrawing, ///< Time spent drawing world viewports in GUI
|
||||
Video, ///< Speed of painting drawn video buffer.
|
||||
Sound, ///< Speed of mixing audio samples
|
||||
AllScripts, ///< Sum of all GS/AI scripts
|
||||
GameScript, ///< Game script execution
|
||||
AI0, ///< AI execution for player slot 1
|
||||
AI1, ///< AI execution for player slot 2
|
||||
AI2, ///< AI execution for player slot 3
|
||||
AI3, ///< AI execution for player slot 4
|
||||
AI4, ///< AI execution for player slot 5
|
||||
AI5, ///< AI execution for player slot 6
|
||||
AI6, ///< AI execution for player slot 7
|
||||
AI7, ///< AI execution for player slot 8
|
||||
AI8, ///< AI execution for player slot 9
|
||||
AI9, ///< AI execution for player slot 10
|
||||
AI10, ///< AI execution for player slot 11
|
||||
AI11, ///< AI execution for player slot 12
|
||||
AI12, ///< AI execution for player slot 13
|
||||
AI13, ///< AI execution for player slot 14
|
||||
AI14, ///< AI execution for player slot 15
|
||||
End, ///< End of enum, must be last.
|
||||
};
|
||||
DECLARE_ENUM_AS_SEQUENTIAL(PerformanceElement)
|
||||
|
||||
/** Type used to hold a performance timing measurement */
|
||||
typedef uint64_t TimingMeasurement;
|
||||
|
||||
@@ -31,15 +31,15 @@
|
||||
/* static */ void Game::GameLoop()
|
||||
{
|
||||
if (_networking && !_network_server) {
|
||||
PerformanceMeasurer::SetInactive(PFE_GAMESCRIPT);
|
||||
PerformanceMeasurer::SetInactive(PerformanceElement::GameScript);
|
||||
return;
|
||||
}
|
||||
if (Game::instance == nullptr) {
|
||||
PerformanceMeasurer::SetInactive(PFE_GAMESCRIPT);
|
||||
PerformanceMeasurer::SetInactive(PerformanceElement::GameScript);
|
||||
return;
|
||||
}
|
||||
|
||||
PerformanceMeasurer framerate(PFE_GAMESCRIPT);
|
||||
PerformanceMeasurer framerate(PerformanceElement::GameScript);
|
||||
|
||||
Game::frame_counter++;
|
||||
|
||||
|
||||
@@ -59,11 +59,11 @@ static constexpr std::initializer_list<NWidgetPart> _nested_gs_config_widgets =
|
||||
NWidget(NWID_VERTICAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_OPEN_URL), SetResize(1, 0), SetFill(1, 0), SetStringTip(STR_CONTENT_OPEN_URL, STR_CONTENT_OPEN_URL_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TFT_README), SetFill(1, 1), SetResize(1, 0), SetMinimalSize(93, 0), SetStringTip(STR_TEXTFILE_VIEW_README, STR_TEXTFILE_VIEW_README_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TextfileType::Readme), SetFill(1, 1), SetResize(1, 0), SetMinimalSize(93, 0), SetStringTip(STR_TEXTFILE_VIEW_README, STR_TEXTFILE_VIEW_README_TOOLTIP),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_TEXTFILE_VIEW_CHANGELOG_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TFT_LICENSE), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_LICENCE, STR_TEXTFILE_VIEW_LICENCE_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TextfileType::Changelog), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_TEXTFILE_VIEW_CHANGELOG_TOOLTIP),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Yellow, WID_GSC_TEXTFILE + TextfileType::License), SetFill(1, 1), SetResize(1, 0), SetStringTip(STR_TEXTFILE_VIEW_LICENCE, STR_TEXTFILE_VIEW_LICENCE_TOOLTIP),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -225,7 +225,7 @@ struct GSConfigWindow : public Window {
|
||||
|
||||
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
|
||||
{
|
||||
if (widget >= WID_GSC_TEXTFILE && widget < WID_GSC_TEXTFILE + TFT_CONTENT_END) {
|
||||
if (widget >= WID_GSC_TEXTFILE && widget < WID_GSC_TEXTFILE + TextfileType::ContentEnd) {
|
||||
if (GameConfig::GetConfig() == nullptr) return;
|
||||
|
||||
ShowScriptTextfileWindow(this, static_cast<TextfileType>(widget - WID_GSC_TEXTFILE), OWNER_DEITY);
|
||||
@@ -396,7 +396,7 @@ struct GSConfigWindow : public Window {
|
||||
|
||||
const GameConfig *config = GameConfig::GetConfig();
|
||||
this->SetWidgetDisabledState(WID_GSC_OPEN_URL, config->GetInfo() == nullptr || config->GetInfo()->GetURL().empty());
|
||||
for (TextfileType tft : EnumRange(TFT_CONTENT_BEGIN, TFT_CONTENT_END)) {
|
||||
for (TextfileType tft : EnumRange(TextfileType::ContentBegin, TextfileType::ContentEnd)) {
|
||||
this->SetWidgetDisabledState(WID_GSC_TEXTFILE + tft, !config->GetTextfile(tft, OWNER_DEITY).has_value());
|
||||
}
|
||||
this->RebuildVisibleSettings();
|
||||
|
||||
+14
-14
@@ -107,7 +107,7 @@ void Gamelog::Reset()
|
||||
* @param md5sum array of md5sum to print, if known
|
||||
* @param gc GrfConfig, if known
|
||||
*/
|
||||
static void AddGrfInfo(std::back_insert_iterator<std::string> &output_iterator, uint32_t grfid, const MD5Hash *md5sum, const GRFConfig *gc)
|
||||
static void AddGrfInfo(std::back_insert_iterator<std::string> &output_iterator, GrfID grfid, const MD5Hash *md5sum, const GRFConfig *gc)
|
||||
{
|
||||
if (md5sum != nullptr) {
|
||||
fmt::format_to(output_iterator, "GRF ID {:08X}, checksum {}", std::byteswap(grfid), FormatArrayAsHex(*md5sum));
|
||||
@@ -194,23 +194,23 @@ void Gamelog::Print(std::function<void(const std::string &)> proc)
|
||||
fmt::format_to(output_iterator, "Conversion from ");
|
||||
switch (this->type) {
|
||||
default: NOT_REACHED();
|
||||
case SGT_OTTD:
|
||||
case SavegameType::OTTD:
|
||||
fmt::format_to(output_iterator, "OTTD savegame without gamelog: version {}, {}",
|
||||
GB(this->version, 8, 16), GB(this->version, 0, 8));
|
||||
break;
|
||||
|
||||
case SGT_TTO:
|
||||
case SavegameType::TTO:
|
||||
fmt::format_to(output_iterator, "TTO savegame");
|
||||
break;
|
||||
|
||||
case SGT_TTD:
|
||||
case SavegameType::TTD:
|
||||
fmt::format_to(output_iterator, "TTD savegame");
|
||||
break;
|
||||
|
||||
case SGT_TTDP1:
|
||||
case SGT_TTDP2:
|
||||
case SavegameType::TTDP1:
|
||||
case SavegameType::TTDP2:
|
||||
fmt::format_to(output_iterator, "TTDP savegame, {} format",
|
||||
this->type == SGT_TTDP1 ? "old" : "new");
|
||||
this->type == SavegameType::TTDP1 ? "old" : "new");
|
||||
if (this->version != 0) {
|
||||
fmt::format_to(output_iterator, ", TTDP version {}.{}.{}.{}",
|
||||
GB(this->version, 24, 8), GB(this->version, 20, 4),
|
||||
@@ -380,7 +380,7 @@ void Gamelog::Revision()
|
||||
assert(this->action_type == GamelogActionType::Start || this->action_type == GamelogActionType::Load);
|
||||
|
||||
this->Change(std::make_unique<LoggedChangeRevision>(
|
||||
GetGamelogRevisionString(), _openttd_newgrf_version, SAVEGAME_VERSION, _openttd_revision_modified));
|
||||
GetGamelogRevisionString(), _openttd_newgrf_version, to_underlying(SAVEGAME_VERSION), _openttd_revision_modified));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -401,7 +401,7 @@ void Gamelog::Oldver()
|
||||
assert(this->action_type == GamelogActionType::Load);
|
||||
|
||||
this->Change(std::make_unique<LoggedChangeOldVersion>(_savegame_type,
|
||||
(_savegame_type == SGT_OTTD ? ((uint32_t)_sl_version << 8 | _sl_minor_version) : _ttdp_version)));
|
||||
(_savegame_type == SavegameType::OTTD ? (static_cast<uint32_t>(_sl_version) << 8 | _sl_minor_version) : _ttdp_version)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -463,7 +463,7 @@ void Gamelog::TestMode()
|
||||
* @param bug type of bug, @see enum GRFBugs
|
||||
* @param data additional data
|
||||
*/
|
||||
void Gamelog::GRFBug(uint32_t grfid, ::GRFBug bug, uint64_t data)
|
||||
void Gamelog::GRFBug(GrfID grfid, ::GRFBug bug, uint64_t data)
|
||||
{
|
||||
assert(this->action_type == GamelogActionType::GRFBug);
|
||||
|
||||
@@ -479,7 +479,7 @@ void Gamelog::GRFBug(uint32_t grfid, ::GRFBug bug, uint64_t data)
|
||||
* @param internal_id the internal ID of whatever's broken in the NewGRF
|
||||
* @return true iff a unique record was done
|
||||
*/
|
||||
bool Gamelog::GRFBugReverse(uint32_t grfid, uint16_t internal_id)
|
||||
bool Gamelog::GRFBugReverse(GrfID grfid, uint16_t internal_id)
|
||||
{
|
||||
for (const LoggedAction &la : this->data->action) {
|
||||
for (const auto &lc : la.change) {
|
||||
@@ -514,7 +514,7 @@ static inline bool IsLoggableGrfConfig(const GRFConfig &g)
|
||||
* Logs removal of a GRF
|
||||
* @param grfid ID of removed GRF
|
||||
*/
|
||||
void Gamelog::GRFRemove(uint32_t grfid)
|
||||
void Gamelog::GRFRemove(GrfID grfid)
|
||||
{
|
||||
assert(this->action_type == GamelogActionType::Load || this->action_type == GamelogActionType::GRF);
|
||||
|
||||
@@ -551,7 +551,7 @@ void Gamelog::GRFCompatible(const GRFIdentifier &newg)
|
||||
* @param grfid GRF that is moved
|
||||
* @param offset how far it is moved, positive = moved down
|
||||
*/
|
||||
void Gamelog::GRFMove(uint32_t grfid, int32_t offset)
|
||||
void Gamelog::GRFMove(GrfID grfid, int32_t offset)
|
||||
{
|
||||
assert(this->action_type == GamelogActionType::GRF);
|
||||
|
||||
@@ -563,7 +563,7 @@ void Gamelog::GRFMove(uint32_t grfid, int32_t offset)
|
||||
* Details about parameters changed are not stored
|
||||
* @param grfid ID of GRF to store
|
||||
*/
|
||||
void Gamelog::GRFParameters(uint32_t grfid)
|
||||
void Gamelog::GRFParameters(GrfID grfid)
|
||||
{
|
||||
assert(this->action_type == GamelogActionType::GRF);
|
||||
|
||||
|
||||
+6
-5
@@ -11,6 +11,7 @@
|
||||
#define GAMELOG_H
|
||||
|
||||
#include "newgrf_config.h"
|
||||
#include "newgrf_type.h"
|
||||
|
||||
/** The actions we log. */
|
||||
enum class GamelogActionType : uint8_t {
|
||||
@@ -78,13 +79,13 @@ public:
|
||||
|
||||
void GRFUpdate(const GRFConfigList &oldg, const GRFConfigList &newg);
|
||||
void GRFAddList(const GRFConfigList &newg);
|
||||
void GRFRemove(uint32_t grfid);
|
||||
void GRFRemove(GrfID grfid);
|
||||
void GRFAdd(const GRFConfig &newg);
|
||||
void GRFBug(uint32_t grfid, ::GRFBug bug, uint64_t data);
|
||||
bool GRFBugReverse(uint32_t grfid, uint16_t internal_id);
|
||||
void GRFBug(GrfID grfid, ::GRFBug bug, uint64_t data);
|
||||
bool GRFBugReverse(GrfID grfid, uint16_t internal_id);
|
||||
void GRFCompatible(const GRFIdentifier &newg);
|
||||
void GRFMove(uint32_t grfid, int32_t offset);
|
||||
void GRFParameters(uint32_t grfid);
|
||||
void GRFMove(GrfID grfid, int32_t offset);
|
||||
void GRFParameters(GrfID grfid);
|
||||
|
||||
void TestRevision();
|
||||
void TestMode();
|
||||
|
||||
+98
-11
@@ -25,13 +25,25 @@ struct GRFPresence {
|
||||
const GRFConfig *gc = nullptr; ///< GRFConfig, if known
|
||||
bool was_missing = false; ///< Grf was missing during some gameload in the past
|
||||
|
||||
/**
|
||||
* Create the presence.
|
||||
* @param gc The configuration of the NewGRF.
|
||||
*/
|
||||
GRFPresence(const GRFConfig *gc) : gc(gc) {}
|
||||
|
||||
/** Create an empty presence. */
|
||||
GRFPresence() = default;
|
||||
};
|
||||
using GrfIDMapping = std::map<uint32_t, GRFPresence>;
|
||||
using GrfIDMapping = std::map<GrfID, GRFPresence>; ///< A mapping from \c GrfID to the \c GRFPresence.
|
||||
|
||||
/** Container for any change that we deem needs to be logged. */
|
||||
struct LoggedChange {
|
||||
/**
|
||||
* Create the log entry.
|
||||
* @param type The type of change to log.
|
||||
*/
|
||||
LoggedChange(GamelogChangeType type = GamelogChangeType::None) : ct(type) {}
|
||||
|
||||
/** Ensure the destructor of the sub classes are called as well. */
|
||||
virtual ~LoggedChange() = default;
|
||||
|
||||
@@ -43,7 +55,7 @@ struct LoggedChange {
|
||||
*/
|
||||
virtual void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) = 0;
|
||||
|
||||
GamelogChangeType ct{};
|
||||
GamelogChangeType ct{}; ///< The type of change.
|
||||
};
|
||||
|
||||
/** Log element for the change of the game mode and landscape. */
|
||||
@@ -64,8 +76,18 @@ struct LoggedChangeMode : LoggedChange {
|
||||
LandscapeType landscape{}; ///< landscape (temperate, arctic, ...)
|
||||
};
|
||||
|
||||
/** A log entry for a change in OpenTTD version. */
|
||||
struct LoggedChangeRevision : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeRevision() : LoggedChange(GamelogChangeType::Revision) {}
|
||||
|
||||
/**
|
||||
* Create the new log entry.
|
||||
* @param text The string representation of the version.
|
||||
* @param newgrf The NewGRF version.
|
||||
* @param slver The savegame version.
|
||||
* @param modified Whether the executable was modified.
|
||||
*/
|
||||
LoggedChangeRevision(const std::string &text, uint32_t newgrf, uint16_t slver, uint8_t modified) :
|
||||
LoggedChange(GamelogChangeType::Revision), text(text), newgrf(newgrf), slver(slver), modified(modified) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
@@ -76,8 +98,16 @@ struct LoggedChangeRevision : LoggedChange {
|
||||
uint8_t modified = 0; ///< _openttd_revision_modified
|
||||
};
|
||||
|
||||
/** A log entry for loading a really old savegame. */
|
||||
struct LoggedChangeOldVersion : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeOldVersion() : LoggedChange(GamelogChangeType::OldVer) {}
|
||||
|
||||
/**
|
||||
* Create the entry.
|
||||
* @param type The \c SavegameType.
|
||||
* @param version The TTDP or ancient OpenTTD version if available.
|
||||
*/
|
||||
LoggedChangeOldVersion(uint32_t type, uint32_t version) :
|
||||
LoggedChange(GamelogChangeType::OldVer), type(type), version(version) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
@@ -86,50 +116,95 @@ struct LoggedChangeOldVersion : LoggedChange {
|
||||
uint32_t version = 0; ///< major and minor version OR ttdp version
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF that was added. */
|
||||
struct LoggedChangeGRFAdd : LoggedChange, GRFIdentifier {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFAdd() : LoggedChange(GamelogChangeType::GRFAdd) {}
|
||||
|
||||
/**
|
||||
* Create a log entry for an added NewGRF.
|
||||
* @param ident The NewGRF that is added.
|
||||
*/
|
||||
LoggedChangeGRFAdd(const GRFIdentifier &ident) :
|
||||
LoggedChange(GamelogChangeType::GRFAdd), GRFIdentifier(ident) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF that was removed. */
|
||||
struct LoggedChangeGRFRemoved : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFRemoved() : LoggedChange(GamelogChangeType::GRFRem) {}
|
||||
LoggedChangeGRFRemoved(uint32_t grfid) :
|
||||
|
||||
/**
|
||||
* Create a log entry for a removed NewGRF.
|
||||
* @param grfid The NewGRF that is removed.
|
||||
*/
|
||||
LoggedChangeGRFRemoved(GrfID grfid) :
|
||||
LoggedChange(GamelogChangeType::GRFRem), grfid(grfid) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
|
||||
uint32_t grfid = 0; ///< ID of removed GRF
|
||||
GrfID grfid{}; ///< ID of removed GRF
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF that was changed. */
|
||||
struct LoggedChangeGRFChanged : LoggedChange, GRFIdentifier {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFChanged() : LoggedChange(GamelogChangeType::GRFCompat) {}
|
||||
|
||||
/**
|
||||
* Create a log entry for a changed NewGRF.
|
||||
* @param ident The NewGRF that is changed.
|
||||
*/
|
||||
LoggedChangeGRFChanged(const GRFIdentifier &ident) :
|
||||
LoggedChange(GamelogChangeType::GRFCompat), GRFIdentifier(ident) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF for which a parameter was changed. */
|
||||
struct LoggedChangeGRFParameterChanged : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFParameterChanged() : LoggedChange(GamelogChangeType::GRFParam) {}
|
||||
LoggedChangeGRFParameterChanged(uint32_t grfid) :
|
||||
|
||||
/**
|
||||
* Create a log entry for a parameter change of a NewGRF.
|
||||
* @param grfid The NewGRF for which the parameter is changed.
|
||||
*/
|
||||
LoggedChangeGRFParameterChanged(GrfID grfid) :
|
||||
LoggedChange(GamelogChangeType::GRFParam), grfid(grfid) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
|
||||
uint32_t grfid = 0; ///< ID of GRF with changed parameters
|
||||
GrfID grfid{}; ///< ID of GRF with changed parameters
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF that was moved. */
|
||||
struct LoggedChangeGRFMoved : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFMoved() : LoggedChange(GamelogChangeType::GRFMove) {}
|
||||
LoggedChangeGRFMoved(uint32_t grfid, int32_t offset) :
|
||||
|
||||
/**
|
||||
* Create a log entry for a moved NewGRF.
|
||||
* @param grfid The NewGRF that is moved.
|
||||
* @param offset The amount the NewGRF was moved.
|
||||
*/
|
||||
LoggedChangeGRFMoved(GrfID grfid, int32_t offset) :
|
||||
LoggedChange(GamelogChangeType::GRFMove), grfid(grfid), offset(offset) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
|
||||
uint32_t grfid = 0; ///< ID of moved GRF
|
||||
GrfID grfid{}; ///< ID of moved GRF
|
||||
int32_t offset = 0; ///< offset, positive = move down
|
||||
};
|
||||
|
||||
/** A log entry for changing a setting. */
|
||||
struct LoggedChangeSettingChanged : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeSettingChanged() : LoggedChange(GamelogChangeType::Setting) {}
|
||||
|
||||
/**
|
||||
* Create the log entry.
|
||||
* @param name The name of the setting.
|
||||
* @param oldval The value before the change.
|
||||
* @param newval The value after the change.
|
||||
*/
|
||||
LoggedChangeSettingChanged(const std::string &name, int32_t oldval, int32_t newval) :
|
||||
LoggedChange(GamelogChangeType::Setting), name(name), oldval(oldval), newval(newval) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
@@ -139,18 +214,29 @@ struct LoggedChangeSettingChanged : LoggedChange {
|
||||
int32_t newval = 0; ///< new value
|
||||
};
|
||||
|
||||
/** A log entry for a NewGRF bug. */
|
||||
struct LoggedChangeGRFBug : LoggedChange {
|
||||
/** Constructor for savegame loading. */
|
||||
LoggedChangeGRFBug() : LoggedChange(GamelogChangeType::GRFBug) {}
|
||||
LoggedChangeGRFBug(uint64_t data, uint32_t grfid, GRFBug bug) :
|
||||
|
||||
/**
|
||||
* Create a NewGRF bug log entry.
|
||||
* @param data Bug specific extra data for identifying the buggy entry.
|
||||
* @param grfid The NewGRF that is deemed buggy.
|
||||
* @param bug The bug that has been seen.
|
||||
*/
|
||||
LoggedChangeGRFBug(uint64_t data, GrfID grfid, GRFBug bug) :
|
||||
LoggedChange(GamelogChangeType::GRFBug), data(data), grfid(grfid), bug(bug) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
|
||||
uint64_t data = 0; ///< additional data
|
||||
uint32_t grfid = 0; ///< ID of problematic GRF
|
||||
GrfID grfid{}; ///< ID of problematic GRF
|
||||
GRFBug bug{}; ///< type of bug, @see enum GRFBugs
|
||||
};
|
||||
|
||||
/** A log entry denoting that this savegame was involved in an emergency (crash) save. */
|
||||
struct LoggedChangeEmergencySave : LoggedChange {
|
||||
/** Create the entry. */
|
||||
LoggedChangeEmergencySave() : LoggedChange(GamelogChangeType::Emergency) {}
|
||||
void FormatTo(std::back_insert_iterator<std::string> &output_iterator, GrfIDMapping &grf_names, GamelogActionType action_type) override;
|
||||
};
|
||||
@@ -163,8 +249,9 @@ struct LoggedAction {
|
||||
uint64_t tick = 0; ///< Tick when it happened
|
||||
};
|
||||
|
||||
/** Container for some internal data. */
|
||||
struct GamelogInternalData {
|
||||
std::vector<LoggedAction> action;
|
||||
std::vector<LoggedAction> action; ///< The known actions.
|
||||
};
|
||||
|
||||
#endif /* GAMELOG_INTERNAL_H */
|
||||
|
||||
+1
-1
@@ -461,7 +461,7 @@ void LoadTownData()
|
||||
/* Try founding on the target tile, and if that doesn't work, find the nearest suitable tile up to 16 tiles away.
|
||||
* The target might be on water, blocked somehow, or on a steep slope that can't be terraformed by the founding command. */
|
||||
for (auto tile : SpiralTileSequence(target_tile, 16, 0, 0)) {
|
||||
std::tuple<CommandCost, Money, TownID> result = Command<Commands::FoundTown>::Do(DoCommandFlag::Execute, tile, TSZ_SMALL, is_city, _settings_game.economy.town_layout, false, 0, name);
|
||||
std::tuple<CommandCost, Money, TownID> result = Command<Commands::FoundTown>::Do(DoCommandFlag::Execute, tile, TownSize::Small, is_city, _settings_game.economy.town_layout, false, 0, name);
|
||||
|
||||
town_id = std::get<TownID>(result);
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_generate_landscape_w
|
||||
/* Mapsize X * Y. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_MAPSIZE_X_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_MAPSIZE_Y_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_MAX_HEIGHT_PULLDOWN), SetToolTip(STR_CONFIG_SETTING_TERRAIN_TYPE_HELPTEXT), SetFill(1, 1),
|
||||
@@ -178,13 +178,13 @@ static constexpr std::initializer_list<NWidgetPart> _nested_generate_landscape_w
|
||||
/* Map borders buttons for each edge. */
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_NORTHWEST), SetPadding(0, WidgetDimensions::unscaled.hsep_normal, 0, 0), SetFill(1, 1), SetAlignment(SA_RIGHT | SA_VERT_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_NORTHWEST), SetPadding(0, WidgetDimensions::unscaled.hsep_normal, 0, 0), SetFill(1, 1), SetAlignment({AlignmentH::End, AlignmentV::Middle}),
|
||||
NWidget(WWT_TEXTBTN, Colours::Orange, WID_GL_WATER_NW), SetToolTip(STR_MAPGEN_NORTHWEST_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXTBTN, Colours::Orange, WID_GL_WATER_NE), SetToolTip(STR_MAPGEN_NORTHEAST_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_NORTHEAST), SetPadding(0, 0, 0, WidgetDimensions::unscaled.hsep_normal), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL, NWidContainerFlag::EqualSize),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_SOUTHWEST), SetPadding(0, WidgetDimensions::unscaled.hsep_normal, 0, 0), SetFill(1, 1), SetAlignment(SA_RIGHT | SA_VERT_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_SOUTHWEST), SetPadding(0, WidgetDimensions::unscaled.hsep_normal, 0, 0), SetFill(1, 1), SetAlignment({AlignmentH::End, AlignmentV::Middle}),
|
||||
NWidget(WWT_TEXTBTN, Colours::Orange, WID_GL_WATER_SW), SetToolTip(STR_MAPGEN_SOUTHWEST_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXTBTN, Colours::Orange, WID_GL_WATER_SE), SetToolTip(STR_MAPGEN_SOUTHEAST_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_SOUTHEAST), SetPadding(0, 0, 0, WidgetDimensions::unscaled.hsep_normal), SetFill(1, 1),
|
||||
@@ -248,7 +248,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_heightmap_load_widge
|
||||
/* Mapsize X * Y. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_MAPSIZE_X_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_MAPSIZE_Y_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_GL_HEIGHTMAP_ROTATION_PULLDOWN), SetToolTip(STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP), SetFill(1, 1),
|
||||
@@ -1301,7 +1301,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_create_scenario_widg
|
||||
/* Map size. */
|
||||
NWidget(NWID_HORIZONTAL), SetPIP(0, WidgetDimensions::unscaled.hsep_normal, 0),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_CS_MAPSIZE_X_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid), SetStringTip(STR_MAPGEN_BY), SetFill(0, 1), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_DROPDOWN, Colours::Orange, WID_CS_MAPSIZE_Y_PULLDOWN), SetToolTip(STR_MAPGEN_MAPSIZE_TOOLTIP), SetFill(1, 1),
|
||||
EndContainer(),
|
||||
|
||||
@@ -1443,17 +1443,17 @@ struct GenerateProgressWindow : public Window {
|
||||
DrawFrameRect(r, Colours::Grey, {FrameFlag::BorderOnly, FrameFlag::Lowered});
|
||||
Rect br = r.Shrink(WidgetDimensions::scaled.bevel);
|
||||
DrawFrameRect(br.WithWidth(br.Width() * GenWorldStatus::percent / 100, _current_text_dir == TD_RTL), Colours::Mauve, {});
|
||||
DrawString(br.CentreToHeight(GetCharacterHeight(FontSize::Normal)), GetString(STR_GENERATION_PROGRESS, GenWorldStatus::percent), TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawString(br.CentreToHeight(GetCharacterHeight(FontSize::Normal)), GetString(STR_GENERATION_PROGRESS, GenWorldStatus::percent), TextColour::FromString, AlignmentH::Centre);
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_GP_PROGRESS_TEXT:
|
||||
/* Tell which class we are generating */
|
||||
DrawString(r.left, r.right, r.top, GenWorldStatus::cls, TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawString(r.left, r.right, r.top, GenWorldStatus::cls, TextColour::FromString, AlignmentH::Centre);
|
||||
|
||||
/* And say where we are in that class */
|
||||
DrawString(r.left, r.right, r.top + GetCharacterHeight(FontSize::Normal) + WidgetDimensions::scaled.vsep_normal,
|
||||
GetString(STR_GENERATION_PROGRESS_NUM, GenWorldStatus::current, GenWorldStatus::total), TextColour::FromString, SA_HOR_CENTER);
|
||||
GetString(STR_GENERATION_PROGRESS_NUM, GenWorldStatus::current, GenWorldStatus::total), TextColour::FromString, AlignmentH::Centre);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
+19
-19
@@ -503,7 +503,7 @@ static void SetColourRemap(ExtendedTextColour colour)
|
||||
* @return In case of left or center alignment the right most pixel we have drawn to.
|
||||
* In case of right alignment the left most pixel we have drawn to.
|
||||
*/
|
||||
static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left, int right, StringAlignment align, bool underline, bool truncation, ExtendedTextColour default_colour)
|
||||
static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left, int right, Alignment align, bool underline, bool truncation, ExtendedTextColour default_colour)
|
||||
{
|
||||
if (line.CountRuns() == 0) return 0;
|
||||
|
||||
@@ -556,26 +556,26 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
}
|
||||
|
||||
/* In case we have a RTL language we swap the alignment. */
|
||||
if (!(align & SA_FORCE) && _current_text_dir == TD_RTL && (align & SA_HOR_MASK) != SA_HOR_CENTER) align ^= SA_RIGHT;
|
||||
align.h = align.ResolveRTL();
|
||||
|
||||
/* right is the right most position to draw on. In this case we want to do
|
||||
* calculations with the width of the string. In comparison right can be
|
||||
* seen as lastof(todraw) and width as lengthof(todraw). They differ by 1.
|
||||
* So most +1/-1 additions are to move from lengthof to 'indices'.
|
||||
*/
|
||||
switch (align & SA_HOR_MASK) {
|
||||
case SA_LEFT:
|
||||
switch (align.h) {
|
||||
case AlignmentH::ForceLeft:
|
||||
/* right + 1 = left + w */
|
||||
right = left + w - 1;
|
||||
break;
|
||||
|
||||
case SA_HOR_CENTER:
|
||||
case AlignmentH::Centre:
|
||||
left = RoundDivSU(right + 1 + left - w, 2);
|
||||
/* right + 1 = left + w */
|
||||
right = left + w - 1;
|
||||
break;
|
||||
|
||||
case SA_RIGHT:
|
||||
case AlignmentH::ForceRight:
|
||||
left = right + 1 - w;
|
||||
break;
|
||||
|
||||
@@ -645,7 +645,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
GfxFillRect(left, y + h, right, y + h + WidgetDimensions::scaled.bevel.top - 1, PixelColour{_string_colourremap[1]});
|
||||
}
|
||||
|
||||
return (align & SA_HOR_MASK) == SA_RIGHT ? left : right;
|
||||
return align.h == AlignmentH::ForceRight ? left : right;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -665,7 +665,7 @@ static int DrawLayoutLine(const ParagraphLayouter::Line &line, int y, int left,
|
||||
* @return In case of left or center alignment the right most pixel we have drawn to.
|
||||
* In case of right alignment the left most pixel we have drawn to.
|
||||
*/
|
||||
int DrawString(int left, int right, int top, std::string_view str, ExtendedTextColour colour, StringAlignment align, bool underline, FontSize fontsize)
|
||||
int DrawString(int left, int right, int top, std::string_view str, ExtendedTextColour colour, Alignment align, bool underline, FontSize fontsize)
|
||||
{
|
||||
/* The string may contain control chars to change the font, just use the biggest font for clipping. */
|
||||
int max_height = std::max({GetCharacterHeight(FontSize::Small), GetCharacterHeight(FontSize::Normal), GetCharacterHeight(FontSize::Large), GetCharacterHeight(FontSize::Monospace)});
|
||||
@@ -701,7 +701,7 @@ int DrawString(int left, int right, int top, std::string_view str, ExtendedTextC
|
||||
* @return In case of left or center alignment the right most pixel we have drawn to.
|
||||
* In case of right alignment the left most pixel we have drawn to.
|
||||
*/
|
||||
int DrawString(int left, int right, int top, StringID str, ExtendedTextColour colour, StringAlignment align, bool underline, FontSize fontsize)
|
||||
int DrawString(int left, int right, int top, StringID str, ExtendedTextColour colour, Alignment align, bool underline, FontSize fontsize)
|
||||
{
|
||||
return DrawString(left, right, top, GetString(str), colour, align, underline, fontsize);
|
||||
}
|
||||
@@ -782,9 +782,9 @@ Dimension GetStringMultiLineBoundingBox(std::string_view str, const Dimension &s
|
||||
* @param underline Whether to underline all strings
|
||||
* @param fontsize The size of the initial characters.
|
||||
*
|
||||
* @return If \a align is #SA_BOTTOM, the top to where we have written, else the bottom to where we have written.
|
||||
* @return If \a align is #AlignmentV::Bottom, the top to where we have written, else the bottom to where we have written.
|
||||
*/
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour, StringAlignment align, bool underline, FontSize fontsize)
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour, Alignment align, bool underline, FontSize fontsize)
|
||||
{
|
||||
int maxw = right - left + 1;
|
||||
int maxh = bottom - top + 1;
|
||||
@@ -796,16 +796,16 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_vi
|
||||
Layouter layout(str, maxw, fontsize);
|
||||
int total_height = layout.GetBounds().height;
|
||||
int y;
|
||||
switch (align & SA_VERT_MASK) {
|
||||
case SA_TOP:
|
||||
switch (align.v) {
|
||||
case AlignmentV::Top:
|
||||
y = top;
|
||||
break;
|
||||
|
||||
case SA_VERT_CENTER:
|
||||
case AlignmentV::Middle:
|
||||
y = RoundDivSU(bottom + top - total_height, 2);
|
||||
break;
|
||||
|
||||
case SA_BOTTOM:
|
||||
case AlignmentV::Bottom:
|
||||
y = bottom - total_height;
|
||||
break;
|
||||
|
||||
@@ -827,7 +827,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_vi
|
||||
y += line_height;
|
||||
}
|
||||
|
||||
return ((align & SA_VERT_MASK) == SA_BOTTOM) ? first_line : last_line;
|
||||
return align.v == AlignmentV::Bottom ? first_line : last_line;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -844,9 +844,9 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_vi
|
||||
* @param underline Whether to underline all strings
|
||||
* @param fontsize The size of the initial characters.
|
||||
*
|
||||
* @return If \a align is #SA_BOTTOM, the top to where we have written, else the bottom to where we have written.
|
||||
* @return If \a align is #AlignmentV::Bottom, the top to where we have written, else the bottom to where we have written.
|
||||
*/
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, ExtendedTextColour colour, StringAlignment align, bool underline, FontSize fontsize)
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, ExtendedTextColour colour, Alignment align, bool underline, FontSize fontsize)
|
||||
{
|
||||
return DrawStringMultiLine(left, right, top, bottom, GetString(str), colour, align, underline, fontsize);
|
||||
}
|
||||
@@ -869,7 +869,7 @@ int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str,
|
||||
*
|
||||
* @return true iff the string was drawn.
|
||||
*/
|
||||
bool DrawStringMultiLineWithClipping(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour, StringAlignment align, bool underline, FontSize fontsize)
|
||||
bool DrawStringMultiLineWithClipping(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour, Alignment align, bool underline, FontSize fontsize)
|
||||
{
|
||||
/* The string may contain control chars to change the font, just use the biggest font for clipping. */
|
||||
int max_height = std::max({GetCharacterHeight(FontSize::Small), GetCharacterHeight(FontSize::Normal), GetCharacterHeight(FontSize::Large), GetCharacterHeight(FontSize::Monospace)});
|
||||
|
||||
+14
-14
@@ -93,14 +93,14 @@ Dimension GetScaledSpriteSize(SpriteID sprid); /* widget.cpp */
|
||||
Dimension GetSquareScaledSpriteSize(SpriteID sprid); /* widget.cpp */
|
||||
void DrawSpriteViewport(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = nullptr);
|
||||
void DrawSprite(SpriteID img, PaletteID pal, int x, int y, const SubSprite *sub = nullptr, ZoomLevel zoom = _gui_zoom);
|
||||
void DrawSpriteIgnorePadding(SpriteID img, PaletteID pal, const Rect &r, StringAlignment align); /* widget.cpp */
|
||||
void DrawSpriteIgnorePadding(SpriteID img, PaletteID pal, const Rect &r, Alignment align); /* widget.cpp */
|
||||
std::unique_ptr<uint32_t[]> DrawSpriteToRgbaBuffer(SpriteID spriteId, ZoomLevel zoom = _gui_zoom);
|
||||
|
||||
int DrawString(int left, int right, int top, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawString(int left, int right, int top, StringID str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
bool DrawStringMultiLineWithClipping(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawString(int left, int right, int top, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = AlignmentH::Start, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawString(int left, int right, int top, StringID str, ExtendedTextColour colour = TextColour::FromString, Alignment align = AlignmentH::Start, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
int DrawStringMultiLine(int left, int right, int top, int bottom, StringID str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
bool DrawStringMultiLineWithClipping(int left, int right, int top, int bottom, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal);
|
||||
|
||||
void DrawCharCentered(char32_t c, const Rect &r, TextColour colour);
|
||||
|
||||
@@ -121,13 +121,13 @@ void DrawRectOutline(const Rect &r, PixelColour colour, int width = 1, int dash
|
||||
* @param fontsize The size of the initial characters.
|
||||
* @return In case of left or center alignment the right most pixel we have drawn to. In case of right alignment the left most pixel we have drawn to.
|
||||
*/
|
||||
inline int DrawString(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
inline int DrawString(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = AlignmentH::Start, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
{
|
||||
return DrawString(r.left, r.right, r.top, str, colour, align, underline, fontsize);
|
||||
}
|
||||
|
||||
/** @copydoc DrawString(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FontSize::Normal) */
|
||||
inline int DrawString(const Rect &r, StringID str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = SA_LEFT, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
/** @copydoc DrawString(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = AlignmentH::Start, bool underline = false, FontSize fontsize = FontSize::Normal) */
|
||||
inline int DrawString(const Rect &r, StringID str, ExtendedTextColour colour = TextColour::FromString, Alignment align = AlignmentH::Start, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
{
|
||||
return DrawString(r.left, r.right, r.top, str, colour, align, underline, fontsize);
|
||||
}
|
||||
@@ -142,15 +142,15 @@ inline int DrawString(const Rect &r, StringID str, ExtendedTextColour colour = T
|
||||
* @param underline Whether to underline all strings
|
||||
* @param fontsize The size of the initial characters.
|
||||
*
|
||||
* @return If \a align is #SA_BOTTOM, the top to where we have written, else the bottom to where we have written.
|
||||
* @return If \a align is #AlignmentV::Bottom, the top to where we have written, else the bottom to where we have written.
|
||||
*/
|
||||
inline int DrawStringMultiLine(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
inline int DrawStringMultiLine(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
{
|
||||
return DrawStringMultiLine(r.left, r.right, r.top, r.bottom, str, colour, align, underline, fontsize);
|
||||
}
|
||||
|
||||
/** @copydoc DrawStringMultiLine(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal) */
|
||||
inline int DrawStringMultiLine(const Rect &r, StringID str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
/** @copydoc DrawStringMultiLine(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = ({AlignmentH::Start, AlignmentV::Top}), bool underline = false, FontSize fontsize = FontSize::Normal) */
|
||||
inline int DrawStringMultiLine(const Rect &r, StringID str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
{
|
||||
return DrawStringMultiLine(r.left, r.right, r.top, r.bottom, str, colour, align, underline, fontsize);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ inline int DrawStringMultiLine(const Rect &r, StringID str, ExtendedTextColour c
|
||||
*
|
||||
* @return \c true iff the string was drawn.
|
||||
*/
|
||||
inline bool DrawStringMultiLineWithClipping(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, StringAlignment align = (SA_TOP | SA_LEFT), bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
inline bool DrawStringMultiLineWithClipping(const Rect &r, std::string_view str, ExtendedTextColour colour = TextColour::FromString, Alignment align = {AlignmentH::Start, AlignmentV::Top}, bool underline = false, FontSize fontsize = FontSize::Normal)
|
||||
{
|
||||
return DrawStringMultiLineWithClipping(r.left, r.right, r.top, r.bottom, str, colour, align, underline, fontsize);
|
||||
}
|
||||
|
||||
@@ -430,24 +430,6 @@ enum class Support8bpp : uint8_t {
|
||||
Hardware, ///< Full 8bpp support by OS and hardware.
|
||||
};
|
||||
|
||||
/** How to align the to-be drawn text. */
|
||||
enum StringAlignment : uint8_t {
|
||||
SA_LEFT = 0 << 0, ///< Left align the text.
|
||||
SA_HOR_CENTER = 1 << 0, ///< Horizontally center the text.
|
||||
SA_RIGHT = 2 << 0, ///< Right align the text (must be a single bit).
|
||||
SA_HOR_MASK = 3 << 0, ///< Mask for horizontal alignment.
|
||||
|
||||
SA_TOP = 0 << 2, ///< Top align the text.
|
||||
SA_VERT_CENTER = 1 << 2, ///< Vertically center the text.
|
||||
SA_BOTTOM = 2 << 2, ///< Bottom align the text.
|
||||
SA_VERT_MASK = 3 << 2, ///< Mask for vertical alignment.
|
||||
|
||||
SA_CENTER = SA_HOR_CENTER | SA_VERT_CENTER, ///< Center both horizontally and vertically.
|
||||
|
||||
SA_FORCE = 1 << 4, ///< Force the alignment, i.e. don't swap for RTL languages.
|
||||
};
|
||||
DECLARE_ENUM_AS_BIT_SET(StringAlignment)
|
||||
|
||||
/** The four direction keys on a keyboard. */
|
||||
enum class DirectionKey {
|
||||
Left, ///< Left
|
||||
|
||||
+2
-2
@@ -211,7 +211,7 @@ struct GoalListWindow : public Window {
|
||||
case GC_PROGRESS:
|
||||
if (!s->progress.empty()) {
|
||||
StringID str = s->completed ? STR_GOALS_PROGRESS_COMPLETE : STR_GOALS_PROGRESS;
|
||||
DrawString(r.WithWidth(progress_col_width, !rtl), GetString(str, s->progress.GetDecodedString()), TextColour::FromString, SA_RIGHT | SA_FORCE);
|
||||
DrawString(r.WithWidth(progress_col_width, !rtl), GetString(str, s->progress.GetDecodedString()), TextColour::FromString, AlignmentH::ForceRight);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -380,7 +380,7 @@ struct GoalQuestionWindow : public Window {
|
||||
{
|
||||
if (widget != WID_GQ_QUESTION) return;
|
||||
|
||||
DrawStringMultiLine(r, this->question.GetDecodedString(), this->colour, SA_TOP | SA_HOR_CENTER);
|
||||
DrawStringMultiLine(r, this->question.GetDecodedString(), this->colour, {AlignmentH::Centre, AlignmentV::Top});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+50
-33
@@ -196,6 +196,12 @@ protected:
|
||||
const HistoryRange *history_range = nullptr;
|
||||
};
|
||||
|
||||
/** Label and tooltip for a graph range. */
|
||||
struct GraphRange {
|
||||
StringID label; ///< Label for this range.
|
||||
StringID tooltip; ///< Tooltip for this range.
|
||||
};
|
||||
|
||||
static inline constexpr GraphScale MONTHLY_SCALE_WALLCLOCK[] = {
|
||||
{STR_GRAPH_LAST_24_MINUTES_TIME_LABEL, HISTORY_MONTH.total_division, ECONOMY_MONTH_MINUTES, &HISTORY_MONTH},
|
||||
{STR_GRAPH_LAST_72_MINUTES_TIME_LABEL, HISTORY_QUARTER.total_division, ECONOMY_QUARTER_MINUTES, &HISTORY_QUARTER},
|
||||
@@ -240,7 +246,7 @@ protected:
|
||||
};
|
||||
std::vector<DataSet> data{};
|
||||
|
||||
std::span<const StringID> ranges{};
|
||||
std::span<const GraphRange> ranges{};
|
||||
std::span<const GraphScale> scales{};
|
||||
uint8_t selected_scale = 0;
|
||||
|
||||
@@ -482,11 +488,11 @@ protected:
|
||||
if (rtl) {
|
||||
DrawString(r.right + ScaleGUITrad(4), r.right + label_width + ScaleGUITrad(4), y,
|
||||
GetString(STR_GRAPH_Y_LABEL, this->format_str_y_axis, y_label),
|
||||
GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT | SA_FORCE);
|
||||
GRAPH_AXIS_LABEL_COLOUR, AlignmentH::ForceRight);
|
||||
} else {
|
||||
DrawString(r.left - label_width - ScaleGUITrad(4), r.left - ScaleGUITrad(4), y,
|
||||
GetString(STR_GRAPH_Y_LABEL, this->format_str_y_axis, y_label),
|
||||
GRAPH_AXIS_LABEL_COLOUR, SA_RIGHT | SA_FORCE);
|
||||
GRAPH_AXIS_LABEL_COLOUR, AlignmentH::ForceRight);
|
||||
}
|
||||
|
||||
y_label -= y_label_separation;
|
||||
@@ -507,11 +513,11 @@ protected:
|
||||
if (rtl) {
|
||||
DrawStringMultiLineWithClipping(x + x_sep, x, y, this->height,
|
||||
GetString(mo == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, STR_MONTH_ABBREV_JAN + mo, yr),
|
||||
GRAPH_AXIS_LABEL_COLOUR, SA_LEFT);
|
||||
GRAPH_AXIS_LABEL_COLOUR, AlignmentH::Start);
|
||||
} else {
|
||||
DrawStringMultiLineWithClipping(x, x + x_sep, y, this->height,
|
||||
GetString(mo == 0 ? STR_GRAPH_X_LABEL_MONTH_YEAR : STR_GRAPH_X_LABEL_MONTH, STR_MONTH_ABBREV_JAN + mo, yr),
|
||||
GRAPH_AXIS_LABEL_COLOUR, SA_LEFT);
|
||||
GRAPH_AXIS_LABEL_COLOUR, AlignmentH::Start);
|
||||
}
|
||||
|
||||
mo += this->month_increment;
|
||||
@@ -538,9 +544,9 @@ protected:
|
||||
|
||||
for (int i = 0; i < this->num_on_x_axis; i++) {
|
||||
if (rtl) {
|
||||
DrawString(x + x_sep + 1, x - 1, y, GetString(STR_GRAPH_Y_LABEL_NUMBER, label), GRAPH_AXIS_LABEL_COLOUR, SA_HOR_CENTER);
|
||||
DrawString(x + x_sep + 1, x - 1, y, GetString(STR_GRAPH_Y_LABEL_NUMBER, label), GRAPH_AXIS_LABEL_COLOUR, AlignmentH::Centre);
|
||||
} else {
|
||||
DrawString(x + 1, x + x_sep - 1, y, GetString(STR_GRAPH_Y_LABEL_NUMBER, label), GRAPH_AXIS_LABEL_COLOUR, SA_HOR_CENTER);
|
||||
DrawString(x + 1, x + x_sep - 1, y, GetString(STR_GRAPH_Y_LABEL_NUMBER, label), GRAPH_AXIS_LABEL_COLOUR, AlignmentH::Centre);
|
||||
}
|
||||
|
||||
label += iterator;
|
||||
@@ -670,7 +676,7 @@ public:
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_GRAPH_RANGE_MATRIX:
|
||||
this->UpdateMatrixSize(widget, size, resize, this->ranges);
|
||||
this->UpdateMatrixSize(widget, size, resize, this->ranges | std::views::transform(&GraphRange::label));
|
||||
break;
|
||||
|
||||
case WID_GRAPH_SCALE_MATRIX:
|
||||
@@ -704,6 +710,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override
|
||||
{
|
||||
if (widget != WID_GRAPH_RANGE_MATRIX) return false;
|
||||
|
||||
int row = GetRowFromWidget(pt.y, widget, 0, GetCharacterHeight(FontSize::Small) + WidgetDimensions::scaled.framerect.Vertical());
|
||||
if (row == INT_MAX) return false;
|
||||
|
||||
GuiShowTooltips(this, GetEncodedString(this->ranges[row].tooltip), close_cond);
|
||||
return true;
|
||||
}
|
||||
|
||||
void DrawWidget(const Rect &r, WidgetID widget) const override
|
||||
{
|
||||
switch (widget) {
|
||||
@@ -715,14 +732,14 @@ public:
|
||||
uint line_height = GetCharacterHeight(FontSize::Small) + WidgetDimensions::scaled.framerect.Vertical();
|
||||
uint index = 0;
|
||||
Rect line = r.WithHeight(line_height);
|
||||
for (const auto &str : this->ranges) {
|
||||
for (const auto &[label, tooltip] : this->ranges) {
|
||||
bool lowered = !HasBit(this->excluded_range, index) && !HasBit(this->masked_range, index);
|
||||
|
||||
/* Redraw frame if lowered */
|
||||
if (lowered) DrawFrameRect(line, Colours::Brown, FrameFlag::Lowered);
|
||||
|
||||
const Rect text = line.Shrink(WidgetDimensions::scaled.framerect);
|
||||
DrawString(text, str, (this->highlight_state && this->highlight_range == index) ? TextColour::White : TextColour::Black, SA_CENTER, false, FontSize::Small);
|
||||
DrawString(text, label, (this->highlight_state && this->highlight_range == index) ? TextColour::White : TextColour::Black, {AlignmentH::Centre, AlignmentV::Middle}, false, FontSize::Small);
|
||||
|
||||
if (HasBit(this->masked_range, index)) {
|
||||
GfxFillRect(line.Shrink(WidgetDimensions::scaled.bevel), GetColourGradient(Colours::Brown, Shade::Darker), FillRectMode::Checker);
|
||||
@@ -742,7 +759,7 @@ public:
|
||||
/* Redraw frame if selected */
|
||||
if (selected_month_increment == scale.month_increment) DrawFrameRect(line, Colours::Brown, FrameFlag::Lowered);
|
||||
|
||||
DrawString(line.Shrink(WidgetDimensions::scaled.framerect), scale.label, TextColour::Black, SA_CENTER, false, FontSize::Small);
|
||||
DrawString(line.Shrink(WidgetDimensions::scaled.framerect), scale.label, TextColour::Black, {AlignmentH::Centre, AlignmentV::Middle}, false, FontSize::Small);
|
||||
|
||||
line = line.Translate(0, line_height);
|
||||
}
|
||||
@@ -956,7 +973,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_operating_profit_wid
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(576, 160), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1010,7 +1027,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_income_graph_widgets
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1062,7 +1079,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_delivered_cargo_grap
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(576, 128), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1121,7 +1138,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_performance_history_
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1173,7 +1190,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_company_value_graph_
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(576, 224), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1445,7 +1462,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_cargo_payment_rates_
|
||||
NWidget(WWT_STICKYBOX, Colours::Brown),
|
||||
EndContainer(),
|
||||
NWidget(WWT_PANEL, Colours::Brown, WID_GRAPH_BACKGROUND), SetMinimalSize(568, 128),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_HEADER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetStringTip(STR_GRAPH_CARGO_PAYMENT_RATES_TITLE), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_HEADER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetStringTip(STR_GRAPH_CARGO_PAYMENT_RATES_TITLE), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(495, 0), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
@@ -1462,7 +1479,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_cargo_payment_rates_
|
||||
NWidget(NWID_SPACER), SetMinimalSize(5, 0), SetFill(0, 1), SetResize(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1609,7 +1626,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
DrawString(this->score_info_left, this->score_info_right, text_top, STR_PERFORMANCE_DETAIL_VEHICLES + to_underlying(score_type));
|
||||
|
||||
/* Draw the score */
|
||||
DrawString(this->score_info_left, this->score_info_right, text_top, GetString(STR_JUST_COMMA, score), TextColour::Black, SA_RIGHT);
|
||||
DrawString(this->score_info_left, this->score_info_right, text_top, GetString(STR_JUST_COMMA, score), TextColour::Black, AlignmentH::End);
|
||||
|
||||
/* Calculate the %-bar */
|
||||
uint x = Clamp<int64_t>(val, 0, needed) * this->bar_width / needed;
|
||||
@@ -1625,7 +1642,7 @@ struct PerformanceRatingDetailWindow : Window {
|
||||
if (x != this->bar_right) GfxFillRect(x, bar_top, this->bar_right, bar_top + this->bar_height - 1, rtl ? colour_done : colour_notdone);
|
||||
|
||||
/* Draw it */
|
||||
DrawString(this->bar_left, this->bar_right, text_top, GetString(STR_PERFORMANCE_DETAIL_PERCENT, Clamp<int64_t>(val, 0, needed) * 100 / needed), TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawString(this->bar_left, this->bar_right, text_top, GetString(STR_PERFORMANCE_DETAIL_PERCENT, Clamp<int64_t>(val, 0, needed) * 100 / needed), TextColour::FromString, AlignmentH::Centre);
|
||||
|
||||
/* ScoreID::Loan is inverted */
|
||||
if (score_type == ScoreID::Loan) val = needed - val;
|
||||
@@ -1710,11 +1727,11 @@ CompanyID PerformanceRatingDetailWindow::company = CompanyID::Invalid();
|
||||
/*******************************/
|
||||
|
||||
struct IndustryProductionGraphWindow : BaseCargoGraphWindow {
|
||||
static inline constexpr StringID RANGE_LABELS[] = {
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED,
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED,
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED,
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING,
|
||||
static inline constexpr GraphRange RANGE_LABELS[] = {
|
||||
{STR_GRAPH_INDUSTRY_RANGE_PRODUCED, STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP},
|
||||
{STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED, STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP},
|
||||
{STR_GRAPH_INDUSTRY_RANGE_DELIVERED, STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP},
|
||||
{STR_GRAPH_INDUSTRY_RANGE_WAITING, STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP},
|
||||
};
|
||||
|
||||
static inline CargoTypes excluded_cargo_types{};
|
||||
@@ -1851,7 +1868,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_industry_production_
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(495, 0), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 24), SetFill(0, 1),
|
||||
NWidget(WWT_MATRIX, Colours::Brown, WID_GRAPH_RANGE_MATRIX), SetFill(1, 0), SetResize(0, 0), SetMatrixDataTip(1, 0, STR_GRAPH_TOGGLE_RANGE),
|
||||
NWidget(WWT_MATRIX, Colours::Brown, WID_GRAPH_RANGE_MATRIX), SetFill(1, 0), SetResize(0, 0), SetMatrixDataTip(1, 0),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Brown, WID_GRAPH_ENABLE_CARGOES), SetStringTip(STR_GRAPH_CARGO_ENABLE_ALL, STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Brown, WID_GRAPH_DISABLE_CARGOES), SetStringTip(STR_GRAPH_CARGO_DISABLE_ALL, STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL), SetFill(1, 0),
|
||||
@@ -1867,7 +1884,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_industry_production_
|
||||
NWidget(NWID_SPACER), SetMinimalSize(5, 0), SetFill(0, 1), SetResize(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
@@ -1887,10 +1904,10 @@ void ShowIndustryProductionGraph(WindowNumber window_number)
|
||||
}
|
||||
|
||||
struct TownCargoGraphWindow : BaseCargoGraphWindow {
|
||||
static inline constexpr StringID RANGE_LABELS[] = {
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED,
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED,
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED,
|
||||
static inline constexpr GraphRange RANGE_LABELS[] = {
|
||||
{STR_GRAPH_TOWN_RANGE_PRODUCED, STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP},
|
||||
{STR_GRAPH_TOWN_RANGE_TRANSPORTED, STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP},
|
||||
{STR_GRAPH_TOWN_RANGE_DELIVERED, STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP},
|
||||
};
|
||||
|
||||
static inline CargoTypes excluded_cargo_types{};
|
||||
@@ -2015,7 +2032,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_town_cargo_graph_wid
|
||||
NWidget(WWT_EMPTY, Colours::Invalid, WID_GRAPH_GRAPH), SetMinimalSize(495, 0), SetFill(1, 1), SetResize(1, 1),
|
||||
NWidget(NWID_VERTICAL),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 24), SetFill(0, 1),
|
||||
NWidget(WWT_MATRIX, Colours::Brown, WID_GRAPH_RANGE_MATRIX), SetFill(1, 0), SetResize(0, 0), SetMatrixDataTip(1, 0, STR_GRAPH_CARGO_PAYMENT_TOGGLE_CARGO),
|
||||
NWidget(WWT_MATRIX, Colours::Brown, WID_GRAPH_RANGE_MATRIX), SetFill(1, 0), SetResize(0, 0), SetMatrixDataTip(1, 0),
|
||||
NWidget(NWID_SPACER), SetMinimalSize(0, 4),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Brown, WID_GRAPH_ENABLE_CARGOES), SetStringTip(STR_GRAPH_CARGO_ENABLE_ALL, STR_GRAPH_CARGO_TOOLTIP_ENABLE_ALL), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHTXTBTN, Colours::Brown, WID_GRAPH_DISABLE_CARGOES), SetStringTip(STR_GRAPH_CARGO_DISABLE_ALL, STR_GRAPH_CARGO_TOOLTIP_DISABLE_ALL), SetFill(1, 0),
|
||||
@@ -2031,7 +2048,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_town_cargo_graph_wid
|
||||
NWidget(NWID_SPACER), SetMinimalSize(5, 0), SetFill(0, 1), SetResize(0, 1),
|
||||
EndContainer(),
|
||||
NWidget(NWID_HORIZONTAL),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment(SA_CENTER),
|
||||
NWidget(WWT_TEXT, Colours::Invalid, WID_GRAPH_FOOTER), SetFill(1, 0), SetResize(1, 0), SetPadding(2, 0, 2, 0), SetTextStyle(TextColour::Black, FontSize::Small), SetAlignment({AlignmentH::Centre, AlignmentV::Middle}),
|
||||
NWidget(WWT_RESIZEBOX, Colours::Brown, WID_GRAPH_RESIZE), SetResizeWidgetTypeTip(ResizeWidgetType::HideBevel, STR_TOOLTIP_RESIZE),
|
||||
EndContainer(),
|
||||
EndContainer(),
|
||||
|
||||
+9
-9
@@ -373,7 +373,7 @@ private:
|
||||
|
||||
/* draw fold / unfold button */
|
||||
if (has_children) {
|
||||
DrawSpriteIgnorePadding(Group::Get(g_id)->folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED, PAL_NONE, r.WithX(this->column_rects[VGC_FOLD]).Translate(indent * level_width, 0), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(Group::Get(g_id)->folded ? SPR_CIRCLE_FOLDED : SPR_CIRCLE_UNFOLDED, PAL_NONE, r.WithX(this->column_rects[VGC_FOLD]).Translate(indent * level_width, 0), {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
/* draw group name */
|
||||
@@ -381,24 +381,24 @@ private:
|
||||
|
||||
/* draw autoreplace protection */
|
||||
if (protection) {
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_PROTECT, PAL_NONE, r.WithX(this->column_rects[VGC_PROTECT]), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_PROTECT, PAL_NONE, r.WithX(this->column_rects[VGC_PROTECT]), {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
/* draw autoreplace status */
|
||||
if (stats.autoreplace_defined) {
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_ACTIVE, stats.autoreplace_finished ? PALETTE_CRASH : PAL_NONE, r.WithX(this->column_rects[VGC_AUTOREPLACE]), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(SPR_GROUP_REPLACE_ACTIVE, stats.autoreplace_finished ? PALETTE_CRASH : PAL_NONE, r.WithX(this->column_rects[VGC_AUTOREPLACE]), {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
|
||||
/* draw the profit icon */
|
||||
DrawSpriteIgnorePadding(this->GetGroupProfitSpriteID(g_id), PAL_NONE, r.WithX(this->column_rects[VGC_PROFIT]), SA_CENTER);
|
||||
DrawSpriteIgnorePadding(this->GetGroupProfitSpriteID(g_id), PAL_NONE, r.WithX(this->column_rects[VGC_PROFIT]), {AlignmentH::Centre, AlignmentV::Middle});
|
||||
|
||||
/* draw the number of vehicles of the group */
|
||||
int num_vehicle_with_subgroups = GetGroupNumVehicle(this->vli.company, g_id, this->vli.vtype);
|
||||
int num_vehicle = GroupStatistics::Get(this->vli.company, g_id, this->vli.vtype).num_vehicle;
|
||||
if (IsAllGroupID(g_id) || IsDefaultGroupID(g_id) || num_vehicle_with_subgroups == num_vehicle) {
|
||||
DrawString(r.WithX(this->column_rects[VGC_NUMBER]).CentreToHeight(this->column_size[VGC_NUMBER].height), GetString(STR_JUST_COMMA, num_vehicle), colour, SA_RIGHT | SA_FORCE, false, FontSize::Small);
|
||||
DrawString(r.WithX(this->column_rects[VGC_NUMBER]).CentreToHeight(this->column_size[VGC_NUMBER].height), GetString(STR_JUST_COMMA, num_vehicle), colour, AlignmentH::ForceRight, false, FontSize::Small);
|
||||
} else {
|
||||
DrawString(r.WithX(this->column_rects[VGC_NUMBER]).CentreToHeight(this->column_size[VGC_NUMBER].height), GetString(STR_GROUP_COUNT_WITH_SUBGROUP, num_vehicle, num_vehicle_with_subgroups - num_vehicle), colour, SA_RIGHT | SA_FORCE);
|
||||
DrawString(r.WithX(this->column_rects[VGC_NUMBER]).CentreToHeight(this->column_size[VGC_NUMBER].height), GetString(STR_GROUP_COUNT_WITH_SUBGROUP, num_vehicle, num_vehicle_with_subgroups - num_vehicle), colour, AlignmentH::ForceRight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,17 +663,17 @@ public:
|
||||
Rect tr = r.Shrink(WidgetDimensions::scaled.framerect);
|
||||
|
||||
DrawString(tr, TimerGameEconomy::UsingWallclockUnits() ? STR_GROUP_PROFIT_THIS_PERIOD : STR_GROUP_PROFIT_THIS_YEAR, TextColour::Black);
|
||||
DrawString(tr, GetString(STR_JUST_CURRENCY_LONG, this_year), TextColour::Black, SA_RIGHT);
|
||||
DrawString(tr, GetString(STR_JUST_CURRENCY_LONG, this_year), TextColour::Black, AlignmentH::End);
|
||||
|
||||
tr.top += GetCharacterHeight(FontSize::Normal);
|
||||
DrawString(tr, TimerGameEconomy::UsingWallclockUnits() ? STR_GROUP_PROFIT_LAST_PERIOD : STR_GROUP_PROFIT_LAST_YEAR, TextColour::Black);
|
||||
DrawString(tr, GetString(STR_JUST_CURRENCY_LONG, last_year), TextColour::Black, SA_RIGHT);
|
||||
DrawString(tr, GetString(STR_JUST_CURRENCY_LONG, last_year), TextColour::Black, AlignmentH::End);
|
||||
|
||||
tr.top += GetCharacterHeight(FontSize::Normal);
|
||||
DrawString(tr, STR_GROUP_OCCUPANCY, TextColour::Black);
|
||||
const size_t vehicle_count = this->vehicles.size();
|
||||
if (vehicle_count > 0) {
|
||||
DrawString(tr, GetString(STR_GROUP_OCCUPANCY_VALUE, occupancy / vehicle_count), TextColour::Black, SA_RIGHT);
|
||||
DrawString(tr, GetString(STR_GROUP_OCCUPANCY_VALUE, occupancy / vehicle_count), TextColour::Black, AlignmentH::End);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ static std::optional<std::string> FindGameManualFilePath(std::string_view filena
|
||||
|
||||
/** Window class displaying the game manual textfile viewer. */
|
||||
struct GameManualTextfileWindow : public TextfileWindow {
|
||||
GameManualTextfileWindow(std::string_view filename, Subdirectory subdir) : TextfileWindow(nullptr, TFT_GAME_MANUAL)
|
||||
GameManualTextfileWindow(std::string_view filename, Subdirectory subdir) : TextfileWindow(nullptr, TextfileType::GameManual)
|
||||
{
|
||||
this->ConstructWindow();
|
||||
|
||||
|
||||
@@ -158,11 +158,11 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
|
||||
if (this->background_img == SPR_TYCOON_IMG2_BEGIN) { // Tycoon of the century \o/
|
||||
DrawStringMultiLine(pt.x + ScaleSpriteTrad(15), pt.x + ScaleSpriteTrad(640) - ScaleSpriteTrad(25), pt.y + ScaleSpriteTrad(90), pt.y + ScaleSpriteTrad(160),
|
||||
GetString(STR_HIGHSCORE_PRESIDENT_OF_COMPANY_ACHIEVES_STATUS, c->index, c->index, EndGameGetPerformanceTitleFromValue(c->old_economy[0].performance_history)),
|
||||
TextColour::FromString, SA_CENTER);
|
||||
TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
} else {
|
||||
DrawStringMultiLine(pt.x + ScaleSpriteTrad(36), pt.x + ScaleSpriteTrad(640), pt.y + ScaleSpriteTrad(140), pt.y + ScaleSpriteTrad(206),
|
||||
GetString(STR_HIGHSCORE_COMPANY_ACHIEVES_STATUS, c->index, EndGameGetPerformanceTitleFromValue(c->old_economy[0].performance_history)),
|
||||
TextColour::FromString, SA_CENTER);
|
||||
TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -202,7 +202,7 @@ struct HighScoreWindow : EndGameHighScoreBaseWindow {
|
||||
Point pt = this->GetTopLeft(ScaleSpriteTrad(640), ScaleSpriteTrad(480));
|
||||
|
||||
/* Draw the title. */
|
||||
DrawStringMultiLine(pt.x + ScaleSpriteTrad(70), pt.x + ScaleSpriteTrad(570), pt.y, pt.y + ScaleSpriteTrad(140), STR_HIGHSCORE_TOP_COMPANIES, TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(pt.x + ScaleSpriteTrad(70), pt.x + ScaleSpriteTrad(570), pt.y, pt.y + ScaleSpriteTrad(140), STR_HIGHSCORE_TOP_COMPANIES, TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
|
||||
/* Draw Highscore peepz */
|
||||
for (uint8_t i = 0; i < ClampTo<uint8_t>(hs.size()); i++) {
|
||||
|
||||
@@ -537,7 +537,7 @@ public:
|
||||
DrawString(tr, indsp->name, selected ? TextColour::White : TextColour::Orange);
|
||||
GfxFillRect(icon, selected ? PC_WHITE : PC_BLACK);
|
||||
GfxFillRect(icon.Shrink(WidgetDimensions::scaled.bevel), indsp->map_colour);
|
||||
DrawString(tr, GetString(STR_JUST_COMMA, Industry::GetIndustryTypeCount(type)), TextColour::Black, SA_RIGHT, false, FontSize::Small);
|
||||
DrawString(tr, GetString(STR_JUST_COMMA, Industry::GetIndustryTypeCount(type)), TextColour::Black, AlignmentH::End, false, FontSize::Small);
|
||||
|
||||
text = text.Translate(0, this->resize.step_height);
|
||||
icon = icon.Translate(0, this->resize.step_height);
|
||||
@@ -2152,7 +2152,7 @@ struct CargoesField {
|
||||
|
||||
case CargoesFieldType::Header:
|
||||
ypos += (small_height - GetCharacterHeight(FontSize::Normal)) / 2;
|
||||
DrawString(xpos, xpos + industry_width, ypos, this->u.header, TextColour::White, SA_HOR_CENTER);
|
||||
DrawString(xpos, xpos + industry_width, ypos, this->u.header, TextColour::White, AlignmentH::Centre);
|
||||
break;
|
||||
|
||||
case CargoesFieldType::Industry: {
|
||||
@@ -2163,7 +2163,7 @@ struct CargoesField {
|
||||
ypos += (normal_height - GetCharacterHeight(FontSize::Normal)) / 2;
|
||||
if (this->u.industry.ind_type < NUM_INDUSTRYTYPES) {
|
||||
const IndustrySpec *indsp = GetIndustrySpec(this->u.industry.ind_type);
|
||||
DrawString(xpos, xpos2, ypos, indsp->name, TextColour::White, SA_HOR_CENTER);
|
||||
DrawString(xpos, xpos2, ypos, indsp->name, TextColour::White, AlignmentH::Centre);
|
||||
|
||||
/* Draw the industry legend. */
|
||||
int blob_left, blob_right;
|
||||
@@ -2177,7 +2177,7 @@ struct CargoesField {
|
||||
GfxFillRect(blob_left, ypos2 - blob_distance - CargoesField::legend.height, blob_right, ypos2 - blob_distance, PC_BLACK); // Border
|
||||
GfxFillRect(blob_left + 1, ypos2 - blob_distance - CargoesField::legend.height + 1, blob_right - 1, ypos2 - blob_distance - 1, indsp->map_colour);
|
||||
} else {
|
||||
DrawString(xpos, xpos2, ypos, STR_INDUSTRY_CARGOES_HOUSES, TextColour::FromString, SA_HOR_CENTER);
|
||||
DrawString(xpos, xpos2, ypos, STR_INDUSTRY_CARGOES_HOUSES, TextColour::FromString, AlignmentH::Centre);
|
||||
}
|
||||
|
||||
/* Draw the other_produced/other_accepted cargoes. */
|
||||
@@ -2268,7 +2268,7 @@ struct CargoesField {
|
||||
if (IsValidCargoType(this->u.cargo_label.cargoes[i])) {
|
||||
const CargoSpec *csp = CargoSpec::Get(this->u.cargo_label.cargoes[i]);
|
||||
DrawString(xpos + WidgetDimensions::scaled.framerect.left, xpos + industry_width - 1 - WidgetDimensions::scaled.framerect.right, ypos, csp->name, TextColour::White,
|
||||
(this->u.cargo_label.left_align) ? SA_LEFT : SA_RIGHT);
|
||||
(this->u.cargo_label.left_align) ? AlignmentH::Start : AlignmentH::End);
|
||||
}
|
||||
ypos += GetCharacterHeight(FontSize::Normal) + CargoesField::cargo_space.height;
|
||||
}
|
||||
|
||||
+28
-41
@@ -47,27 +47,13 @@
|
||||
* A viewport command for the main menu background (intro game).
|
||||
*/
|
||||
struct IntroGameViewportCommand {
|
||||
/** Horizontal alignment value. */
|
||||
enum AlignmentH : uint8_t {
|
||||
LEFT,
|
||||
CENTRE,
|
||||
RIGHT,
|
||||
};
|
||||
/** Vertical alignment value. */
|
||||
enum AlignmentV : uint8_t {
|
||||
TOP,
|
||||
MIDDLE,
|
||||
BOTTOM,
|
||||
};
|
||||
|
||||
int command_index = 0; ///< Sequence number of the command (order they are performed in).
|
||||
Point position{ 0, 0 }; ///< Calculated world coordinate to position viewport top-left at.
|
||||
VehicleID vehicle = VehicleID::Invalid(); ///< Vehicle to follow, or VehicleID::Invalid() if not following a vehicle.
|
||||
uint delay = 0; ///< Delay until next command.
|
||||
int zoom_adjust = 0; ///< Adjustment to zoom level from base zoom level.
|
||||
bool pan_to_next = false; ///< If true, do a smooth pan from this position to the next.
|
||||
AlignmentH align_h = CENTRE; ///< Horizontal alignment.
|
||||
AlignmentV align_v = MIDDLE; ///< Vertical alignment.
|
||||
Alignment align = {AlignmentH::Centre, AlignmentV::Middle}; ///< Alignment.
|
||||
|
||||
/**
|
||||
* Calculate effective position.
|
||||
@@ -83,15 +69,16 @@ struct IntroGameViewportCommand {
|
||||
}
|
||||
|
||||
Point p;
|
||||
switch (this->align_h) {
|
||||
case LEFT: p.x = this->position.x; break;
|
||||
case CENTRE: p.x = this->position.x - vp.virtual_width / 2; break;
|
||||
case RIGHT: p.x = this->position.x - vp.virtual_width; break;
|
||||
switch (this->align.ResolveRTL()) {
|
||||
case AlignmentH::ForceLeft: p.x = this->position.x; break;
|
||||
case AlignmentH::Centre: p.x = this->position.x - vp.virtual_width / 2; break;
|
||||
case AlignmentH::ForceRight: p.x = this->position.x - vp.virtual_width; break;
|
||||
default: NOT_REACHED();
|
||||
}
|
||||
switch (this->align_v) {
|
||||
case TOP: p.y = this->position.y; break;
|
||||
case MIDDLE: p.y = this->position.y - vp.virtual_height / 2; break;
|
||||
case BOTTOM: p.y = this->position.y - vp.virtual_height; break;
|
||||
switch (this->align.v) {
|
||||
case AlignmentV::Top: p.y = this->position.y; break;
|
||||
case AlignmentV::Middle: p.y = this->position.y - vp.virtual_height / 2; break;
|
||||
case AlignmentV::Bottom: p.y = this->position.y - vp.virtual_height; break;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
@@ -151,12 +138,12 @@ struct SelectGameWindow : public Window {
|
||||
switch (toupper(c)) {
|
||||
case '-': vc.zoom_adjust = +1; break;
|
||||
case '+': vc.zoom_adjust = -1; break;
|
||||
case 'T': vc.align_v = IntroGameViewportCommand::TOP; break;
|
||||
case 'M': vc.align_v = IntroGameViewportCommand::MIDDLE; break;
|
||||
case 'B': vc.align_v = IntroGameViewportCommand::BOTTOM; break;
|
||||
case 'L': vc.align_h = IntroGameViewportCommand::LEFT; break;
|
||||
case 'C': vc.align_h = IntroGameViewportCommand::CENTRE; break;
|
||||
case 'R': vc.align_h = IntroGameViewportCommand::RIGHT; break;
|
||||
case 'T': vc.align.v = AlignmentV::Top; break;
|
||||
case 'M': vc.align.v = AlignmentV::Middle; break;
|
||||
case 'B': vc.align.v = AlignmentV::Bottom; break;
|
||||
case 'L': vc.align.h = AlignmentH::ForceLeft; break;
|
||||
case 'C': vc.align.h = AlignmentH::Centre; break;
|
||||
case 'R': vc.align.h = AlignmentH::ForceRight; break;
|
||||
case 'P': vc.pan_to_next = true; break;
|
||||
case 'V': vc.vehicle = static_cast<VehicleID>(consumer.ReadIntegerBase<uint32_t>(10, VehicleID::Invalid().base())); break;
|
||||
}
|
||||
@@ -267,11 +254,11 @@ struct SelectGameWindow : public Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_SGI_BASESET:
|
||||
DrawStringMultiLine(r, GetString(STR_INTRO_BASESET, _missing_extra_graphics), TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(r, GetString(STR_INTRO_BASESET, _missing_extra_graphics), TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
break;
|
||||
|
||||
case WID_SGI_TRANSLATION:
|
||||
DrawStringMultiLine(r, GetString(STR_INTRO_TRANSLATION, _current_language->missing), TextColour::FromString, SA_CENTER);
|
||||
DrawStringMultiLine(r, GetString(STR_INTRO_TRANSLATION, _current_language->missing), TextColour::FromString, {AlignmentH::Centre, AlignmentV::Middle});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -349,16 +336,16 @@ static constexpr std::initializer_list<NWidgetPart> _nested_select_game_widgets
|
||||
|
||||
/* Single player */
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_GENERATE_GAME), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_LANDSCAPING, STR_INTRO_NEW_GAME, STR_INTRO_TOOLTIP_NEW_GAME), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_HEIGHTMAP), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SHOW_COUNTOURS, STR_INTRO_PLAY_HEIGHTMAP, STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_SCENARIO), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SUBSIDIES, STR_INTRO_PLAY_SCENARIO, STR_INTRO_TOOLTIP_PLAY_SCENARIO), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_LOAD_GAME), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SAVE, STR_INTRO_LOAD_GAME, STR_INTRO_TOOLTIP_LOAD_GAME), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_HIGHSCORE), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_COMPANY_LEAGUE, STR_INTRO_HIGHSCORE, STR_INTRO_TOOLTIP_HIGHSCORE), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_GENERATE_GAME), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_LANDSCAPING, STR_INTRO_NEW_GAME, STR_INTRO_TOOLTIP_NEW_GAME), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_HEIGHTMAP), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SHOW_COUNTOURS, STR_INTRO_PLAY_HEIGHTMAP, STR_INTRO_TOOLTIP_PLAY_HEIGHTMAP), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_SCENARIO), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SUBSIDIES, STR_INTRO_PLAY_SCENARIO, STR_INTRO_TOOLTIP_PLAY_SCENARIO), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_LOAD_GAME), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SAVE, STR_INTRO_LOAD_GAME, STR_INTRO_TOOLTIP_LOAD_GAME), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_HIGHSCORE), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_COMPANY_LEAGUE, STR_INTRO_HIGHSCORE, STR_INTRO_TOOLTIP_HIGHSCORE), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
|
||||
/* Multi player */
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_NETWORK), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_COMPANY_GENERAL, STR_INTRO_MULTIPLAYER, STR_INTRO_TOOLTIP_MULTIPLAYER), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_PLAY_NETWORK), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_COMPANY_GENERAL, STR_INTRO_MULTIPLAYER, STR_INTRO_TOOLTIP_MULTIPLAYER), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
|
||||
NWidget(NWID_SELECTION, Colours::Invalid, WID_SGI_BASESET_SELECTION),
|
||||
@@ -375,10 +362,10 @@ static constexpr std::initializer_list<NWidgetPart> _nested_select_game_widgets
|
||||
|
||||
/* Other */
|
||||
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_OPTIONS), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SETTINGS, STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_CONTENT_DOWNLOAD), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SHOW_VEHICLES, STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_EDIT_SCENARIO), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SMALLMAP, STR_INTRO_SCENARIO_EDITOR, STR_INTRO_TOOLTIP_SCENARIO_EDITOR), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_HELP), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_QUERY, STR_INTRO_HELP, STR_INTRO_TOOLTIP_HELP), SetAlignment(SA_LEFT | SA_VERT_CENTER), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_OPTIONS), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SETTINGS, STR_INTRO_GAME_OPTIONS, STR_INTRO_TOOLTIP_GAME_OPTIONS), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_CONTENT_DOWNLOAD), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SHOW_VEHICLES, STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_EDIT_SCENARIO), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_SMALLMAP, STR_INTRO_SCENARIO_EDITOR, STR_INTRO_TOOLTIP_SCENARIO_EDITOR), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
NWidget(WWT_PUSHIMGTEXTBTN, Colours::Orange, WID_SGI_HELP), SetToolbarMinimalSize(1), SetSpriteStringTip(SPR_IMG_QUERY, STR_INTRO_HELP, STR_INTRO_TOOLTIP_HELP), SetAlignment({AlignmentH::Start, AlignmentV::Middle}), SetFill(1, 0),
|
||||
EndContainer(),
|
||||
|
||||
NWidget(NWID_VERTICAL),
|
||||
|
||||
+3
-3
@@ -460,7 +460,7 @@ void DrawFoundation(TileInfo *ti, Foundation f)
|
||||
if (!IsNonContinuousFoundation(f)) {
|
||||
/* Lower part of foundation */
|
||||
static constexpr SpriteBounds bounds{{}, {TILE_SIZE, TILE_SIZE, TILE_HEIGHT - 1}, {}};
|
||||
AddSortableSpriteToDraw(leveled_base + (ti->tileh & ~SLOPE_STEEP), PAL_NONE, *ti, bounds);
|
||||
AddSortableSpriteToDraw(leveled_base + RemoveSteepSlope(ti->tileh), PAL_NONE, *ti, bounds);
|
||||
}
|
||||
|
||||
Corner highest_corner = GetHighestSlopeCorner(ti->tileh);
|
||||
@@ -803,7 +803,7 @@ TileIndex _cur_tileloop_tile;
|
||||
*/
|
||||
void RunTileLoop()
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_GL_LANDSCAPE);
|
||||
PerformanceAccumulator framerate(PerformanceElement::GameLoopLandscape);
|
||||
|
||||
/* The pseudorandom sequence of tiles is generated using a Galois linear feedback
|
||||
* shift register (LFSR). This allows a deterministic pseudorandom ordering, but
|
||||
@@ -1727,7 +1727,7 @@ void OnTick_LinkGraph();
|
||||
void CallLandscapeTick()
|
||||
{
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_GL_LANDSCAPE);
|
||||
PerformanceAccumulator framerate(PerformanceElement::GameLoopLandscape);
|
||||
|
||||
OnTick_Town();
|
||||
OnTick_Trees();
|
||||
|
||||
@@ -632,7 +632,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 anos (trimestralmente)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 anos (anualmente)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Mostrar/Ocultar gráfico para este intervalo de dados
|
||||
STR_GRAPH_SELECT_SCALE :Alterar a escala horizontal do gráfico
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tarifas por Carga
|
||||
@@ -648,14 +647,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Histórico de Carga
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produzido
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Mostrar/Ocultar gráfico das cargas produzidas por esta indústria
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportado
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Mostrar/Ocultar gráfico das cargas transportadas a partir desta indústria
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Entregue
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Mostrar/Ocultar gráfico das cargas entregues a esta indústria
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Aguardando
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Mostrar/Ocultar gráfico das cargas aguardando nesta indústria
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Histórico de Carga
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Produzido
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Mostrar/Ocultar gráfico das cargas produzidas por esta localidade
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transportado
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Mostrar/Ocultar gráfico das cargas transportadas a partir desta localidade
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Entregue
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Mostrar/Ocultar gráfico das cargas entregues a esta localidade
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Mostrar avaliações detalhadas de desempenho
|
||||
|
||||
@@ -1661,12 +1667,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :Nenhum
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Melhorado
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Veículos rodoviários: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Escolher o lado de condução
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Lado de condução do veículo rodoviário: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Escolha o lado de condução do veículo rodoviário.{}Isso também pode afetar o lado dos sinais e os gráficos dos semáforos.{}Pode ser necessário recarregar o jogo para que a alteração tenha efeito total
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Conduzir pela esquerda
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Conduzir pela direita
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Esquerda
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Direita
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Rotação do mapa de altitudes: {STRING}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Escolher em que sentido a imagem do mapa de altitudes será girada para caber no mundo do jogo
|
||||
@@ -2889,22 +2895,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Excluir coleç
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Você quer mesmo excluir esta coleção?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Você quer mesmo excluir esta coleção? Ela contém itens de NewGRFs desativados!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Selecionar uma classe de estação para mostrar
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Selecionar uma classe de estação para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Escolher um tipo de estação para construir. Ctrl+Clique para adicionar ou remover nos itens salvos
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Selecione uma coleção de estações para mostrar
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Selecionar uma classe de ponto de controle para mostrar
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Selecionar uma classe de ponto de controle para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Escolher um ponto de controle para construir. Ctrl+Clique para adicionar ou remover nos itens salvos
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Selecione uma coleção de pontos de controle para mostrar
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Selecionar uma classe de estação de ônibus para mostrar
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Selecionar uma classe de estação de ônibus para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Escolher um tipo de estação de ônibus para construir. Ctrl+Clique para adicionar ou remover nos itens salvos
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Selecione uma coleção de estações de ônibus para mostrar
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecionar uma classe de estação de caminhões para mostrar
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Selecionar uma classe de estação de caminhões para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Escolher um tipo de estação de caminhões para construir. Ctrl+Clique para adicionar ou remover nos itens salvos
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Selecione uma coleção de estações de caminhões para mostrar
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecionar uma classe de objeto para mostrar
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Selecionar uma classe de objeto para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Escolher um tipo de objeto para construir. Ctrl+Clique para adicionar ou remover nos itens salvos. Ctrl+Clique+Arraste para selecionar a área diagonalmente. Pressione também Shift para apenas mostrar o custo estimado
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Selecione uma coleção de objetos para mostrar
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecionar uma zona urbana para mostrar
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Selecionar uma zona da localidade para exibir. Ctrl+Clique para adicionar ou remover em itens salvos
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Selecionar um tipo de casa para construir. Ctrl+Clique para adicionar ou remover nos itens salvos
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Selecione uma coleção de casas para mostrar
|
||||
|
||||
@@ -5362,6 +5368,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :ponte está {HE
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :ponte está {HEIGHT} abaixo do necessário para o ponto de controle ferroviário
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :ponte está {HEIGHT} abaixo do necessário para o ponto de controle rodoviário
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :ponte está {HEIGHT} abaixo do necessário para a eclusa
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :ponte é {HEIGHT} mais baixa que um depósito de trem
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :ponte é {HEIGHT} mais baixa que um depósito rodoviário
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :ponte é {HEIGHT} mais baixa que um depósito de embarcações
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :ponte é {HEIGHT} mais baixa do que o objeto
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Não é possível construir túnel aqui...
|
||||
|
||||
+84
-55
@@ -526,6 +526,7 @@ STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Construcció d'
|
||||
STR_LANDSCAPING_MENU_LANDSCAPING :Modificació del paisatge
|
||||
STR_LANDSCAPING_MENU_PLANT_TREES :Planta arbres
|
||||
STR_LANDSCAPING_MENU_PLACE_SIGN :Situa un senyal
|
||||
STR_LANDSCAPING_MENU_PLACE_OBJECT :Situa objectes
|
||||
|
||||
# Music menu
|
||||
STR_TOOLBAR_SOUND_MUSIC :So/música
|
||||
@@ -631,7 +632,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 anys (trimestral)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 anys (anual)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Commuta el gràfic per al rang d'aquestes dades
|
||||
STR_GRAPH_SELECT_SCALE :Canvia l'escala horitzontal del gràfic
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Tarifes de pagament de càrregues
|
||||
@@ -647,14 +647,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Historial de càrregues
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produït
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Mostra/amaga el gràfic de càrrega produïda per aquesta indústria.
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportat
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Mostra/amaga el gràfic de càrrega transportada d'aquesta indústria.
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Entregades
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Mostra/amaga el gràfic de càrrega entregada a aquesta indústria.
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :En espera
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Mostra/amaga el gràfic de càrrega en espera en aquesta indústria.
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Historial de càrregues
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Produït
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Mostra/amaga el gràfic de càrrega produïda per aquesta població.
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transportades
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Mostra/amaga el gràfic de càrrega transportada des d'aquesta població.
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Entregat
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Mostra/amaga el gràfic de càrrega entregada a aquesta població.
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Mostra ratis de rendiment detallats
|
||||
|
||||
@@ -1353,8 +1360,12 @@ STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HIGH :Alt
|
||||
STR_CONFIG_SETTING_RECESSIONS :Recessions: {STRING}
|
||||
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Si està activat, poden haver recessions periòdicament. Durant una recessió, tota la producció és significativament més baixa, tornant al nivell previ quan s'acabi el període de recessió.
|
||||
|
||||
STR_CONFIG_SETTING_TRAIN_FLIP_REVERSE :Permet que els trens donin la volta quan inverteixen el sentit: {STRING}
|
||||
|
||||
###length 3
|
||||
STR_CONFIG_SETTING_TRAIN_FLIP_REVERSE_ALL :Tots
|
||||
STR_CONFIG_SETTING_TRAIN_FLIP_REVERSE_END_OF_LINE_ONLY :Només al final de línia
|
||||
STR_CONFIG_SETTING_TRAIN_FLIP_REVERSE_NONE :Cap
|
||||
|
||||
STR_CONFIG_SETTING_DISASTERS :Catàstrofes: {STRING}
|
||||
STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Permet o no que passin catàstrofes que puguin bloquejar o destruir ocasionalment vehicles o infraestructures
|
||||
@@ -1362,12 +1373,12 @@ STR_CONFIG_SETTING_DISASTERS_HELPTEXT :Permet o no que
|
||||
STR_CONFIG_SETTING_CITY_APPROVAL :Actitud de les alcaldies de les poblacions: {STRING}
|
||||
STR_CONFIG_SETTING_CITY_APPROVAL_HELPTEXT :Establiu com afecta al prestigi de les companyies el soroll i els danys ambientals que provoquen. Aquest prestigi influirà en la futura acceptació o denegació d'accions de construcció a la població.
|
||||
|
||||
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT :Alçada màxima del mapa: {STRING}
|
||||
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT :Altitud màxima del mapa: {STRING}
|
||||
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_HELPTEXT :Estableix l'alçada màxima del terreny del mapa. Amb «Automàtica», s'escollirà un valor adequat després que es generi el terreny.
|
||||
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_VALUE :{NUM}
|
||||
###setting-zero-is-special
|
||||
STR_CONFIG_SETTING_MAP_HEIGHT_LIMIT_AUTO :Automàtica
|
||||
STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}No es pot escollir aquest límit d'alçada del mapa. Hi ha almenys una muntanya al mapa que és més alta.
|
||||
STR_CONFIG_SETTING_TOO_HIGH_MOUNTAIN :{WHITE}No es pot escollir aquest límit d'altitud del mapa. Hi ha almenys una muntanya al mapa que és més alta.
|
||||
|
||||
STR_CONFIG_SETTING_AUTOSLOPE :Permet la modificació del terreny sota edificis, rails, etc.: {STRING}
|
||||
STR_CONFIG_SETTING_AUTOSLOPE_HELPTEXT :Permet modelar el terreny sota les vies, els edificis i altres elements sense eliminar-los.
|
||||
@@ -1559,7 +1570,11 @@ STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE :Escala la produ
|
||||
STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE_HELPTEXT :Escala la producció de càrrega de les indústries segons aquest percentatge.
|
||||
STR_CONFIG_SETTING_CARGO_SCALE_VALUE :{NUM}{NBSP}%
|
||||
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE :Caiguda del valor de la càrrega respecte el temps: {STRING}
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_HELPTEXT :Ajusta la rapidesa amb la qual decreix el valor de la càrrega dels vehicles.
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_VALUE :{NUM}{NBSP}%
|
||||
###setting-zero-is-special
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_ZERO :Sense caiguda
|
||||
|
||||
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Autorenova el vehicle quan sigui vell: {STRING}
|
||||
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Si està activat, quan un vehicle arriba al final de la seva vida útil es substitueix automàticament quan es compleixen les condicions d'autorenovació.
|
||||
@@ -1796,7 +1811,11 @@ STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE_HELPTEXT :Mostra als hora
|
||||
STR_CONFIG_SETTING_QUICKGOTO :Creació ràpida d'ordres per a vehicles: {STRING}
|
||||
STR_CONFIG_SETTING_QUICKGOTO_HELPTEXT :Preselecciona el botó 'Vés a' quan s'obri la finestra d'ordres
|
||||
|
||||
STR_CONFIG_SETTING_DEFAULT_RAIL_ROAD_TYPE :Tipus de rail, carretera o tramvia per defecte (després de la càrrega d'una desada o en una nova partida): {STRING}
|
||||
###length 3
|
||||
STR_CONFIG_SETTING_DEFAULT_RAIL_ROAD_TYPE_FIRST :El primer disponible
|
||||
STR_CONFIG_SETTING_DEFAULT_RAIL_ROAD_TYPE_LAST :L'últim disponible
|
||||
STR_CONFIG_SETTING_DEFAULT_RAIL_ROAD_TYPE_MOST_USED :El que més es fa servir
|
||||
|
||||
STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION :Mostra els camins reservats: {STRING}
|
||||
STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION_HELPTEXT :Dóna a les vies reservades un color diferent per visualitzar problemes d'encaminament de trens
|
||||
@@ -1903,6 +1922,8 @@ STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT :Quan s'activa,
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Activa límits de velocitat per als vagons: {STRING}
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Si està activat, també utilitza els límits de velocitat dels vagons per a decidir la velocitat màxima del tren.
|
||||
|
||||
STR_CONFIG_SETTING_AIRCRAFT_RANGE :Activa l'abast màxim de les aeronaus: {STRING}
|
||||
STR_CONFIG_SETTING_AIRCRAFT_RANGE_HELPTEXT :Quan l'opció està activada, els NewGRF poden limitar l'abast màxim de les aeronaus.
|
||||
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS :Desactiva vies electrificades: {STRING}
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Activant aquest paràmetre es desactiva el requeriment d'electrificar les vies per poder fer-hi circular locomotores elèctriques
|
||||
@@ -2210,22 +2231,22 @@ STR_CONFIG_SETTING_REVERSE_AT_SIGNALS_HELPTEXT :Permetre als tr
|
||||
STR_CONFIG_SETTING_QUERY_CAPTION :{WHITE}Canvia el valor de l'ajustament
|
||||
|
||||
# Config errors
|
||||
STR_CONFIG_ERROR :{WHITE}S'ha produït un error en el fitxer de configuració...
|
||||
STR_CONFIG_ERROR_ARRAY :{WHITE}...error en la matriu «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_VALUE :{WHITE}...valor «{STRING}» invàlid per a «{STRING}».
|
||||
STR_CONFIG_ERROR :S'ha produït un error en el fitxer de configuració...
|
||||
STR_CONFIG_ERROR_ARRAY :Error a la matriu «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_VALUE :Valor «{STRING}» no vàlid per a «{STRING}».
|
||||
STR_CONFIG_ERROR_TRAILING_CHARACTERS :{WHITE}...caràcters finals (espai, nova línia...) al final de la configuració de l'opció «{STRING}».
|
||||
STR_CONFIG_ERROR_DUPLICATE_GRFID :{WHITE}...s'ignorarà el fitxer NewGRF «{STRING}» perquè l'identificador del NewGRF és el mateix que el de «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_GRF :{WHITE}...s'ignorarà el fitxer NewGRF invàlid «{STRING}»: {STRING}
|
||||
STR_CONFIG_ERROR_DUPLICATE_GRFID :S'ignorarà el fitxer NewGRF «{STRING}» perquè l'identificador del NewGRF és el mateix que el de «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_GRF :S'ignorarà el fitxer NewGRF invàlid «{STRING}»: {STRING}
|
||||
STR_CONFIG_ERROR_INVALID_GRF_NOT_FOUND :no s'ha trobat.
|
||||
STR_CONFIG_ERROR_INVALID_GRF_UNSAFE :insegur per a ús estàtic.
|
||||
STR_CONFIG_ERROR_INVALID_GRF_SYSTEM :NewGRF del sistema
|
||||
STR_CONFIG_ERROR_INVALID_GRF_INCOMPATIBLE :no és compatible amb aquesta versió de l'OpenTTD.
|
||||
STR_CONFIG_ERROR_INVALID_GRF_UNKNOWN :desconegut.
|
||||
STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_LEVEL :{WHITE}...el nivell de compressió «{STRING}» no és vàlid.
|
||||
STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM :{WHITE}...el format de partida «{STRING}» no està disponible. Es revertirà a «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_LEVEL :El nivell de compressió «{STRING}» no és vàlid.
|
||||
STR_CONFIG_ERROR_INVALID_SAVEGAME_COMPRESSION_ALGORITHM :El format de partida «{STRING}» no està disponible. Es revertirà a «{STRING}».
|
||||
STR_CONFIG_ERROR_INVALID_BASE_GRAPHICS_NOT_FOUND :s'ignorarà el conjunt de gràfics base «{STRING}» perquè no s'ha trobat.
|
||||
STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :{WHITE}...s'ignorarà el conjunt de sons base «{STRING}» perquè no s'ha trobat.
|
||||
STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :{WHITE}...s'ignorarà el conjunt de peces de música «{STRING}» perquè no s'ha trobat.
|
||||
STR_CONFIG_ERROR_INVALID_BASE_SOUNDS_NOT_FOUND :S'ignorarà el conjunt de sons base «{STRING}» perquè no s'ha trobat.
|
||||
STR_CONFIG_ERROR_INVALID_BASE_MUSIC_NOT_FOUND :S'ignorarà el conjunt de peces de música «{STRING}» perquè no s'ha trobat.
|
||||
|
||||
# Video initialization errors
|
||||
STR_VIDEO_DRIVER_ERROR :{WHITE}S'ha produït un error en la configuració de vídeo...
|
||||
@@ -2302,8 +2323,8 @@ STR_CHEAT_CHANGE_COMPANY :{LTBLUE}Juga am
|
||||
STR_CHEAT_EXTRA_DYNAMITE :{LTBLUE}Eruga màgica (treu indústries i altres objectes inamovibles): {ORANGE}{STRING}
|
||||
STR_CHEAT_CROSSINGTUNNELS :{LTBLUE}Els túnels es poden creuar: {ORANGE}{STRING}
|
||||
STR_CHEAT_NO_JETCRASH :{LTBLUE}Els avions a reacció en aeroports petits tindran menys accidents: {ORANGE}{STRING}
|
||||
STR_CHEAT_EDIT_MAX_HL :{LTBLUE}Edita l'alçada màxima del mapa: {ORANGE}{NUM}
|
||||
STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT :{WHITE}Edita l'alçada màxima del terreny en el mapa
|
||||
STR_CHEAT_EDIT_MAX_HL :{LTBLUE}Edita l'altitud màxima del mapa: {ORANGE}{NUM}
|
||||
STR_CHEAT_EDIT_MAX_HL_QUERY_CAPT :{WHITE}Edita l'altitud màxima del terreny en el mapa
|
||||
STR_CHEAT_CHANGE_DATE :{LTBLUE}Canvia la data: {ORANGE}{DATE_SHORT}
|
||||
STR_CHEAT_CHANGE_DATE_QUERY_CAPT :{WHITE}Canvia l'any actual
|
||||
STR_CHEAT_SETUP_PROD :{LTBLUE}Activa la modificació dels valors de producció: {ORANGE}{STRING}
|
||||
@@ -3082,6 +3103,8 @@ STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Situa à
|
||||
STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Defineix àrea de desert.{}Amb Ctrl+clic, es treu l'àrea de desert.
|
||||
STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Augmenta la mida de l'àrea de terreny a rebaixar/elevar
|
||||
STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Disminueix la mida de l'àrea de terreny a rebaixar/elevar
|
||||
STR_TERRAFORM_TOOLTIP_LOWER_A_CORNER_OF_LAND :{BLACK}Rebaixa una cantonada del terreny. Si la mida és 1×1 i amb Clic+arrossega, es rebaixa la primera cantonada seleccionada i s'anivella l'àrea a la nova alçària. Amb Ctrl+clic+arrossega, se selecciona l'àrea en diagonal. Amb Maj, només es mostrarà el cost estimat de l'acció.
|
||||
STR_TERRAFORM_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Eleva una cantonada del terreny. Si la mida és 1×1 i amb Clic+arrossega, s'eleva la primera cantonada seleccionada i s'anivella l'àrea a la nova alçària. Amb Ctrl+clic+arrossega, se selecciona l'àrea en diagonal. Amb Maj, només es mostrarà el cost estimat de l'acció.
|
||||
STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Genera un terreny aleatori
|
||||
STR_TERRAFORM_SE_NEW_WORLD :{BLACK}Crea un escenari nou
|
||||
STR_TERRAFORM_RESET_LANDSCAPE :{BLACK}Restableix el paisatge
|
||||
@@ -3491,7 +3514,7 @@ STR_SE_MAPGEN_CAPTION :{WHITE}Tipus d'
|
||||
STR_SE_MAPGEN_FLAT_WORLD :{WHITE}Terreny pla
|
||||
STR_SE_MAPGEN_FLAT_WORLD_TOOLTIP :{BLACK}Generar un terreny pla
|
||||
STR_SE_MAPGEN_RANDOM_LAND :{WHITE}Terreny aleatori
|
||||
STR_SE_MAPGEN_FLAT_WORLD_HEIGHT :{BLACK}Alçada del terreny pla:
|
||||
STR_SE_MAPGEN_FLAT_WORLD_HEIGHT :{BLACK}Alçària del terreny pla:
|
||||
STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_TOOLTIP :{BLACK}Trieu l'altura de la terra per damunt del nivell de la mar.
|
||||
STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_DOWN_TOOLTIP :{BLACK}Mou l'alçada del terreny pla un pas avall
|
||||
STR_SE_MAPGEN_FLAT_WORLD_HEIGHT_UP_TOOLTIP :{BLACK}Mou l'alçada del terreny pla un pas amunt
|
||||
@@ -3693,7 +3716,7 @@ STR_NEWGRF_BROKEN_VEHICLE_LENGTH :{WHITE}Un vehic
|
||||
STR_NEWGRF_BROKEN_CAPACITY :{WHITE}Un vehicle «{1:ENGINE}» ha canviat la seva capacitat mentre estava fora del dipòsit o no ha canviat el tipus de càrrega a transportar.
|
||||
STR_BROKEN_VEHICLE_LENGTH :El tren «{VEHICLE}» propietat de «{COMPANY}» té una llargada incorrecta, probablement a causa de problemes amb els NewGRF. La partida podria dessincronitzar-se o fallar.
|
||||
|
||||
STR_NEWGRF_BUGGY :{WHITE}El NewGRF «{0:STRING}» dóna informació incorrecta.
|
||||
STR_NEWGRF_BUGGY :El NewGRF «{0:STRING}» dóna informació incorrecta.
|
||||
STR_NEWGRF_BUGGY_ARTICULATED_CARGO :{WHITE}La informació de càrrega/remodelació de «{1:ENGINE}» no encaixa amb la llista de compres després de la construcció. Això podria causar un mal funcionament de la funció autorenova/substitueix.
|
||||
STR_NEWGRF_BUGGY_ENDLESS_PRODUCTION_CALLBACK :«{1:STRING}» ha provocat un bucle infinit en la crida de producció.
|
||||
STR_NEWGRF_BUGGY_UNKNOWN_CALLBACK_RESULT :{WHITE}'Callback' {1:HEX} ha retornat un resultat desconegut/invàlid {2:HEX}
|
||||
@@ -4738,6 +4761,7 @@ STR_ORDER_CONDITIONAL_REQUIRES_SERVICE :Necessita revis
|
||||
STR_ORDER_CONDITIONAL_UNCONDITIONALLY :Sempre
|
||||
STR_ORDER_CONDITIONAL_REMAINING_LIFETIME :Temps de vida restant (anys)
|
||||
STR_ORDER_CONDITIONAL_MAX_RELIABILITY :Fiabilitat màxima
|
||||
STR_ORDER_CONDITIONAL_DRIVING_BACKWARDS :Marxa enrere
|
||||
###next-name-looks-similar
|
||||
|
||||
STR_ORDER_CONDITIONAL_COMPARATOR_TOOLTIP :{BLACK}Com comparar les dades del vehicle al valor donat
|
||||
@@ -5060,7 +5084,7 @@ STR_ERROR_PNGMAP_FILE_NOT_FOUND :{WHITE}... no s
|
||||
STR_ERROR_PNGMAP_IMAGE_TYPE :{WHITE}... no s'ha pogut convertir el tipus d'imatge. Es necessita una imatge PNG de 8 o 24-bit
|
||||
STR_ERROR_PNGMAP_MISC :{WHITE}... alguna cosa ha anat malament (probablement un fitxer corrupte)
|
||||
|
||||
STR_ERROR_BMPMAP :{WHITE}Impossible carregar el terreny des del BMP...
|
||||
STR_ERROR_BMPMAP :Impossible carregar el terreny des del BMP...
|
||||
STR_ERROR_BMPMAP_IMAGE_TYPE :{WHITE}... no s'ha pogut convertir el tipus d'imatge
|
||||
|
||||
STR_ERROR_HEIGHTMAP_TOO_LARGE :{WHITE}... l'imatge és massa gran
|
||||
@@ -5075,7 +5099,7 @@ STR_WARNING_FALLBACK_SOUNDSET :{WHITE}Només s
|
||||
STR_WARNING_SCREENSHOT_SIZE_CAPTION :{WHITE}Captura de pantalla enorme
|
||||
STR_WARNING_SCREENSHOT_SIZE_MESSAGE :{YELLOW}La captura de pantalla tindrà una resolució de {COMMA} x {COMMA} píxels. Es tardarà una estona a fer la captura. Vols continuar?
|
||||
|
||||
STR_MESSAGE_HEIGHTMAP_SUCCESSFULLY :{WHITE}Mapa d'alçades desat correctament amb el nom «{STRING}». El cim més alt té alçada {NUM}.
|
||||
STR_MESSAGE_HEIGHTMAP_SUCCESSFULLY :{WHITE}Mapa d'altituds desat correctament amb el nom «{STRING}». El cim més alt té altitud {NUM}.
|
||||
STR_MESSAGE_SCREENSHOT_SUCCESSFULLY :{WHITE}Captura de pantalla desada correctament com a '{STRING}'
|
||||
STR_ERROR_SCREENSHOT_FAILED :{WHITE}Error en la captura de pantalla!
|
||||
|
||||
@@ -5096,7 +5120,7 @@ STR_ERROR_CAN_T_CLEAR_THIS_AREA :{WHITE}No es po
|
||||
STR_ERROR_SITE_UNSUITABLE :{WHITE}... lloc inadequat
|
||||
STR_ERROR_ALREADY_BUILT :{WHITE}... ja construït
|
||||
STR_ERROR_OWNED_BY :{WHITE}... propietat de {STRING}
|
||||
STR_ERROR_AREA_IS_OWNED_BY_ANOTHER :{WHITE}... l'àrea és propietat d'una altra companyia
|
||||
STR_ERROR_AREA_IS_OWNED_BY_ANOTHER :L'àrea és propietat d'una altra companyia.
|
||||
STR_ERROR_TERRAFORM_LIMIT_REACHED :{WHITE}... s'ha arribat al límit de neteja de paisatge
|
||||
STR_ERROR_CLEARING_LIMIT_REACHED :{WHITE}... s'ha arribat al límit de neteja de cel·les
|
||||
STR_ERROR_TREE_PLANT_LIMIT_REACHED :{WHITE}... s'ha arribat al límit de plantat d'arbres
|
||||
@@ -5132,7 +5156,7 @@ STR_ERROR_CURRENCY_REQUIRED :{WHITE}... {CUR
|
||||
STR_ERROR_CAN_T_REPAY_LOAN :{WHITE}No es pot amortitzar préstec...
|
||||
STR_ERROR_INSUFFICIENT_FUNDS :{WHITE}No es poden regalar els diners deixats pel banc...
|
||||
STR_ERROR_CAN_T_GIVE_MONEY :{WHITE}No podeu donar diners a aquesta companyia...
|
||||
STR_ERROR_CAN_T_BUY_COMPANY :{WHITE}No pots comprar la companyia...
|
||||
STR_ERROR_CAN_T_BUY_COMPANY :No es pot comprar la companyia...
|
||||
STR_ERROR_CAN_T_BUILD_COMPANY_HEADQUARTERS :{WHITE}No es pot construir la seu de la companyia...
|
||||
|
||||
# Town related errors
|
||||
@@ -5141,7 +5165,7 @@ STR_ERROR_CAN_T_RENAME_TOWN :{WHITE}No es po
|
||||
STR_ERROR_CAN_T_FOUND_TOWN_HERE :{WHITE}No es pot construir una població aquí...
|
||||
STR_ERROR_CAN_T_EXPAND_TOWN :{WHITE}No es pot expandir la població...
|
||||
STR_ERROR_TOO_CLOSE_TO_ANOTHER_TOWN :{WHITE}... massa prop d'una altra població
|
||||
STR_ERROR_TOO_MANY_TOWNS :{WHITE}... massa poblacions
|
||||
STR_ERROR_TOO_MANY_TOWNS :Massa poblacions
|
||||
STR_ERROR_NO_SPACE_FOR_TOWN :{WHITE}...no queda espai al mapa.
|
||||
STR_ERROR_ROAD_WORKS_IN_PROGRESS :{WHITE}Obres en progrés
|
||||
STR_ERROR_TOWN_CAN_T_DELETE :{WHITE}No es pot eliminar aquesta població...{}{}Hi ha una estació, un dipòsit o una cel·la pertanyent a la població que no pot ser eliminada
|
||||
@@ -5149,7 +5173,7 @@ STR_ERROR_STATUE_NO_SUITABLE_PLACE :{WHITE}... no h
|
||||
STR_ERROR_CAN_T_BUILD_HOUSE :{WHITE}La casa no es pot construir...
|
||||
|
||||
# Industry related errors
|
||||
STR_ERROR_TOO_MANY_INDUSTRIES :massa indústries
|
||||
STR_ERROR_TOO_MANY_INDUSTRIES :Massa indústries
|
||||
STR_ERROR_CAN_T_GENERATE_INDUSTRIES :{WHITE}No es poden generar indústries...
|
||||
STR_ERROR_CAN_T_BUILD_HERE :{WHITE}Aquí no es pot construir {STRING}...
|
||||
STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY :{WHITE}Aquí no es pot construir aquest tipus d'indústria...
|
||||
@@ -5157,7 +5181,7 @@ STR_ERROR_CAN_T_PROSPECT_INDUSTRY :{WHITE}No es po
|
||||
STR_ERROR_INDUSTRY_TOO_CLOSE :{WHITE}... massa prop d'altres indústries
|
||||
STR_ERROR_MUST_FOUND_TOWN_FIRST :{WHITE}...abans s'ha de fundar una població.
|
||||
STR_ERROR_ONLY_ONE_ALLOWED_PER_TOWN :{WHITE}... només un permès per població
|
||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :{WHITE}... només es pot construir en poblacions de més de 1200 hab.
|
||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS_WITH_POPULATION_OF_1200 :Només es pot construir en poblacions de més de 1200 habitants.
|
||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_RAINFOREST :{WHITE}... només es pot construir en àrees de selva tropical
|
||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_DESERT :{WHITE}... només es pot construir en àrees de desert
|
||||
STR_ERROR_CAN_ONLY_BE_BUILT_IN_TOWNS :{WHITE}... només es pot construir en poblacions (substituint cases)
|
||||
@@ -5175,10 +5199,10 @@ STR_ERROR_NO_SUITABLE_PLACES_FOR_INDUSTRIES_EXPLANATION :Canvieu els par
|
||||
|
||||
# Station construction related errors
|
||||
STR_ERROR_CAN_T_BUILD_RAILROAD_STATION :{WHITE}Aquí no es pot construir una estació de tren...
|
||||
STR_ERROR_CAN_T_BUILD_BUS_STATION :{WHITE}No es pot construir una parada d'autobús...
|
||||
STR_ERROR_CAN_T_BUILD_BUS_STATION :No es pot construir una parada d'autobús...
|
||||
STR_ERROR_CAN_T_BUILD_TRUCK_STATION :{WHITE}No es pot construir estació de mercaderies...
|
||||
STR_ERROR_CAN_T_BUILD_PASSENGER_TRAM_STATION :{WHITE}No puc construir l'estació de tramvies de passatgers
|
||||
STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION :{WHITE}No puc construir l'estació de tramvies de càrrega
|
||||
STR_ERROR_CAN_T_BUILD_CARGO_TRAM_STATION :No es pot construir l'estació de tramvies de càrrega
|
||||
STR_ERROR_CAN_T_BUILD_DOCK_HERE :{WHITE}Aquí no es pot construir un port...
|
||||
STR_ERROR_CAN_T_BUILD_AIRPORT_HERE :Aquí no es pot construir un aeroport...
|
||||
|
||||
@@ -5186,10 +5210,10 @@ STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING :{WHITE}Fusiona
|
||||
STR_ERROR_STATION_TOO_SPREAD_OUT :{WHITE}... estació massa extensa
|
||||
STR_ERROR_STATION_DISALLOWED_NUMBER_TRACKS :{WHITE}... nombre de vies no vàlid
|
||||
STR_ERROR_STATION_DISALLOWED_LENGTH :{WHITE}... llargada no vàlida
|
||||
STR_ERROR_TOO_MANY_STATIONS_LOADING :massa estacions/àrees de càrrega
|
||||
STR_ERROR_TOO_MANY_STATION_SPECS :hi ha massa parts d'estacions de tren.
|
||||
STR_ERROR_TOO_MANY_BUS_STOPS :massa parades d'autobús
|
||||
STR_ERROR_TOO_MANY_TRUCK_STOPS :{WHITE}Masses estacions de càrrega
|
||||
STR_ERROR_TOO_MANY_STATIONS_LOADING :Massa estacions/àrees de càrrega
|
||||
STR_ERROR_TOO_MANY_STATION_SPECS :Hi ha massa parts d'estacions de tren.
|
||||
STR_ERROR_TOO_MANY_BUS_STOPS :Massa parades d'autobús
|
||||
STR_ERROR_TOO_MANY_TRUCK_STOPS :Massa estacions de càrrega
|
||||
STR_ERROR_TOO_CLOSE_TO_ANOTHER_DOCK :{WHITE}Massa prop d'un altre moll
|
||||
STR_ERROR_TOO_CLOSE_TO_ANOTHER_AIRPORT :{WHITE}Massa prop d'un altre aeroport
|
||||
STR_ERROR_CAN_T_RENAME_STATION :{WHITE}No es pot canviar el nom de l'estació...
|
||||
@@ -5255,17 +5279,18 @@ STR_ERROR_INCOMPATIBLE_RAIL_TYPES :Tipus de rail i
|
||||
|
||||
STR_ERROR_CAN_T_MOVE_VEHICLE :{WHITE}No es pot moure el vehicle...
|
||||
STR_ERROR_REAR_ENGINE_FOLLOW_FRONT :{WHITE}La màquina posterior sempre ha de seguir la seva parella davantera
|
||||
STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :{WHITE}Incapaç de trobar el camí a la cotxera local
|
||||
STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :{WHITE}Impossible trobar la cotxera local
|
||||
STR_ERROR_UNABLE_TO_FIND_ROUTE_TO :No es pot trobar el camí a la cotxera local.
|
||||
STR_ERROR_UNABLE_TO_FIND_LOCAL_DEPOT :Impossible trobar la cotxera local
|
||||
STR_ERROR_UNABLE_TO_FIND_LOCAL_HANGAR :Impossible trobar l'hangar local
|
||||
|
||||
STR_ERROR_DEPOT_WRONG_DEPOT_TYPE :Tipus de cotxera incorrecta
|
||||
|
||||
# Depot unbunching related errors
|
||||
STR_ERROR_UNBUNCHING_ONLY_ONE_ALLOWED :{WHITE}... cada llista d'ordres només pot tenir una ordre d'espaiar.
|
||||
STR_ERROR_UNBUNCHING_NO_FULL_LOAD :{WHITE}... no es poden fer servir ordres de càrrega completa quan el vehicle té una ordre d'espaiat.
|
||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :no es poden espaiar vehicles que tenen una ordre de càrrega completa.
|
||||
STR_ERROR_UNBUNCHING_NO_CONDITIONAL :{WHITE}... no pot fer servir ordres condicionals quan un vehicle té una ordre d'espaiat.
|
||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :els vehicles no es poden espaiar si tenen ordres condicionals.
|
||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_FULL_LOAD :No es poden espaiar vehicles que tenen una ordre de càrrega completa.
|
||||
STR_ERROR_UNBUNCHING_NO_CONDITIONAL :No poden fer servir ordres condicionals quan un vehicle té una ordre d'espaiat.
|
||||
STR_ERROR_UNBUNCHING_NO_UNBUNCHING_CONDITIONAL :Els vehicles no es poden espaiar si tenen ordres condicionals.
|
||||
|
||||
# Autoreplace related errors
|
||||
STR_ERROR_TRAIN_TOO_LONG_AFTER_REPLACEMENT :{WHITE}{VEHICLE} és massa llarg després de la substitució
|
||||
@@ -5307,7 +5332,7 @@ STR_ERROR_NO_SUITABLE_ROAD :{WHITE}No hi ha
|
||||
STR_ERROR_NO_SUITABLE_TRAMWAY :{WHITE}No hi ha vies de tramvia adequades.
|
||||
|
||||
# Waterway construction errors
|
||||
STR_ERROR_CAN_T_BUILD_CANALS :{WHITE}Aquí no es poden construir canals...
|
||||
STR_ERROR_CAN_T_BUILD_CANALS :Aquí no es poden construir canals...
|
||||
STR_ERROR_CAN_T_BUILD_LOCKS :{WHITE}Aquí no es pot construir una resclosa...
|
||||
STR_ERROR_CAN_T_PLACE_RIVERS :{WHITE}Aquí no es poden posar rius...
|
||||
STR_ERROR_MUST_BE_BUILT_ON_WATER :{WHITE}...s'ha de construir sobre l'aigua.
|
||||
@@ -5324,23 +5349,27 @@ STR_ERROR_TREE_WRONG_TERRAIN_FOR_TREE_TYPE :{WHITE}... el t
|
||||
STR_ERROR_CAN_T_PLANT_TREE_HERE :{WHITE}Aquí no es poden plantar arbres...
|
||||
|
||||
# Bridge related errors
|
||||
STR_ERROR_CAN_T_BUILD_BRIDGE_HERE :{WHITE}Aquí no es pot construir el pont...
|
||||
STR_ERROR_CAN_T_BUILD_BRIDGE_HERE :Aquí no es pot construir el pont...
|
||||
STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST :{WHITE}...abans s'ha d'enderrocar el pont.
|
||||
STR_ERROR_CAN_T_START_AND_END_ON :no es pot començar i acabar a la mateixa posició.
|
||||
STR_ERROR_CAN_T_START_AND_END_ON :No es pot començar i acabar a la mateixa posició.
|
||||
STR_ERROR_BRIDGEHEADS_NOT_SAME_HEIGHT :{WHITE}Les capçaleres del pont no són al mateix nivell
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN :{WHITE}El pont és massa baix pel terreny
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TERRAIN :El pont és massa baix per al terreny.
|
||||
STR_ERROR_BRIDGE_TOO_HIGH_FOR_TERRAIN :{WHITE}El pont és massa alt per a aquest terreny.
|
||||
STR_ERROR_START_AND_END_MUST_BE_IN :{WHITE}Inici i final han d'estar en línia recta
|
||||
STR_ERROR_ENDS_OF_BRIDGE_MUST_BOTH :{WHITE}... els extrems del pont han d'estar tots dos a terra
|
||||
STR_ERROR_BRIDGE_TOO_LONG :{WHITE}... el pont és massa llarg
|
||||
STR_ERROR_BRIDGE_THROUGH_MAP_BORDER :{WHITE}El pont acabaria fora del mapa
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION :{WHITE}El pont és {HEIGHT} massa baix per a l'estació.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADSTOP :{WHITE}El pont és {HEIGHT} massa baix per a la parada de carretera.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_DOCK :{WHITE}El pont és {HEIGHT} massa baix per al moll.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :{WHITE}El pont és {HEIGHT} massa baix per a la boia.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :{WHITE}El pont és {HEIGHT} massa baix per al punt de pas.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :{WHITE}El pont és {HEIGHT} massa baix per al punt de pas de carretera.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :{WHITE}El pont és {HEIGHT} massa baix per a la resclosa.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_STATION :El pont és {HEIGHT} massa baix per a l'estació.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADSTOP :El pont és {HEIGHT} massa baix per a la parada de carretera.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_DOCK :El pont és {HEIGHT} massa baix per al moll.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :El pont és {HEIGHT} massa baix per a la boia.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :El pont és {HEIGHT} massa baix per al punt de pas.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :El pont és {HEIGHT} massa baix per al punt de pas de carretera.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :El pont és {HEIGHT} massa baix per a la resclosa.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :El pont és {HEIGHT} massa baix per a la cotxera de trens.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :El pont és {HEIGHT} massa baix per a les cotxeres de vehicles de carretera.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :El pont és {HEIGHT} massa baix per a la drassana.
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :El pont és {HEIGHT} massa baix per a l'objecte.
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Aquí no es pot construir el túnel...
|
||||
@@ -5352,7 +5381,7 @@ STR_ERROR_UNABLE_TO_EXCAVATE_LAND :{WHITE}Impossib
|
||||
STR_ERROR_TUNNEL_TOO_LONG :{WHITE}... túnel massa llarg
|
||||
|
||||
# Object related errors
|
||||
STR_ERROR_TOO_MANY_OBJECTS :massa objectes
|
||||
STR_ERROR_TOO_MANY_OBJECTS :Massa objectes
|
||||
STR_ERROR_CAN_T_BUILD_OBJECT :{WHITE}No es pot construir l'objecte...
|
||||
STR_ERROR_OBJECT_IN_THE_WAY :{WHITE}Objecte en el camí
|
||||
STR_ERROR_COMPANY_HEADQUARTERS_IN :{WHITE}... seu de la companyia en el camí
|
||||
@@ -5410,9 +5439,9 @@ STR_ERROR_CAN_T_SEND_AIRCRAFT_TO_HANGAR :{WHITE}No es po
|
||||
|
||||
###length VEHICLE_TYPES
|
||||
STR_ERROR_CAN_T_BUY_TRAIN :{WHITE}No es pot comprar el vehicle ferroviari...
|
||||
STR_ERROR_CAN_T_BUY_ROAD_VEHICLE :{WHITE}No es pot comprar l'automòbil...
|
||||
STR_ERROR_CAN_T_BUY_SHIP :{WHITE}No es pot comprar el vaixell...
|
||||
STR_ERROR_CAN_T_BUY_AIRCRAFT :{WHITE}No es pot comprar l'avió...
|
||||
STR_ERROR_CAN_T_BUY_ROAD_VEHICLE :No es pot comprar l'automòbil...
|
||||
STR_ERROR_CAN_T_BUY_SHIP :No es pot comprar el vaixell...
|
||||
STR_ERROR_CAN_T_BUY_AIRCRAFT :No es pot comprar l'aeronau...
|
||||
|
||||
###length VEHICLE_TYPES
|
||||
STR_ERROR_CAN_T_RENAME_TRAIN_TYPE :{WHITE}No es pot canviar el nom del tipus de vehicle ferroviari...
|
||||
@@ -5438,10 +5467,10 @@ STR_ERROR_CAN_T_AUTOREPLACE_ROAD_VEHICLE :{WHITE}Hi ha ve
|
||||
STR_ERROR_CAN_T_AUTOREPLACE_SHIP :{WHITE}Hi ha vaixells que no es poden autoreemplaçar...
|
||||
STR_ERROR_CAN_T_AUTOREPLACE_AIRCRAFT :{WHITE}Hi ha aeronaus que no es poden autoreemplaçar...
|
||||
|
||||
STR_ERROR_TOO_MANY_VEHICLES_IN_GAME :{WHITE}Massa vehicles en joc
|
||||
STR_ERROR_TOO_MANY_VEHICLES_IN_GAME :Massa vehicles en joc
|
||||
STR_ERROR_CAN_T_CHANGE_SERVICING :{WHITE}No es pot canviar l'interval de les revisions...
|
||||
|
||||
STR_ERROR_VEHICLE_IS_DESTROYED :vehicle destruït
|
||||
STR_ERROR_VEHICLE_IS_DESTROYED :Vehicle destruït
|
||||
|
||||
STR_ERROR_CAN_T_CLONE_VEHICLE_LIST :{WHITE}... no tots els vehicles són idèntics.
|
||||
|
||||
@@ -5466,7 +5495,7 @@ STR_ERROR_AIRCRAFT_IS_IN_FLIGHT :{WHITE}L'avió
|
||||
|
||||
# Order related errors
|
||||
STR_ERROR_NO_MORE_SPACE_FOR_ORDERS :{WHITE}...no hi ha més espai disponible per ordres.
|
||||
STR_ERROR_TOO_MANY_ORDERS :massa ordres
|
||||
STR_ERROR_TOO_MANY_ORDERS :Massa ordres
|
||||
STR_ERROR_CAN_T_INSERT_NEW_ORDER :{WHITE}No es pot afegir una nova ordre...
|
||||
STR_ERROR_CAN_T_DELETE_THIS_ORDER :Aquesta ordre no es pot esborrar...
|
||||
STR_ERROR_CAN_T_MODIFY_THIS_ORDER :{WHITE}No es pot modificar aquesta ordre...
|
||||
@@ -5474,8 +5503,8 @@ STR_ERROR_CAN_T_MOVE_THIS_ORDER :{WHITE}Impossib
|
||||
STR_ERROR_CAN_T_SKIP_ORDER :{WHITE}Impossible saltar l'ordre actual...
|
||||
STR_ERROR_CAN_T_SKIP_TO_ORDER :{WHITE}Impossible saltar l'ordre seleccionada...
|
||||
STR_ERROR_CAN_T_COPY_SHARE_ORDER :{WHITE}... el vehicle no pot anar a totes les estacions
|
||||
STR_ERROR_CAN_T_ADD_ORDER :el vehicle no pot anar a aquesta estació.
|
||||
STR_ERROR_CAN_T_ADD_ORDER_SHARED :un vehicle que comparteix aquesta ordre no pot anar a aquesta estació.
|
||||
STR_ERROR_CAN_T_ADD_ORDER :El vehicle no pot anar a aquesta estació.
|
||||
STR_ERROR_CAN_T_ADD_ORDER_SHARED :Un vehicle que comparteix aquesta ordre no pot anar a aquesta estació.
|
||||
STR_ERROR_CAN_T_COPY_ORDER_VEHICLE_LIST :{WHITE}... no tots els vehicles tenen les mateixes ordres.
|
||||
STR_ERROR_CAN_T_SHARE_ORDER_VEHICLE_LIST :{WHITE}... no tots els vehicles comparteixen ordres.
|
||||
|
||||
@@ -5508,7 +5537,7 @@ STR_ERROR_TIMETABLE_INCOMPLETE :{WHITE}... l'ho
|
||||
STR_ERROR_TIMETABLE_NOT_STARTED :{WHITE}... l'horari encara no ha començat.
|
||||
|
||||
# Sign related errors
|
||||
STR_ERROR_TOO_MANY_SIGNS :massa senyals
|
||||
STR_ERROR_TOO_MANY_SIGNS :Massa senyals
|
||||
STR_ERROR_CAN_T_PLACE_SIGN_HERE :{WHITE}Aquí no es pot situar un senyal...
|
||||
STR_ERROR_CAN_T_CHANGE_SIGN_NAME :{WHITE}No es pot canviar el nom del senyal...
|
||||
STR_ERROR_CAN_T_DELETE_SIGN :El senyal no es pot esborrar...
|
||||
|
||||
@@ -718,7 +718,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 let (čtvrtletně)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 let (ročně)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Zobrazit nebo skrýt graf pro tento rozsah dat
|
||||
STR_GRAPH_SELECT_SCALE :Změnit vodorovné měřítko grafu
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ceny za přepravu nákladu
|
||||
|
||||
+15
-3
@@ -525,6 +525,7 @@ STR_AIRCRAFT_MENU_AIRPORT_CONSTRUCTION :Lufthavnskonstr
|
||||
STR_LANDSCAPING_MENU_LANDSCAPING :Landskabsværktøjer
|
||||
STR_LANDSCAPING_MENU_PLANT_TREES :Plant træer
|
||||
STR_LANDSCAPING_MENU_PLACE_SIGN :Placer skilt
|
||||
STR_LANDSCAPING_MENU_PLACE_OBJECT :Placer objekt
|
||||
|
||||
# Music menu
|
||||
STR_TOOLBAR_SOUND_MUSIC :Lyd/Musik
|
||||
@@ -630,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 år (quarterly)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 år (yearly)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Slå graf til/fra for dette dataområde
|
||||
STR_GRAPH_SELECT_SCALE :Ændre grafens vandrette skala
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Lastudbetalingsrater
|
||||
@@ -1351,6 +1351,7 @@ STR_CONFIG_SETTING_CONSTRUCTION_COSTS_HIGH :Høj
|
||||
STR_CONFIG_SETTING_RECESSIONS :Kriser: {STRING}
|
||||
STR_CONFIG_SETTING_RECESSIONS_HELPTEXT :Hvis aktiveret, kan lavkonjunktur forekomme hvert par år. Under en lavkonjunktur er al produktion væsentligt lavere (den vender tilbage til tidligere niveau, når recessionen er forbi)
|
||||
|
||||
STR_CONFIG_SETTING_TRAIN_FLIP_REVERSE :Tillad tog at vende ved tilbage kørsel: {STRING}
|
||||
|
||||
###length 3
|
||||
|
||||
@@ -1557,7 +1558,11 @@ STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE :Skalér industr
|
||||
STR_CONFIG_SETTING_INDUSTRY_CARGO_SCALE_HELPTEXT :Skaler industriens gods produktion med denne procentdel
|
||||
STR_CONFIG_SETTING_CARGO_SCALE_VALUE :{NUM}%
|
||||
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE :Betalings aldrings sats for skala gods: {STRING}
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_HELPTEXT :Juster hvor hurtigt last lastet på et køretøj falder i værdi over tid
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_VALUE :{NUM}%
|
||||
###setting-zero-is-special
|
||||
STR_CONFIG_SETTING_CARGO_AGING_RATE_ZERO :Ingen forfald
|
||||
|
||||
STR_CONFIG_SETTING_AUTORENEW_VEHICLE :Automatisk fornyelse af gamle køretøjer: {STRING}
|
||||
STR_CONFIG_SETTING_AUTORENEW_VEHICLE_HELPTEXT :Når aktiveret, bliver et køretøjder nærmer sig sin afslutning af livet automatisk udskiftet, når betingelserne er opfyldt
|
||||
@@ -1901,6 +1906,8 @@ STR_CONFIG_SETTING_STATION_LENGTH_LOADING_PENALTY_HELPTEXT :Når den er akt
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS :Aktiver hastighedsbegrænsning for vogne: {STRING}
|
||||
STR_CONFIG_SETTING_WAGONSPEEDLIMITS_HELPTEXT :Når tilladt, brug også fartgrænse på vogne, for at bestemme makshastigheden på tog
|
||||
|
||||
STR_CONFIG_SETTING_AIRCRAFT_RANGE :Aktivér flyets maksimale rækkevidde: {STRING}
|
||||
STR_CONFIG_SETTING_AIRCRAFT_RANGE_HELPTEXT :Når det er aktiveret, vil NewGRF'er kunne begrænse flyets maksimale rækkevidde
|
||||
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS :Slå elektriske jernbaner fra: {STRING}
|
||||
STR_CONFIG_SETTING_DISABLE_ELRAILS_HELPTEXT :Tilladelse af denne indstilling slår nødvendigheden af elektrisk jernbaner fra, for at få elektriske tog til at kører
|
||||
@@ -3080,6 +3087,7 @@ STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Placér
|
||||
STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Definer ørkenområde.{}Hold Ctrl nede for at fjerne det.
|
||||
STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Forstør landområdet der skal sænkes/hæves
|
||||
STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Formindsk landområdet der skal sænkes/hæves
|
||||
STR_TERRAFORM_TOOLTIP_RAISE_A_CORNER_OF_LAND :{BLACK}Hæv et hjørne eller et område. Hvis størrelsen er 1x1, skal du klikke og trække for at hæve det første valgte hjørne og justere det valgte område til den nye hjørnehøjde. Ctrl+klik+træk for at vælge området diagonalt. Tryk også på Shift for kun at vise omkostningsestimatet.
|
||||
STR_TERRAFORM_TOOLTIP_GENERATE_RANDOM_LAND :{BLACK}Generer tilfældigt land
|
||||
STR_TERRAFORM_SE_NEW_WORLD :{BLACK}Opret nyt scenarie
|
||||
STR_TERRAFORM_RESET_LANDSCAPE :{BLACK}Nulstil landskab
|
||||
@@ -4572,8 +4580,8 @@ STR_VEHICLE_DETAILS_ROAD_VEHICLE_RENAME :{BLACK}Giv kør
|
||||
STR_VEHICLE_DETAILS_SHIP_RENAME :{BLACK}Giv skibet et navn
|
||||
STR_VEHICLE_DETAILS_AIRCRAFT_RENAME :{BLACK}Navngiv flyet
|
||||
|
||||
STR_VEHICLE_INFO_AGE :{COMMA} år ({COMMA})
|
||||
STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år ({COMMA})
|
||||
STR_VEHICLE_INFO_AGE :{COMMA} år{P "" s} (lifetime: {COMMA} år{P "" s})
|
||||
STR_VEHICLE_INFO_AGE_RED :{RED}{COMMA} år{P "" s} (lifetime: {COMMA} år{P "" s})
|
||||
STR_VEHICLE_INFO_AGE_RUNNING_COST_YR :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftsomkostninger: {LTBLUE}{CURRENCY_LONG}/år
|
||||
STR_VEHICLE_INFO_AGE_RUNNING_COST_PERIOD :{BLACK}Alder: {LTBLUE}{STRING}{BLACK} Driftsomkostninger: {LTBLUE}{CURRENCY_LONG}/periode
|
||||
|
||||
@@ -4587,6 +4595,7 @@ STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR :{BLACK}Overskud
|
||||
STR_VEHICLE_INFO_PROFIT_THIS_YEAR_LAST_YEAR_MIN_PERFORMANCE :{BLACK}Årets resultat: {LTBLUE}{CURRENCY_LONG} (sidste år: {CURRENCY_LONG}) {BLACK}Mindste ydeevne: {LTBLUE}{POWER_TO_WEIGHT}
|
||||
STR_VEHICLE_INFO_PROFIT_THIS_PERIOD_LAST_PERIOD :{BLACK}Profit denne periode: {LTBLUE}{CURRENCY_LONG} (sidste periode: {CURRENCY_LONG})
|
||||
STR_VEHICLE_INFO_PROFIT_THIS_PERIOD_LAST_PERIOD_MIN_PERFORMANCE :{BLACK}Profit denne periode: {LTBLUE}{CURRENCY_LONG} (sidste periode: {CURRENCY_LONG}) {BLACK}Min. ydeevne: {LTBLUE}{POWER_TO_WEIGHT}
|
||||
STR_VEHICLE_INFO_RELIABILITY_BREAKDOWNS :{BLACK}Pålidelighed: {LTBLUE}{COMMA}% (maks: {COMMA}%) {BLACK}Nedbrud siden sidste service: {LTBLUE}{COMMA}
|
||||
|
||||
STR_VEHICLE_INFO_BUILT_VALUE :{LTBLUE}{ENGINE} {BLACK}Bygget: {LTBLUE}{NUM}{BLACK} Værdi: {LTBLUE}{CURRENCY_LONG}
|
||||
STR_VEHICLE_INFO_NO_CAPACITY :{BLACK}Kapacitet: {LTBLUE}Ingen{STRING}
|
||||
@@ -5338,6 +5347,9 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :broen er {HEIGH
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :broen er {HEIGHT} for lav til et rutepunkt
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :broen er {HEIGHT} for lav til et rutepunkt
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :broen er {HEIGHT} for lav til slusen
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :broen er {HEIGHT} for lav til tog depotet
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :broen er {HEIGHT} for lav til bil depotet
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :broen er {HEIGHT} for lav til skibs depotet
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :{WHITE}Kan ikke bygge en tunnel her...
|
||||
|
||||
@@ -630,7 +630,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 jaar (per kwartaal)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 jaar (jaarlijks)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Grafiek weergeven-verbergen voor dit gegevensbereik
|
||||
STR_GRAPH_SELECT_SCALE :Horizontale schaal van grafiek aanpassen
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Vrachtprijzen
|
||||
|
||||
+21
-11
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 years (quarterly)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 years (yearly)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Toggle graph for this data range
|
||||
STR_GRAPH_SELECT_SCALE :Change horizontal scale of graph
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates
|
||||
@@ -647,14 +646,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Cargo History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Waiting
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Toggle graph of cargo waiting at this industry
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Cargo History
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this town
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this town
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this town
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Show detailed performance ratings
|
||||
|
||||
@@ -1660,12 +1666,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :None
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Improved
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicles: {STRING2}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the driving side
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicle driving side: {STRING2}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the road vehicle driving side.{}This can also affect signal side and semaphore graphics.{}It may require reloading the game for a change to take full effect
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Drive on left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Drive on right
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Right
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Heightmap rotation: {STRING2}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Choose which way the heightmap image is rotated to fit into the game world
|
||||
@@ -2888,22 +2894,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Delete collecti
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Are you sure you want to delete this collection?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Are you sure you want to delete this collection? There are items from disabled NewGRFs in it!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Select a station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Select a collection of stations to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Select a waypoint to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Select a collection of waypoints to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Select a bus station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Select a collection of bus stations to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a lorry station class to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a lorry station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a lorry station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Select a collection of lorry stations to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Select a collection of objects to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Select a collection of houses to display
|
||||
|
||||
@@ -5361,6 +5367,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :bridge is {HEIG
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :bridge is {HEIGHT} too low for rail waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :bridge is {HEIGHT} too low for road waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :bridge is {HEIGHT} too low for lock
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :bridge is {HEIGHT} too low for train depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :bridge is {HEIGHT} too low for road vehicle depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :bridge is {HEIGHT} too low for ship depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :bridge is {HEIGHT} too low for object
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Can't build tunnel here...
|
||||
|
||||
+21
-11
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 years (quarterly)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 years (yearly)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Toggle graph for this data range
|
||||
STR_GRAPH_SELECT_SCALE :Change horizontal scale of graph
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates
|
||||
@@ -647,14 +646,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Cargo History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Waiting
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Toggle graph of cargo waiting at this industry
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Cargo History
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this town
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this town
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this town
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Show detailed performance ratings
|
||||
|
||||
@@ -1660,12 +1666,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :None
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Improved
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicles: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the driving side
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicle driving side: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the road vehicle driving side.{}This can also affect signal side and semaphore graphics.{}It may require reloading the game for a change to take full effect
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Drive on left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Drive on right
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Right
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Heightmap rotation: {STRING}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Choose which way the heightmap image is rotated to fit into the game world
|
||||
@@ -2888,22 +2894,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Delete collecti
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Are you sure you want to delete this collection?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Are you sure you want to delete this collection? There are items from disabled NewGRFs in it!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Select a station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Select a collection of stations to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Select a waypoint to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Select a collection of waypoints to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Select a bus station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Select a collection of bus stations to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a truck station class to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a truck station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a truck station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Select a collection of truck stations to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Select a collection of objects to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Select a collection of houses to display
|
||||
|
||||
@@ -5361,6 +5367,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :bridge is {HEIG
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :bridge is {HEIGHT} too low for rail waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :bridge is {HEIGHT} too low for road waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :bridge is {HEIGHT} too low for lock
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :bridge is {HEIGHT} too low for train depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :bridge is {HEIGHT} too low for road vehicle depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :bridge is {HEIGHT} too low for ship depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :bridge is {HEIGHT} too low for object
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Can't build tunnel here...
|
||||
|
||||
+21
-11
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 years (quarterly)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 years (yearly)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Toggle graph for this data range
|
||||
STR_GRAPH_SELECT_SCALE :Change horizontal scale of graph
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Cargo Payment Rates
|
||||
@@ -647,14 +646,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Cargo History
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this industry
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Waiting
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Toggle graph of cargo waiting at this industry
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Cargo History
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Produced
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Toggle graph of cargo produced by this town
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transported
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Toggle graph of cargo transported from this town
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Delivered
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Toggle graph of cargo delivered to this town
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Show detailed performance ratings
|
||||
|
||||
@@ -1660,12 +1666,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :None
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Original
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Improved
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicles: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the driving side
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Road vehicle driving side: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Choose the road vehicle driving side.{}This can also affect signal side and semaphore graphics.{}It may require reloading the game for a change to take full effect
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Drive on left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Drive on right
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Left
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Right
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Heightmap rotation: {STRING}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Choose which way the heightmap image is rotated to fit into the game world
|
||||
@@ -2888,22 +2894,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Delete collecti
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Are you sure you want to delete this collection?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Are you sure you want to delete this collection? There are items from disabled NewGRFs in it!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Select a station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Select a station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Select a collection of stations to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Select a waypoint class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Select a waypoint to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Select a collection of waypoints to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Select a bus station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Select a bus station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Select a collection of bus stations to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a truck station class to display
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Select a truck station class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Select a truck station type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Select a collection of truck stations to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Select an object class to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Select an object type to build. Ctrl+Click to add or remove in saved items. Ctrl+Click+Drag to select the area diagonally. Also press Shift to show cost estimate only
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Select a collection of objects to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Select a town zone to display. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Select a house type to build. Ctrl+Click to add or remove in saved items
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Select a collection of houses to display
|
||||
|
||||
@@ -5361,6 +5367,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :bridge is {HEIG
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :bridge is {HEIGHT} too low for rail waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :bridge is {HEIGHT} too low for road waypoint
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :bridge is {HEIGHT} too low for lock
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :bridge is {HEIGHT} too low for train depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :bridge is {HEIGHT} too low for road vehicle depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :bridge is {HEIGHT} too low for ship depot
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :bridge is {HEIGHT} too low for object
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Can't build tunnel here...
|
||||
|
||||
+18
-8
@@ -719,7 +719,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 jaroj (po jarkvarono)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 jaroj (po jaro)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :{BLACK}Baskulu diagramon de tiu ŝarĝotipo
|
||||
STR_GRAPH_SELECT_SCALE :Ŝanĝi horizontalan skalon de diagramoj
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ŝarĝpagaj tarifoj
|
||||
@@ -735,14 +734,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Historio de ŝarĝo
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Produktita
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Baskuli diagramon de ŝarĝoj, produktataj de tiu ĉi entrepreno
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Transportita
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Baskuligi diagramon de ŝarĝoj, transportataj de tiu ĉi entrepreno
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Liverita
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Baskuligi diagramon de ŝarĝoj, liverataj al tiu ĉi entrepreno
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Atendita
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Baskuligi diagramon de ŝarĝoj, atendantaj ĉe tiu ĉi entrepreno
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Historio de ŝarĝo
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Provizita
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Baskuligi diagramon de ŝarĝoj, produktataj de tiu ĉi urbo
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Transportita
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Baskuligi diagramon de ŝarĝoj, transportataj de tiu ĉi urbo
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Liverita
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Baskuligi diagramon de ŝarĝoj, liverataj al tiu ĉi urbo
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Montri detalaj rendimentpritaksoj
|
||||
|
||||
@@ -1752,7 +1758,7 @@ STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :originala
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :plibonigita
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Trafikflanko: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Elektu, sur kiu flanko de la vojo veturas stratveturiloj
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Elektu, sur kiu flanko de la vojo veturas stratveturiloj.{}Ĉi tio povas ankaŭ influi la grafikojn de signaliloj.{}Rekomencado de la ludo povas esti bezonata por tuta efekto
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :maldekstra
|
||||
@@ -2981,22 +2987,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Forigi kolekton
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Ĉu vi certas, ke vi volas forigi ĉi tiun kolekton?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Ĉu vi certas, ke vi volas forigi ĉi tiun kolekton? Ĝi enhavas erojn de malŝaltitaj NewGRF-dosieroj!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Elektu klason de stacioj por montri
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Elektu klason de stacioj por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Elektu tipon de stacio por konstrui. Stir-klako aldonas aŭ forigas la stacion kiel konservita
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Elekti kolekton de stacioj por montrado
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Elektu klason de vojpunktoj por montri
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Elektu klason de vojpunktoj por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Elektu vojpunkton por konstrui. Stir-klako aldonas aŭ forigas la vojpunkton kiel konservita
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Elekti kolekton de vojpunktoj por montrado
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Elektu klason de bushaltejoj por montri
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Elektu klason de bushaltejoj por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Elektu tipon de bushaltejo por konstrui. Stir-klako aldonas aŭ forigas la bushaltejon kiel konservita
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Elekti kolekton de bushaltejoj por montrado
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Elektu klason de ŝarĝstacioj por montri
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Elektu klason de ŝarĝstacioj por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Elektu tipon de ŝarĝstacio por konstrui. Stir-klako aldonas aŭ forigas la ŝarĝstacion kiel konservita
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Elekti kolekton de ŝarĝstacioj por montrado
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Elektu klason de objektoj por montri
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Elektu klason de objektoj por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Elektu tipon de objekto por konstrui. Stir-klako aldonas aŭ forigas la objekton kiel konservita. Stir-klako kaj ŝovo elektas diagonalan areon. Ankaŭ premu majuskligan klavon por nur montri kostotakson
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Elekti kolekton de objektoj por montrado
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Elektu urbodistrikton por montri
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Elektu urbodistrikton por montri. Stir+Klaku por aldoni aŭ forigi en la listo de konservitaj eroj
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Elektu tipon de domo por konstrui. Stir-klako aldonas aŭ forigas la objekton kiel konservita
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Elekti kolekton de domoj por montrado
|
||||
|
||||
@@ -5466,6 +5472,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :ponto estas tro
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :ponto estas tro malalta (je {HEIGHT}) por relvojpunkto
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :ponto estas tro malalta (je {HEIGHT}) por strata vojpunkto
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :ponto estas tro malalta (je {HEIGHT}) por kluzo
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :ponto estas {HEIGHT} tro malalta por vagonartenejo
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :ponto estas {HEIGHT} tro malalta por stratveturila garaĝo
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :ponto estas {HEIGHT} tro malalta por ŝipgaraĝo
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :ponto estas {HEIGHT} tro malalta por objekto
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Ne povas konstrui tunelon ĉi tie...
|
||||
|
||||
+627
-349
File diff suppressed because it is too large
Load Diff
+22
-12
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 vuotta (neljännesvuosittain)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 vuotta (vuosittain)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Valitse, näytetäänkö tämän osion kuvaaja
|
||||
STR_GRAPH_SELECT_SCALE :Muuta kuvaajan vaaka-asteikkoa
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Rahtitaksat
|
||||
@@ -647,14 +646,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} – rahtihistoria
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Tuotettu
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Valitse, näytetäänkö tämän laitoksen tuottaman rahdin kuvaaja
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Kuljetettu
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Valitse, näytetäänkö tältä laitokselta kuljetetun rahdin kuvaaja
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Toimitettu
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Valitse, näytetäänkö tälle laitokselle toimitetun rahdin kuvaaja
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Odottava
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Valitse, näytetäänkö tällä laitoksella odottavan rahdin kuvaaja
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} – rahtihistoria
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Tuotettu
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Valitse, näytetäänkö tämän kunnan tuottaman rahdin kuvaaja
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Kuljetettu
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Valitse, näytetäänkö tästä kunnasta kuljetetun rahdin kuvaaja
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Toimitettu
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Valitse, näytetäänkö tähän kuntaan toimitetun rahdin kuvaaja
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Näytä tarkat suorituskykyarviot
|
||||
|
||||
@@ -1660,12 +1666,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :Ei mitään
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Alkuperäinen
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Parannettu
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Ajoneuvot: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Valitse ajokaista
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Ajoneuvoliikenteen ajopuoli: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Valitse, kummalla puolella tietä ajoneuvot kulkevat.{}Tämä voi myös vaikuttaa siihen, kummalle puolelle rataa opastimet sijoittuvat, sekä siipiopastimien grafiikkaan.{}Saatat joutua lataamaan pelin uudestaan, jotta muutos toteutuisi kokonaan
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Vasemmanpuolinen liikenne
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Oikeanpuolinen liikenne
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Vasemmalla
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Oikealla
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Korkeuskartan pyöritys:{STRING}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Valitse, mihin suuntaan korkeuskartan kuvaa kierretään pelimaailmaan sopiakseen
|
||||
@@ -2888,22 +2894,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Poista kokoelma
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Haluatko varmasti poistaa tämän kokoelman?
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Haluatko varmasti poistaa tämän kokoelman? Se sisältää kohteita käytöstä poistetuista NewGRF:istä!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Valitse näytettävä asemien luokka
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Valitse näytettävä asemien luokka. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Valitse rakennettavan aseman tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Valitse näytettävä asemakokoelma
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Valitse näytettävä reittipisteiden luokka
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Valitse näytettävä reittipisteiden luokka. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Valitse rakennettava reittipiste. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Valitse näytettävä reittipistekokoelma
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Valitse näytettävä linja-autopysäkkien luokka
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Valitse näytettävä linja-autopysäkkien luokka. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Valitse rakennettavan linja-autopysäkin tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Valitse näytettävä linja-autoasemakokoelma
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Valitse näytettävä lastauslaitureiden luokka
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Valitse näytettävä lastauslaitureiden luokka. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Valitse rakennettavan lastauslaiturin tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Valitse näytettävä lastauslaiturikokoelma
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Valitse näytettävä objektien luokka
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Valitse näytettävä objektien luokka. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Valitse rakennettavan objektin tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista. Ctrl+napsautus+veto valitsee alueen vinottain. Paina lisäksi vaihtonäppäintä nähdäksesi vain kustannusarvion
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Valitse näytettävä objektikokoelma
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Valitse näytettävä kunnan vyöhyke
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Valitse näytettävä kunnan vyöhyke. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Valitse rakennettavan talon tyyppi. Ctrl+napsautus lisää tallennettuihin tai poistaa tallennetuista
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Valitse näytettävä talokokoelma
|
||||
|
||||
@@ -3003,7 +3009,7 @@ STR_ROAD_NAME_TRAM :Raitiotie
|
||||
|
||||
# Road depot construction window
|
||||
STR_BUILD_DEPOT_ROAD_ORIENTATION_CAPTION :{WHITE}Autovarikon suunta
|
||||
STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse autovarikon suunta
|
||||
STR_BUILD_DEPOT_ROAD_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse ajoneuvovarikon suunta
|
||||
STR_BUILD_DEPOT_TRAM_ORIENTATION_CAPTION :{WHITE}Raitiotievarikon suunta
|
||||
STR_BUILD_DEPOT_TRAM_ORIENTATION_SELECT_TOOLTIP :{BLACK}Valitse raitiotievarikon suunta
|
||||
|
||||
@@ -5361,6 +5367,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :silta on {HEIGH
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :silta on {HEIGHT} liian matala rautatien reittipisteen ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :silta on {HEIGHT} liian matala tien reittipisteen ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :silta on {HEIGHT} liian matala sulun ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :silta on {HEIGHT} liian matala junavarikon ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :silta on {HEIGHT} liian matala ajoneuvovarikon ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :silta on {HEIGHT} liian matala telakan ylle
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :silta on {HEIGHT} liian matala objektin ylle
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Tähän ei voi rakentaa tunnelia…
|
||||
|
||||
@@ -632,7 +632,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 ans (trimestriel)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 ans (annuel)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Basculer le graphique pour les données de cette échelle
|
||||
STR_GRAPH_SELECT_SCALE :Modifier l'échelle horizontale du graphique
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Valeur des marchandises
|
||||
|
||||
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 años (trimestral)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 años (anualmente)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Amosar/ocultar gráfica para este rango de datas
|
||||
STR_GRAPH_SELECT_SCALE :Mudar escala horizontal do gráfico
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Taxas de pago por carga
|
||||
|
||||
@@ -631,7 +631,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 Jahre (vierteljährlich)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 Jahre (jährlich)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Diagramm für diesen Datenbereich umschalten
|
||||
STR_GRAPH_SELECT_SCALE :Horizontale Skala des Diagramms ändern
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Frachtbeförderungspreise
|
||||
|
||||
+21
-11
@@ -724,7 +724,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 έτη (τετραμηνιαία)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 έτη (ετήσια)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Εναλλαγή γραφήματος για αυτό το εύρος στοιχείων
|
||||
STR_GRAPH_SELECT_SCALE :Αλλαγή οριζόντιας κλίμακας γραφήματος
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Ποσοστά Πληρωμής Φορτίων
|
||||
@@ -740,14 +739,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Ιστορικό Εμπορευμάτων
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Παράχθηκε/αν
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που παράγεται από αυτή την βιομηχανία
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Μεταφέρθηκε/αν
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που μεταφέρεται από αυτή την βιομηχανία
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Παραδόθηκε
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που μεταφέρεται σε αυτή την βιομηχανία
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Αναμονή
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Εναλλαγή γραφήματος φορτίου που περιμένει σε αυτή την βιομηχανία
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Ιστορικό Εμπορευμάτων
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Παράχθηκε/αν
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που παράγεται από αυτή την πόλη
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Μεταφέρθηκε/αν
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που μεταφέρεται από αυτή την πόλη
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Παραδόθηκε
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Εναλλαγή γραφήματος φορτίου που μεταφέρεται σε αυτή την πόλη
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Εμφάνιση λεπτομεριών αποδόσεων
|
||||
|
||||
@@ -1753,12 +1759,12 @@ STR_CONFIG_SETTING_TREE_PLACER_NONE :Κανένας
|
||||
STR_CONFIG_SETTING_TREE_PLACER_ORIGINAL :Αυθεντικός
|
||||
STR_CONFIG_SETTING_TREE_PLACER_IMPROVED :Βελτιωμένος
|
||||
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Οδικά Οχήματα: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Επιλέξτε την πλευρά οδήγησης
|
||||
STR_CONFIG_SETTING_ROAD_SIDE :Πλευρά οδήγησης οδικών οχημάτων: {STRING}
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_HELPTEXT :Επιλέξτε την πλευρά οδήγησης του οδικού οχήματος.{}Αυτό μπορεί επίσης να επηρεάσει την πλευρά του σήματος και τα γραφικά του σηματοφόρου.{}Μπορεί να χρειαστεί να επαναφορτώσετε το παιχνίδι για να τεθεί σε πλήρη ισχύ μια αλλαγή.
|
||||
|
||||
###length 2
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Οδήγηση από τα αριστερά
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Οδήγηση από τα δεξιά
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_LEFT :Αριστερά
|
||||
STR_CONFIG_SETTING_ROAD_SIDE_RIGHT :Δεξιά
|
||||
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION :Περιστροφή χάρτη υψομετρίας: {STRING}
|
||||
STR_CONFIG_SETTING_HEIGHTMAP_ROTATION_TOOLTIP :Επιλέξτε με ποιον τρόπο θα περιστραφεί η εικόνα του ύψους χάρτη, για να ταιριάζει στον κόσμο του παιχνιδιού
|
||||
@@ -2981,22 +2987,22 @@ STR_PICKER_COLLECTION_DELETE_QUERY :Διαγραφ
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_TEXT :{YELLOW}Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτή τη συλλογή;
|
||||
STR_PICKER_COLLECTION_DELETE_QUERY_DISABLED_TEXT :{YELLOW}Είστε σίγουρος/η ότι θέλετε να διαγράψετε αυτή τη συλλογή; Υπάρχουν αντικείμενα από απενεργοποιημένα NewGRFs σε αυτήν!
|
||||
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Επιλογή κατηγορίας σταθμού για εμφάνιση
|
||||
STR_PICKER_STATION_CLASS_TOOLTIP :Επιλογή κατηγορίας σταθμού για εμφάνιση. Ctrl+κλικ για προσθήκη στα ή αφαίρεση από τα αποθηκευμένα αντικείμενα
|
||||
STR_PICKER_STATION_TYPE_TOOLTIP :Επιλογή τύπου σταθμού για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
|
||||
STR_PICKER_STATION_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από σταθμούς προς εμφάνιση
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Επιλογή κατηγορίας σημείου καθοδήγησης για εμφάνιση
|
||||
STR_PICKER_WAYPOINT_CLASS_TOOLTIP :Επιλογή κατηγορίας σημείου καθοδήγησης για εμφάνιση. Ctrl+κλικ για προσθήκη στα ή αφαίρεση από τα αποθηκευμένα αντικείμενα
|
||||
STR_PICKER_WAYPOINT_TYPE_TOOLTIP :Επιλογή σημείου καθοδήγησης για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
|
||||
STR_PICKER_WAYPOINT_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από σημεία καθοδήγησης προς εμφάνιση
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Επιλογή κατηγορίας στάσεων λεωφορείων για εμφάνιση
|
||||
STR_PICKER_ROADSTOP_BUS_CLASS_TOOLTIP :Επιλογή κατηγορίας στάσεων λεωφορείων για εμφάνιση. Ctrl+κλικ για προσθήκη στα ή αφαίρεση από τα αποθηκευμένα αντικείμενα
|
||||
STR_PICKER_ROADSTOP_BUS_TYPE_TOOLTIP :Επιλογή κατηγορίας στάσεων λεωφορείων για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
|
||||
STR_PICKER_ROADSTOP_BUS_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από σταθμούς λεωφορείων προς εμφάνιση
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Επιλογή κατηγορίας σταθμών φορτηγών προς εμφάνιση
|
||||
STR_PICKER_ROADSTOP_TRUCK_CLASS_TOOLTIP :Επιλογή κατηγορίας σταθμών φορτηγών για εμφάνιση
|
||||
STR_PICKER_ROADSTOP_TRUCK_TYPE_TOOLTIP :Επιλογή κατηγορίας σταθμών φορτηγών για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
|
||||
STR_PICKER_ROADSTOP_TRUCK_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από σταθμούς φορτηγών προς εμφάνιση
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση
|
||||
STR_PICKER_OBJECT_CLASS_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση. Ctrl+κλικ για προσθήκη στα ή αφαίρεση από τα αποθηκευμένα αντικείμενα
|
||||
STR_PICKER_OBJECT_TYPE_TOOLTIP :Επιλογή κατηγορίας αντικειμένων για εμφάνιση. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία. Ctrl+κλικ+σύρσιμο για να επιλεγεί διαγώνια περιοχή. Επίσης, πατήστε Shift για εμφάνιση εκτιμώμενου κόστους μόνο
|
||||
STR_PICKER_OBJECT_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από αντικείμενα προς εμφάνιση
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Επιλέξτε τη ζώνη της πόλης που θέλετε να εμφανίσετε
|
||||
STR_PICKER_HOUSE_CLASS_TOOLTIP :Επιλέξτε τη ζώνη της πόλης που θέλετε να εμφανίσετε. Ctrl+κλικ για προσθήκη στα ή αφαίρεση από τα αποθηκευμένα αντικείμενα
|
||||
STR_PICKER_HOUSE_TYPE_TOOLTIP :Επιλογή τύπου σπιτιού για κατασκευή. Ctrl+κλικ για προσθήκη σε ή αφαίρεση από αποθηκευμένα στοιχεία
|
||||
STR_PICKER_HOUSE_COLLECTION_TOOLTIP :Επιλέξτε μια συλλογή από σπίτια προς εμφάνιση
|
||||
|
||||
@@ -5462,6 +5468,10 @@ STR_ERROR_BRIDGE_TOO_LOW_FOR_BUOY :η γέφυρα
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_RAIL_WAYPOINT :η γέφυρα είναι πολύ χαμηλή κατά {HEIGHT} για σιδηροδρομικό σημείο καθοδήγησης
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROAD_WAYPOINT :η γέφυρα είναι πολύ χαμηλή κατά {HEIGHT} για οδικό σημείο καθοδήγησης
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_LOCK :η γέφυρα είναι πολύ χαμηλή κατά {HEIGHT} για κλείδωμα
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_TRAIN_DEPOT :η γέφυρα είναι {HEIGHT} πολύ χαμηλή για το αμαξοστάσιο τρένων
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_ROADVEH_DEPOT :η γέφυρα είναι {HEIGHT} πολύ χαμηλή για το αμαξοστάσιο οδικών οχημάτων
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_SHIP_DEPOT :η γέφυρα είναι {HEIGHT} πολύ χαμηλή για το ναυπηγείο πλοίων
|
||||
STR_ERROR_BRIDGE_TOO_LOW_FOR_OBJECT :η γέφυρα είναι {HEIGHT} πολύ χαμηλή για το αντικείμενο
|
||||
|
||||
# Tunnel related errors
|
||||
STR_ERROR_CAN_T_BUILD_TUNNEL_HERE :Δεν μπορεί να κατασκευαστεί σήραγγα εδώ...
|
||||
|
||||
@@ -694,7 +694,6 @@ STR_GRAPH_LAST_24_MONTHS :{TINY_FONT}{BLA
|
||||
STR_GRAPH_LAST_24_QUARTERS :{TINY_FONT}{BLACK}6 év (negyedévente)
|
||||
STR_GRAPH_LAST_24_YEARS :{TINY_FONT}{BLACK}24 év (évente)
|
||||
|
||||
STR_GRAPH_TOGGLE_RANGE :Grafikon megjelenítése ehhez az adatsorhoz
|
||||
STR_GRAPH_SELECT_SCALE :A grafikon vízszintes skálájának módosítása
|
||||
|
||||
STR_GRAPH_CARGO_PAYMENT_RATES_CAPTION :{WHITE}Rakományok szállítási díja
|
||||
@@ -710,14 +709,21 @@ STR_GRAPH_CARGO_PAYMENT_CARGO :{TINY_FONT}{BLA
|
||||
|
||||
STR_GRAPH_INDUSTRY_CAPTION :{WHITE}{INDUSTRY} - Rakománytörténet
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED :Előállított
|
||||
STR_GRAPH_INDUSTRY_RANGE_PRODUCED_TOOLTIP :Ezen iparág által által előállított rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED :Szállítva
|
||||
STR_GRAPH_INDUSTRY_RANGE_TRANSPORTED_TOOLTIP :Ezen iparágtól szállított rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED :Leszállítva
|
||||
STR_GRAPH_INDUSTRY_RANGE_DELIVERED_TOOLTIP :Ezen iparághoz szállított rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING :Várakozik
|
||||
STR_GRAPH_INDUSTRY_RANGE_WAITING_TOOLTIP :Ezen iparágnál várakozó rakomány grafikonjának mutatása be/ki
|
||||
|
||||
STR_GRAPH_TOWN_CARGO_CAPTION :{WHITE}{TOWN} - Rakománytörténet
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED :Előállított
|
||||
STR_GRAPH_TOWN_RANGE_PRODUCED_TOOLTIP :Az ebben a városban előállított rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED :Elszállítva
|
||||
STR_GRAPH_TOWN_RANGE_TRANSPORTED_TOOLTIP :Az ebből a városból szállított rakomány grafikonjának mutatása be/ki
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED :Leszállítva
|
||||
STR_GRAPH_TOWN_RANGE_DELIVERED_TOOLTIP :Az ebbe a városba szállított rakomány grafikonjának mutatása be/ki
|
||||
|
||||
STR_GRAPH_PERFORMANCE_DETAIL_TOOLTIP :{BLACK}Részletes teljesítményértékelés mutatása
|
||||
|
||||
@@ -3158,7 +3164,7 @@ STR_TREES_MODE_FOREST_LG_TOOLTIP :{BLACK}A tájon
|
||||
|
||||
# Land generation window (SE)
|
||||
STR_TERRAFORM_TOOLBAR_LAND_GENERATION_CAPTION :{WHITE}Táj szerkesztése
|
||||
STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Sziklás területek elhelyezése a térképen
|
||||
STR_TERRAFORM_TOOLTIP_PLACE_ROCKY_AREAS_ON_LANDSCAPE :{BLACK}Sziklás területek elhelyezése a térképen.{}Ctrl+kattintással a sziklás terület eltávolítása
|
||||
STR_TERRAFORM_TOOLTIP_DEFINE_DESERT_AREA :{BLACK}Sivatag létrehozása.{}Ctrl+kattintás a sivatag eltávolításához
|
||||
STR_TERRAFORM_TOOLTIP_INCREASE_SIZE_OF_LAND_AREA :{BLACK}Az emelendő/süllyesztendő földterület növelése
|
||||
STR_TERRAFORM_TOOLTIP_DECREASE_SIZE_OF_LAND_AREA :{BLACK}Az emelendő/süllyesztendő földterület csökkentése
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user