Commit Graph

55 Commits

Author SHA1 Message Date
Jonathan G Rennison
5718730d68 VarAction2: Add support for more varaction2 types
Add CB failure and deterministic relative types
2023-03-15 19:44:26 +00:00
Peter Nelson
c95a3be243 Change: Expose ObjectSpec vector to simplify iteration.
(cherry picked from commit 51b112139235c66c3adb2c3a75919fc1d3eff9fc)
2023-02-11 00:30:40 +00:00
Peter Nelson
74e4556a85 Codechange: Store objectspecs in std::vector instead of flat array.
(cherry picked from commit 1ae263c5467105820e4d770b3d57d25ba01e22b1)
2023-02-11 00:30:40 +00:00
Peter Nelson
d34e1bbbc1 Codechange: Bind objectspecs to classes once all finalised.
(cherry picked from commit 5f4a8f730b8982cbec7eec5e2331f0bc9217e69e)
2023-02-11 00:30:40 +00:00
Jonathan G Rennison
1bfd96c7f2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/3rdparty/fmt/core.h
#	src/command_type.h
#	src/console_cmds.cpp
#	src/core/overflowsafe_type.hpp
#	src/landscape.cpp
#	src/network/network.cpp
#	src/newgrf_object.h
#	src/object_cmd.cpp
#	src/order_gui.cpp
#	src/saveload/vehicle_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/script/api/script_object.hpp
#	src/script/api/script_town.cpp
#	src/table/object_land.h
#	src/timetable_cmd.cpp
#	src/tree_cmd.cpp
#	src/vehicle_gui.cpp
#	src/window.cpp
2023-01-15 19:28:37 +00:00
PeterN
2355882ec1
Codechange: Remove object enabled flag and shuffle members. (#10358)
`enabled` flag is replaced with IsEnabled() which checks if views is
non-zero.

ObjectSpec is shuffled to reduce its memory footprint.
2023-01-15 10:58:03 +00:00
Jonathan G Rennison
0a9c44d1a2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/airport_gui.cpp
#	src/blitter/32bpp_anim_sse4.cpp
#	src/console_cmds.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/newgrf_object.h
#	src/road_gui.cpp
#	src/widgets/road_widget.h
#	src/window.cpp
2022-10-16 20:14:13 +01:00
Michael Lutz
bd357656ba Codechange: [NewGRF] Replace magic number for default object size by a constant. 2022-10-16 18:28:08 +02:00
Jonathan G Rennison
d4f11eca42 Add NewGRF object properties to set viewport map mode/smallmap tile type 2022-02-07 01:16:45 +00:00
Jonathan G Rennison
33dc6c9688 Add NewGRF VarAction2 variable remapping infrastructure 2022-01-24 02:01:09 +00:00
Jonathan G Rennison
2e7f8d2e1e Add inclined foundation option to object edge foundation mode
Bump feature version
2022-01-23 13:17:13 +00:00
Jonathan G Rennison
b807f0d50e Fix setting of object spec ctrl flags from GRF properties 2021-12-08 03:35:56 +00:00
Jonathan G Rennison
24fb390e9f Add NewGRF object property for flood-resistance
Does not imply being able to be built on water
2021-12-05 21:46:09 +00:00
Jonathan G Rennison
d9116106ca Add NewGRF object property for new edge foundation mode 2021-12-05 21:33:56 +00:00
Jonathan G Rennison
924ffb013f Add NewGRF object property/flag to use land as object ground sprite
This handles variable ground densities, snow/desert, etc.
2021-12-05 11:54:13 +00:00
Jonathan G Rennison
95a60d520e Increase object class ID limit 2021-11-15 23:36:03 +00:00
Jonathan G Rennison
2ad446369d Cache animated tile speed, use btree map for animated tiles 2020-11-26 00:19:51 +00:00
Jonathan G Rennison
810bfd276e Add several NewGRF variables to vehicle image callback whitelist
Add vehicle flags to control cached image invalidation

Various refactorings
2020-08-25 01:26:44 +01:00
Niels Martin Hansen
c8779fb311
Feature: NewGRF callback profiling (#7868)
Adds a console command newgrf_profile to collect some profiling data about NewGRF action 2 callbacks and produce a CSV file.
2020-01-26 13:45:51 +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
Henry Wilson
af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
J0an Josep
cfb8092397 Fix b4b98e5165: Use FALLTHROUGH attribute with correct indentation. 2018-04-30 21:52:40 +02:00
frosch
d9d669dcf8 (svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent. 2018-03-11 13:19:41 +00:00
frosch
b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +00:00
frosch
db894b0b3f (svn r26085) -Codechange: Pass ResolverObjects as reference instead of pointer since they are never NULL. 2013-11-24 14:41:19 +00:00
planetmaker
c29ec8edee (svn r25877) -Doc: A bit too much c&p in comment 2013-10-17 21:41:59 +00:00
planetmaker
2ee9a2b5e7 (svn r25875) -Change: In scenario editor allow to build all objects which were available at any point in the past to support building scenarios with historic items 2013-10-17 21:37:25 +00:00
planetmaker
547b1fba45 (svn r25874) -Add: [NewGRF] NewObject property 0x10, bit 13 indicating that object amount scales with water content of map border (e.g. used for lighthouses) 2013-10-17 21:31:53 +00:00
planetmaker
88286d33ab (svn r25873) -Codechange: Add property for the amount of generated objects upon map creation to default objects 2013-10-17 21:27:08 +00:00
planetmaker
f5e408fa1c (svn r25868) -Fix (r25650): Initialization of default objects swapped costs and dates 2013-10-16 19:11:34 +00:00
frosch
b1131671d4 (svn r25831) -Change: Increase the object class limit from 32 to 255. (sbr) 2013-10-12 16:30:05 +00:00
alberth
33ff55a8f1 (svn r24693) -Doc: Add some doxymentation into the newgrf code. 2012-11-10 20:46:39 +00:00
alberth
4c9bea2a71 (svn r24692) -Cleanup: Cleanup final parts of the old resolver code. 2012-11-10 20:45:59 +00:00
alberth
a9b8b22daf (svn r24683) -Codechange: Add resolver classes for objects. 2012-11-10 20:40:46 +00:00
frosch
27ffb03383 (svn r24160) -Codechange: Split parts of ObjectSpec::IsAvailable() into ObjectSpec::IsEverAvailable(). 2012-04-22 16:27:45 +00:00
rubidium
e40eb8177a (svn r23735) -Codechange: remove ~50 includes from headers that weren't needed 2012-01-03 20:26:05 +00:00
terkhen
f1cde00372 (svn r22561) -Codechange: Remove constness from Object in ResolverObject. 2011-06-12 20:36:33 +00:00
terkhen
e127fca384 (svn r22557) -Codechange: Remove constness from AnimationBase callbacks. 2011-06-12 20:32:52 +00:00
planetmaker
2aa14cc54b (svn r22204) -Change: Make the base costs for building and demolishing NewObjects also local to the individual NewGRFs 2011-03-05 18:28:10 +00:00
rubidium
7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
rubidium
eb299736c1 (svn r21886) -Codechange: move documentation towards the code to make it more likely to be updated [n]. 2011-01-22 09:53:15 +00:00
rubidium
5d0da9492e (svn r21454) -Codechange: add support for object variable 48 2010-12-10 21:32:52 +00:00
rubidium
fdeab92dc7 (svn r21452) -Codechange: read object property 17 (number of views) 2010-12-10 21:30:26 +00:00
rubidium
60fe27db50 (svn r20662) -Codechange: implement object animation 2010-08-28 18:51:47 +00:00
rubidium
852bde0bad (svn r20660) -Codechange: implement (most) of action2 support for objects 2010-08-28 18:49:39 +00:00
rubidium
c481e3b110 (svn r20655) -Codechange: implement reading the action3 of objects 2010-08-28 18:22:24 +00:00
rubidium
164a923c69 (svn r20652) -Codechange: implement a function to get the index of a spec. 2010-08-28 17:38:07 +00:00
rubidium
0a86eac2f1 (svn r20651) -Codechange: add a function to determine whether an object is available and use it 2010-08-28 17:36:28 +00:00
rubidium
6348aa7964 (svn r20650) -Codechange: add some variables to the object's spec 2010-08-28 17:35:00 +00:00