mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
Rename some resource types that conflict from Torch (#87)
This commit is contained in:
@@ -10,7 +10,7 @@ SM64::MacroObjectFactoryV0::ReadResource(std::shared_ptr<Ship::File> file,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<MacroObject> macro = std::make_shared<MacroObject>(initData);
|
||||
std::shared_ptr<MacroObjectResource> macro = std::make_shared<MacroObjectResource>(initData);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
uint32_t count = reader->ReadUInt32();
|
||||
|
||||
@@ -8,7 +8,7 @@ SM64::TrajectoryFactoryV0::ReadResource(std::shared_ptr<Ship::File> file,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<Trajectory> trajectory = std::make_shared<Trajectory>(initData);
|
||||
std::shared_ptr<TrajectoryResource> trajectory = std::make_shared<TrajectoryResource>(initData);
|
||||
auto reader = std::get<std::shared_ptr<Ship::BinaryReader>>(file->Reader);
|
||||
|
||||
uint32_t count = reader->ReadUInt32();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "MacroObject.h"
|
||||
|
||||
namespace SM64 {
|
||||
int16_t* MacroObject::GetPointer() {
|
||||
int16_t* MacroObjectResource::GetPointer() {
|
||||
return mData.data();
|
||||
}
|
||||
|
||||
size_t MacroObject::GetPointerSize() {
|
||||
size_t MacroObjectResource::GetPointerSize() {
|
||||
return sizeof(mData.size()) * sizeof(int16_t);
|
||||
}
|
||||
} // namespace SM64
|
||||
@@ -4,11 +4,11 @@
|
||||
#include <ship/resource/Resource.h>
|
||||
|
||||
namespace SM64 {
|
||||
class MacroObject : public Ship::Resource<int16_t> {
|
||||
class MacroObjectResource : public Ship::Resource<int16_t> {
|
||||
public:
|
||||
using Resource::Resource;
|
||||
|
||||
MacroObject() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
MacroObjectResource() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
|
||||
int16_t* GetPointer();
|
||||
size_t GetPointerSize();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include "Trajectory.h"
|
||||
|
||||
namespace SM64 {
|
||||
TrajectoryData* Trajectory::GetPointer() {
|
||||
TrajectoryData* TrajectoryResource::GetPointer() {
|
||||
return mData.data();
|
||||
}
|
||||
|
||||
size_t Trajectory::GetPointerSize() {
|
||||
size_t TrajectoryResource::GetPointerSize() {
|
||||
return sizeof(mData.size()) * sizeof(TrajectoryData);
|
||||
}
|
||||
} // namespace SM64
|
||||
@@ -12,11 +12,11 @@ struct TrajectoryData {
|
||||
|
||||
namespace SM64 {
|
||||
|
||||
class Trajectory : public Ship::Resource<TrajectoryData> {
|
||||
class TrajectoryResource : public Ship::Resource<TrajectoryData> {
|
||||
public:
|
||||
using Resource::Resource;
|
||||
|
||||
Trajectory() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
TrajectoryResource() : Resource(std::shared_ptr<Ship::ResourceInitData>()) {}
|
||||
|
||||
TrajectoryData* GetPointer();
|
||||
size_t GetPointerSize();
|
||||
|
||||
Reference in New Issue
Block a user