| 136 | |
| 137 | |
| 138 | bool GetUtxNameTable(vector <UTXENTRYNAME> &NameEntries, UTXHEADER &Header) |
| 139 | { |
| 140 | ILuint NumRead; |
| 141 | |
| 142 | // Go to the name table. |
| 143 | iseek(Header.NameOffset, IL_SEEK_SET); |
| 144 | |
| 145 | NameEntries.resize(Header.NameCount); |
| 146 | |
| 147 | // Read in the name table. |
| 148 | for (NumRead = 0; NumRead < Header.NameCount; NumRead++) { |
| 149 | NameEntries[NumRead].Name = GetUtxName(Header); |
| 150 | if (NameEntries[NumRead].Name == "") |
| 151 | break; |
| 152 | NameEntries[NumRead].Flags = GetLittleUInt(); |
| 153 | } |
| 154 | |
| 155 | // Did not read all of the entries (most likely GetUtxName failed). |
| 156 | if (NumRead < Header.NameCount) { |
| 157 | ilSetError(IL_INVALID_FILE_HEADER); |
| 158 | return false; |
| 159 | } |
| 160 | |
| 161 | return true; |
| 162 | } |
| 163 | |
| 164 | |
| 165 | // This following code is from http://wiki.beyondunreal.com/Legacy:Package_File_Format/Data_Details. |
no test coverage detected