Commit Graph

70 Commits

Author SHA1 Message Date
Rubidium df461b0329 Codechange: simplify TileAdd by using simple asserts 2024-03-10 15:50:24 +01:00
Kuhnovic b38d3c2208
Change: simplified water region evaluation, removed savegame data (#11750) 2024-01-21 20:56:50 +00:00
Peter Nelson da2d21f5b0
Fix: Left-over printf-style format passed to fmt. (#11584) 2023-12-14 19:35:35 +00:00
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.
2023-11-06 20:29:35 +00:00
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
2023-07-19 19:30:14 +02:00
Rubidium 5e9a1eb790 Codechange: use fmt::format to construct error message 2023-06-07 08:02:58 +02:00
Rubidium 275ebf4509 Codechange: replace fprintf(<FILE*> with fmt::print(<FILE*> 2023-05-21 15:12:02 +02:00
Rubidium f74e26ca7e Codechange: replace error/usererror printf variant with fmt variant and rename 2023-04-25 17:55:09 +02:00
Rubidium 1eefe1c3a0 Codechange: hide Tile(Extended) into the Tile structure 2023-02-28 07:11:48 +01:00
Rubidium 7a1816a6cd Codechange: rename Tile to TileBase to be able to introduce a new Tile class 2023-02-28 07:11:48 +01:00
Rubidium 7cdc23fd64 Codechange: hide the map's size related fields in the Map structure 2023-01-21 17:11:40 +01:00
Rubidium de6bc8e692 Codechange: move TILE_MASK to Map::WrapToMap 2023-01-21 17:11:40 +01:00
Rubidium fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
Rubidium d481f78b24 Codechange: add map size related functions to Map structure 2023-01-21 17:11:40 +01:00
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.
2021-12-16 22:28:32 +01:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
J0anJosep 79a551a83c Codechange: Use TileAddBy(Diag)Dir when possible. 2018-04-30 18:55:04 +02:00
Patric Stout aef69443e7 Remove: WinCE support 2018-04-29 15:32:16 +02:00
rubidium 2e493fa806 (svn r26503) -Fix: compilation error with full debug build 2014-04-24 18:49:24 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
truebrain 6f6035ce0b (svn r23701) -Codechange: give TileAddWrap() a 27% speed-up, by swapping entries in an if() statement, and reusing already calculated values (tnx to SmatZ for the ideas) 2012-01-01 16:01:51 +00:00
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
frosch 8b2f2c09e5 (svn r21995) -Cleanup (r21994): Remove obsolete comment. 2011-02-06 14:33:04 +00:00
frosch a8859bbff9 (svn r21994) -Fix: Make computations of closest-land/water-distances handle waterish tiles more correctly. 2011-02-06 13:57:17 +00:00
rubidium 7efd7e19ed (svn r21845) -Codechange: move documentation towards the code to make it more likely to be updates [d-m]. 2011-01-18 22:31:06 +00:00
rubidium 7cf40e5d25 (svn r21470) -Codechange: add method to get the distance from the edge in a given direction 2010-12-11 19:48:31 +00:00
alberth 606519c112 (svn r21055) -Codechange [FS#4190]: Code style fix (chillcore) 2010-10-29 14:59:37 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
yexo 6be4560528 (svn r18937) -Fix (r15190): TileAddWrap didn't return INVALID_TILE for void tiles at the north border 2010-01-28 19:27:10 +00:00
yexo be3ca424f6 (svn r18755) -Fix [FS#3495] (r14847): CircularTileSearch skipped a few tiles close to the starting tile 2010-01-07 20:56:50 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
smatz 114d48e492 (svn r17596) -Codechange: constify some tables 2009-09-20 23:11:01 +00:00
rubidium e8ddf001c8 (svn r17570) -Fix: a number of Doxygen warnings about missing parameters, which were sometimes missing and sometimes just typos 2009-09-19 09:51:14 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 4419366f94 (svn r16603) -Codechange: enumify map size limits (based on a patch by Bilbo) 2009-06-20 11:25:39 +00:00
smatz ec78a39f9e (svn r16550) -Codechange: move definition of ScaleByMapSize to header file, use shifts instead of mults 2009-06-10 08:18:40 +00:00
smatz 0c0943fe83 (svn r16547) -Codechange: make CircularTileSearch a tiny bit faster 2009-06-09 23:34:48 +00:00
rubidium 00ed8c6f27 (svn r16138) -Codechange: move GetClosestWaterDistance to map* 2009-04-24 22:27:21 +00:00
smatz d73c1fa7bf (svn r15568) -Cleanup: *allocT/AllocaM doesn't return NULL when allocating fails 2009-02-24 20:59:17 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz df79660531 (svn r15296) -Cleanup: remove redundant _MSC_VER >= 1400 checks, older versions aren't supported anymore. One check in stdafx.h is enough 2009-01-30 17:54:48 +00:00
rubidium d642a55b91 (svn r14847) -Codechange: generalise the circular search to search around a rectangle (PhilSophus) 2009-01-05 17:48:54 +00:00
frosch 4e6d827ea6 (svn r13632) -Codechange: Use 'void *' for user-data of CircularTileSearch(). 2008-06-25 18:46:05 +00:00
belugas b0ada3fbbf (svn r13367) -Codechange: Allow CircularTileSearch function to return the tile where search has been successful, or INVALID_TILE if it has not 2008-06-03 02:20:27 +00:00
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. 2008-05-06 15:11:33 +00:00
belugas 4a3e135086 (svn r11961) -Feature[newGRF]: Add support for Action 0D, var 13: informations about current map size. 2008-01-23 17:08:35 +00:00