3d starfield and lightsourced spaceship. allegro game programming library.
#include <allegro.h>
Example exstars
This program draws a 3D star field (depth-cued) and a polygon starship (controllable with the keyboard cursor keys), using the Allegro math functions.
BITMAP(3alleg4), END_OF_MAIN(3alleg4), MATRIX(3alleg4), PALETTE(3alleg4), SCREEN_H(3alleg4), SCREEN_W(3alleg4), allegro_error(3alleg4), allegro_init(3alleg4), allegro_message(3alleg4), apply_matrix(3alleg4), blit(3alleg4), clear_bitmap(3alleg4), create_bitmap(3alleg4), cross_product(3alleg4), destroy_bitmap(3alleg4), dot_product(3alleg4), fixed(3alleg4), fixmul(3alleg4), fixtof(3alleg4), fixtoi(3alleg4), font(3alleg4), get_rotation_matrix(3alleg4), get_transformation_matrix(3alleg4), get_translation_matrix(3alleg4), install_keyboard(3alleg4), install_timer(3alleg4), itofix(3alleg4), key(3alleg4), normalize_vector(3alleg4), palette_color(3alleg4), persp_project(3alleg4), poll_keyboard(3alleg4), putpixel(3alleg4), rectfill(3alleg4), screen(3alleg4), set_gfx_mode(3alleg4), set_palette(3alleg4), set_projection_viewport(3alleg4), textout_centre_ex(3alleg4), textprintf_centre_ex(3alleg4), triangle(3alleg4), vsync(3alleg4)