Commit Graph
187 Commits
Author SHA1 Message Date
Rito12andrubidium42 f7e20ecb4e Cleanup: STR_ERROR_TOO_CLOSE_TO_EDGE_OF_MAP_SUB is not needed. 2026-02-23 17:14:56 +01:00
Rubidiumandrubidium42 6be4e353bc Codechange: use designated initialisers for _tile_type_object_procs 2026-02-18 17:03:33 +01:00
Rubidiumandrubidium42 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Rubidiumandrubidium42 98f27ed83c Fix #15166: foundations missing adjacent to NewGRF objects without foundation 2026-01-27 20:23:26 +01:00
Cyprian Klimaszewskiandrubidium42 97f3e5b70f Codechange: Make TileType enum an enum class. 2026-01-24 08:34:05 +01:00
Cyprian Klimaszewskiandrubidium42 322ce224b4 Codechange: Make Price an enum class. 2026-01-14 22:07:02 +01:00
Tyler TrahanandGitHub b41e23270d Codefix: Clean up object area placement (#15062) 2026-01-08 20:51:03 +00:00
Rubidiumandrubidium42 2fcd4e189a Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...' 2026-01-03 16:04:32 +01:00
Peter NelsonandGitHub d80ed069b5 Fix 2d7d085e8e: "(Invalid parameter)" in error message when trying to remove another player's object. (#14981)
Formatted error string was thrown away.
2025-12-25 17:21:43 +00:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 98275ee5d3 Codechange: Use enum class for water-related enums. (#14804) 2025-11-19 20:35:11 +00:00
Tyler TrahanandGitHub e8d49ebfe6 Fix: Two lighthouse spawn issues (#14785)
* Fix: Lighthouses need sea to generate, not rivers

* Fix: Don't spawn lighthouses close together
2025-11-17 12:55:23 +00:00
Rito12andGitHub f759b691d7 Codechange: Use helper function for company recolour offset (#14740) 2025-11-03 12:25:32 +00:00
Jonathan G RennisonandGitHub 9307e1929e Fix #14604: Clearing tiles to build objects did not update town ratings (#14616) 2025-09-27 18:11:42 +01:00
Tyler TrahanandGitHub 0b99a0b66a Feature: Draw infinite water when all borders are water (#13289) 2025-09-26 14:37:27 +00:00
Peter NelsonandPeter Nelson f30f808b50 Codechange: Implement tile proc handler to test for building bridge over tile. 2025-08-20 21:40:41 +01:00
Peter NelsonandPeter Nelson 0a1c0b8b48 Change: Hide bridge pillars if obstructed by tile below.
Tiles can now control if pillars are drawn on a bridge above it. There is no visible change with default bridges.
2025-08-15 23:20:18 +01:00
Peter NelsonandGitHub 921d83c324 Codechange: Unify structures with sprite sub-tile bounds and simplify bounding boxes. (#14424)
Lots of different structs contain variations on sub-tile bounds with different naming. Unify into a single struct that can be inherited and passed directly to AddSortableSpriteToDraw.

At the same time, offsets now work more logically: sub-tile bounds now specify the bounding box, and an offset can be applied to the sprite.
2025-07-22 00:02:00 +01:00
Rubidiumandrubidium42 96873dee63 Codechange: use std::array.fill over memset 2025-05-09 17:20:41 +02:00
froschandfrosch a277cb2b4c Change: [NewGRF] Increase the textstack for all callbacks to 16 registers. 2025-05-09 12:39:11 +02:00
Peter NelsonandPeter Nelson a7019b859c Codechange: Use DiagDirections when checking for flat buildable tiles. 2025-05-07 17:31:29 +01:00
froschandfrosch eb9bbb2456 Codechange: Remove direct access to temporary storage from TextRefStack. 2025-05-06 22:24:41 +02:00
froschandfrosch 6faa667644 Codechange: Remove global GetRegister(), instead return 100+ registers directly from GetXxxCallback(). 2025-05-06 22:24:41 +02:00
froschandGitHub d7ddea4032 Codechange: Turn AnimationTrigger enums into enum classes. (#14067) 2025-04-21 20:53:31 +02:00
Peter NelsonandGitHub e1fdc10227 Fix e114ed357d: Incorrect test of object flags allowed HQ to be removed. (#14062) 2025-04-21 15:45:29 +01:00
froschandfrosch b956af631e Codechange: Replace CircularTileSearch with SpiralTileSequence. 2025-04-20 12:50:45 +02:00
froschandfrosch cde350dc01 Codechange: Replace macros GENERAL_SPRITE_COLOUR and COMPANY_SPRITE_COLOUR with functions GetColourPalette and GetCompanyPalette. 2025-04-18 23:41:37 +02:00
froschandfrosch 68016031cf Codechange: Turn macros GetCompanyHQSize and IncreaseCompanyHQSize into functions. 2025-04-18 23:41:37 +02:00
Peter NelsonandGitHub 2c59838acb Codechange: (re)set multiple bitset flags in one call. (#14017) 2025-04-18 14:07:57 +01:00
Peter NelsonandGitHub 89948b941b Codechange: Use emplace_back instead of push_back. (#13855) 2025-03-20 17:39:10 +00:00
Peter NelsonandGitHub 17f7d0950e Fix #13838: Formatted error message of sub-errors may be lost. (#13840) 2025-03-18 08:39:40 +00:00
Rubidiumandrubidium42 5ea5855677 Codechange: use std::move over copying where applicable 2025-03-16 17:33:06 +01:00
Peter NelsonandPeter Nelson 96f260e718 Codechange: Pass TileDesc by reference. 2025-02-23 23:00:51 +00:00
Rubidiumandrubidium42 24a7cde9cc Codechange: explicitly initialise Company member variables 2025-02-22 16:33:05 +01:00
Rubidiumandrubidium42 8682f39966 Codechange: explicitly initialise Object member variables 2025-02-18 18:51:44 +01:00
Rubidiumandrubidium42 44506ebc86 Codechange: use span size over terminator object 2025-02-16 11:19:12 +01:00
Rubidiumandrubidium42 069ff846e4 Codechange: use std::vector/std::span for DrawTileSprites over malloc-ed table 2025-02-14 16:01:45 +01:00
Rubidiumandrubidium42 c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Rubidiumandrubidium42 ec492cb267 Codechange: make CompanyMask a BaseBitSet implementation 2025-02-09 19:24:51 +01:00
Rubidiumandrubidium42 5f41bc0279 Codechange: put SourceType and SourceID into Source struct 2025-02-08 06:37:23 +01:00
Peter NelsonandGitHub e114ed357d Codechange: Use EnumBitSet for ObjectFlags. (#13441) 2025-02-02 21:15:03 +00:00
Peter NelsonandPeter Nelson 40aeedeade Codechange: Use EnumBitSet for callback masks. 2025-01-31 17:08:24 +00:00
Rubidiumandrubidium42 e894a5880c Codechange: rename CargoID to CargoType and amend related variables/comments 2025-01-26 18:07:10 +01:00
Peter NelsonandGitHub 1e77fd0b61 Codechange: Remove unnecessary 'return_cmd_error` macro. (#13160)
This macro is a leftover from when errors used to be packed into a single int32_t.

`return CommandCost` is clearer, and doesn't need a macro.
2024-12-08 18:02:30 +00:00
Peter NelsonandPeter Nelson e73d6fcaac Codechange: Store grfid with entity grfprops.
This allows using the grfid without having to dereference the grffile pointer.

Uses no extra storage as it fits within otherwise wasted padding space.
2024-12-05 18:17:58 +00:00
Peter NelsonandPeter Nelson 8f9836793f Change: Store water tile flooding state in the map.
This allows water tiles which cannot flood any further to not even try to flood.

On a large map with lots of water tiles this can noticeably reduce game loop processing time.

Mostly ported from JGRPP.
2024-11-06 19:44:14 +00:00
Peter NelsonandGitHub 93eb27d8df Codechange: Use reference for always_accepted output parameter of AddAcceptedCargo. (#12854)
This parameter should always present (see tile_cmd.h:186), so use a reference to ensure it is.
2024-07-10 12:30:14 +01:00
Jonathan G Rennisonandrubidium42 85918fc23e Fix: Water infrastructure total when changing owner of object on water 2024-05-29 20:11:43 +02:00
Patric StoutandGitHub a3cfd23cf9 Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Michael Lutz 8dda387f82 Codechange: Use std::tuple for slope functions with two return values 2024-03-08 18:08:55 +01:00