It does if you are willing to look up the formulae! For example, I made a 3d Pong game a few weeks ago. Basically, I used Allegro with math.h and checked the formulae on wikipedia. Also there are
3d math routines, although I haven't used them at all...
Okay, so next thing is input. Allegro uses two main sources of input: the keyboard array and the mouse variables. The keyboard array is
key[] which is indexed by a kabillion macros: here's how it works:
Code:
key[KEY_A]
key[KEY_ESC]
key[KEY_SHIFT]
key[KEY_F1]
key[KEY_CTRL]
...aand so on. A complete list is
here.
For mouse, use the variables
mouse_x mouse_y, and use the bit-mapped variable
mouse_b.
mouse_b & 1 is left button,
mouse_b & 2 is right,
mouse_b & 4 is middle. any other buttons on your mouse can probably be found at later bits.
Okay, next is text. To draw text on the screen, you need a font. Fonts can be loaded to allegro from GRX format .fnt files, 8x8 or 8x16 BIOS format fonts, or from specially prepared bitmaps. Allegro also contains a global
font variable, containing a simple font.
To load a font, use the
load_font() function, like so.
Code:
FONT * myfont = load_font("myfont.fnt",NULL,NULL);
The two NULL arguments are a palette, which doesn't exist, and a loader script file, which is not needed.
So, to use a font, use the
textprintf_ex() function.
Code:
textprintf(buffer,font,x,y,color,bgcolor,"format string", ...)
The color or bgcolor arguments may be -1, in which case they are transparent.
There are also textprintf_centre_ex(), and textprintf_right_ex(), variants which treat the coordinates given differently.