SpaghettiKart
Loading...
Searching...
No Matches
Trophy.h
Go to the documentation of this file.
1#pragma once
2
3#include <libultraship.h>
4#include "Object.h"
6#include "World.h"
8
9extern "C" {
10#include "common_structs.h"
11}
12
13class OTrophy : public OObject {
14public:
23
24 enum Behaviour : int16_t {
27 ROTATE, // A dual-axis opposing rotation
28 ROTATE2, // A single-axis rotation
30 };
31
32 // This is simply a helper function to keep Spawning code clean
33 static OTrophy* Spawn(const FVector& pos, TrophyType trophy, Behaviour bhv) {
34 SpawnParams params = {
35 .Name = "mk:trophy",
36 .Type = trophy,
37 .Behaviour = bhv,
38 .Location = pos,
39 };
40 return dynamic_cast<OTrophy*>(AddObjectToWorld<OTrophy>(params));
41 }
42
43 explicit OTrophy(const SpawnParams& params);
44
45 virtual void SetSpawnParams(SpawnParams& params) override;
46 virtual void Tick() override;
47 virtual void Draw(s32 cameraId) override;
48 virtual void DrawEditorProperties() override;
49 void func_80086700(s32 objectIndex);
50 void func_80086940(s32 objectIndex);
51 void func_80086C14(s32 objectIndex);
52 void func_80086C6C(s32 objectIndex);
53
54private:
56
59 int8_t _toggle;
62 bool _isMod = false;
63};
static OObject * AddObjectToWorld(const SpawnParams &params)
Definition RegisterContent.h:10
OObject()
Definition Object.cpp:13
bool _isMod
Definition Trophy.h:62
OTrophy(const SpawnParams &params)
Definition Trophy.cpp:23
virtual void Draw(s32 cameraId) override
Definition Trophy.cpp:226
static OTrophy * Spawn(const FVector &pos, TrophyType trophy, Behaviour bhv)
Definition Trophy.h:33
TrophyType
Definition Trophy.h:15
@ SILVER
Definition Trophy.h:17
@ SILVER_150
Definition Trophy.h:20
@ GOLD_150
Definition Trophy.h:21
@ BRONZE
Definition Trophy.h:16
@ BRONZE_150
Definition Trophy.h:19
@ GOLD
Definition Trophy.h:18
Behaviour _bhv
Definition Trophy.h:58
int8_t _toggle
Definition Trophy.h:59
void func_80086940(s32 objectIndex)
Definition Trophy.cpp:281
StarEmitter * _emitter
Definition Trophy.h:55
virtual void SetSpawnParams(SpawnParams &params) override
Definition Trophy.cpp:98
void func_80086C6C(s32 objectIndex)
Definition Trophy.cpp:361
virtual void DrawEditorProperties() override
Definition Trophy.cpp:377
TrophyType _type
Definition Trophy.h:57
virtual void Tick() override
Definition Trophy.cpp:105
Behaviour
Definition Trophy.h:24
@ STATIONARY
Definition Trophy.h:26
@ PODIUM_CEREMONY
Definition Trophy.h:25
@ ROTATE
Definition Trophy.h:27
@ GO_FISH
Definition Trophy.h:29
@ ROTATE2
Definition Trophy.h:28
void func_80086700(s32 objectIndex)
Definition Trophy.cpp:270
int8_t * _toggleVisibility
Definition Trophy.h:60
void func_80086C14(s32 objectIndex)
Definition Trophy.cpp:350
Vec3f _oldPos
Definition Trophy.h:61
Definition StarEmitter.h:22
f32 Vec3f[3]
Definition common_structs.h:10
Definition CoreMath.h:30
Definition SpawnParams.h:30