Examples
The following lite-C program prints "Hello World", then plays a movie file and exits.
void main { printf("Hello, World!"); // message box screen_size.x = 400; screen_size.y = 400; // resize the window int handle = media_play("greetings.mpg",NULL,50); // start a movie in the whole window at volume 50. while(media_playing(handle)) wait(1); // wait until movie was finished sys_exit(NULL); }The following lite-C program opens a 3D window and displays a spinning sphere
void main { level_load(""); // open an empty level. you can use NULL instead of "" ENTITY* sphere = ent_create("sphere.mdl",vector(0,0,0),NULL); // create sphere model at position (0,0,0) while(1) { sphere->pan += 1; // rotate the sphere with 1 degree per frame wait(1); // wait one frame } }Read more about this topic: Lite-C
Famous quotes containing the word examples:
“In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.”
—Michel de Montaigne (15331592)
“There are many examples of women that have excelled in learning, and even in war, but this is no reason we should bring em all up to Latin and Greek or else military discipline, instead of needle-work and housewifry.”
—Bernard Mandeville (16701733)
“Histories are more full of examples of the fidelity of dogs than of friends.”
—Alexander Pope (16881744)