1
1
forked from 0ad/0ad
0ad/source/simulation2/system
Ykkrosh 05422ad545 Avoid slightly-expensive QueryInterface() calls
Add CEntityHandle which wraps an entity_id_t and also has a pointer to a
per-entity array of IComponents. QueryInterface/CmpPtr on a handle just
involve a couple of pointer dereferences instead of a map lookup.

This requires sizeof(void*) per registered interface type per entity,
which is currently ~0.5KB per entity, which shouldn't be a problem.

This was SVN commit r13825.
2013-09-11 20:41:53 +00:00
..
CmpPtr.cpp # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
CmpPtr.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
Component.h Simplify component interface: remove explicit context parameter, use GetSimContext() instead. 2011-01-16 14:08:38 +00:00
ComponentManager.cpp Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
ComponentManager.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
ComponentManagerSerialization.cpp Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
Components.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
ComponentTest.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
Entity.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
IComponent.cpp Simplify component interface: remove explicit context parameter, use GetSimContext() instead. 2011-01-16 14:08:38 +00:00
IComponent.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00
Interface.h # Rewrite of the game's simulation system 2010-01-09 19:20:14 +00:00
InterfaceScripted.h Give an elevation advantage to ranged units. Patch by sanderd17. Fix #1960. 2013-08-03 19:20:20 +00:00
Message.h Fix serialize/deserialize API asymmetry. 2010-09-17 17:53:26 +00:00
ParamNode.cpp Wall placement. Closes #786. 2012-05-05 19:22:22 +00:00
ParamNode.h Wall placement. Closes #786. 2012-05-05 19:22:22 +00:00
SimContext.cpp split debug_assert into ENSURE and ASSERT as discussed in a previous meeting. 2011-04-30 13:01:45 +00:00
SimContext.h Avoid slightly-expensive QueryInterface() calls 2013-09-11 20:41:53 +00:00