All pastes #450193 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-20 17:40 UTC
rendered paste body
#include <allegro.h>

int main()
{
	allegro_init();
	set_gfx_mode(GFX_AUTODETECT_WINDOWED, 1024, 768, 0, 0);
	install_keyboard();

	BITMAP* b = load_pcx("test.pcx", 0);

	int xo = 32;
	int yo = 24;

	stretch_blit(b, screen, 0, 0, b->w, b->h, xo, yo, b->w*3, b->h*3);

	int sx = 50;
	int sy = 50;
	int sw = 50;
	int sh = 50;

	stretch_blit(b, screen, sx, sy, sw, sh,
		sx*3+xo, sy*3+yo, sw*3, sh*3);

	readkey();
}
END_OF_MAIN()