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