struct Sprite { Sprite(const char *_path, float _tx=0, float _ty=0, float _tw=0, float _th=0) : path(_path), tx(_tx), ty(_ty), tw(_tw), th(_th) { }; const char *path; const float tx, ty; float tw, th;};struct Rotate { Rotate(float _a=0, float _cx=0, float _cy=0) : a(_a), cx(_cx), cy(_cy) { }; float a; float cx, cy;};namespace R { void DrawSprite(Sprite *, float x, float y, float w, float h, const Rotate *r=NULL, float z=0);}
So a call looks like
R::DrawSprite(&Sprite("bg.png"), 0, 0, 800, 600);