MCPcopy Create free account
hub / github.com/DentonW/DevIL / GetUtxNameTable

Function GetUtxNameTable

DevIL/src-IL/src/il_utx.cpp:138–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136
137
138bool 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.

Callers 1

iLoadUtxInternalFunction · 0.70

Calls 3

GetLittleUIntFunction · 0.85
ilSetErrorFunction · 0.85
GetUtxNameFunction · 0.70

Tested by

no test coverage detected