summaryrefslogtreecommitdiff
path: root/src/KingSystem/World/worldShootingStarMgr.h
blob: 49cc7ebdb89f32ee5994e2bd943e5cf47aeebd10 (plain)
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
#pragma once

#include <math/seadVector.h>
#include <thread/seadAtomic.h>
#include "KingSystem/Utils/Types.h"
#include "KingSystem/World/worldJob.h"

namespace ksys::world {

class ShootingStarMgr : public Job {
public:
    ShootingStarMgr();
    ~ShootingStarMgr() override;

    JobType getType() const override { return JobType::ShootingStar; }

    void init_(sead::Heap* heap) override;
    void calc_() override;
    virtual void reset();

    static void setScheduled(bool enable);
    void initSchedule();
    static bool isScheduledTime();

    bool tryGetStarPosition(sead::Vector3f* out) const;
    static void setStarPosition(f32 x, f32 y, f32 z);
    static void spawnShootingStar();
    void spawnStar();

    static bool checkCamera();
    bool isStarPositionValid();
    static void setShootingStarHours(int start, int end, int hr_unk);
    static void resetStarPosition();
    static void resetStarProperty();

    s32 mFallHour = 0;
    s32 mFallMinute = 0;
    bool mInitialised = false;
    bool mNeedSpawnStar = false;
    bool mIsMainField = false;
    bool _2b = false;
};
KSYS_CHECK_SIZE_NX150(ShootingStarMgr, 0x30);

}  // namespace ksys::world