#ifndef _TPFDRAW_H
#define _TPFDRAW_H

#include "screen.h"
#include "f1616.h"
#include "map.h"
#include "tex.h"
#include "obj.h"

/* Contains code for drawing maps (tpfMap) and objects (tpfObj) to screen
   (tpfScreen) */

#ifdef __cplusplus
extern "C" {
#endif

/* Internal library routines - do not use! */
extern void TpfDraw_ARM_DoDrawList(int x,int y,int s,int b,tpfDrawObj **l);
extern void TpfDraw_AddToDrawList(tpfScreen *s,tpfTex *t,int x,f1616 y,f1616 yscale,f1616 z,int texx);

/* Clear any pending draw operations for the given tpfScreen */
extern void TpfDraw_ClearDrawList(tpfScreen *s);

/* Perform any pending draw operations for the given tpfScreen, and remove them
   from the to-do list */
extern void TpfDraw_DoDrawList(tpfScreen *s);

/* Render a level map
   TpfDraw_DoDrawList must be called to perform the drawing
   The textures used in the map must not be deleted before the draw occurs */
extern void TpfDraw_Draw(tpfScreen *s,tpfMap *m);

/* Render an object
   TpfDraw_DoDrawList must be called to perform the drawing
   The textures used in the object must not be deleted before the draw occurs */
extern void TpfDraw_DrawObj(tpfScreen *s,tpfObj *o);

#ifdef __cplusplus
}
#endif

#endif
