| 15 | } |
| 16 | |
| 17 | void SGameMtl::Load(IReader& fs) |
| 18 | { |
| 19 | R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_MAIN)); |
| 20 | ID = fs.r_u32(); |
| 21 | fs.r_stringZ(m_Name); |
| 22 | |
| 23 | if (fs.find_chunk(GAMEMTL_CHUNK_DESC)) |
| 24 | { |
| 25 | fs.r_stringZ(m_Desc); |
| 26 | } |
| 27 | |
| 28 | R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_FLAGS)); |
| 29 | Flags.assign(fs.r_u32()); |
| 30 | |
| 31 | R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_PHYSICS)); |
| 32 | fPHFriction = fs.r_float(); |
| 33 | fPHDamping = fs.r_float(); |
| 34 | fPHSpring = fs.r_float(); |
| 35 | fPHBounceStartVelocity = fs.r_float(); |
| 36 | fPHBouncing = fs.r_float(); |
| 37 | |
| 38 | R_ASSERT(fs.find_chunk(GAMEMTL_CHUNK_FACTORS)); |
| 39 | fShootFactor = fs.r_float(); |
| 40 | fBounceDamageFactor = fs.r_float(); |
| 41 | fVisTransparencyFactor = fs.r_float(); |
| 42 | fSndOcclusionFactor = fs.r_float(); |
| 43 | |
| 44 | if (fs.find_chunk(GAMEMTL_CHUNK_FACTORS_MP)) |
| 45 | fs.r_float(); |
| 46 | |
| 47 | if (fs.find_chunk(GAMEMTL_CHUNK_FLOTATION)) |
| 48 | fFlotationFactor = fs.r_float(); |
| 49 | |
| 50 | if (fs.find_chunk(GAMEMTL_CHUNK_INJURIOUS)) |
| 51 | fInjuriousSpeed = fs.r_float(); |
| 52 | |
| 53 | if (fs.find_chunk(GAMEMTL_CHUNK_DENSITY)) |
| 54 | fDensityFactor = fs.r_float(); |
| 55 | } |
| 56 | |
| 57 | void CGameMtlLibrary::Load() |
| 58 | { |
nothing calls this directly
no test coverage detected