Commit Graph

81 Commits (f6b17149c6650036361ef2d3441788960b9d4aa0)

Author SHA1 Message Date
tron 3c368fc05e (svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes 18 years ago
belugas 40a8964911 (svn r5609) CodeChange : Apply coding style 18 years ago
tron 772fbda3e3 (svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular 18 years ago
tron 8cae4d1214 (svn r5225) Some windows periodically check if their parent exists - if not they close themselves
This is unnecessary, because their parents already close them when they get closed
Therefore remove the code for the periodic checks
18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
rubidium 2a337ab009 (svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency 18 years ago
rubidium 3dae1a9bba (svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity 18 years ago
celestar 113b093d89 (svn r4200) -Codechange: Make use of water map accessors when getting the Index of a Ship Depot. TODO: Store the depot index in the map 19 years ago
peter1138 c203fdaafa (svn r4195) - Codechange: Initialize order variables to avoid a compiler warning. These are unused anyway... (smells of r3476-7, but not the same) 19 years ago
tron c40740e058 (svn r4120) Use the new station functions where appropriate 19 years ago
tron f6285a659c (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 19 years ago
tron a90e46bf03 (svn r3981) More work for the rail accessing functions and enums 19 years ago
tron 4efa560ffc (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 19 years ago
tron b26d54585f (svn r3660) Convert further road bits and type references to the functions/enums 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
truelight a33a7bc4f8 (svn r3477) -Fix: a fix that fixed the last commit.. I shouldn't be committing here :) 19 years ago
truelight 8650268e3d (svn r3476) -Fix: fixed a warning from the OSX compiler, it is bogus, but oh well 19 years ago
Darkvater 66ac4f4d1a (svn r3325) - Fix: You couldn't send an airplane to a hangar for mandatory servicing, the NON_STOP flag failed the command. 19 years ago
peter1138 5f3dc36983 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 19 years ago
bjarni 16e65960b9 (svn r3218) -Feature: Multiheaded train engines will now stay in the same train
This means that any user attempt to remove a rear engine will tell the user to move the front engine instead
	This fixes the assert when moving multiheaded engines (introduced in r3144)
	Note: to make old savegames use this feature, some engines might be turned around in order to link engines in pairs

-Codechange: train subtype is now a bitmask
	This allows fast access to info like if it is a wagon or engine and if it is in front and so on
	Note: savegame version bump
19 years ago
truelight cd1ad24723 (svn r3210) -Codechange: use IsRailWaypoint where possible (instead of magicnumbers)
-Codechange: IsRailWaypoint should take 'tile', not 'm5'
19 years ago
tron 8a3587fa28 (svn r3185) const 19 years ago
tron 9d0e7b6458 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron 53f00c8f9d (svn r3173) Use the trinary operator and switch to improve readability
Also align short cases nicely
19 years ago
tron 181d586a7c (svn r3078) Some more stuff, which piled up:
- const, whitespace, indentation, bracing, GB/SB, pointless casts
- use the trinary operator where appropriate
- data types (uint[] -> AcceptedCargo, ...)
- if cascade -> switch
- if (ptr) -> if (ptr != NULL)
- DeMorgan's Law
- Fix some comments
- 0 -> '\0', change magic numbers to symbolic constants
19 years ago
tron 0b936c3222 (svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
19 years ago
Darkvater 4a58250cb9 (svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
- change a lot of byte player types to PlayerID
- beautify header files, same "#endif /* filename */" ending
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago
tron 54cbd01825 (svn r2673) Include functions.h directly, not globally via openttd.h 19 years ago
ludde 6246619185 (svn r2573) Codechange: Removed WDF_RESTORE_DPARAM, it's not needed with the new string system.
Also fixed a bug introduced in r2564, forgot to remove 4 global variables in network_gui.c.
19 years ago
tron a4bf608d40 (svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes. 19 years ago
tron 9617614b04 (svn r2487) Replace TILE_XY by TileXY/TileDiffXY 19 years ago
tron a733fede9b (svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile" 19 years ago
celestar fd95f78dfc (svn r2443) -Fix: somehow I delete one line too many :( 19 years ago
celestar c7de834059 (svn r2441) -Feature: You can now give transfer order to set up feeder systems 19 years ago
tron a9b95b3cbb (svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
matthijs ea0f4757c6 (svn r2363) - Codechange: [NPF] Removed caching the endnode check. The code for this was buggy, fundamentally flawed and barely useful. (Hackykid) 19 years ago
matthijs f8302a137a (svn r2256) - Fix: Trains cannot find a depot when they are in a tunnel. (glx)
- Add: GetVehicleTrackdir() helper function.
- Codechange: Moved SortStruct from vehicle_gui.h to ttd.h, so the dependency from vehicle.h on vehicle_gui.h could be removed.
- Codechange: Typedeffed the VehicleTypes struct so it can be used as the type for Vehicle.type instead of "byte".
- Codechange: Removed prototype for VehicleSorter(), which had no implementation anymore and was never called.
19 years ago
truelight d1e158d6f7 (svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h
-Codechange: rewrote some functions while moving waypoint-stuff
-Add: added support for 64k waypoints
-Fix: made the waypoint struct a bit more logic (no bit-fucking)
20 years ago
celestar a9c0a173bf (svn r2034) -Codechange: Replaced the rather meaningless LOAD and UNLOAD flags for depots by something more meaningful 20 years ago
tron 830565514c (svn r1867) Include tables/sprites.h only in files which need it 20 years ago
tron c45312326a (svn r1838) Ship depots are on water, not roads 20 years ago
matthijs cc0966405b (svn r1834) - Fix: NPF does not check the owner of its target, busses try to enter other players' depots. TODO
- Add: asserts to find the v->u.rail.track == 0 problem.
- Add: IsValidDepot(), IsValidTown(), IsValidSign(), IsValidVehicle(), IsValidStation()
- Add: GetTileOwner(), IsTileOwner()
- Codechange: Replaced IsShipDepotTile(), IsTrainDepotTile(), IsRoadDepotTile() by IsTileDepotType().
- Codechange: typedeffed the MAP_OWNERS as Owner. Should be used as variable type.
- Codechange: Replaced a few uint by TileIndex.
20 years ago
truelight 5f4b8ef232 (svn r1819) -Codechange: removed 1 unused function, and 1 unused struct (tnx to Tron) 20 years ago
truelight 79d1ed2c66 (svn r1818) -Add: Dynamic orders (up to 64k orders) 20 years ago
truelight bd7f37d592 (svn r1817) -Codechange: Moved depot-functions to depot.c
-Codechange: Added wrappers around depot-access (GetDepot no exists)
-Codechange: Made depot-functions a bit more logic (no longer 
GetDepotByTile crashes your game when you request it on a non-depot tile)
-Add: made depots dynamic (yes, 64k depots are possible now)
20 years ago
celestar ecbe6e2be4 (svn r1760) -Fix: [ 1113399 ] Game no longer crashes when right-clicking a disabled Full Load button 20 years ago
darkvater 26ef673f66 (svn r1746) - Feature: [GUI] [ 1107690 ] Resizable orders GUI (nzhook) 20 years ago
tron 38587b60f7 (svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
20 years ago