New Super Mario Bros. U Headers
Loading...
Searching...
No Matches
IceMgr.h
Go to the documentation of this file.
1#pragma once
2
3#include <actor/ActorUniqueID.h>
4
5#include <container/seadSafeArray.h>
6#include <math/seadVector.h>
7
8struct IceEfScale;
9
11{
12 cIceType_Square = 0, ///< Square
13 cIceType_Tate, ///< Vertical rectangle
14 cIceType_Yoko, ///< Horizontal rectangle
15 cIceType_BigSquare, ///< Square that isn't carryable
16 cIceType_BigTate, ///< Vertical rectangle that isn't carryable
17 cIceType_BigYoko, ///< Horizontal rectangle that isn't carryable
18
20};
21static_assert(cIceType_Num == 6);
22
23struct IceInfo
24{
28 const IceEfScale* ef_scale; // Was actually applied in NSMBW, but no longer does anything in NSMBU
29
30 static u32 makeParam(IceType type, bool unk_1 = false, u32 unk_2 = 0, bool unk_3 = false)
31 {
32 return (
33 ((u32)type & 7) |
34 ((u32)unk_1 << 12) |
35 ((unk_2 & 0xF) << 24) |
36 ((u32)unk_3 << 28)
37 );
38 }
39};
40
41class Enemy;
42
43class IceMgr
44{
45public:
46 static const s32 cIceMaxNum = 12;
47
48public:
49 struct IceStatus
50 {
51 union
52 {
53 struct
54 {
58 };
60 };
61
64 , ice_act_1(0)
65 , ice_act_2(4)
66 {
67 }
68
69 IceStatus(s32 melt_time_type_, s32 ice_act_1_, s32 ice_act_2_)
73 {
74 }
75 };
76 static_assert(sizeof(IceStatus) == 4);
77
78 struct TimeInfo
79 {
82 };
83 static_assert(sizeof(TimeInfo) == 4);
84
85public:
86 // Address: 0x0237CBBC
87 IceMgr(Enemy* owner);
88 // Address: 0x0237CD54
90
91 // Address: 0x0237CB94
92 void setIceStatus(const IceStatus& status);
93
94 // Address: 0x0237D63C
95 bool createIce(IceInfo* info, s32 num);
96
97 bool createIce(IceInfo& info)
98 {
99 return createIce(&info, 1);
100 }
101
102 template <s32 N>
103 bool createIce(IceInfo (&info_array)[N])
104 {
105 return createIce(info_array, N);
106 }
107
108 // Address: 0x0237CCC8
109 void removeIce();
110
111 bool hasIce() const
112 {
113 return mHasIce;
114 }
115
116protected:
124 bool mHasIce; // Maybe?
125 bool mPermanent; // Maybe??
133};
134static_assert(sizeof(IceMgr) == 0x50);
IceType
Definition IceMgr.h:11
@ cIceType_Num
Definition IceMgr.h:19
@ cIceType_Tate
Vertical rectangle.
Definition IceMgr.h:13
@ cIceType_Square
Square.
Definition IceMgr.h:12
@ cIceType_BigYoko
Horizontal rectangle that isn't carryable.
Definition IceMgr.h:17
@ cIceType_BigTate
Vertical rectangle that isn't carryable.
Definition IceMgr.h:16
@ cIceType_Yoko
Horizontal rectangle.
Definition IceMgr.h:14
@ cIceType_BigSquare
Square that isn't carryable.
Definition IceMgr.h:15
Definition Enemy.h:33
Definition IceMgr.h:44
bool createIce(IceInfo(&info_array)[N])
Definition IceMgr.h:103
u8 _47
Definition IceMgr.h:127
IceMgr(Enemy *owner)
sead::SafeArray< ActorUniqueID, cIceMaxNum > mIceID
Definition IceMgr.h:118
u8 _4a
Definition IceMgr.h:130
u8 mIceNum
Definition IceMgr.h:117
void setIceStatus(const IceStatus &status)
bool createIce(IceInfo *info, s32 num)
s16 mTimer2
Definition IceMgr.h:123
TimeInfo * mTimeInfo
Definition IceMgr.h:120
s8 mPlayerNo
Definition IceMgr.h:131
u8 _46
Definition IceMgr.h:126
IceStatus mIceStatus
Definition IceMgr.h:119
bool mPermanent
Definition IceMgr.h:125
s16 mTimer1
Definition IceMgr.h:122
u8 _49
Definition IceMgr.h:129
bool mHasIce
Definition IceMgr.h:124
Enemy * mOwner
Definition IceMgr.h:121
void removeIce()
u8 _48
Definition IceMgr.h:128
bool hasIce() const
Definition IceMgr.h:111
bool createIce(IceInfo &info)
Definition IceMgr.h:97
u8 _4c
Definition IceMgr.h:132
static const s32 cIceMaxNum
Definition IceMgr.h:46
Definition IceMgr.h:24
u32 ice_param_0
Definition IceMgr.h:25
sead::Vector3f position
Definition IceMgr.h:26
const IceEfScale * ef_scale
Definition IceMgr.h:28
static u32 makeParam(IceType type, bool unk_1=false, u32 unk_2=0, bool unk_3=false)
Definition IceMgr.h:30
sead::Vector3f scale
Definition IceMgr.h:27
Definition IceMgr.h:50
u8 melt_time_type
Definition IceMgr.h:55
u32 _0
Definition IceMgr.h:59
u8 ice_act_2
Definition IceMgr.h:57
u8 ice_act_1
Definition IceMgr.h:56
IceStatus()
Definition IceMgr.h:62
IceStatus(s32 melt_time_type_, s32 ice_act_1_, s32 ice_act_2_)
Definition IceMgr.h:69
Definition IceMgr.h:79
s16 melt_shake
Definition IceMgr.h:81
s16 melt
Definition IceMgr.h:80