Commit Graph

73 Commits

Author SHA1 Message Date
tron 2eb76813ed (svn r6184) Remove the unused (because it was NULL in all callers) second parameter of FillDrawPixelInfo() and simplify some expressions 2006-08-28 07:33:51 +00:00
truelight ceb523c29f (svn r6057) -Codechange: made a function GetRandomXXX, that _always_ returns a valid XXX, unless there are none to pick from. Then NULL is returned. 2006-08-22 21:14:45 +00:00
truelight 0461d89612 (svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
-Codechange: use IsValidXXX where ever possible
  Note: both changes to prepare for new pool system, which needs those changes.
  For every pool there are 2 ugly lines, which will be removed when done
  implementing new pool system.
  Based on FS#13 by blathijs, partly implemented.
2006-08-22 15:33:35 +00:00
rubidium 480af9c917 (svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct. 2006-08-22 14:38:37 +00:00
truelight 7c6ec91ef7 (svn r6040) -Add: when clicking twice on a Location Button, the SmallMap centers on your position (based on FS#54 by thomasdev)
-Add: when clicking twice in SmallMap on a position, it centers there (based on FS#54 by thomasdev)
-Add: add a button in SmallMap that centers the SmallMap on your current position (based on FS#54 by thomasdev)
2006-08-21 17:41:04 +00:00
truelight 2849e4fea9 (svn r6038) -Codechange: move mousewheel code to event WE_MOUSEWHEEL instead of a general function that handles that
-Codechange: use always 'e' for WindowsEvent, neverr 'we'
2006-08-21 14:59:58 +00:00
truelight 9ec2fdcbf3 (svn r6036) -Codechange: do not handle SCROLL in a central function, but let windows handle them theirself. Added WE_SCROLL for this. 2006-08-21 14:34:59 +00:00
belugas 6082507fea (svn r5609) CodeChange : Apply coding style 2006-07-26 03:33:12 +00:00
tron 0a72639c2d (svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc. 2006-06-10 08:37:41 +00:00
tron 65c06663ba (svn r4938) Remove STATION_HANGAR, because it isn't really a station type of its own 2006-05-21 12:01:57 +00:00
belugas f1da549c10 (svn r4350) CodeChange : Add and use accessors [G|S]etIndustrype. Define and use IndustryGfx type instead of uint 2006-04-10 21:00:56 +00:00
tron 99a6b9b8f2 (svn r4279) s/\<CL_/CLEAR_/ 2006-04-04 21:35:13 +00:00
tron cc0ffe6582 (svn r4271) s/\<TR_/TREE_/ resp. s/\<TR_/TREE_GROUND/ 2006-04-04 06:25:05 +00:00
celestar 3aa1e38be6 (svn r4246) -Codechange. Replaced about 100 occurences of '16' by TILE_SIZE 2006-04-03 05:32:11 +00:00
peter1138 43c86cf33f (svn r4199) - Codechange: Use industry map accessors to get industry graphics type. 2006-03-31 10:44:32 +00:00
tron cda8934a55 (svn r4120) Use the new station functions where appropriate 2006-03-26 19:20:15 +00:00
belugas 26a5b62865 (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme 2006-03-24 18:16:39 +00:00
tron b8da06ddb1 (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX 2006-03-16 15:16:27 +00:00
tron 78083f0da7 (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 2006-03-12 15:04:03 +00:00
tron e63e3bb84c (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 2006-03-11 17:06:16 +00:00
tron cc4f5b4e6f (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 2006-03-05 10:19:33 +00:00
tron 453b30e387 (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
2006-02-06 09:18:04 +00:00
Darkvater 7f1cda519c (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. 2006-02-05 23:12:23 +00:00
tron 208a4b4944 (svn r3556) Add accessors for handling tree tiles
See tree.h for details
2006-02-05 14:47:15 +00:00
Darkvater c5a669b39f (svn r3529) - Fix: [ 1415782 ] crash in string code with openbsd/zaurus; alignment issues (thanks Tron for the help) 2006-02-03 21:51:42 +00:00
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
2006-02-01 15:31:21 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
tron 22dc05faf2 (svn r3510) Fiddle with whitespace and parentheses 2006-02-01 06:32:03 +00:00
Darkvater 8931913884 (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) 2006-01-28 12:23:54 +00:00
peter1138 1c57091230 (svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing. 2005-12-07 15:48:52 +00:00
tron 833032adc0 (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 2005-11-14 08:09:57 +00:00
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
2005-10-22 06:39:32 +00:00
tron 1677748d4d (svn r2894) Simplify colouring in owner-mode in the minimap regarding towns and get rid of some magic numbers 2005-08-27 13:04:15 +00:00
truelight 732acc8ead (svn r2858) -Codechange: resolved some magic numbers (_Luca_) 2005-08-11 19:23:32 +00:00
tron a227065ab7 (svn r2701) Insert Id tags into all source files 2005-07-24 14:12:37 +00:00
tron 559babcdc9 (svn r2673) Include functions.h directly, not globally via openttd.h 2005-07-22 07:02:20 +00:00
tron 0762aa9ec9 (svn r2669) Shuffle some more stuff around to reduce dependencies 2005-07-21 22:15:02 +00:00
tron 8f71864bef (svn r2571) Add explicit type Pixel for ... Pixels 2005-07-15 14:16:14 +00:00
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. 2005-07-13 18:04:01 +00:00
tron bec5e4fb4c (svn r2487) Replace TILE_XY by TileXY/TileDiffXY 2005-06-25 16:44:57 +00:00
Darkvater b2b0f6f3ce (svn r2425) - Fix (regression): wrong sprite for level-land cursor (thx Tron)
- CodeChange: change MapSizeX() - 1 to MapMaxX() in the smallmap drawing code
2005-06-06 17:30:52 +00:00
Darkvater 7dd5578477 (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. 2005-06-06 15:58:58 +00:00
tron 0c4ecbe9ec (svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner 2005-06-04 11:56:32 +00:00
Darkvater b438b1248c (svn r2397) - CodeChange: rename all "ttd" files to "openttd" files. 2005-06-02 19:30:21 +00:00
Darkvater 14996be3ef (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. 2005-05-15 11:20:38 +00:00
tron cb084f59c2 (svn r2020) Reduce code duplication in the minimap code a bit 2005-03-17 16:31:18 +00:00
tron f1f70501db (svn r2019) Miscellaneous cleanups, like uint -> TileIndex, >> -> /, if cascade -> switch 2005-03-17 09:59:52 +00:00
tron 61e0dd439f (svn r2015) Use a struct and an inline function for colour masking on the mini-map - this should improve readability a bit 2005-03-15 18:31:38 +00:00
tron 94c75f33bb (svn r1854) Split GetSpritePtr() into GetSprite() for regular sprites (returning a Sprite*) and GetNonSprite() for "sprites" of type 0xFF (returning byte*) 2005-02-10 12:14:38 +00:00
tron 2a151d9354 (svn r1853) Move spritecache function declarations into a header of their own and use SpriteID as parameter type where appropriate 2005-02-10 05:43:30 +00:00