Game Development Reference
In-Depth Information
Figure 17.2 A three-channel motion file.
globally, at the scene level or at the mesh level. The mesh object knows
about its animation so we will include a flag that informs the transforma-
tion engine that the motion is coming from a mesh, scene or global level
motion file.
Text and buttons
No game or demo is going to be complete without at least some text and
the odd button. Buttons are usually best defined at the global level, since
they define a look and feel for a game that should remain consistent. Text,
however, is a scene level object. The displayed string of characters, the
font, colour, size and location will vary from scene to scene. Toon3D
defines a CGLText class to handle text objects. Because text can move on
the screen, the CGLText class uses a special format for key values. As
well as frame value, x and y position, scale and the smoothing factors
tension, bias and continuity, the actual string value to be displayed is part
of the key value.
typedef struct stTEXTKEY{
int frame;
GLfloat x,y,scale;
char str[80];
float tn,ct,bs;
BYTE linear;
}TEXTKEY;
Search Nedrilad ::




Custom Search