예제 #1
0
void TCOD_image_blit_rect(TCOD_image_t image, TCOD_console_t console, int x, int y,
	int w, int h, TCOD_bkgnd_flag_t bkgnd_flag) {
	int width,height;
	float scalex,scaley;
	TCOD_image_get_size(image,&width,&height);
	if ( w == -1 ) w=width;
	if ( h == -1 ) h=height;
	if ( w <= 0 || h <= 0 || bkgnd_flag == TCOD_BKGND_NONE ) return;
	scalex = (float)(w)/width;
	scaley = (float)(h)/height;
	TCOD_image_blit(image,console,x+w*0.5f,y+h*0.5f,bkgnd_flag,scalex,scaley,0.0f);
}
예제 #2
0
void TCODImage::blit(TCODConsole *console, float x, float y, TCOD_bkgnd_flag_t bkgnd_flag, float scalex, float scaley, float angle) const {
	TCOD_image_blit(data,console->data,x,y,bkgnd_flag,scalex,scaley,angle);
}