Commit Graph

97 Commits

Author SHA1 Message Date
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
Rubidium 3a676a5af0 Codechange: replace static inline with static for non-class functions 2024-01-06 13:37:33 +01:00
Peter Nelson bc8e26f4e7
Codechange: Simplify usage of GRFFile cargo_map. (#11349) 2023-10-20 18:38:54 +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 3323402aaa Codechange: rename smallvec_type to container_func and use only when needed 2023-05-20 16:53:10 +02:00
Peter Nelson 6b87fe6540 Codechange: Use std::array for GRF(File|Config) parameters.
This simplifies comparison, copying and assignment operations.
2023-05-19 16:53:56 +01:00
Rubidium 3901ef9760 Codechange: use std::string for the GRF filenames 2023-05-04 23:23:32 +02:00
Rubidium 7088f5b7c7 Codechange: use string/fmt instead of printf for grfmsg 2023-04-18 23:21:08 +02:00
Peter Nelson 7b0797d1cd Codechange: Use unique ptrs for NewGRF specs. 2023-04-16 15:09:10 +01:00
Peter Nelson ef6b307465 Change: Use std::vector for NewGRF spec tables.
Pointer space is allocated only for the number of IDs used, instead of
the max number of IDs for each feature.
2023-04-16 15:09:10 +01:00
Jonathan G Rennison 4c1406a4b5 Add: NewGRF road stops 2023-02-26 21:28:30 +01:00
PeterN 4f26f6b8aa
Cleanup: Simplify GRFLabel linked-list with std::vector. (#10284) 2022-12-25 22:32:22 +00:00
Rubidium 10e35ca8e4 Codechange: let NewGRF make use of SpriteFile instead of most of the FIO slot functions 2021-05-08 12:39:34 +02:00
Rubidium fdc11a9f94 Codechange: introduce SpriteFile to be used by the sprite loader instead of the global FIO slot functionality 2021-05-08 12:39:34 +02:00
Yexo 1507902d00 Codechange: remove has_newindustries global 2020-06-01 22:46:06 +02:00
Yexo a82572d0f5 Codechange: remove has_newhouses global 2020-06-01 22:46:06 +02:00
Yexo f827bc8c1a Fix #8166: don't crash on loading an invalid roadtype newgrf
Initialization code for GRFFile::roadtype_map was copied from
railtype_map. But while RailType is a byte-sized enum and could thus
be initialized via memset, RoadType doesn't have a defined size.
2020-06-01 12:44:02 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
peter1138 c02ef3e456 Feature: Add NotRoadTypes (NRT) 2019-05-01 21:36:27 +02:00
Charles Pigott 931d32f414 Codechange: Remove RailTypeByte type 2019-04-29 17:40:22 +01:00
stormcone 79343762a4 Fix: Typos. (#7517) 2019-04-15 22:06:41 +02:00
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 2019-03-26 20:15:57 +00:00
Henry Wilson c01a2e2a81 Codechange: Removed SmallVector completely 2019-03-26 20:15:57 +00:00
frosch 1aedadb49b (svn r27730) -Change: Split openttd.grf into openttd.grf and orig_extra.grf
openttd.grf is now always loaded and provides all extra graphics in case the (possibly outdated) baseset does not.
  orig_extra.grf contains graphics specific to the original baseset only.
2017-01-14 15:48:19 +00:00
frosch a3b356e057 (svn r27725) -Codechange: Remove IsOpenTTDBaseGRF and test for GCF_CONFIG instead, which does the same in all use-cases. 2017-01-07 21:36:25 +00:00
frosch 4d310eafc5 (svn r27200) -Feature/Fix [FS#6260]: [NewGRF] Add Misc. GRF Feature Flag 6 to enable the second rocky tile set. 2015-03-20 19:27:15 +00:00
rubidium 2b10ee1891 (svn r26364) -Fix [FS#5892]: writing out of the bounds of the rail type map 2014-02-22 21:12:28 +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
frosch 522e5ec86b (svn r24277) -Codechange: Store cargo and railtype translation tables in a SmallVector. 2012-05-25 20:57:36 +00:00
frosch b8f6b300d6 (svn r24276) -Codechange: Enhance GRFFile with constructor and destructor. 2012-05-25 20:54:54 +00:00
michi_cc 6db39410a1 (svn r23887) -Feature: [NewGRF] Support for container version 2. 2012-02-04 13:29:04 +00:00
truebrain da460f6928 (svn r23703) -Codechange: allow a compiler to inline a wrapper function, avoiding creation of a function stack, massively increasing its speed, for a function that is called often 2012-01-01 16:38:38 +00:00
rubidium df16ebd730 (svn r23595) -Codechange: add comma after last enum to get a more uniform coding style 2011-12-19 17:48:04 +00:00
rubidium 3d88c74389 (svn r23526) -Codechange: unify cargos vs cargoes 2011-12-15 21:56:00 +00:00
frosch 5aaecae6e2 (svn r23153) -Change: [NewGRF v8] Use heightlevel units in variable 20/A0. 2011-11-08 17:28:52 +00:00
michi_cc 707b0f48e6 (svn r23114) -Feature: [NewGRF] Ambient sound effect callback. 2011-11-04 21:05:08 +00:00
rubidium 1842622d81 (svn r22973) -Add: support for replacing the buoy via action123 2011-10-02 20:26:43 +00:00
planetmaker 3b70f697e1 (svn r22918) -Fix: [NewGRF] Properties for feature 0x05 were not zeroed for each NewGRF, thus waterfeatures could glitch when the properties were set by a previous NewGRF and the NewGRF assumed the properties to be unmodified 2011-09-11 09:31:57 +00:00
rubidium 8e5f433b22 (svn r22826) -Codechange: pass sub directory to NewGRF loading functions 2011-08-24 13:48:29 +00:00
frosch 236075e944 (svn r22784) -Fix: Move Action 2 references from GRFFile to GrfProcessingState, and reset them after each loading stage. 2011-08-21 12:07:15 +00:00
frosch bb57e0934a (svn r22783) -Fix: Move Action 1 references from GRFFile to GrfProcessingState, and reset them after each loading stage. 2011-08-21 12:06:54 +00:00
frosch c9e920f1eb (svn r22693) -Fix [FS#4691]: The override managers were not reset in some cases like creating a new scenario. 2011-07-29 22:23:17 +00:00
yexo 6a1eb377ae (svn r22408) -Cleanup: remove unused variable GRFFile::sprite_offset 2011-05-01 20:46:36 +00:00
rubidium 0500c92003 (svn r21208) -Add: [NewGRF] Mapping information w.r.t. a translation's case and gender names 2010-11-16 12:47:22 +00:00
frosch a54b711dc1 (svn r20848) -Add: _loaded_newgrf_features.used_liveries to keep track which liveries are used by some vehicle resp. which are not used at all. 2010-09-25 21:59:22 +00:00
smatz 82949024f1 (svn r20758) -Fix: when leaving the program, current newgrf config would leak, causing valgrind warnings 2010-09-06 18:20:07 +00:00
rubidium 23ba40d385 (svn r20654) -Codechange: implement reading action0 of objects 2010-08-28 18:21:09 +00:00
rubidium 412bb37f59 (svn r20409) -Codechange: reduce the number of includes needed by newgrf.h 2010-08-08 09:07:40 +00:00
rubidium 398418b8fa (svn r19812) -Codechange: give some unnamed enums a name or, in case they consisted of unrelated values use static const (u)int 2010-05-13 09:44:44 +00:00