/*!
Base class for a linked list of drawable objects.
Note that "object" is used as a generic term, not in specific reference to
game objects (though they are the most common thing in drawing lists).
*/
struct THDrawable : public THLinkList
{
//! Draw the object at a specific point on a render target
/*!
Can also "draw" the object to the speakers, i.e. play sounds.
*/
void (*m_fnDraw)(THDrawable* pSelf, THRenderTarget* pCanvas, int iDestX, int iDestY);
//! Perform a hit test against the object
/*!
Should return true if when the object is drawn at (iDestX, iDestY) on a canvas,
the point (iTestX, iTestY) is within / on the object.
*/
bool (*m_fnHitTest)(THDrawable* pSelf, int iDestX, int iDestY, int iTestX, int iTestY);
//! Drawing flags (zero or more list flags from #THDrawFlags).
uint32_t m_iFlags;
/** Returns true if instance is a multiple frame animation.
Should be overloaded in derived class.
*/
bool (*m_fnIsMultipleFrameAnimation)(THDrawable *pSelf);
};