mirror of
https://github.com/MonsterDruide1/OdysseyDecomp
synced 2026-04-23 09:04:21 +00:00
Library/Light: Implement PlaneParam (#885)
This commit is contained in:
parent
5a72d499e9
commit
06c8d29492
|
|
@ -78389,37 +78389,37 @@ MapObj/OceanWaveActor.o:
|
|||
- offset: 0x2d5f0c
|
||||
size: 8
|
||||
label: _ZNK2al12ParameterF3215getParamTypeStrEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f14
|
||||
size: 8
|
||||
label: _ZNK2al12ParameterF3212getParamTypeEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f1c
|
||||
size: 8
|
||||
label: _ZNK2al9ParameterIfE3ptrEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f24
|
||||
size: 8
|
||||
label: _ZN2al9ParameterIfE3ptrEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f2c
|
||||
size: 8
|
||||
label: _ZNK2al9ParameterIfE4sizeEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f34
|
||||
size: 8
|
||||
label: _ZNK2al9ParameterIfE15getParamTypeStrEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f3c
|
||||
size: 8
|
||||
label: _ZNK2al9ParameterIfE12getParamTypeEv
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
lazy: true
|
||||
- offset: 0x2d5f44
|
||||
size: 8
|
||||
|
|
@ -244205,7 +244205,7 @@ Library/Light/DirectionParam.o:
|
|||
- offset: 0x8be170
|
||||
size: 696
|
||||
label: _ZN2al10PlaneParam10initializeERKN4sead7Vector3IfEEPNS_12ParameterObjEPKc
|
||||
status: NotDecompiled
|
||||
status: Matching
|
||||
Library/Light/LightKeeper.o:
|
||||
'.text':
|
||||
- offset: 0x8be428
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include <utility/aglParameter.h>
|
||||
#include <utility/aglParameterObj.h>
|
||||
|
||||
#include "Library/Base/StringUtil.h"
|
||||
#include "Library/Math/MathUtil.h"
|
||||
#include "Library/Placement/PlacementFunction.h"
|
||||
#include "Library/Yaml/ParameterBase.h"
|
||||
|
|
@ -145,4 +146,13 @@ void DirectionParam::lerp(const DirectionParam& startDirection, const DirectionP
|
|||
syncFromDirection();
|
||||
}
|
||||
|
||||
void PlaneParam::initialize(const sead::Vector3f& direction, ParameterObj* parameterObj,
|
||||
const char* planeName) {
|
||||
StringTmp<256> normal = {"%sNormal", planeName};
|
||||
StringTmp<256> distance = {"%sDistance", planeName};
|
||||
|
||||
initializeDir(direction, parameterObj, normal.cstr(), "平面法線");
|
||||
mDistanceFromOrigin = new ParameterF32(distance.cstr(), "原点からの距離",
|
||||
"Min=-100000, Max=100000", parameterObj, true);
|
||||
}
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ class ParameterObj;
|
|||
} // namespace agl::utl
|
||||
|
||||
namespace al {
|
||||
class ActorInitInfo;
|
||||
struct ActorInitInfo;
|
||||
class ParameterF32;
|
||||
class ParameterObj;
|
||||
class ParameterV2f;
|
||||
|
||||
|
|
@ -47,4 +48,17 @@ private:
|
|||
|
||||
static_assert(sizeof(DirectionParam) == 0x20);
|
||||
|
||||
class PlaneParam : public DirectionParam {
|
||||
public:
|
||||
PlaneParam() = default;
|
||||
|
||||
void initialize(const sead::Vector3f& direction, ParameterObj* parameterObj,
|
||||
const char* planeName);
|
||||
|
||||
private:
|
||||
ParameterF32* mDistanceFromOrigin = nullptr;
|
||||
};
|
||||
|
||||
static_assert(sizeof(PlaneParam) == 0x28);
|
||||
|
||||
} // namespace al
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ SEAD_ENUM(YamlParamType,
|
|||
const sead::SafeString& meta, ParameterObj* obj, bool e) \
|
||||
: Parameter(name, label, meta, obj, e) {} \
|
||||
\
|
||||
Parameter##Name(const Type& value, const sead::SafeString& name, \
|
||||
Parameter##Name(Type const& value, const sead::SafeString& name, \
|
||||
const sead::SafeString& label, const sead::SafeString& meta, \
|
||||
ParameterObj* obj, bool e) \
|
||||
: Parameter(value, name, label, meta, obj, e) {} \
|
||||
|
|
@ -51,7 +51,7 @@ SEAD_ENUM(YamlParamType,
|
|||
const sead::SafeString& meta, ParameterList* list, bool e) \
|
||||
: Parameter(name, label, meta, list, e) {} \
|
||||
\
|
||||
Parameter##Name(const Type& value, const sead::SafeString& name, \
|
||||
Parameter##Name(Type const& value, const sead::SafeString& name, \
|
||||
const sead::SafeString& label, const sead::SafeString& meta, \
|
||||
ParameterList* list, bool e) \
|
||||
: Parameter(value, name, label, meta, list, e) {} \
|
||||
|
|
|
|||
|
|
@ -314,6 +314,8 @@ def common_const_reference(c, path):
|
|||
continue
|
||||
if "operator[]" in line:
|
||||
continue
|
||||
if "Type const&" in line:
|
||||
continue
|
||||
if "AudioDirectorInitInfo" in line:
|
||||
continue
|
||||
if "ReplaceTimeInfo" in line:
|
||||
|
|
|
|||
Loading…
Reference in a new issue