mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -05:00
Add implementation for stringtable assetloader iw4
This commit is contained in:
@ -41,10 +41,11 @@ bool AssetLoaderStringTable::LoadFromRaw(const std::string& assetName, ISearchPa
|
||||
if (currentLine.size() > maxCols)
|
||||
maxCols = currentLine.size();
|
||||
csvLines.emplace_back(std::move(currentLine));
|
||||
currentLine = std::vector<std::string>();
|
||||
}
|
||||
|
||||
stringTable->columnCount = maxCols;
|
||||
stringTable->rowCount = csvLines.size();
|
||||
stringTable->columnCount = static_cast<int>(maxCols);
|
||||
stringTable->rowCount = static_cast<int>(csvLines.size());
|
||||
const auto cellCount = static_cast<unsigned>(stringTable->rowCount) * static_cast<unsigned>(stringTable->columnCount);
|
||||
|
||||
if (cellCount)
|
||||
@ -70,7 +71,6 @@ bool AssetLoaderStringTable::LoadFromRaw(const std::string& assetName, ISearchPa
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::sort(&stringTable->cellIndex[0], &stringTable->cellIndex[cellCount - 1], [stringTable, maxCols](const int16_t a, const int16_t b)
|
||||
{
|
||||
auto compareResult = stringTable->values[a].hash - stringTable->values[b].hash;
|
||||
|
Reference in New Issue
Block a user