ext/ruby2d/gl2.c in ruby2d-0.9.5 vs ext/ruby2d/gl2.c in ruby2d-0.10.0
- old
+ new
@@ -129,9 +129,24 @@
);
}
/*
+ * Draw a tile
+ */
+void R2D_GL2_DrawTile(R2D_Image *img, int x, int y, int tw, int th, GLfloat tx1, GLfloat ty1, GLfloat tx2,
+GLfloat ty2, GLfloat tx3, GLfloat ty3, GLfloat tx4, GLfloat ty4) {
+ R2D_GL2_DrawTexture(
+ x, y, tw, th,
+ img->rotate, img->rx, img->ry,
+ img->color.r, img->color.g, img->color.b, img->color.a,
+ tx1, ty1, tx2, ty2, tx3, ty3, tx4, ty4,
+ img->texture_id
+ );
+}
+
+
+/*
* Draw text
*/
void R2D_GL2_DrawText(R2D_Text *txt) {
R2D_GL2_DrawTexture(
txt->x, txt->y, txt->width, txt->height,