File diff r23537:f6a6d4ce4bd5 → r23538:8df50944b27a
src/object_base.h
Show inline comments
 
@@ -71,27 +71,27 @@ struct Object : ObjectPool::PoolItem<&_o
 
	}
 

	
 
	/** Resets object counts. */
 
	static inline void ResetTypeCounts()
 
	{
 
		memset(&counts, 0, sizeof(counts));
 
	}
 

	
 
protected:
 
	static uint16 counts[NUM_OBJECTS]; ///< Number of objects per type ingame
 
};
 

	
 
#define FOR_ALL_OBJECTS_FROM(var, start) FOR_ALL_ITEMS_FROM(Object, object_index, var, start)
 
#define FOR_ALL_OBJECTS(var) FOR_ALL_OBJECTS_FROM(var, 0)
 

	
 
/**
 
 * Keeps track of removed objects during execution/testruns of commands.
 
 */
 
struct ClearedObjectArea {
 
	TileIndex first_tile;  ///< The first tile being cleared, which then causes the whole object to be cleared.
 
	TileArea area;         ///< The area of the object.
 
};
 

	
 
ClearedObjectArea *FindClearedObject(TileIndex tile);
 
extern SmallVector<ClearedObjectArea, 4> _cleared_object_areas;
 
extern std::vector<ClearedObjectArea> _cleared_object_areas;
 

	
 
#endif /* OBJECT_BASE_H */