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
20 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
tron
e2dab60ad1
(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
5885b31bb4
(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
3617d24318
(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
189ca73707
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
20 years ago
tron
31d6f87d80
(svn r1560) Introduce SetTileType() and SetTileHeight()
...
Replace direct references to _map_type_and_height with these
20 years ago
tron
ae796740aa
(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
febac23b25
(svn r1504) enummed town ratings (Jango)
20 years ago
truelight
a243285af4
(svn r1486) -Codechange: moved all 'signs' stuff to signs.c/h and prepared it for
...
dynamic arrays
20 years ago
tron
49584082a0
(svn r1451) Fix some of the signed/unsigned comparison warnings
20 years ago
tron
7ca6b2b8b0
(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
8b7c1e94e1
(svn r1402) Trim trailing whitespace
20 years ago
tron
f8c95a1dbe
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
20 years ago
darkvater
cdfb3d5113
(svn r1366) -Fix: [1093186] rough land in snow upon dying of tree
20 years ago
darkvater
9a49fda8e6
(svn r1355) -Fix: [1092473] random trees in scenario editor do not overwrite rocks as well
20 years ago
darkvater
52c87a0330
(svn r1353) -Fix: [1092707] placing rocks in scenario editor. You can place rocks on trees and vice versa
20 years ago
darkvater
5b6be88587
(svn r1347) -Fix: Some were fixed for the trees -> Only copy the lowest two bits (amount of snow/desert) from map5 to map2 when placing trees, before this happened implicitly because map2 was just 8 bits wide;
20 years ago
tron
afb6e5441d
(svn r1345) Only copy the lowest two bits (amount of snow/desert) from map5 to map2 when placing trees, before this happened implicitly because map2 was just 8 bits wide
20 years ago
truelight
635b854c29
(svn r1299) -Fix: [ 1092473 ] In SE, when trees are placed randomly, they are no
...
longer placed on farmland
20 years ago
truelight
c2ee8d70e4
(svn r1288) -Codechange: changed _map2 to an uint16. It is still saved and loaded as
...
an uint8 till the savegame version is bumped to version 5. Then it works
automaticly as a fully uint16. So _stations[] can not be increased till
after the bump!!
20 years ago
tron
765ecfed84
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
20 years ago
tron
e56c3cddd8
(svn r925) Use sound enums
...
Also play the correct sound when a toyland road vehicle breaks down
20 years ago
tron
acbd1801c7
(svn r815) Include strings.h only in the files which need it.
...
This should reduce the compile time after altering english.txt by about 1/3, because "only" 62 instead of 90 .c files must be recompiled.
20 years ago
tron
e8537f5512
(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
...
Now it is active-true.
20 years ago