Commit Graph

47 Commits (ab535c0a8665e6380c5037d7b6f0a507fc91d36a)

Author SHA1 Message Date
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
10 months ago
Patric Stout 5fba47b0f7
Codechange: make no assumptions on how the internals of TileIndex work (#11183)
Basically, avoid ".value", and just cast it to its original type
if you want to retrieve this.
10 months ago
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
11 months ago
Rubidium 1eefe1c3a0 Codechange: hide Tile(Extended) into the Tile structure 1 year ago
Rubidium 580d0a6343 Codechange: make use of Tile in for all direct map accesses 1 year ago
Rubidium 7a6452d3ef Codechange: introduce Tile class for accessing map data of a single tile 1 year ago
Rubidium 7a1816a6cd Codechange: rename Tile to TileBase to be able to introduce a new Tile class 1 year ago
Rubidium 0fb0469e47 Codechange: introduce iterator to iterate over the Tiles of a Map
Note: this version is using TileIndex, but that changes later
1 year ago
Rubidium b7a5d8e296 Codechange: add annotation to selectively force inlining in debug build 1 year ago
Rubidium 7cdc23fd64 Codechange: hide the map's size related fields in the Map structure 1 year ago
Rubidium de6bc8e692 Codechange: move TILE_MASK to Map::WrapToMap 1 year ago
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 1 year ago
Rubidium d481f78b24 Codechange: add map size related functions to Map structure 1 year ago
Joan Josep bcf26f8ec0
Doc: Fix some spelling mistakes (to->two, tileindex->TileIndex). (#9857) 2 years ago
Michael Lutz b0990fcff7 Codechange: Make TileIndex a "strong" typedef to give it a distinct type.
This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
2 years ago
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
Joan Josep 944f785be8 Fix: Spelling errors (#6769) 6 years ago
Pavel Stupnikov 8d8b9a026a Feature #6610: Allow towns to build houses on road turns (#6758) 6 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 13 years ago
rubidium 7efd7e19ed (svn r21845) -Codechange: move documentation towards the code to make it more likely to be updates [d-m]. 14 years ago
rubidium cdd35c6a51 (svn r21490) -Codechange: abstract/encapsulate the map area iterating a bit 14 years ago
rubidium 7cf40e5d25 (svn r21470) -Codechange: add method to get the distance from the edge in a given direction 14 years ago
rubidium 4871baf44d (svn r20282) -Codechange: add some spaces where they should've been 14 years ago
frosch 2e90f7f8b9 (svn r19670) -Codechange: Add CeilDiv() and RoundDiv() to simplify integer divisions with rounding. 14 years ago
rubidium 3e131e2fec (svn r18718) -Codechange: make a wrapper macro for looping TileAreas 15 years ago
rubidium b2e9b5d612 (svn r18683) -Fix: it's not an other 15 years ago
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
rubidium 2ec12a3f58 (svn r16966) -Codechange: BEGIN_TILE_LOOP and END_TILE_LOOP reworked into TILE_LOOP, which means no more duplication of parameters between BEGIN_TILE_LOOP and END_TILE_LOOP 15 years ago
smatz 5e1c59c3de (svn r16552) -Codechange: make AddTileIndexDiffCWrap() a bit faster 15 years ago
smatz d6996c110a (svn r16551) -Codechange: use shift instead of multiplication in TileXY() 15 years ago
smatz ec78a39f9e (svn r16550) -Codechange: move definition of ScaleByMapSize to header file, use shifts instead of mults 15 years ago
rubidium 00ed8c6f27 (svn r16138) -Codechange: move GetClosestWaterDistance to map* 15 years ago
frosch d452a0a0ec (svn r15789) -Codechange: Add DiagdirBetweenTiles() and use it. 15 years ago
belugas 05fe2d8d21 (svn r15620) -Fix[FS#2699]: Error in documentation (Conditional Zenith). 15 years ago
yexo a0c4f1156a (svn r15585) -Codechange: Remove TILE_ASSERT and replace all instances with assert(tile < MapSize()). 15 years ago
rubidium d642a55b91 (svn r14847) -Codechange: generalise the circular search to search around a rectangle (PhilSophus) 16 years ago
frosch 4e6d827ea6 (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 16 years ago
belugas b0ada3fbbf (svn r13367) -Codechange: Allow CircularTileSearch function to return the tile where search has been successful, or INVALID_TILE if it has not 16 years ago
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 16 years ago
belugas 4a3e135086 (svn r11961) -Feature[newGRF]: Add support for Action 0D, var 13: informations about current map size. 17 years ago
frosch 49d2087d7f (svn r11947) -Feature: Make use of new sprites added by Action5 type 0D.
Tiles which only consist of shore do not flood anymore, instead they get removed if they are no longer connected to flooding water.
17 years ago
glx b7f50533c2 (svn r11914) -Documentation: fix some @file statement 17 years ago
frosch 978a7ca56a (svn r11897) -Fix: Replace an uint with TileIndex and a small coding style fix. 17 years ago
rubidium 2786d789a1 (svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h). 17 years ago