Commit Graph

110 Commits

Author SHA1 Message Date
Peter Nelson 3e83dcedfd Codechange: Allocate houses dynamically instead of from a fixed array.
This uses vectors for HouseSpecs and global/town building counts.
2024-03-28 23:23:00 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Michael Lutz 8dda387f82 Codechange: Use std::tuple for slope functions with two return values 2024-03-08 18:08:55 +01: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 1a179cb297 Codechange: use GetString + StrMakeValid to pass string without colours/font sizes to Debug 2023-05-21 21:17:12 +02:00
Rubidium fb856e16c1 Codechange: replace some min/clamp constructs to ClampTo 2023-05-06 21:26:13 +02:00
Peter Nelson 912eb68981 Change: Extend entity override manager and station spec lists to support 16 bit IDs. 2023-05-05 07:08:40 +01:00
Peter Nelson 370a8d77a4 Codechange: Use simple assignment to assign specs. 2023-04-23 15:58:27 +01:00
Rubidium 7088f5b7c7 Codechange: use string/fmt instead of printf for grfmsg 2023-04-18 23:21:08 +02:00
Peter Nelson 1f46f080f0 Codechange: Store objectspecs in std::vector instead of flat array. 2023-04-02 22:42:38 +01:00
Peter Nelson 93197f58b7 Codechange: Bind objectspecs to classes once all finalised. 2023-04-02 22:42:38 +01:00
Peter Nelson ede1201b6a Codechange: Rename override manager variables. 2023-01-26 21:39:16 +01:00
Peter Nelson bcc53c5ad5 Codechange: Add missing `this->` in override manager.
Variable scope is also tweaked in a couple of cases reducing line count.
2023-01-26 21:39:16 +01:00
Peter Nelson eedb786872 Codechange: Use vector for NewGRF spec overrides.
This replaces C-style memory management.
2023-01-26 21:39:16 +01:00
Rubidium de6bc8e692 Codechange: move TILE_MASK to Map::WrapToMap 2023-01-21 17:11:40 +01:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
rubidium42 44ca7d9377 Change: Use gender-neutral pronouns 2021-05-15 10:16:48 +02:00
Michael Lutz 79240eab1e Codechange: Make use of the improved C++17 emplace_back function. 2020-12-15 00:29:30 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Niels Martin Hansen 53f8d0b815 Codechange: Use std::vector for industry tile layouts 2019-10-19 17:16:25 +01:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson a0f36a50e6 Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back() 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +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
frosch ba1779b978 (svn r26241) -Codechange: Remember the GRFFile which filled the TextRefStack in the TextRefStack. 2014-01-12 18:00:39 +00:00
frosch 73c6565cf2 (svn r26240) -Codechange: Pass the GRFFile to GetErrorMessageFromLocationCallbackResult instead of the GRFID. 2014-01-12 18:00:19 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
rubidium 6d6be50ae0 (svn r23740) -Codechange: remove some 300 unneeded includes from the .cpp files 2012-01-03 21:32:51 +00:00
alberth 4af8c2d5e1 (svn r23704) -Doc: Doxygen comment fixes and additions. 2012-01-01 17:22:32 +00:00
rubidium 58423b26d1 (svn r23474) -Codechange: move the declaration error related functions to error.h 2011-12-10 13:54:10 +00:00
frosch 8f4c6d42f9 (svn r23154) -Change: [NewGRF v8] Use heightlevel units in nearby tile info variables. (rubidium) 2011-11-08 17:29:01 +00:00
frosch 30874b5e81 (svn r23147) -Change: [NewGRF v8] Unify the return values of boolean callbacks, and check the results for validity. 2011-11-08 17:26:49 +00:00
frosch d8f8909f85 (svn r23142) -Change: [NewGRF v8] Unify the return values of callbacks returning D0xx texts. 2011-11-08 17:24:43 +00:00
frosch 56e5144f71 (svn r23140) -Add: ErrorUnknownCallbackResult() 2011-11-08 17:24:15 +00:00
rubidium 19eabdba2c (svn r23106) -Codechange: pass int* to GetTileSlope and friends 2011-11-04 11:30:37 +00:00
rubidium 69162621d8 (svn r23096) -Codechange: remove useless divisions and multiplications by TILE_HEIGHT for the snow line code 2011-11-04 10:25:58 +00:00
rubidium 7757a2ed40 (svn r23091) -Codechange: rename some Get*Z functions to Get*PixelZ functions if they return the Z in pixels (like TilePixelHeight) 2011-11-04 10:18:13 +00:00
frosch 7f228d6909 (svn r22924) -Codechange: Enhance NewGRFSpriteLayout for drawing construction stages in spritelayouts with inconsistent number of sprites per spriteset. 2011-09-11 15:10:09 +00:00
frosch c6e29a5b89 (svn r22848) -Add: The missing bits in station variable 43. 2011-08-27 08:42:24 +00:00
frosch 2e466cc184 (svn r22721) -Fix (r22518): Conditionally hiding a sprite caused subsequent items of the spritelayout to use wrong registers. 2011-08-06 10:47:37 +00:00
planetmaker e188edd8f6 (svn r22679) -Change [FS#4692] (r22655): [NewGRF] Use a value of 0 to indicate the invalid waterclass in the nearby land info (0x60 ind. tiles, 0x62 houses, objects,...) 2011-07-21 17:17:48 +00:00
michi_cc d579af11e8 (svn r22659) -Add: [NewGRF] Support for the land slope check callback for stations. 2011-07-11 16:32:35 +00:00
michi_cc 624aec0b19 (svn r22657) -Add: [NewGRF] More default error messages for the industry shape and location callbacks. 2011-07-11 16:32:25 +00:00
michi_cc 206ff68e65 (svn r22656) -Codechange: Deduplicate the custom error message of the industry shape and location callbacks. 2011-07-11 16:32:19 +00:00
michi_cc 1e855be492 (svn r22655) -Add: [NewGRF] Add water class to the 'land info of nearby tiles' vars. 2011-07-11 16:32:13 +00:00
rubidium 52e40e7cbd (svn r22578) -Fix: another MSVC compile warning 2011-06-13 08:27:12 +00:00
terkhen 7f5612a98f (svn r22574) -Fix (r22566): GetGRFID was using a wrong return type. 2011-06-13 06:28:43 +00:00