Game Development Reference
In-Depth Information
if (line.Find("NODE_TM")!=-1){
if (!ReadCameraNodeTM(file)) return FALSE;
}
if (line.Find("CAMERA_FOV")!=-1){
if (ParseTokens(line, tokens, 5)<2){
fov = atof(tokens[1.name);
camera.zoomFactor = fov * 5;
}
}
}
camera.CreateKey(0);
return TRUE;
}
Reading the LIGHTOBJECT section
A light section contains the familiar NODE_NAME and NODE_TM tags. In
a simple parser you will probably want to read the LIGHT_TYPE tag,
LIGHT_COLOR, LIGHT_INTENS and the LIGHT_TDIST.
*LIGHTOBJECT {
*NODE_NAME "Fspot02"
*LIGHT_TYPE Target
*NODE_TM {
...
}
...
*LIGHT_SETTINGS {
*TIMEVALUE 0
*LIGHT_COLOR 1.0000 1.0000 1.0000
*LIGHT_INTENS 1.0000
*LIGHT_TDIST 240.0000
...
}
*TM_ANIMATION {
...
}
}
Search Nedrilad ::




Custom Search