struct DrawData {
int32 level; ///< Slice of this sprite (vertical row).
uint16 z_height; ///< Height of the voxel being drawn.
SpriteOrder order; ///< Selection when to draw this sprite (sorts sprites within a voxel). @see SpriteOrder
const ImageData *sprite; ///< Mouse cursor to draw.
Point32 base; ///< Base coordinate of the image, relative to top-left of the window.
const Recolouring *recolour; ///< Recolouring of the sprite.
};
/**
* Sort predicate of the draw data.
* @param dd1 First value to compare.
* @param dd2 Second value to compare.
* @return \c true if \a dd1 should be drawn before \a dd2.
*/
inline bool operator<(const DrawData &dd1, const DrawData &dd2)
{
if (dd1.level != dd2.level) return dd1.level < dd2.level; // Order on slice first.
if (dd1.z_height != dd2.z_height) return dd1.z_height < dd2.z_height; // Lower in the same slice first.
if (dd1.order != dd2.order) return dd1.order < dd2.order; // Type of sprite.
return dd1.base.y < dd2.base.y;
}