tron
18ad0ae50e
(svn r4572) Remove vehicle_leave_tile_proc
...
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
19 years ago
tron
0347fb2ab6
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
19 years ago
tron
81e6d68f95
(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
99a6b9b8f2
(svn r4279) s/\<CL_/CLEAR_/
19 years ago
tron
cc0ffe6582
(svn r4271) s/\<TR_/TREE_/ resp. s/\<TR_/TREE_GROUND/
19 years ago
celestar
cc87f682b9
(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
892a4c587d
(svn r4242) Pass TileIndex and slope to GetSlopeTileh_*() instead of TileInfo
19 years ago
belugas
80570009dd
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
19 years ago
tron
7b21893adb
(svn r3983) Use existing functions to access tree and road info
19 years ago
tron
b394f72fa9
(svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable
19 years ago
tron
cc4f5b4e6f
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
19 years ago
tron
00a16eedcc
(svn r3668) Add a function to turn a tile into a tree tile
19 years ago
tron
f6d48379d8
(svn r3665) Add a function to turn a tile into a clear tile
19 years ago
tron
ea73b46684
(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
4f0ff156e8
(svn r3583) Fix 2 glitches in r3556
19 years ago
tron
208a4b4944
(svn r3556) Add accessors for handling tree tiles
...
See tree.h for details
19 years ago
tron
b36f89bc51
(svn r3532) Revert r3467, was total nonesense, my fault
19 years ago
tron
b844aa2db3
(svn r3520) Remove unused parameters from some functions
19 years ago
tron
21fb5b5150
(svn r3516) Fix embarrassing bug in r3514
19 years ago
tron
ac4f4e30d5
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
...
See clear.h for details
19 years ago
tron
84fb96fe85
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
Darkvater
5fed533ce8
(svn r3467) - CodeChange: Remove an useless assignment (reads a value and just writes it back)" tree_cmd.c
19 years ago
Darkvater
6fb36934a8
(svn r3446) - Fix: incorrect validating of tree-planting command which can allow a buffer-overflow (Tron)
19 years ago
tron
ce9cbb9c47
(svn r3196) Use structs instead of magic offsets into arrays
19 years ago
tron
9f8c5d8fd2
(svn r3186) Unnecessary casts and truncation
19 years ago
tron
f7abff5f96
(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
833032adc0
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
19 years ago
tron
2cc2154ad2
(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
ece9b9b2b6
(svn r3066) Constify the parameter of GetSlopeZ_*()
19 years ago
Darkvater
8e6a911700
(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
50e41dc1d1
(svn r2763) Small cleanup and improve a few comments
19 years ago
tron
9b676d2cd9
(svn r2758) Add the AB() macro to add a value to a bit range and use it in a few places, also make use of GB and SB nearby
19 years ago
tron
f57d263d83
(svn r2750) -Fix: Tree tiles above the snow line got redrawn disproportionately often
19 years ago
tron
64ac1a6414
(svn r2738) Small bit fiddling cleanup
19 years ago
tron
a227065ab7
(svn r2701) Insert Id tags into all source files
19 years ago
tron
559babcdc9
(svn r2673) Include functions.h directly, not globally via openttd.h
19 years ago
tron
284d9ed7fb
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
19 years ago
celestar
85f06d6e7b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
19 years ago
Darkvater
5695330940
(svn r2628) - Fix: Planting trees does not result in a MapSize() assertion anymore; introduced in r2598
20 years ago
tron
2469cedd15
(svn r2598) Small cleanup, especially get rid of a FindLandscapeHeight(), because it was overkill
20 years ago
celestar
9ca761b065
(svn r2595) -Codechange: Introduced "IsSteepTileh" to find whether a tile is steep
...
(i.e. spans two height levels) and use it throughout the code.
-Codechange: Add CanBuildDepotByTileh to find if a tile is suitable to
build a depot on it. Wraps some bitmagic which seems quite unreadable at
first glance
20 years ago
ludde
6013b327f7
(svn r2560) Fix: various minor code changes.
...
Added RandomTile/RandomTileSeed functions to generate a random tile.
Changed landscape routines so they don't assume that the Y map side is a power of two. (support for this is not complete, though)
Changed some frequently used map macros to not compute the values each time.
Silence some warnings on MSVC.
20 years ago
tron
8c1d74162f
(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.
20 years ago
tron
bec5e4fb4c
(svn r2487) Replace TILE_XY by TileXY/TileDiffXY
20 years ago
tron
3154e7148d
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
20 years ago
tron
74541c1dcc
(svn r2408) Introduce SetTileOwner() and use it
20 years ago
tron
0c4ecbe9ec
(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
b438b1248c
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
20 years ago
Darkvater
ab954a934a
(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
tron
e2359c11ae
(svn r1874) Fix bug introduced in r1839 which placed snow covered trees below the snow line ([1121680])
20 years ago