2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-01-24 08:53:04 +00:00

wip: change redirect pointer to lookup

This commit is contained in:
Jan
2025-06-13 20:25:33 +01:00
parent 788bf1cc5d
commit 667d76e50e
9 changed files with 110 additions and 154 deletions

View File

@@ -50,7 +50,10 @@ void ContentLoaderBase::LoadXStringArray(const bool atStreamStart, const size_t
const auto fill = m_stream.LoadWithFill(4u * count);
for (size_t index = 0; index < count; index++)
{
fill.FillPtr(varXString[index], 4u * index);
m_stream.AddPointerLookup(&varXString[index], fill.BlockBuffer(4u * index));
}
}
for (size_t index = 0; index < count; index++)

View File

@@ -1,19 +0,0 @@
#include "InvalidAliasLookupException.h"
#include <format>
InvalidAliasLookupException::InvalidAliasLookupException(const size_t lookupIndex, const size_t lookupCount)
: m_lookup_index(lookupIndex),
m_lookup_count(lookupCount)
{
}
std::string InvalidAliasLookupException::DetailedMessage()
{
return std::format("Tried to resolve zone alias lookup {} when there are only {} entries in the lookup", m_lookup_index, m_lookup_count);
}
char const* InvalidAliasLookupException::what() const noexcept
{
return "Tried to resolve invalid zone alias lookup";
}

View File

@@ -1,16 +0,0 @@
#pragma once
#include "LoadingException.h"
#include "Zone/XBlock.h"
class InvalidAliasLookupException final : public LoadingException
{
public:
InvalidAliasLookupException(size_t lookupIndex, size_t lookupCount);
std::string DetailedMessage() override;
[[nodiscard]] char const* what() const noexcept override;
private:
size_t m_lookup_index;
size_t m_lookup_count;
};