Commit Graph

114 Commits (8b60fc3d354cf855864ea537df19fe0b8406ee2c)

Author SHA1 Message Date
Peter Nelson 8b60fc3d35
Codechange: Use vector for waypoint layout. (#12264)
This replaces manual new/delete of byte array, and matches how it is used for station layouts.
3 months ago
Kuhnovic b38d3c2208
Change: simplified water region evaluation, removed savegame data (#11750) 5 months ago
Kuhnovic f1e999ec59
Feature: Region-based pathfinder for ships (#10543) 5 months ago
Peter Nelson b5dc9328f2
Change: Store station blocked/wires/pylons flags in map. (#11337)
This stores three flags in unused map bits, and avoids having to look up
station graphics and custom station specs to determine blocked/wires/pylons
status.

This potentially affects rail pathfinding performance.

Savegame version is not bumped, as the flags can just be updated every
time.
9 months ago
frosch 5733145c59 Cleanup: Remove unneeded parameters. 9 months ago
PeterN 882f06bf14
Fix: Support more than 256 stations/waypoints/roadstops per class. (#10793)
It was already possible to define more than 256 per class, but not possible
to use them as the index used in GUI and passed through commands was limited
to a byte.
1 year ago
Patric Stout 7aa2b9ab0a
Codechange: move all date-related variables inside the timer (#10706) 1 year ago
Tyler Trahan bc44158f9a
Change: Allow overbuilding station and waypoint tiles (#10618) 1 year ago
Charles Pigott b282664242 Codechange: Replace all usages of alloca/AllocaM with more modern/less discouraged alternatives 1 year ago
Chenshu Yu eabb9db0bb
Fix #9810: 'Rebuilding' a through road stop costs money (#9852) 1 year ago
rubidium42 6ba55e663e Codechange: do not hide variables with other variables 1 year ago
J0anJosep d9a37c915f Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h. 2 years ago
Michael Lutz c6d7b98808 Codechange: Un-bitstuff landscape commands. 3 years ago
Michael Lutz 6fe445e6c0 Codechange: Un-bitstuff station/depot/waypoint commands. 3 years ago
Michael Lutz e740c24eb7 Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
3 years ago
Michael Lutz 7048e1522f Codechange: Move flags in CommandProc in front of the command arguments. 3 years ago
Michael Lutz 33ca4f2b99 Codechange: Let the compile generate the master command table out of templated command traits.
This is using a non-intrusive type-traits like templated system, which
allows compile-time validation that the command table and the command
enum match up.
3 years ago
Michael Lutz b6933a2ebd Codechange: Move command arguments to the back of the DoCommand function call. 3 years ago
rubidium42 2e136285e1 Codechange: move from C-string to std::string for DoCommand 3 years ago
rubidium42 661728558e Codechange: let IsUnique.* functions accept std::string 3 years ago
Peter Nelson bd1a20f6ee Codechange: Use std::vector for NewGRF station platform layouts.
This avoids the need to custom memory management and additional members.

This also resolves use-after-free if modifying copied layouts, so presumably nobody has ever done that.
3 years ago
Michael Lutz 63ccb36ef3 Codechange: Use std::string for most of the user-settable custom names. 4 years ago
glx ddabfed1cd Codechange: Replace station related FOR_ALL with range-based for loops 5 years ago
Niels Martin Hansen 9900af38f5
Fix #7847: Use ViewportSign coordinates for sign Kdtree coordinates (#7849)
Ensure the same coordinates are used for station/town/player signs regardless of how the landscape changes below it after the coordinates were first determined.

By keeping track of whether each ViewportSign is valid for Kdtree use (and only ever registering the viewport sign when the object is valid) a lot of code can be simplified and become more robust at the same time.
5 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
stormcone 2817cd41f1 Fix #7250: Viewport kdtree not being updated for waypoints when sign moved.
Code based on the patch by JGRennison.
JGRennison/OpenTTD-patches@ac84f34062
5 years ago
peter1138 f538179878 Feature: Multi-tile docks and docking points. 5 years ago
PeterN abe8cf4985
Codechange: Replace duplicated code with TileArea::Expand() (#7467) 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Niels Martin Hansen e8d397e4ee Codechange: Make a merged k-d tree index of all viewport signs 5 years ago
J0an Josep 67f6bcdc9b Fix #6805: Update CmdBuilRailWaypoint bits. 6 years ago
peter1138 3aad5abfe9 (svn r27785) -Fix [FS#6508]: Buoys not always drawn after being placed depending on zoom level (Samu). 7 years ago
rubidium 9daf7e749c (svn r26879) -Codechange: remove most MayHaveBridgeAbove calls since the data is now always accessible 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
zuu dfb5663313 (svn r25849) -Codechange: Introduce IsTileFlat to not compute full slope information for situations when we only want to know if a tile is flat or not (cirdan, LordAro) 11 years ago
frosch 0f0e7e43cf (svn r24166) -Codechange: Turn NewGRFClass::Get(Tid, uint) and GetCount(Tid) into non-static members GetSpec(uint) and GetSpecCount(). 12 years ago
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 13 years ago
michi_cc f98312eb77 (svn r23414) -Add: Company infrastructure counts for stations/airports. 13 years ago
peter1138 3e1d070413 (svn r23319) -Fix (r23316): Offsets of viewport signs were not scaled up. 13 years ago
rubidium 2ed0f93bfb (svn r23093) -Codechange: add a default NULL for the Z of GetTileSlope and use it 13 years ago
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 13 years ago
rubidium 1a515e6344 (svn r22405) -Document: some more "random-ish" tidbits 13 years ago
rubidium faf5d899f7 (svn r22017) -Codechange: move MarkTileDirtyByTile to viewport_func.h 14 years ago
smatz 3057a26fd5 (svn r21953) -Remove [FS#4456]: the non-uniform stations setting. Support for uniform stations has been broken for over a year 14 years ago
terkhen 53c9846f14 (svn r21806) -Codechange: Correct additional appearances of the same typo. 14 years ago
rubidium 44d1c55347 (svn r21415) -Codechange: limit station/waypoint name by amount of characters, not bytes 14 years ago
frosch 612516ff76 (svn r21290) -Codechange: Add HasTileWaterGround() to deduplicate some tests. 14 years ago
rubidium af18c30f30 (svn r20816) -Codechange [FS#3835]: make waypoint default names work like depots, stations and vehicles (Krille) 14 years ago
yexo a2ba35f57c (svn r20749) -Fix: allow overbuilding objects with buoys and ship depots 14 years ago