| 264 | |
| 265 | |
| 266 | bool ODBlock::saveScript(SampleFramework::File * fp,bool bQuote) |
| 267 | { |
| 268 | static int tablevel = 1; |
| 269 | static int retVal = 0; |
| 270 | int j; |
| 271 | //save the script in said file should be stream!! |
| 272 | for (j=0; j<tablevel-1; j++) |
| 273 | retVal = fprintf(fp,"\t"); |
| 274 | if (bQuote) |
| 275 | retVal = fprintf(fp,"\""); |
| 276 | if (identifier) |
| 277 | retVal = fprintf(fp, "%s", identifier); |
| 278 | else |
| 279 | retVal = fprintf(fp,"_noname"); |
| 280 | if (bQuote) |
| 281 | retVal = fprintf(fp,"\""); |
| 282 | if (!bTerminal) |
| 283 | { |
| 284 | retVal =fprintf(fp,"\n"); |
| 285 | for (j=0; j<tablevel; j++) |
| 286 | retVal = fprintf(fp,"\t"); |
| 287 | retVal = fprintf(fp,"{\n"); |
| 288 | tablevel ++; |
| 289 | for (physx::PxU32 i = 0; i < subBlocks.size(); ++i) |
| 290 | (subBlocks[i])->saveScript(fp,bQuote); |
| 291 | tablevel --; |
| 292 | for (j=0; j<tablevel; j++) |
| 293 | retVal = fprintf(fp,"\t"); |
| 294 | retVal = fprintf(fp,"}\n"); |
| 295 | } |
| 296 | else |
| 297 | retVal = fprintf(fp,";\n"); |
| 298 | |
| 299 | PX_ASSERT( retVal >= 0 ); |
| 300 | // added this return to make this compile on snc & release |
| 301 | return retVal >= 0; |
| 302 | } |
| 303 | |
| 304 | |
| 305 | const char * ODBlock::ident() |