mirror of
https://github.com/zeldaret/botw
synced 2026-08-26 07:33:28 -04:00
ksys/phys: Implement ParamSet and res::Physics
This commit is contained in:
@@ -1 +1,15 @@
|
||||
#include "KingSystem/Resource/resResourcePhysics.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
void Physics::doCreate_(u8* buffer, u32 buffer_size, sead::Heap* heap) {}
|
||||
|
||||
bool Physics::parse_(u8* data, size_t size, sead::Heap* heap) {
|
||||
if (!data)
|
||||
return true;
|
||||
|
||||
mParamSet.parse(this, agl::utl::ResParameterArchive{data}, heap);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace ksys::res
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
#pragma once
|
||||
|
||||
#include "KingSystem/Physics/System/physParamSet.h"
|
||||
#include "KingSystem/Resource/resResource.h"
|
||||
#include "KingSystem/Utils/ParamIO.h"
|
||||
|
||||
namespace ksys::res {
|
||||
|
||||
// TODO
|
||||
class Physics : public ParamIO, public Resource {
|
||||
SEAD_RTTI_OVERRIDE(Physics, Resource)
|
||||
public:
|
||||
Physics() : ParamIO("physics", 0) {}
|
||||
|
||||
phys::ParamSet& getParamSet() { return mParamSet; }
|
||||
|
||||
void doCreate_(u8* buffer, u32 buffer_size, sead::Heap* heap) override;
|
||||
bool parse_(u8* data, size_t size, sead::Heap* heap) override;
|
||||
bool needsParse() const override { return true; }
|
||||
|
||||
private:
|
||||
phys::ParamSet mParamSet;
|
||||
};
|
||||
|
||||
} // namespace ksys::res
|
||||
|
||||
Reference in New Issue
Block a user