Created
January 13, 2018 22:37
-
-
Save jrsa/875c4c0c3453682c039257a858aa3b7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// CMapChunk::Create, macOS build 12340 | |
do { | |
subchunks_ = *subchunks; | |
remainingDataBytes = remainingSubchunkBytes - 8; | |
currentChunkData_ = subchunks + 8; | |
if (*subchunks == 'MCNR') { | |
this->pMcnrData = currentChunkData_; | |
*(subchunks + 4) = 448; | |
} | |
else if (*subchunks > 'MCNR') { | |
if (subchunks_ == 'MCSE') { | |
if (this->header->nSoundEmitters) | |
this->pMcseData = currentChunkData_; | |
} | |
else if (subchunks_ > 'MCSE') { | |
if (subchunks_ == 'MCSH') { | |
this->pMcshData = currentChunkData_; | |
} | |
else if (subchunks_ == 'MCVT') { | |
this->pMcvtData = currentChunkData_; | |
} | |
} | |
else if (subchunks_ == 'MCRF') { | |
this->pMcrfData = currentChunkData_; | |
} | |
} | |
else if (subchunks_ == 'MCCV') { | |
this->pMccvData = currentChunkData_; | |
} | |
else if (subchunks_ > 'MCCV') { | |
if (subchunks_ == 'MCLQ') { | |
header__ = this->header; | |
if (header__->sizeLiquid > 8u) { | |
this->pMclqData = currentChunkData_; | |
*(subchunks + 4) = header__->sizeLiquid - 8; | |
} | |
} | |
else if (subchunks_ == 'MCLY') { | |
this->pMclyData = currentChunkData_; | |
} | |
} | |
else if (subchunks_ == 'MCAL') { | |
header = this->header; | |
this->pMcalData = currentChunkData_; | |
*(subchunks + 4) = header->sizeAlpha - 8; | |
} | |
nextChunkOffset = *(subchunks + 4); | |
remainingSubchunkBytes = remainingDataBytes - nextChunkOffset; | |
subchunks = currentChunkData_ + nextChunkOffset; | |
} while (remainingSubchunkBytes > 0); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment