mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-07-12 13:25:53 +00:00
Iterator and MSVC fixes
This commit is contained in:
parent
ff5c7321c7
commit
8df8b99fb1
@ -94,16 +94,17 @@ std::unique_ptr<CInputStream> CResLoader::LoadNewResourceSync(const SObjectTag&
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<IDvdRequest> CResLoader::LoadResourcePartAsync(const SObjectTag& tag, u32 length, u32 offset, void* buf)
|
std::shared_ptr<IDvdRequest> CResLoader::LoadResourcePartAsync(const SObjectTag& tag, u32 off, u32 size, void* buf)
|
||||||
{
|
{
|
||||||
return FindResourceForLoad(tag.id)->AsyncSeekRead(buf, length,
|
CPakFile* file = FindResourceForLoad(tag.id);
|
||||||
ESeekOrigin::Begin, x50_cachedResInfo->GetOffset() + offset);
|
return file->AsyncSeekRead(buf, size, ESeekOrigin::Begin, x50_cachedResInfo->GetOffset() + off);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<IDvdRequest> CResLoader::LoadResourceAsync(const SObjectTag& tag, void* buf)
|
std::shared_ptr<IDvdRequest> CResLoader::LoadResourceAsync(const SObjectTag& tag, void* buf)
|
||||||
{
|
{
|
||||||
return FindResourceForLoad(tag.id)->AsyncSeekRead(buf, ROUND_UP_32(x50_cachedResInfo->GetSize()),
|
CPakFile* file = FindResourceForLoad(tag.id);
|
||||||
ESeekOrigin::Begin, x50_cachedResInfo->GetOffset());
|
return file->AsyncSeekRead(buf, ROUND_UP_32(x50_cachedResInfo->GetSize()),
|
||||||
|
ESeekOrigin::Begin, x50_cachedResInfo->GetOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<u8[]> CResLoader::LoadResourceSync(const urde::SObjectTag& tag)
|
std::unique_ptr<u8[]> CResLoader::LoadResourceSync(const urde::SObjectTag& tag)
|
||||||
@ -187,8 +188,7 @@ bool CResLoader::AreAllPaksLoaded() const
|
|||||||
void CResLoader::AsyncIdlePakLoading()
|
void CResLoader::AsyncIdlePakLoading()
|
||||||
{
|
{
|
||||||
for (auto it=x30_pakLoadingList.begin();
|
for (auto it=x30_pakLoadingList.begin();
|
||||||
it != x30_pakLoadingList.end();
|
it != x30_pakLoadingList.end();)
|
||||||
++it)
|
|
||||||
{
|
{
|
||||||
(*it)->AsyncIdle();
|
(*it)->AsyncIdle();
|
||||||
if ((*it)->x2c_asyncLoadPhase == CPakFile::EAsyncPhase::Loaded)
|
if ((*it)->x2c_asyncLoadPhase == CPakFile::EAsyncPhase::Loaded)
|
||||||
@ -196,7 +196,9 @@ void CResLoader::AsyncIdlePakLoading()
|
|||||||
MoveToCorrectLoadedList(std::move(*it));
|
MoveToCorrectLoadedList(std::move(*it));
|
||||||
it = x30_pakLoadingList.erase(it);
|
it = x30_pakLoadingList.erase(it);
|
||||||
--x44_pakLoadingCount;
|
--x44_pakLoadingCount;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
++it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ public:
|
|||||||
void LoadMemResourceSync(const SObjectTag& tag, std::unique_ptr<u8[]>& bufOut, int* sizeOut);
|
void LoadMemResourceSync(const SObjectTag& tag, std::unique_ptr<u8[]>& bufOut, int* sizeOut);
|
||||||
std::unique_ptr<CInputStream> LoadResourceFromMemorySync(const SObjectTag& tag, const void* buf);
|
std::unique_ptr<CInputStream> LoadResourceFromMemorySync(const SObjectTag& tag, const void* buf);
|
||||||
std::unique_ptr<CInputStream> LoadNewResourceSync(const SObjectTag& tag, void* extBuf=nullptr);
|
std::unique_ptr<CInputStream> LoadNewResourceSync(const SObjectTag& tag, void* extBuf=nullptr);
|
||||||
std::shared_ptr<IDvdRequest> LoadResourcePartAsync(const SObjectTag& tag, u32 offset, u32 length, void* buf);
|
std::shared_ptr<IDvdRequest> LoadResourcePartAsync(const SObjectTag& tag, u32 off, u32 size, void* buf);
|
||||||
std::shared_ptr<IDvdRequest> LoadResourceAsync(const SObjectTag& tag, void* buf);
|
std::shared_ptr<IDvdRequest> LoadResourceAsync(const SObjectTag& tag, void* buf);
|
||||||
std::unique_ptr<u8[]> LoadResourceSync(const urde::SObjectTag& tag);
|
std::unique_ptr<u8[]> LoadResourceSync(const urde::SObjectTag& tag);
|
||||||
std::unique_ptr<u8[]> LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size);
|
std::unique_ptr<u8[]> LoadNewResourcePartSync(const urde::SObjectTag& tag, u32 off, u32 size);
|
||||||
|
2
hecl
2
hecl
@ -1 +1 @@
|
|||||||
Subproject commit 9e67b21251e51ab30f07762fe1a0297045eea7ad
|
Subproject commit ef71db799ab99f0aa18d477688c8ad46c85fc014
|
Loading…
x
Reference in New Issue
Block a user