1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#pragma once
#include <KingSystem/Map/mapObject.h>
#include <basis/seadTypes.h>
#include "KingSystem/Resource/resHandle.h"
#include "KingSystem/Utils/Types.h"
namespace al {
class ByamlIter;
}
namespace ksys::act {
class Actor;
class InstParamPack;
} // namespace ksys::act
namespace ksys::map {
class Object;
}
namespace ksys::eco {
enum class WeaponModifier {
None = 0,
/// This will be upgraded to Blue randomly.
RandomBlue = 1,
Blue = 2,
Yellow = 3,
/// Chests only: Weapon will never spawn with any modifiers. This overrides regular scaling.
NoneForced = 4,
};
class LevelSensor {
public:
LevelSensor();
virtual ~LevelSensor();
void init(sead::Heap* heap);
bool scaleWeapon(const sead::SafeString& weapon, WeaponModifier min_modifier,
const char** scaled_weapon, WeaponModifier* scaled_modifier,
act::Actor* actor) const;
bool scaleActor(const sead::SafeString& name, map::Object* obj, const char** scaled_weapon,
act::InstParamPack* pack, const sead::Vector3f& position) const;
void calculatePoints();
private:
f32 mPoints{};
f32 mWeaponPoints{};
f32 mEnemyPoints{};
bool _14{};
f32 mDefaultPoints = -1;
al::ByamlIter* mRootIter = nullptr;
res::Handle mResHandle;
};
KSYS_CHECK_SIZE_NX150(LevelSensor, 0x78);
} // namespace ksys::eco
|