Commit Graph

43 Commits

Author SHA1 Message Date
Peter Nelson 6a3f50aa72
Codechange: Replace separate EffectVehicle arrays. (#12565)
Combine 3 separate arrays into a single struct. This keeps related data together, and avoids needing to check that each array is same length.

Use of constexpr construct ensures data in the array is not default-initialised.

Removes lengthof.
2024-04-24 21:29:12 +01:00
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +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 fe2bcd2a58 Codechange: migrate size related functions to Map structure 2023-01-21 17:11:40 +01:00
frosch d9b4413bc9
Codechange: rename sound ids to make more sense. (#8701) 2021-02-20 19:01:04 +01:00
Matt Kimber 9b28b15e67 Codechange: create MutableSpriteCache to remove the need to cast Vehicle to a mutable type in render methods 2021-01-05 11:42:25 +01:00
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00: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
PeterN a07394a63a
Change: Remove direction parameter from Vehicle::UpdateDeltaXY. (#6792)
The value is either unused or always the same as this->direction.
2018-05-22 18:43:34 +01:00
frosch 117e73751c (svn r27668) -Feature: [NewGRF] Allow composing vehicles from multiple sprites. 2016-10-16 14:59:44 +00:00
frosch d2393b4f6c (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
frosch 7c4e5242ba (svn r27664) -Codechange: Deduplicate code for animating effect vehicles. 2016-10-16 14:56:52 +00:00
rubidium 6c2abf0930 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 2014-09-20 15:31:26 +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
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 3ce8d2ce70 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +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 0d929e877f (svn r23713) -Codechange: split VehicleMove() into two functions, to minimalize the work done where possible 2012-01-02 13:44:30 +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 460d24fd83 (svn r22506) -Feature [FS#4625]: Make the transparency options for industries also affect the effect vehicles created by industries. 2011-05-28 09:46:37 +00:00
frosch 71822b6f1b (svn r22505) -Add: Separate EffectVehicleTypes for broken aircraft and smoke at copper ore mine, to make them distinguishable from each other and from smoke due to disasters. (only affects newly spawned effects) 2011-05-28 09:45:12 +00:00
frosch 7c21083227 (svn r22504) -Codechange: Add EV_END and use it to check the lengths of _effect_init_procs and _effect_tick_procs. 2011-05-28 09:43:53 +00:00
frosch 1b34d22620 (svn r22503) -Doc: EffectVehicleType. 2011-05-28 09:43:22 +00:00
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
smatz ee685c8287 (svn r17316) -Codechange: use Industry::GetByTile() instead of GetIndustryByTile() 2009-08-30 11:47:41 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium 6d1c974254 (svn r16384) -Codechange: move u.effect to EffectVehicle 2009-05-22 18:56:25 +00:00
smatz b687ac51ee (svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted 2009-05-22 13:53:14 +00:00
rubidium 655b0ccc2e (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 2009-03-11 20:43:14 +00:00
rubidium 48c8cdfd84 (svn r15675) -Codechange: don't unnecessarily mark vehicles dirty before deleting them; it already happens in the destructor. 2009-03-11 19:50:19 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium f0b0691bfe (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 2009-01-09 14:59:02 +00:00
rubidium 331b8dd7d4 (svn r14931) -Fix [FS#2512]: the "animation state" of the bubbles was stored in a variable that was not stored in the savegame. Using a variable that gets saved in the savegame solves the desync and makes it a bit clearer. 2009-01-09 09:50:33 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
glx ef0458c739 (svn r14110) -Fix: desyncs due to bubbles in toyland 2008-08-20 16:51:08 +00:00
rubidium 2f3b88ef9a (svn r13343) -Codechange: reorder/move variable/functions in the network headers so that nothing from the network directory needs to include basically all network headers. 2008-05-30 18:20:26 +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
rubidium b139756e2b (svn r12804) -Codechange: move the effect vehicle handling out of vehicle.cpp 2008-04-20 11:12:07 +00:00