Integrated Brede Johansen's updates to flt loader.

This commit is contained in:
Robert Osfield
2001-12-04 16:03:10 +00:00
parent 3e940e0b33
commit d7ded2d90f
30 changed files with 1646 additions and 862 deletions

View File

@@ -68,8 +68,8 @@ void FaceRecord::endian()
ENDIAN( pSFace->diIRMaterial );
ENDIAN( pSFace->wTransparency );
// Added after version 13
if (Registry::instance()->getVersion() > 13)
// Face record extended after version 13
if (getFltFile()->getFlightVersion() > 13)
{
ENDIAN( pSFace->dwFlags );
// ENDIAN( pSFace->PrimaryPackedColor );
@@ -93,12 +93,12 @@ bool FaceRecord::readLocalData(Input& fr)
Record* pRec;
if (!(pRec=fr.readCreateRecord())) return false;
if (!(pRec=fr.readCreateRecord(_pFltFile))) return false;
if (pRec->getOpcode() != PUSH_SUBFACE_OP)
return fr.rewindLast();
while ((pRec=fr.readCreateRecord()))
while ((pRec=fr.readCreateRecord(_pFltFile)))
{
if (pRec->getOpcode()==POP_SUBFACE_OP) return true;