Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions data/file_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241301,37 +241301,37 @@ Library/Fluid/RippleCtrl.o:
- offset: 0x89e104
size: 8
label: _ZNK2al12ParameterV3f15getParamTypeStrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e10c
size: 8
label: _ZNK2al12ParameterV3f12getParamTypeEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e114
size: 8
label: _ZNK2al9ParameterIN4sead7Vector3IfEEE3ptrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e11c
size: 8
label: _ZN2al9ParameterIN4sead7Vector3IfEEE3ptrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e124
size: 8
label: _ZNK2al9ParameterIN4sead7Vector3IfEEE4sizeEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e12c
size: 8
label: _ZNK2al9ParameterIN4sead7Vector3IfEEE15getParamTypeStrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e134
size: 8
label: _ZNK2al9ParameterIN4sead7Vector3IfEEE12getParamTypeEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e13c
size: 8
Expand Down Expand Up @@ -241371,42 +241371,42 @@ Library/Fluid/RippleCtrl.o:
- offset: 0x89e174
size: 516
label: _ZN2al9ParameterIN4sead15FixedSafeStringILi64EEEEC2ERKS3_RKNS1_14SafeStringBaseIcEESA_SA_PNS_12ParameterObjEb
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e378
size: 8
label: _ZNK2al17ParameterString6415getParamTypeStrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e380
size: 8
label: _ZNK2al17ParameterString6412getParamTypeEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e388
size: 8
label: _ZNK2al9ParameterIN4sead15FixedSafeStringILi64EEEE3ptrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e390
size: 8
label: _ZN2al9ParameterIN4sead15FixedSafeStringILi64EEEE3ptrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e398
size: 8
label: _ZNK2al9ParameterIN4sead15FixedSafeStringILi64EEEE4sizeEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e3a0
size: 8
label: _ZNK2al9ParameterIN4sead15FixedSafeStringILi64EEEE15getParamTypeStrEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x89e3a8
size: 8
label: _ZNK2al9ParameterIN4sead15FixedSafeStringILi64EEEE12getParamTypeEv
status: NotDecompiled
status: Matching
lazy: true
Library/Fluid/RippleFixMapParts.o:
'.text':
Expand Down Expand Up @@ -265007,23 +265007,23 @@ Library/Model/SkyDirector.o:
label:
- _ZN2al8SkyParamC1Ev
- _ZN2al8SkyParamC2Ev
status: NotDecompiled
status: NonMatchingMajor
- offset: 0x950c3c
size: 188
label: _ZNK2al8SkyParam7isEqualERKNS_16IUseRequestParamE
status: NotDecompiled
status: Matching
- offset: 0x950cf8
size: 12
label: _ZNK2al8SkyParam9getRotateEv
status: NotDecompiled
status: Matching
- offset: 0x950d04
size: 48
label: _ZNK2al8SkyParam10getSkyNameEv
status: NotDecompiled
status: Matching
- offset: 0x950d34
size: 12
label: _ZNK2al8SkyParam16getStarIntensityEv
status: NotDecompiled
status: Matching
- offset: 0x950d40
size: 320
label:
Expand Down Expand Up @@ -265077,17 +265077,17 @@ Library/Model/SkyDirector.o:
- offset: 0x951398
size: 12
label: _ZNK2al8SkyParam12getParamNameEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x9513a4
size: 8
label: _ZN2al8SkyParam11getParamObjEv
status: NotDecompiled
status: Matching
lazy: true
- offset: 0x9513ac
size: 8
label: _ZNK2al8SkyParam11getParamObjEv
status: NotDecompiled
status: Matching
lazy: true
Library/Model/SubMeshRangeArray.o:
'.text':
Expand Down Expand Up @@ -291364,15 +291364,15 @@ Project/Base/ParamRequestInterp.o:
- offset: 0xa45558
size: 104
label: _ZNK2al16IUseRequestParam7isEqualERKS0_
status: NotDecompiled
status: Matching
- offset: 0xa455c0
size: 104
label: _ZN2al16IUseRequestParam4copyERKS0_
status: NotDecompiled
status: Matching
- offset: 0xa45628
size: 164
label: _ZN2al16IUseRequestParam10copyInterpERKS0_S2_f
status: NotDecompiled
status: Matching
- offset: 0xa456cc
size: 44
label:
Expand Down
43 changes: 43 additions & 0 deletions lib/al/Library/Model/SkyDirector.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#include "Library/Model/SkyDirector.h"

#include "Library/Base/StringUtil.h"
#include "Library/Math/MathUtil.h"
#include "Library/Yaml/ParameterBase.h"

