-void Face_XMLParse (face_t *face, xmlNodePtr surface)
-{
- char *str, *content;
- int i, j;
-
- for(xmlNodePtr current = surface->children; current != NULL; current = current->next)
- {
- if(current->type != XML_ELEMENT_NODE) continue;
- if(!strcmp((char *)current->name, "planepts"))
- {
- content = Q_StrDup((char *)current->children->content);
-
- str = strtok(content, " \n\r\t\v\0");
- for (i=0 ; i<3 ; i++)
- {
- for (j=0 ; j<3 ; j++)
- {
- face->planepts[i][j] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- }
- }
-
- delete [] content;
- }
- else if(!strcmp((char *)current->name, "texdef"))
- {
- content = Q_StrDup((char *)current->children->content);
-
- str = strtok(content, " \n\r\t\v\0");
- face->texdef.shift[0] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.shift[1] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.rotate = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.scale[0] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.scale[1] = atof(str);
-
- delete [] content;
- }
- else if(!strcmp((char *)current->name, "bpmatrix"))
- {
- content = Q_StrDup((char *)current->children->content);
-
- str = strtok(content, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[0][0] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[0][1] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[0][2] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[1][0] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[1][1] = atof(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->brushprimit_texdef.coords[1][2] = atof(str);
-
- delete [] content;
- }
- else if(!strcmp((char *)current->name, "flags"))
- {
- content = Q_StrDup((char *)current->children->content);
-
- str = strtok(content, " \n\r\t\v\0");
- face->texdef.contents = atoi(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.flags = atoi(str);
- str = strtok(NULL, " \n\r\t\v\0");
- face->texdef.value = atoi(str);
-
- delete [] content;
- }
- else if(!strcmp((char *)current->name, "shader"))
- {
- face->texdef.SetName((char *)current->children->content);
- }
- }
+void Face_XMLParse( face_t *face, xmlNodePtr surface ){
+ char *str, *content;
+ int i, j;
+
+ for ( xmlNodePtr current = surface->children; current != NULL; current = current->next )
+ {
+ if ( current->type != XML_ELEMENT_NODE ) {
+ continue;
+ }
+ if ( !strcmp( (char *)current->name, "planepts" ) ) {
+ content = Q_StrDup( (char *)current->children->content );
+
+ str = strtok( content, " \n\r\t\v\0" );
+ for ( i = 0 ; i < 3 ; i++ )
+ {
+ for ( j = 0 ; j < 3 ; j++ )
+ {
+ face->planepts[i][j] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ }
+ }
+
+ delete [] content;
+ }
+ else if ( !strcmp( (char *)current->name, "texdef" ) ) {
+ content = Q_StrDup( (char *)current->children->content );
+
+ str = strtok( content, " \n\r\t\v\0" );
+ face->texdef.shift[0] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.shift[1] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.rotate = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.scale[0] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.scale[1] = atof( str );
+
+ delete [] content;
+ }
+ else if ( !strcmp( (char *)current->name, "bpmatrix" ) ) {
+ content = Q_StrDup( (char *)current->children->content );
+
+ str = strtok( content, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[0][0] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[0][1] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[0][2] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[1][0] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[1][1] = atof( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->brushprimit_texdef.coords[1][2] = atof( str );
+
+ delete [] content;
+ }
+ else if ( !strcmp( (char *)current->name, "flags" ) ) {
+ content = Q_StrDup( (char *)current->children->content );
+
+ str = strtok( content, " \n\r\t\v\0" );
+ face->texdef.contents = atoi( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.flags = atoi( str );
+ str = strtok( NULL, " \n\r\t\v\0" );
+ face->texdef.value = atoi( str );
+
+ delete [] content;
+ }
+ else if ( !strcmp( (char *)current->name, "shader" ) ) {
+ face->texdef.SetName( (char *)current->children->content );
+ }
+ }