frosch and GitHub
fea6a34684
Codechange: SetDParamStr borrows contents from std::string::c_str(). Prevent calling it with temporaries. ( #10136 )
2022-11-05 17:14:10 +01:00
frosch and GitHub
aa06b73137
Codechange: Use positional parameters in the base language either for all or for no parameters. ( #10111 )
...
This should make it less confusing to translators.
2022-11-01 22:22:04 +01:00
frosch and Michael Lutz
f4e2a462fe
Cleanup: Remove unused flag sprites.
2022-10-16 14:56:52 +02:00
frosch and GitHub
bdc17b18e1
Cleanup: The readme is for people building/packaging OpenTTD. Player-focussed manuals are in the Wiki. ( #10026 )
2022-09-26 18:17:36 +02:00
frosch and frosch
e2c46fda3f
Fix: [NewGRF] Ensure that stations always have an even number of sprite layouts.
...
The drawing code has a special fallbacks for zero layouts, but fails hard for one layout.
(odd numbers >= 3 are weird, but do not fail as badly as 1)
2022-09-11 21:26:06 +02:00
frosch and frosch
5c66de860d
Fix: [NewGRF] Result bit 0 of callback 14 was not ignored in the GUI.
2022-09-11 21:26:06 +02:00
frosch and frosch
f7022925d3
Cleanup: [NewGRF] Callback 14 used a weird value for var10 in the GUI.
...
The value 0x2110000 probably originated from a mixup between callback 14 (sprite layout) and 24 (tile layout).
The latter does indeed use a var10 value like that.
2022-09-11 21:26:06 +02:00
frosch and GitHub
54ac304828
Fix: [NewGRF] Upper 16 random bits should be the same for all station tiles in callback 140. ( #9992 )
2022-09-03 22:37:03 +02:00
frosch and GitHub
9529703cab
Codechange: When checking industry placement conditions, perform cheap checks first. ( #9987 )
...
1. Built-in checks on industry level.
2. Built-in checks on industry tiles.
3. NewGRF-defined checks on industry level.
4. NewGRF-defined checks on industry tiles.
2022-09-01 18:13:43 +02:00
frosch and GitHub
acf9d786f1
Fix: [NewGRF] Default value of RailVehicleInfo::railveh_type was inconsistent with other default properties. ( #9967 )
...
If a NewGRF assigned neither "power" nor "dual-headed" properties,
then "railveh_type" defaulted to "singlehead-engine", while "power=0" said "it's a wagon".
2022-08-26 20:50:33 +02:00
frosch and GitHub
8028794bee
Fix #9811 , 9156d7b: Use the NewGRF-defined vehicle center when dragging ships and aircraft. ( #9812 )
...
The alignment using the total-width of the vehicle-chain was meant for articulated trains and road vehicles only.
2022-02-08 23:08:03 +01:00
frosch and GitHub
bc22e9333e
Fix: if vehicles only refit to cargo-slots >= 32, the default cargo was wrong. ( #9744 )
2021-12-12 17:35:41 +01:00
frosch and GitHub
5f6303f985
Fix: don't complain when the sprite font is missing glyphs. ( #9692 )
...
Silently auto-pick a suitable font.
2021-11-13 21:01:16 +01:00
frosch and GitHub
e8bff0ad03
Change: Suppress panning in intro game, while user is interacting with the GUI. ( #9645 )
2021-10-23 15:13:39 +02:00
frosch and frosch
111a47af0d
Codechange: rename 'info_view' to 'rotor_in_gui', because it is only used by helicopters.
2021-10-23 14:45:08 +02:00
frosch and frosch
bc984d9af5
Codechange: remove redundant 'info_view' parameter, it can be derived from 'image_type'.
2021-10-23 14:45:08 +02:00
frosch and GitHub
93fd42b0c3
Doc: guidelines on english.txt or translation changes in PRs. ( #9505 )
2021-08-22 14:27:48 +02:00
frosch and frosch
1da0ba95b2
Feature: Define refittability of default vehicles using cargo classes.
...
This ensures that default vehicles can transport any NewGRF defined cargos, albeit with weird graphics and vehicle names.
This also changes the refittability of default vehicles with default industries.
2021-05-13 23:28:43 +02:00
frosch and frosch
9f8d0b1bee
Fix: Resolve cargo-types of default vehicles via their cargo label.
...
Default vehicles now behave as if they had a cargo translation table. This fixes default vehicles carrying seemingly random cargos, if NewGRF industry sets are present.
This behavior is disabled, when a NewGRF touches any of the cargo-type or refitting properties. In that case it's up to the NewGRF to define its own cargo translation table.
2021-05-13 23:28:43 +02:00
frosch and frosch
a9ff296c3d
Codechange: add constant for number of original cargoes.
2021-05-13 23:28:43 +02:00
frosch and GitHub
5bd8144853
Fix #9256 , 12e43c697d: invalid read after free. ( #9258 )
...
This also changes ScriptEventVehicleAutoReplaced when replacing wagons:
The event is now only spawned, if the head engine changes, so only if the VehicleID of the consist changes.
Previously replacing wagons spawned an event with OldVehicleID==NewVehicleID.
2021-05-12 23:40:03 +02:00
frosch and frosch
f6d5c0136e
Codechange: make Window destruction not rely on undefined behavior.
2021-05-12 23:22:41 +02:00
frosch and frosch
f96f113951
Codechange: use IterateFromBack/Front only if the order is important.
...
Use Iterate if the order does not matter.
2021-05-12 23:22:41 +02:00
frosch and frosch
22567a1f43
Codechange: use iterators instead of 'subranges' when iterating from a specific window.
...
Using iterators makes it easier to include or exclude the start window in the iteration.
2021-05-12 23:22:41 +02:00
frosch and frosch
aba239479b
Codechange: remove excessive templating in favour of a single const_cast.
...
The const_cast will be removed again in a later commit.
2021-05-12 23:22:41 +02:00
frosch and frosch
95abdfdef9
Cleanup: remove unneeded labels and gotos.
...
The window list supports deletion of arbitrary windows, while iterating over it.
2021-05-12 23:22:41 +02:00
frosch and Charles Pigott
2cf5df2a50
Fix: [NewGRF] industry variable 66 and object variable 46 clamped the squared-euclidian distance to 16 bit, when they should not.
2021-05-02 13:45:43 +01:00
frosch and Charles Pigott
84aa17cea6
Fix: [NewGRF] industry variables 65 and 66 ignored the parameter, and always used the north tile.
2021-05-02 13:45:43 +01:00
frosch and frosch
57b4cc64b7
Add: Hindi translation.
2021-04-23 22:57:00 +02:00
frosch and frosch
8dda2c2c17
Change: move all 'unstable' language into 'stable'.
2021-04-23 22:57:00 +02:00
frosch and frosch
37222c3fa2
Change: treat languages as finished, if translations are 75% completed.
...
Unfinished translations are not auto-picked from the locale.
In release builds, unfinished translations are not offered in the GUI.
Unfinished translations are available in non-release builds, or by editing openttd.cfg.
2021-04-22 22:16:56 +02:00
frosch and frosch
a9740cef82
Add: show completion progress of languages in the language dropdown for non-release builds.
2021-04-22 22:16:56 +02:00
frosch and GitHub
c6781cbd44
Fix d4c3d01d: add plural form 14 to strgen. ( #8999 )
2021-04-10 18:09:04 +02:00
frosch and GitHub
0230624359
Fix f0f96e31: [OpenGL] warning: comparison of integer expressions of different signedness. ( #8881 )
2021-03-21 18:38:51 +01:00
frosch and frosch
f580ab4ba4
Fix #8647 : draw tram catenary using 4 bounding boxes.
...
The back sprite is now supposed to contain west, north and east pillars.
The front sprite is supposed to contain the south pillar and the wires.
2021-03-11 00:21:09 +01:00
frosch and frosch
28589db664
Fix: front/back sprites of action5 tram catenary were swapped.
2021-03-11 00:21:09 +01:00
frosch and Michael Lutz
dfa141818b
Fix: OpenGL cursor did not consider sprite offsets of cursor sprites.
2021-02-27 14:52:11 +01:00
frosch and Michael Lutz
d236c57600
Fix: yet another place where the vehicle-cursor did not account for the interface zoom level.
2021-02-27 14:52:11 +01:00
frosch and Charles Pigott
79c2b81ffd
Fix: vehicle-cursor size-limit did not account for the interface zoom level.
2021-02-24 08:00:42 +00:00
frosch and GitHub
d9b4413bc9
Codechange: rename sound ids to make more sense. ( #8701 )
2021-02-20 19:01:04 +01:00
frosch and frosch
5a1fa18509
Change: move the 'road drive side' selection to settings tree, and give it the same 'basic' visibilty as 'signal side'.
2021-02-14 23:14:07 +01:00
frosch and frosch
c71d0f5e7f
Change: move townname generator selection to mapgen GUI.
2021-02-14 23:14:07 +01:00
frosch and frosch
f513a807db
Codechange: move non-GUI code to non-GUI source files.
2021-02-14 23:14:07 +01:00
frosch and frosch
4ce941bbc2
Codechange: turn a constant variable into a real constant.
2021-02-14 23:14:07 +01:00
frosch and frosch
d17226910d
Codechange: minor rearrangement of settings in random map and heightmap GUI.
2021-02-14 23:14:07 +01:00
frosch and frosch
81e47277e7
Change: move the 'tree placer algorithm' selection to the settings tree window, and give it the same 'basic' visibility as 'in-game tree placement'.
2021-02-14 23:14:07 +01:00
frosch and GitHub
b3d048dfcf
Change: [NewGRF] industry special flag 19 now specifically targets only passenger production, instead of the second cargo of any water-based industry. ( #8590 )
...
This behavior is less surprising to NewGRF authors, and may even be intentional behavior for some industries.
2021-01-18 22:42:10 +01:00
frosch and GitHub
540fdfbf5a
Fix 0e62a398c7: Only center the window, when it is smaller than the screen. ( #8581 )
2021-01-16 23:36:15 +01:00
frosch and GitHub
0e62a398c7
Add: [SDL2] video driver parameter to put OpenTTD on a particular display on start. By default use the display where the mouse cursor is. ( #8572 )
2021-01-14 23:29:29 +01:00
frosch and frosch
e339188ded
Add: a go-to-location button to the LandInfo window.
2021-01-11 22:15:58 +01:00
frosch and frosch
1432dbac53
Add: another go-to-location button to the sign window.
2021-01-11 22:15:58 +01:00
frosch and frosch
5bfcd742b8
Change: Relocate rename and location buttons in all windows.
2021-01-11 22:15:58 +01:00
frosch and frosch
589feba0eb
Change: Relocate vehicle rename and location buttons.
2021-01-11 22:15:58 +01:00
frosch and frosch
8dda0ec4ff
Add: [NewGRF] new GUI sprites for 'rename' and 'go to location'.
2021-01-11 22:15:58 +01:00
frosch and frosch
f6abc81cf1
Fix: add missing variables to NewGRF inspect window.
2021-01-10 21:24:38 +01:00
frosch and frosch
868d84bbfc
Add: [NewGRF] vehicle variable 63 to test the tracktype of the current tile against a given tracktype.
2021-01-10 21:24:38 +01:00
frosch and frosch
5b08960560
Fix: [NewGRF] industry variables 69 to 71 did not check, whether the queried cargo is valid.
2021-01-10 21:24:38 +01:00
frosch and frosch
0078554d6a
Fix: GetCargoTranslation could return out-of-bounds index for old-style NewGRF using cargo-slots.
2021-01-10 21:24:38 +01:00
frosch and GitHub
31d1968004
Fix: Start the inactivity-timeout for the content server only after the connection has been established. ( #8530 )
...
When connecting took long due to the first N resolve-addresses timing out, OpenTTD would immediately close the connection, without sending anything.
2021-01-08 20:20:54 +01:00
frosch and Charles Pigott
b08d8c7edb
Cleanup 9f42358: Make also reliability_start randomised independent of introduction date.
2021-01-03 14:56:43 +00:00
frosch and Charles Pigott
d24a9a9df5
Cleanup 8139b14: Move a comment back to the line it belongs to, and add a comment for new code.
2021-01-03 14:56:43 +00:00
frosch and Michael Lutz
ba49fa3b82
Codechange: Rename strings to match their usage.
2020-12-25 00:40:35 +01:00
frosch and Michael Lutz
2bb691f50e
Change: Remove the LAN/Internet combobox from the server list in favour of adding two separate search buttons.
2020-12-25 00:40:35 +01:00
frosch and GitHub
3f606691a8
Add: [GitHub] PR template. ( #8414 )
2020-12-22 22:39:24 +01:00
frosch and GitHub
d5f05fb781
Fix: [NewGRF] Action 7/9 conditions 0x0F to 0x12 failed, if 'param' was 0x88. ( #8382 )
...
Fix: [NewGRF] Action 7/9 conditions 0x0B to 0x12 failed, if 'param' was 0x85.
These conditions are supposed to ignore 'param' entirely.
2020-12-15 22:42:03 +01:00
frosch and Michael Lutz
cc1679e317
Codechange: Apple LLVM fails to implement std::optional::value() also on pretty recent version. Use operator* instead.
2020-12-14 23:50:50 +01:00
frosch and Michael Lutz
484ea62a62
Cleanup: use std::optional instead of custom implementation.
2020-12-14 23:50:50 +01:00
frosch and Michael Lutz
5d278b62cc
Codechange: switch to C++17 on all platforms.
2020-12-14 23:50:50 +01:00
frosch and Michael Lutz
6198a4776b
Change: [NewGRF] Use aircraft property 12 also for helicopters.
...
Due to keeping compatibility we can only do this for NewGRF-defined sound effects.
2020-12-06 20:31:54 +01:00
frosch and Michael Lutz
df5362a008
Fix #8311 , b98c7763de: Industry probability at map generation was scaled differently when set via property or callback.
2020-09-24 19:29:52 +02:00
frosch and Charles Pigott
c434387794
Fix: Adjust .gitignore to CMake build system.
2020-07-10 14:48:47 +01:00
frosch and Charles Pigott
d8182b7e15
Change: Allow command cost-estimation while paused.
2020-06-18 08:59:27 +01:00
frosch and frosch
9f2e23d8ba
Fix #8093 : Build+Refit changed game-state in command test run, and thus caused desyncs.
...
Use DC_AUTOREPLACE for actions that shall be reversibe, in this case:
- Do not rearrange free wagons in test-run.
- Do not discard OrderBackups.
The latter was not triggered by actual auto-replace, since it does not set a 'user'.
2020-05-03 23:18:30 +02:00
frosch and frosch
0f9dc88834
Fix: When build+refit an engine, do not refit any free wagons that may get attached.
2020-05-03 23:18:30 +02:00
frosch and frosch
68244393f1
Codechange: Unify the tests whether build+refit is in simulation-test or real-run.
2020-05-03 23:18:30 +02:00
frosch and GitHub
fb5fc0d80a
Fix: OpenGFX download link did no longer work. ( #8105 )
2020-05-03 18:45:58 +02:00
frosch and Charles Pigott
7fe291667f
Fix #8060 , 5880f14: Restore admin network API compatibility.
2020-04-05 18:36:21 +01:00
frosch and Charles Pigott
0ade8b20fe
Fix #7998 : Crash when scripts tried to access companies with invalid IDs.
2020-02-22 14:32:43 +00:00
frosch and Niels Martin Hansen
a4be4514c9
Fix #7925 : Reset temporary saveload data at the start of loading a savegame instead of at the end.
...
Otherwise temporary data may be passed from an aborted load action to the next load action.
2020-01-12 19:08:38 +01:00
frosch and Charles Pigott
b769eb30c4
Fix: Setting the default railtype to 'first/last available' did not work with NewGRF defined railtypes.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
6fa217dfc8
Codechange: Use RAILTYPE_BEGIN instead of RAILTYPE_RAIL when the intention is iteration.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
3d29c9483b
Codechange: Use a switch with fall-through instead of a if-sequence with context data between cases.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
7f351fd7c1
Fix: Action7/9 conditions 0F..12 reported roadtypes as valid tramtypes and vice versa.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
bc7f92815b
Cleanup: Remove unused constants. The value of the tram constant was also incorrect.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
e5dd19b0de
Cleanup: Properties 12 and 15 do not exist for road/tramtypes.
2019-12-23 17:23:20 +00:00
frosch and Charles Pigott
61dba850af
Revert #7837 , 7e22f243e: OpenTTD tries to replicate the original game mechanics.
...
Making numbers look nice and correlate is no goal, and in this case they actually did not correlate.
2019-11-20 08:01:37 +00:00
frosch and GitHub
041088d317
Fix fbbbc6e193: Crash when creating orders to stations with relocated station sign. ( #7755 )
...
Station::xy is the position of the station sign, and not necessarily a tile of the station.
2019-09-29 22:48:19 +02:00
frosch and Niels Martin Hansen
1a1204472e
Revert: Sprite sorting optimisation sorted incorrectly.
...
This reverts commit 25ab9c1997 .
2018-11-18 17:30:28 +01:00
frosch and Niels Martin Hansen
18ca3e8660
Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits.
2018-10-31 14:35:46 +01:00
frosch and frosch
6391d49277
Fix: Variable 0x85 had no bounds checks.
2018-09-02 21:15:54 +02:00
frosch and frosch
34cc1f8b7c
Fix 192770e6da: Version name in master branch contained a duplicate dash.
2018-04-14 17:59:35 +02:00
frosch and frosch
192770e6da
Change: Non-tag revisions are now named '<commitdate>-<branch>-g<shorthash><modified>'.
2018-04-12 22:26:45 +02:00
frosch and frosch
e0a62a9e55
Remove: [NewGRF] OpenTTD version no longer contains a revision number.
2018-04-12 22:26:45 +02:00
frosch
09d4735679
(svn r27993) -Change: Heading for 1.9 now
2018-03-14 19:36:41 +00:00
frosch
8c458c153d
(svn r27990) -Update: Docs
2018-03-14 18:05:06 +00:00
frosch
55a503e6f2
(svn r27989) -Fix (r27985): VA2 optimisation failed in various special cases:
...
- nvar=0 is meant to return the calculated result.
- Missing references resolve to NULL and got identified with the default result.
- Missing 'break' broke overlapping cases.
- Splitting into non-overlapping cases could result in more than 256 cases.
2018-03-11 15:08:51 +00:00
frosch
c6eb633d18
(svn r27988) -Codechange: Extent hg- and gitignore for .vs
2018-03-11 13:34:28 +00:00
frosch
043274afd6
(svn r27987) -Change: Increase maximum allowed vehicle sprite size to reduce clipping of ships.
2018-03-11 13:25:26 +00:00
frosch
5558899621
(svn r27986) -Codechange: Name magic constants in the vehicle position hash functions.
2018-03-11 13:23:26 +00:00
frosch
07d841d0ef
(svn r27985) -Codechange: Convert VA2 switches into ones with non-overlapping ranges, sort them and resolve them using binary search. Speedup sprite resolving by about 7 percent.
2018-03-11 13:21:27 +00:00