summaryrefslogtreecommitdiff
path: root/src/ending/podium_ceremony_actors.h
blob: f7646bb24574d99af0e3e4010378dd3e43d78c6a (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#ifndef podium_ceremony_actors_H
#define podium_ceremony_actors_H

#include <libultraship.h>
#include <common_structs.h>

enum CeremonyActorType { Initial, Balloon, FireworkCone, FireworkBurst };

// unk
typedef struct {
    /* 0x00 */ s32 unk0;
    /* 0x04 */ s32 unk4;
    /* 0x08 */ s32 actorTimer;
    /* 0x0C */ u8 unk[16]; // 10 bytes
    /* 0x1C */ s8 unk1C;
    /* 0x1D */ s8 unk1D;
    /* 0x1E */ s8 unk1E; // gCharacterSelections
} struct_D_802874D8;

typedef struct {
    s16 type;
    Vec3s unk2;
    s8 unk8;
    s8 unk9;
    s8 unkA;
    s8 unkB;
} ActorInitParams;

// A generic actor, usually a balloon.
typedef struct {
    /* 0x00 */ s32 isActive;
    /* 0x04 */ s16 type;
    /* 0x06 */ s16 unk6;
    /* 0x08 */ s8 unk8;
    /* 0x09 */ s8 unk9;
    /* 0x0A */ s16 unkA;
    /* 0x0C */ s16 unkC;
    /* 0x0E */ s16 unkE;
    /* 0x10 */ Vec3f pos;
    /* 0x1C */ f32 unk1C;
    /* 0x20 */ f32 unk20;
    /* 0x24 */ f32 unk24;
    /* 0x28 */ ActorInitParams* initParams;
    /* 0x2C */ s16 unk2C;
    /* 0x2E */ s16 unk2E;
    /* 0x30 */ s16 unk30;
    /* 0x32 */ s16 unk32;
    /* 0x34 */ s16 unk34;
    /* 0x36 */ s16 unk36;
    /* 0x38 */ f32 unk38;
    /* 0x3C */ s32 timer; // Used to delete the actor after some time.
    /* 0x40 */ s32 unk40;
    /* 0x44 */ s32 unk44;
    /* 0x48 */ s32 unk48;
} CeremonyActor;

typedef struct {
    /* 0x00 */ s32 isActive;
    /* 0x04 */ s16 type;
    /* 0x06 */ s16 unk6;
    /* 0x08 */ s8 unk8;
    /* 0x09 */ s8 unk9;
    /* 0x0A */ s16 unkA;
    /* 0x0C */ s16 unkC;
    /* 0x0E */ s16 unkE;
    /* 0x10 */ Vec3f pos;
    /* 0x1C */ f32 unk1C;
    /* 0x20 */ f32 unk20;
    /* 0x24 */ f32 unk24;
    /* 0x28 */ ActorInitParams* initParams;
    /* 0x2C */ s32 unk2C;
    /* 0x30 */ s32 unk30; // s32 instead of s16
    /* 0x34 */ f32 unk34; // f32 instead of s16
    /* 0x38 */ f32 unk38;
    /* 0x3C */ s32 unk3C;
    /* 0x40 */ s32 unk40;
    /* 0x44 */ s32 unk44;
    /* 0x48 */ s32 unk48;
} Firework;

void update_actors_loop(void);
void func_80280650(void);
void set_initial_position(CeremonyActor*);
CeremonyActor* find_available_entry(void);
CeremonyActor* new_actor(ActorInitParams*);
u16 random_u16_credits(void);
f32 random_float_between_0_and_1(void);
f32 random_who_knows(f32);
void func_80280884(void);
void firework_cone_update_and_spawn_burst(Firework*);
void func_80280A28(Vec3f, Vec3s, f32);
void render_fireworks(Vec3f, f32, s32, s16);
void balloons_and_fireworks_init(void);
void func_80280FFC(void);
void func_8028100C(s32, s32, s32);
void func_8028150C(void);
void func_80281520(void);
void func_80281528(void);
void func_80281530(void);
void func_80281538(void);
void func_80281540(void);
void podium_ceremony_loop(void);
void clear_podium_actors(void);

extern struct_D_802874D8 D_802874D8;
extern CeremonyActor* sPodiumActorList;
extern s32 D_802874FC;

extern ActorInitParams initBalloon;
extern ActorInitParams initCone;
extern ActorInitParams initInitUnk;
extern ActorInitParams initBurst;

extern Gfx* D_802874D4;
extern s32 D_802874FC;
extern Mat4 D_80287500;

#endif