Commit Graph

133 Commits (b0b5641639e042399e0ee3886740999678bc63ea)

Author SHA1 Message Date
celestar 5a449e49fe (svn r4262) -Codechange: use IsClearWaterTile instead of some "home-brewn" marco. town_cmd is now map access free 19 years ago
belugas 84a5c861c8 (svn r4261) CodeChange : Add and Use Accessor for Houses Construction. And cleaning on town.flags12 too 19 years ago
celestar 7eedaf9a0e (svn r4254) -Codechange: Add and make use of map accessors for town lifts. 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 633d9fb8eb (svn r4190) -Codechange: Add and make use of an accessor function to create houses 19 years ago
belugas 1b28d92fc8 (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
celestar 94ca804e4f (svn r4179) -Codechange: Add and make use of an accessor that obtains the building type 19 years ago
celestar c442586676 (svn r4154) -Moved MAX_BRIDGES in bridge.h and made it an enum. This makes two drops ... 19 years ago
tron c699d0e791 (svn r4085) Add GetTown{Index,ByTile}() to get the town index resp. the town from a tile 19 years ago
tron 747fe64b31 (svn r4073) Add functions to make and test for (most) unmovable tiles 19 years ago
tron 4d3364d811 (svn r3996) -Fix: Slope and height information returned for some tile types is wrong
This leads to graphical glitches when drawing foundations.
This doesn't fix all problems, but at least some of them.
19 years ago
tron 453a925d72 (svn r3986) Add [GS]etCrossingRoadOwner 19 years ago
Darkvater 650b1b0c93 (svn r3895) - Add proper SLE(G)_CONDNULL macros for the empty space reservation in savegames and update where used
- Also add this capability to settings
19 years ago
tron 0100871412 (svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does 19 years ago
tron af42610321 (svn r3777) Add some functions to handle tunnels 19 years ago
tron 03254940a4 (svn r3773) Shove some semantics down ottd's throat by replacing ints and magic numbers by enums and some related changes 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 b8b6084da2 (svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL) 19 years ago
Darkvater bf27f0c77b (svn r3627) - Change all hardcoded 255 max-saveload versions with the define SL_MAX_VERSION 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 34a9da4a32 (svn r3561) Don't use FindLandscapeHeightByTile() when it's overkill. Also use a sprite enum instead of a magic number. 19 years ago
tron 17ec6ed70d (svn r3520) Remove unused parameters from some functions 19 years ago
tron 1c3e8630fe (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
Darkvater 7d17583a29 (svn r3445) - Fix: [ 1415379 ] Enhance documentation of lift destination
- Fix: wrong documentation of trees (Tron)
19 years ago
tron 318fe153eb (svn r3365) Staticise 36 functions 19 years ago
tron 04c096ee63 (svn r3339) Remove unnecessary includes 19 years ago
peter1138 80986fcd32 (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 19 years ago
tron e901aefb74 (svn r3188) Use CmdFailed() to check, if a command failed, don't compare with CMD_ERROR 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 6509e42db3 (svn r3179) - RandomRange() and RandomTile() instead of home brewed versions
- CHANCE*() instead of mumbling strange numbers
19 years ago
tron 524fd25cbd (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 19 years ago
tron 81e5b16d71 (svn r3172) static, const 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 b17b87469c (svn r3064) Replace some numbers by sprite names 19 years ago
tron 8980891b09 (svn r3024) -Codechange: Another batch of replacements of int/uint/int16/byte/-1 with proper types and constants 19 years ago
tron 39f5dbfd3b (svn r3019) -Codechange: Replace explicit shifting/anding/oring with GB and SB 19 years ago
tron 6d7c7e67b2 (svn r3010) Get rid of quite some dubious casts, either by using GB(), proper types or just removing them 19 years ago
tron 90e33aed22 (svn r2995) Replace 0xFF/0xFFFF with CT_INVALID/OWNER_SPECTATOR/INVALID_STATION where appropriate 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
Darkvater 78e4cbbfda (svn r2956) - Fix: [ 1253736 ] creating many town crash to desktop. Now it 'dies' with an ingame error message informing the gamer if it couldn't generate any towns in user-space. Still if it happens during new-game generation it crashes since we don't yet have actions to do in such a circumstance. 19 years ago
Darkvater c0c75ef16e (svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
- Add IsLocalPlayer() which substitutes _local_player == _current_player
19 years ago
tron 8b74a95d36 (svn r2886) Rename the "owner" attribute to "m1", because when it stores an owner it is accessed by [GS]etOwner anyway and when it doesn't store an owner, but arbitrary data, accessing a field called "owner" is confusing. 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
celestar a3739aecdf (svn r2702) -Codechange: Cleaned up the sprite code and replaced many magic numbers
by enums. There remains work in gfx.c to move the "transparency" and
"recolor" bits around to make space for more sprites. However, 2800
additional sprites can now be loaded. There also remains cleanup and
Doxygen work on many of the header files.
19 years ago
tron 647cbd6bdd (svn r2701) Insert Id tags into all source files 19 years ago