File: template.c

package info (click to toggle)
allegro4.2 2:4.2.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 24,436 kB
  • ctags: 14,714
  • sloc: ansic: 126,425; asm: 17,011; cpp: 3,846; sh: 2,120; objc: 925; makefile: 715; python: 216; pascal: 179; perl: 73
file content (29 lines) | stat: -rw-r--r-- 570 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 *	�PROJECTNAME�
 *
 *	Created by �FULLUSERNAME� on �DATE�.
 *	Copyright (c) �YEAR� �ORGANIZATIONNAME�. All rights reserved.
 */

#include <Allegro/allegro.h>


int main(int argc, const char *argv[])
{
	allegro_init();
	install_keyboard();
	
	if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0)) {
		allegro_message("Error setting 320x200x8 gfx mode:\n%s\n", allegro_error);
		return -1;
	}
	
	clear_to_color(screen, makecol(255, 255, 255));
	
	textout_centre_ex(screen, font, "Hello, world!", 160, 96, makecol(0, 0, 0), -1);
	
	readkey();
	
	return 0;
}
END_OF_MAIN();