tron
3cde68077e
(svn r3665) Add a function to turn a tile into a clear tile
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
a6c4c31ef1
(svn r3583) Fix 2 glitches in r3556
19 years ago
tron
72eeae1546
(svn r3556) Add accessors for handling tree tiles
...
See tree.h for details
19 years ago
tron
fe6002e20f
(svn r3532) Revert r3467, was total nonesense, my fault
19 years ago
tron
17ec6ed70d
(svn r3520) Remove unused parameters from some functions
19 years ago
tron
b197b9422f
(svn r3516) Fix embarrassing bug in r3514
19 years ago
tron
5e0c8a239e
(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
1c3e8630fe
(svn r3511) More whitespace ([FS#46] by Rubidium)
19 years ago
Darkvater
89a9939112
(svn r3467) - CodeChange: Remove an useless assignment (reads a value and just writes it back)" tree_cmd.c
19 years ago
Darkvater
5e7526948a
(svn r3446) - Fix: incorrect validating of tree-planting command which can allow a buffer-overflow (Tron)
19 years ago
tron
3bdb92446c
(svn r3196) Use structs instead of magic offsets into arrays
19 years ago
tron
ca1dfe94d2
(svn r3186) Unnecessary casts and truncation
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
524fd25cbd
(svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT
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
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
3f424aa673
(svn r2763) Small cleanup and improve a few comments
19 years ago
tron
2f1d530bb5
(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
0dcbecd357
(svn r2750) -Fix: Tree tiles above the snow line got redrawn disproportionately often
19 years ago
tron
0e64dc50b6
(svn r2738) Small bit fiddling cleanup
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
tron
b0779b4b65
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
19 years ago
celestar
1fed0046ac
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
19 years ago
Darkvater
c966fc23fb
(svn r2628) - Fix: Planting trees does not result in a MapSize() assertion anymore; introduced in r2598
19 years ago
tron
06a6cc59ea
(svn r2598) Small cleanup, especially get rid of a FindLandscapeHeight(), because it was overkill
19 years ago
celestar
de19186be3
(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
19 years ago
ludde
2123deff13
(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.
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
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
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
tron
1e2f9ba5a5
(svn r1874) Fix bug introduced in r1839 which placed snow covered trees below the snow line ([1121680])
20 years ago
tron
361d415b88
(svn r1790) Make CmdPlantTree() and related functions more safe and (hopefully) more readable:
...
- check if end tile is on the map
- uint -> TileIndex
- if cascades -> switch
20 years ago
tron
39858e696b
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
20 years ago
tron
400f07fdb8
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
...
These scale a number relative to the map size/circumference.
Use them to scale the amount of map objects.
Of course at the moment they return just the input, because there are no bigger/smaller maps yet.
20 years ago
tron
94d5aeabb2
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
tron
90cafa9b15
(svn r1560) Introduce SetTileType() and SetTileHeight()
...
Replace direct references to _map_type_and_height with these
20 years ago
tron
61a6bc544d
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
20 years ago
celestar
957635121c
(svn r1504) enummed town ratings (Jango)
20 years ago
truelight
97dd511971
(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared it for
...
dynamic arrays
20 years ago
tron
4450ff105c
(svn r1451) Fix some of the signed/unsigned comparison warnings
20 years ago
tron
414ac3286b
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
20 years ago
tron
2eb7aedf69
(svn r1402) Trim trailing whitespace
20 years ago
tron
d3c6855320
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
20 years ago