mirror of
https://github.com/izzy2lost/Starship.git
synced 2026-07-05 15:19:42 -07:00
Merge branch 'HarbourMasters:main' into main
This commit is contained in:
@@ -12,7 +12,7 @@ std::shared_ptr<Ship::IResource> ResourceFactoryBinaryObjectInitV0::ReadResource
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto obj = std::make_shared<ObjectInit>(initData);
|
||||
auto obj = std::make_shared<ObjectInitResource>(initData);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
auto count = reader->ReadUInt32();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "ObjectInit.h"
|
||||
|
||||
namespace SF64 {
|
||||
ObjectInitData* ObjectInit::GetPointer() {
|
||||
ObjectInitData* ObjectInitResource::GetPointer() {
|
||||
return mObjects.data();
|
||||
}
|
||||
|
||||
size_t ObjectInit::GetPointerSize() {
|
||||
size_t ObjectInitResource::GetPointerSize() {
|
||||
return sizeof(ObjectInitData) * mObjects.size();
|
||||
}
|
||||
}
|
||||
@@ -16,11 +16,12 @@ struct ObjectInitData {
|
||||
/* 0x10 */ int16_t id;
|
||||
}; // size = 0x14
|
||||
|
||||
class ObjectInit : public Ship::Resource<ObjectInitData> {
|
||||
// Renamed from ObjectInit to prevent clashing with Torch of same namespace
|
||||
class ObjectInitResource : public Ship::Resource<ObjectInitData> {
|
||||
public:
|
||||
using Resource::Resource;
|
||||
|
||||
ObjectInit() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
ObjectInitResource() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
|
||||
ObjectInitData* GetPointer();
|
||||
size_t GetPointerSize();
|
||||
|
||||
Reference in New Issue
Block a user