Beispiel #1
0
void TCODConsole::printFrame(int x,int y,int w,int h, bool empty, TCOD_bkgnd_flag_t flag, const char *fmt , ...) {
	if ( fmt ) {
		va_list ap;
		va_start(ap,fmt);
		TCOD_console_print_frame(data,x,y,w,h,empty,flag,TCOD_console_vsprint(fmt,ap));
		va_end(ap);
	} else {
		TCOD_console_print_frame(data,x,y,w,h,empty,flag,NULL);
	}
}
Beispiel #2
0
void building_draw(building *b)
{
    TCOD_color_t old_color = TCOD_console_get_default_foreground(NULL);
	TCOD_console_set_default_foreground(NULL, b->model->color);
	TCOD_console_print_frame(NULL, b->p.x, b->p.y,
		b->model->width, b->model->height,
		false, TCOD_BKGND_NONE, NULL);
	TCOD_console_print(NULL, b->p.x + 1, b->p.y, b->model->code);
	TCOD_console_set_default_foreground(NULL, old_color);
}