tron
35e93e451f
(svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
...
Remove DoCommandByTile(), because now it does the same as DoCommand()
19 years ago
tron
9dbc25dc5e
(svn r4269) We don't use GNU indentation style
19 years ago
Darkvater
12cfa5526b
(svn r4266) - Fix: compile warning on VS2005 (not all control paths return a value)
19 years ago
celestar
646badb7d7
(svn r4252) -Codechange: Make more use of map accessors. water_cmd is now map access free
19 years ago
celestar
3bbdf34ed7
(svn r4250) -Codechange: Further use of map accessors for water tiles
19 years ago
celestar
69e1c716e8
(svn r4249) -Codechange: Replace more occurences of 16 by TILE_SIZE and of 8 by TILE_HEIGHT. Reverted one change from the previous commit because it was faulty
19 years ago
tron
7163a64c25
(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo
19 years ago
celestar
05b9ec64c4
(svn r4212) -Codechange: Add and make use of an accessor that retrieves the type of a water tile. Add an enum describing the different water tiles
19 years ago
celestar
75f0e6f194
(svn r4172) -Codechange: Added a few accessors to work with ShipDepots and Locks
19 years ago
celestar
06ae3f8ee1
(svn r4171) -Codechange: Create map accessor functions for creating ship depots and locks. Make use of them
19 years ago
tron
c40740e058
(svn r4120) Use the new station functions where appropriate
19 years ago
tron
c357dacc9f
(svn r3987) Fix another bug in r3979 *grumble*
19 years ago
tron
667666f1a3
(svn r3980) Fix glitch in r3979 spotted by Rubidium. Maybe I'm getting too old for this...
19 years ago
tron
bf3811122d
(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles
19 years ago
tron
6e988259a4
(svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX
19 years ago
tron
26815f7405
(svn r3846) Add functions to set the type of stuff (clear, water, rail, road) under bridges
19 years ago
tron
7a0071cc53
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
19 years ago
tron
0a63715cc7
(svn r3813) Simplify strange control flow
19 years ago
tron
000bb4de54
(svn r3792) -Fix: Mark the right tile as dirty. It's just a graphical glitch which happend in r1592
19 years ago
tron
8cfcdaa733
(svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends
19 years ago
tron
116fb6dff6
(svn r3714) Add functions to turn tiles into water and shore tiles
19 years ago
tron
5352e9fbcb
(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
19 years ago
tron
087fe86ed2
(svn r3564) Several smaller changes:
...
- Don't treat non-booleans as booleans
- Reduce variable scope
- Bracing
- Use DeMorgan's law to make conditionals easier to read
- if cascade -> switch
- Replace some magic numbers by symbolic names
- Avoid assignments within other statements
19 years ago
tron
9712d6f639
(svn r3510) Fiddle with whitespace and parentheses
19 years ago
tron
244d4ab5cb
(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map
19 years ago
peter1138
80986fcd32
(svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed()
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
tron
e26b1ded99
(svn r3199) -Fix: There are only 2 possible directions for ship depots, not 4
19 years ago
tron
45186b1601
(svn r3194) Don't use FindLandscapeHeightByTile() when it's overkill
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
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
tron
71d293f2a3
(svn r3066) Constify the parameter of GetSlopeZ_*()
19 years ago
tron
53a4a6a0f4
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
19 years ago
tron
7ab7d79190
(svn r3028) s/255/OWNER_SPECTATOR/
19 years ago
tron
39f5dbfd3b
(svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB
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
ludde
9a060a0f24
(svn r2781) Fix some of the issues with variables in .h files.
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
celestar
1fed0046ac
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
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
2b73dec567
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
19 years ago
tron
a733fede9b
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
19 years ago
tron
ff0030936e
(svn r2408) Introduce SetTileOwner() and use it
20 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
20 years ago
Darkvater
ba8c649fac
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
ddd4958164
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
...
- CodeChange: remove cmd-misuses CmdStartScenario() and CmdDestroyCompanyHQ()
- Fix (invisible): when parameter checking CmdRestoreOrderIndex() the vehicle did not have its orders yet, so it would fail. So move doing this until AFTER the orders have been added back in RestoreVehicleOrders()
20 years ago
Darkvater
6d349b6284
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
...
- CodeChange: changed the airport gui airport-type checking. Added function GetValidAirports() that returns bitmasked availibility, is also used for checking.
- CodeChange: to check tree-planting, 2 const arrays have been moved to table/tree_land.h (type and count)
- CodeChange: added IsTownIndex() in following of IsStationIndex(), etc.
- Fix (regression): road tunnels did not work anymore, forgot that their type was 0x200 (documented now)
20 years ago