================ idWindow::ReadFromDemoFile ================ */
| 3308 | ================ |
| 3309 | */ |
| 3310 | void idWindow::ReadFromDemoFile( class idDemoFile *f, bool rebuild ) { |
| 3311 | |
| 3312 | // should never hit unless we re-enable WRITE_GUIS |
| 3313 | #ifndef WRITE_GUIS |
| 3314 | assert( false ); |
| 3315 | #else |
| 3316 | |
| 3317 | if (rebuild) { |
| 3318 | CommonInit(); |
| 3319 | } |
| 3320 | |
| 3321 | f->SetLog(true, "window1"); |
| 3322 | backGroundName = f->ReadHashString(); |
| 3323 | f->SetLog(true, backGroundName); |
| 3324 | if ( backGroundName[0] ) { |
| 3325 | background = declManager->FindMaterial(backGroundName); |
| 3326 | } else { |
| 3327 | background = NULL; |
| 3328 | } |
| 3329 | f->ReadUnsignedChar( cursor ); |
| 3330 | f->ReadUnsignedInt( flags ); |
| 3331 | f->ReadInt( timeLine ); |
| 3332 | f->ReadInt( lastTimeRun ); |
| 3333 | idRectangle rct = rect; |
| 3334 | f->ReadFloat( rct.x ); |
| 3335 | f->ReadFloat( rct.y ); |
| 3336 | f->ReadFloat( rct.w ); |
| 3337 | f->ReadFloat( rct.h ); |
| 3338 | f->ReadFloat( drawRect.x ); |
| 3339 | f->ReadFloat( drawRect.y ); |
| 3340 | f->ReadFloat( drawRect.w ); |
| 3341 | f->ReadFloat( drawRect.h ); |
| 3342 | f->ReadFloat( clientRect.x ); |
| 3343 | f->ReadFloat( clientRect.y ); |
| 3344 | f->ReadFloat( clientRect.w ); |
| 3345 | f->ReadFloat( clientRect.h ); |
| 3346 | f->ReadFloat( textRect.x ); |
| 3347 | f->ReadFloat( textRect.y ); |
| 3348 | f->ReadFloat( textRect.w ); |
| 3349 | f->ReadFloat( textRect.h ); |
| 3350 | f->ReadFloat( xOffset); |
| 3351 | f->ReadFloat( yOffset); |
| 3352 | int i, c; |
| 3353 | |
| 3354 | idStr work; |
| 3355 | if (rebuild) { |
| 3356 | f->SetLog(true, (work + "-scripts")); |
| 3357 | for (i = 0; i < SCRIPT_COUNT; i++) { |
| 3358 | bool b; |
| 3359 | f->ReadBool( b ); |
| 3360 | if (b) { |
| 3361 | delete scripts[i]; |
| 3362 | scripts[i] = new idGuiScriptList; |
| 3363 | scripts[i]->ReadFromDemoFile(f); |
| 3364 | } |
| 3365 | } |
| 3366 | |
| 3367 | f->SetLog(true, (work + "-timelines")); |
nothing calls this directly
no test coverage detected