Game Development Reference
In-Depth Information
tmpobj =;
if (tmpobj->name == obj->parentname){
obj->parent = tmpobj;
tmpobj = tmpobj->next;
if (!obj->parent){
line.Format("%s parent object %s not found in object
LPCTSTR(obj->name), LPCTSTR(obj->parentname));
obj->parentname = "noparent";
obj = obj->next;
if (! CreateDefaultLight();
return TRUE;
Reading the SCENE section
When reading the SCENE section we first make use of the function
GetSectionEnd to find the matching end brace. Then the function enters
a loop which has the exit condition that the file position exceeds the value
returned by the GetSectionEnd function. The scheme for most of the
readers is the same, read the next line and search for certain expected
tags. If a tag is found then process it using ParseTokens ; if it is a simple
single line tag or a subroutine or if it is a complex multi-line section. The
SCENE section contains no subsections unless background colour or
ambient animation is implemented.
BOOL C3DSAscii::ReadSceneInfo(CStdioFile &file)
CString line;
TOKEN tokens[5];
int start, end;
Search Nedrilad ::

Custom Search