summaryrefslogtreecommitdiff
path: root/src/engine/objects/Penguin.h
blob: 63c2207c19d4bfc038470f28bcf314d776607b7e (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once

#include <libultraship.h>
#include <vector>
#include "engine/World.h"
#include "engine/objects/Object.h"

extern "C" {
#include "macros.h"
#include "main.h"
#include "vehicles.h"
#include "waypoints.h"
#include "common_structs.h"
#include "objects.h"
#include "course_offsets.h"
}

class OPenguin : public OObject {
public:
    enum PenguinType : uint32_t {
        CHICK,
        ADULT,
        CREDITS,
        EMPEROR
    };

    enum Behaviour : uint16_t {
        DISABLED,
        STRUT, // Emperor penguin
        CIRCLE, // Waddle in a circle
        SLIDE3,
        SLIDE4,
        UNK, // unused
        SLIDE6,
    };

public:
    f32 Diameter = 0.0f; // Waddle in a circle around the spawn point at this diameter.
    uint16_t MirrorModeAngleOffset;

    explicit OPenguin(Vec3f pos, u16 direction, PenguinType type, Behaviour behaviour);

    ~OPenguin() {
        _count--;
    }

    static size_t GetCount() {
        return _count;
    }


    virtual void Tick() override;
    virtual void Draw(s32 cameraId) override;
private:
    void Behaviours(s32 objectIndex, s32 arg1);
    void EmperorPenguin(s32 objectIndex);
    void func_80085080(s32 objectIndex);
    void func_8008502C(s32 objectIndex, s32 arg1);
    void func_80084D2C(s32 objectIndex, s32 arg1);

    void InitEmperorPenguin(s32 objectIndex);
    void OtherPenguin(s32 objectIndex);
    void InitOtherPenguin(s32 objectIndex);

    static size_t _count;
    s32 _idx;
    PenguinType _type;
    Behaviour _bhv;


};