namespace al {

// NON-MATCHING: Stack mismatch https://decomp.me/scratch/uG8AT
SkyParam::SkyParam() {
mParameterObj = new ParameterObj();

mSkyName = new ParameterString64(StringTmp<64>("RSGraphicTestSkyBlue"), mParameterObj, "Name",
"空のモデル名", "", true);

mRotate = new ParameterV3f({0.0f, 0.0f, 0.0f}, mParameterObj, "Rotate", "回転",
"Min=-360.0f, Max=360.0f", true);

mStarIntensity = new ParameterF32(0.0f, mParameterObj, "StarIntensity", "星の明るさ",
"Min=0.0f, Max=100.0f", true);
}

bool SkyParam::isEqual(const IUseRequestParam& other) const {
const SkyParam* param = static_cast<const SkyParam*>(&other);

return isNear(getRotate(), param->getRotate()) &&
isEqualString(getSkyName(), param->getSkyName()) &&
isNear(getStarIntensity(), param->getStarIntensity());
}

const sead::Vector3f& SkyParam::getRotate() const {
return mRotate->getValue();
}

const char* SkyParam::getSkyName() const {
return mSkyName->getValue().cstr();
}

f32 SkyParam::getStarIntensity() const {
return mStarIntensity->getValue();
}

} // namespace al
32 changes: 32 additions & 0 deletions lib/al/Library/Model/SkyDirector.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,45 @@

#include <basis/seadTypes.h>
#include <container/seadPtrArray.h>
#include <math/seadVector.h>
#include <prim/seadSafeString.h>

#include "Project/Base/ParamRequestInterp.h"

namespace al {
struct ActorInitInfo;
class SkyParam;
class Sky;
class ParamRequestInterp;
class ParameterObj;
class ParameterString64;
class ParameterV3f;
class ParameterF32;

class SkyParam : public IUseRequestParam {
public:
SkyParam();

const char* getParamName() const override { return "空"; }

ParameterObj* getParamObj() override { return mParameterObj; }

const ParameterObj* getParamObj() const override { return mParameterObj; }

bool isEqual(const IUseRequestParam& other) const override;

const sead::Vector3f& getRotate() const;
const char* getSkyName() const;
f32 getStarIntensity() const;

private:
ParameterObj* mParameterObj;
ParameterString64* mSkyName;
ParameterV3f* mRotate;
ParameterF32* mStarIntensity;
};

static_assert(sizeof(SkyParam) == 0x28);

class SkyDirector {
public:
Expand Down
4 changes: 4 additions & 0 deletions lib/al/Library/Yaml/ParameterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ SEAD_ENUM(YamlParamType,
ParameterObj* obj, bool e) \
: Parameter(value, name, label, meta, obj, e) {} \
\
Parameter##Name(Type const& value, ParameterObj* obj, const sead::SafeString& name, \
const sead::SafeString& label, const sead::SafeString& meta, bool e) \
: Parameter(value, name, label, meta, obj, e) {} \
\
Parameter##Name(Type const& value, const sead::SafeString& name, \
const sead::SafeString& label, const sead::SafeString& meta, \
ParameterList* list, bool e) \
Expand Down
29 changes: 29 additions & 0 deletions lib/al/Project/Base/ParamRequestInterp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "Project/Base/ParamRequestInterp.h"

#include "Library/Yaml/ParameterBase.h"

namespace al {

bool IUseRequestParam::isEqual(const IUseRequestParam& requestParam) const {
if (!getParamObj())
return false;

return getParamObj()->isEqual(*requestParam.getParamObj());
}

void IUseRequestParam::copy(const IUseRequestParam& requestParam) {
if (!getParamObj())
return;

getParamObj()->copy(*requestParam.getParamObj());
}

void IUseRequestParam::copyInterp(const IUseRequestParam& requestParamStart,
const IUseRequestParam& requestParamEnd, f32 rate) {
if (!getParamObj())
return;

getParamObj()->copyLerp(*requestParamStart.getParamObj(), *requestParamEnd.getParamObj(), rate);
}

} // namespace al
21 changes: 21 additions & 0 deletions lib/al/Project/Base/ParamRequestInterp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once

#include <basis/seadTypes.h>

namespace al {
class ParameterObj;

class IUseRequestParam {
public:
virtual const char* getParamName() const = 0;
virtual ParameterObj* getParamObj() = 0;
virtual const ParameterObj* getParamObj() const = 0;
virtual bool isEqual(const IUseRequestParam& requestParam) const;
virtual void copy(const IUseRequestParam& requestParam);
virtual void copyInterp(const IUseRequestParam& requestParamStart,
const IUseRequestParam& requestParamEnd, f32 rate);
};

static_assert(sizeof(IUseRequestParam) == 0x8);

} // namespace al