Commit Graph

66 Commits (9b18c11413655ef3bc1871cf84fe1a0e95a166c3)

Author SHA1 Message Date
belugas 40a8964911 (svn r5609) CodeChange : Apply coding style 18 years ago
tron a2362674e3 (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 18 years ago
tron 9bd8bccaa0 (svn r4938) Remove STATION_HANGAR, because it isn't really a station type of its own 18 years ago
belugas ddd96570ca (svn r4350) CodeChange : Add and use accessors [G|S]etIndustrype. Define and use IndustryGfx type instead of uint 18 years ago
tron aa5777c874 (svn r4279) s/\<CL_/CLEAR_/ 19 years ago
tron b7ee0b8ba3 (svn r4271) s/\<TR_/TREE_/ resp. s/\<TR_/TREE_GROUND/ 19 years ago
celestar 6443c14ebd (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 19 years ago
peter1138 6e97540f1e (svn r4199) - Codechange: Use industry map accessors to get industry graphics type. 19 years ago
tron c40740e058 (svn r4120) Use the new station functions where appropriate 19 years ago
belugas ed86c3d818 (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme 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 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 86491ca257 (svn r3820) Be a bit more strict with types: use special types instead of generic byte and don't fill arbitrary data into inappropriate types 19 years ago
tron 4efa560ffc (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 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
Darkvater d9d4a4c4bd (svn r3559) - CodeChange: simplify MKCOLOR(x) macro for smallmap_gui.c by adding a TO_LE32X() macro next to TO_BE32X(). The 'X' signifies them as macros and not-inline functions so they can be used in variable declarations. 19 years ago
tron 72eeae1546 (svn r3556) Add accessors for handling tree tiles
See tree.h for details
19 years ago
Darkvater e57ea5e57d (svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help) 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
tron 9712d6f639 (svn r3510) Fiddle with whitespace and parentheses 19 years ago
Darkvater 1693f5052b (svn r3462) - Fix: a one-off pixel alignment in the minimap window that "overflowed" its panel in the tropical climate (qball should be satisfied now) 19 years ago
peter1138 5f3dc36983 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 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 0def515dbb (svn r2894) Simplify colouring in owner-mode in the minimap regarding towns and get rid of some magic numbers 19 years ago
truelight 30e9f4cff2 (svn r2858) -Codechange: resolved some magic numbers (_Luca_) 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 71140a5768 (svn r2669) Shuffle some more stuff around to reduce dependencies 19 years ago
tron 462b0d6686 (svn r2571) Add explicit type Pixel for ... Pixels 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
Darkvater ab7bf18d23 (svn r2425) - Fix (regression): wrong sprite for level-land cursor (thx Tron)
- CodeChange: change MapSizeX() - 1 to MapMaxX() in the smallmap drawing code
19 years ago
Darkvater 4198418d77 (svn r2424) - Fix: backport the smallmap_gui.c changes from the map/ branch into trunk. This also implicitely fixes the bug where the game would crash in certain resolutions with certain minimap masks when dragged partly outside the game-area. 19 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 19 years ago
Darkvater ba8c649fac (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 19 years ago
Darkvater a195f8df91 (svn r2319) - Fix: copying/pasting from the extra viewport did not center on what you wanted to see if one of the windows (viewport or main) was zoomed out. Also fix the undisabled-zoom-in button upon creation. 19 years ago
tron f82893680b (svn r2020) Reduce code duplication in the minimap code a bit 20 years ago
tron 167f30edc7 (svn r2019) Miscellaneous cleanups, like uint -> TileIndex, >> -> /, if cascade -> switch 20 years ago
tron 46378c1516 (svn r2015) Use a struct and an inline function for colour masking on the mini-map - this should improve readability a bit 20 years ago
tron d2703fd672 (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*) 20 years ago
tron 7cd19fe07a (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate 20 years ago
tron 38587b60f7 (svn r1718) Use the enum TileType as parameter/return type for [GS]etTileType() instead of plain int.
This makes it necessary to rename TileType() to GetTileType() because a type and a function may not share the same name.
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 94d5aeabb2 (svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile 20 years ago
tron 14451419c6 (svn r1593) Remove yet another alloca() 20 years ago
tron 27057ae4b0 (svn r1545) Add TileHeight() which returns the height (not multiplied by 8)
Replace some direct references to _map_type_and_height with TileHeight()/IsTileType()
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
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