iOS/buildlibs/armv7/allegro-4.4.2/addons/allegrogl/src/videovtb.c
/* allegro_gl_video_pivot_scaled_sprite_flip:
 * FIXME: Broken if the bitmap was split into multiple textures.
 * FIXME: Doesn't apply rotation and scale to the memory copy
 * FIXME: Doesn't work for when FBO is not available.
 */
Broken if the bitmap was split into multiple textures.
FIXME: Doesn't apply rotation and scale to the memory copy
FIXME: Doesn't work for when FBO is not available.
Broken if the bitmap was split into multiple textures . FIXME : Doesn ' t apply rotation and scale to the memory copy FIXME : Doesn ' t work for when FBO is not available .
static void allegro_gl_video_pivot_scaled_sprite_flip(struct BITMAP *bmp,
			struct BITMAP *sprite, fixed x, fixed y, fixed cx, fixed cy,
			fixed angle, fixed scale, int v_flip) {
	double dscale = fixtof(scale);
	GLint matrix_mode;
#define BIN_2_DEG(x) (-(x) * 180.0 / 128)
	glGetIntegerv(GL_MATRIX_MODE, &matrix_mode);
	glMatrixMode(GL_MODELVIEW);
	glPushMatrix();
	glTranslated(fixtof(x), fixtof(y), 0.);
	glRotated(BIN_2_DEG(fixtof(angle)), 0., 0., -1.);
	glScaled(dscale, dscale, dscale);
	glTranslated(-fixtof(x+cx), -fixtof(y+cy), 0.);
	do_masked_blit_video(sprite, bmp, 0, 0, fixtoi(x), fixtoi(y),
	                      sprite->w, sprite->h, v_flip ? AGL_V_FLIP : FALSE, FALSE);
	glPopMatrix();
	glMatrixMode(matrix_mode);
#undef BIN_2_DEG
	return;
}
static void allegro_gl_video_pivot_scaled_sprite_flip ( struct BITMAP * bmp , struct BITMAP * sprite , fixed x , fixed y , fixed cx , fixed cy , fixed angle , fixed scale , int v_flip ) { double dscale = fixtof ( scale ) ; GLint matrix_mode ; #define BIN_2_DEG ( x )  (-(x) * 180.0 / 128) glGetIntegerv ( GL_MATRIX_MODE , & matrix_mode ) ; glMatrixMode ( GL_MODELVIEW ) ; glPushMatrix ( ) ; glTranslated ( fixtof ( x ) , fixtof ( y ) , 0. ) ; glRotated ( BIN_2_DEG ( fixtof ( angle ) ) , 0. , 0. , -1. ) ; glScaled ( dscale , dscale , dscale ) ; glTranslated ( - fixtof ( x + cx ) , - fixtof ( y + cy ) , 0. ) ; do_masked_blit_video ( sprite , bmp , 0 , 0 , fixtoi ( x ) , fixtoi ( y ) , sprite -> w , sprite -> h , v_flip ? AGL_V_FLIP : FALSE , FALSE ) ; glPopMatrix ( ) ; glMatrixMode ( matrix_mode ) ; #undef  BIN_2_DEG return ; }
allegro_gl_video_pivot_scaled_sprite_flip:
 FIXME: Broken if the bitmap was split into multiple textures.
allegro_gl_video_pivot_scaled_sprite_flip : FIXME : Broken if the bitmap was split into multiple textures .