Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JPAFieldBlock.h
Go to the documentation of this file.
1#ifndef JPAFIELDBLOCK_H
2#define JPAFIELDBLOCK_H
3
4#include "JSystem/JGeometry.h"
5#include "dolphin/types.h"
6
7class JKRHeap;
10class JPAFieldBlock;
11
13public:
14 /* 8027BDEC */ void calcAffect(JPAFieldBlock*, JPABaseParticle*);
15 /* 8027BF18 */ f32 calcFadeAffect(JPAFieldBlock*, f32) const;
16
17 /* 8027D3AC */ virtual ~JPAFieldBase() {}
18 /* 80276A8C */ virtual void prepare(JPAEmitterWorkData*, JPAFieldBlock*) {}
20
22};
23
25public:
26 /* 8027C56C */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
27 /* 8027C674 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
28 /* 8027D564 */ ~JPAFieldVortex() {}
29
31 /* 0x1C */ f32 field_0x1c;
32 /* 0x20 */ f32 field_0x20;
33};
34
35class JPAFieldSpin : public JPAFieldBase {
36public:
37 /* 8027CE64 */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
38 /* 8027CFA8 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
39 /* 8027D3F4 */ ~JPAFieldSpin() {}
40
44};
45
47public:
48 /* 8027CCCC */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
49 /* 8027D4AC */ ~JPAFieldRandom() {}
50};
51
53public:
54 /* 8027C36C */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
55 /* 8027C3E0 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
56 /* 8027D5C0 */ ~JPAFieldNewton() {}
57
59 /* 0x1C */ f32 mCutoff;
60};
61
63public:
64 /* 8027C24C */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
65 /* 8027C29C */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
66 /* 8027D61C */ ~JPAFieldMagnet() {}
67
69};
70
72public:
73 /* 8027BFB4 */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
74 /* 8027C054 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
75 /* 8027D6D4 */ ~JPAFieldGravity() {}
76};
77
78class JPAFieldDrag : public JPAFieldBase {
79public:
80 /* 8027CDE4 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
81 /* 8027D450 */ ~JPAFieldDrag() {}
82};
83
85public:
86 /* 8027C814 */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
87 /* 8027CA94 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
88 /* 8027D508 */ ~JPAFieldConvection() {}
89
93};
94
95class JPAFieldAir : public JPAFieldBase {
96public:
97 /* 8027C07C */ void prepare(JPAEmitterWorkData*, JPAFieldBlock*);
98 /* 8027C1B8 */ void calc(JPAEmitterWorkData*, JPAFieldBlock*, JPABaseParticle*);
99 /* 8027D678 */ ~JPAFieldAir() {}
100};
101
102// unknown name
104public:
105 /* 0x00 */ u8 mMagic[4];
106 /* 0x04 */ u32 mSize;
107 /* 0x08 */ u32 mFlags;
110 /* 0x24 */ f32 mMag;
111 /* 0x28 */ f32 mMagRndm;
112 /* 0x2C */ f32 mVal1;
113 /* 0x30 */ f32 mFadeInTime;
114 /* 0x34 */ f32 mFadeOutTime;
115 /* 0x38 */ f32 mEnTime;
116 /* 0x3C */ f32 mDisTime;
117 /* 0x40 */ u8 mCycle;
118};
119
121public:
122 /* 8027D088 */ JPAFieldBlock(u8 const*, JKRHeap*);
123 /* 8027D0C0 */ void init(JKRHeap*);
124
125 u32 getType() { return mpData->mFlags & 0xF; }
126 u32 getAddType() { return (mpData->mFlags >> 8) & 3; }
127 u32 getSttFlag() { return mpData->mFlags >> 16; }
128 bool checkStatus(u16 flag) { return flag & getSttFlag(); }
130 f32 getVal1() { return mpData->mVal1; }
135 u8 getCycle() { return mpData->mCycle; }
140 f32 getMag() { return mMag; }
143 f32 getMagOrig() { return mpData->mMag; }
144 void initOpParam() {
147 mMag = getMagOrig();
148 }
151
152private:
153 /* 0x00 */ const JPAFieldBlockData* mpData;
155 /* 0x08 */ f32 mFadeInRate;
156 /* 0x0C */ f32 mFadeOutRate;
159 /* 0x28 */ f32 mMag;
160
161 enum Type {
162 /* 0x0 */ FIELD_GRAVITY,
163 /* 0x1 */ FIELD_AIR,
164 /* 0x2 */ FIELD_MAGNET,
165 /* 0x3 */ FIELD_NEWTON,
166 /* 0x4 */ FIELD_VORTEX,
167 /* 0x5 */ FIELD_RANDOM,
168 /* 0x6 */ FIELD_DRAG,
170 /* 0x8 */ FIELD_SPIN,
171 };
172};
173
174#endif /* JPAFIELDBLOCK_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRHeap.h:16
Definition JPAParticle.h:20
Definition JPAFieldBlock.h:95
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:67
~JPAFieldAir()
Definition JPAFieldBlock.h:99
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:80
Definition JPAFieldBlock.h:12
void calcAffect(JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:13
virtual void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.h:18
virtual void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)=0
virtual ~JPAFieldBase()
Definition JPAFieldBlock.h:17
f32 calcFadeAffect(JPAFieldBlock *, f32) const
Definition JPAFieldBlock.cpp:34
JGeometry::TVec3< f32 > mAccel
Definition JPAFieldBlock.h:21
Definition JPAFieldBlock.h:103
f32 mEnTime
Definition JPAFieldBlock.h:115
JGeometry::TVec3< f32 > mPos
Definition JPAFieldBlock.h:108
JGeometry::TVec3< f32 > mDir
Definition JPAFieldBlock.h:109
f32 mMagRndm
Definition JPAFieldBlock.h:111
u8 mMagic[4]
Definition JPAFieldBlock.h:105
u8 mCycle
Definition JPAFieldBlock.h:117
f32 mDisTime
Definition JPAFieldBlock.h:116
f32 mFadeOutTime
Definition JPAFieldBlock.h:114
f32 mVal1
Definition JPAFieldBlock.h:112
u32 mSize
Definition JPAFieldBlock.h:106
u32 mFlags
Definition JPAFieldBlock.h:107
f32 mMag
Definition JPAFieldBlock.h:110
f32 mFadeInTime
Definition JPAFieldBlock.h:113
Definition JPAFieldBlock.h:120
f32 getMag()
Definition JPAFieldBlock.h:140
f32 mFadeOutRate
Definition JPAFieldBlock.h:156
f32 mFadeInRate
Definition JPAFieldBlock.h:155
void prepare(JPAEmitterWorkData *work)
Definition JPAFieldBlock.h:149
f32 getFadeInTime()
Definition JPAFieldBlock.h:131
JGeometry::TVec3< f32 > & getPos()
Definition JPAFieldBlock.h:138
JGeometry::TVec3< f32 > & getDir()
Definition JPAFieldBlock.h:139
JPAFieldBase * mpField
Definition JPAFieldBlock.h:154
f32 getFadeOutTime()
Definition JPAFieldBlock.h:132
void getDirOrig(JGeometry::TVec3< f32 > *dir)
Definition JPAFieldBlock.h:142
u32 getSttFlag()
Definition JPAFieldBlock.h:127
f32 mMag
Definition JPAFieldBlock.h:159
f32 getFadeInRate()
Definition JPAFieldBlock.h:136
u32 getAddType()
Definition JPAFieldBlock.h:126
const JPAFieldBlockData * mpData
Definition JPAFieldBlock.h:153
bool checkStatus(u16 flag)
Definition JPAFieldBlock.h:128
f32 getEnTime()
Definition JPAFieldBlock.h:133
u8 getCycle()
Definition JPAFieldBlock.h:135
f32 getMagOrig()
Definition JPAFieldBlock.h:143
void initOpParam()
Definition JPAFieldBlock.h:144
JGeometry::TVec3< f32 > mPos
Definition JPAFieldBlock.h:157
f32 getFadeOutRate()
Definition JPAFieldBlock.h:137
void calc(JPAEmitterWorkData *work, JPABaseParticle *ptcl)
Definition JPAFieldBlock.h:150
f32 getMagRndm()
Definition JPAFieldBlock.h:129
f32 getDisTime()
Definition JPAFieldBlock.h:134
f32 getVal1()
Definition JPAFieldBlock.h:130
Type
Definition JPAFieldBlock.h:161
@ FIELD_DRAG
Definition JPAFieldBlock.h:168
@ FIELD_VORTEX
Definition JPAFieldBlock.h:166
@ FIELD_MAGNET
Definition JPAFieldBlock.h:164
@ FIELD_AIR
Definition JPAFieldBlock.h:163
@ FIELD_RANDOM
Definition JPAFieldBlock.h:167
@ FIELD_NEWTON
Definition JPAFieldBlock.h:165
@ FIELD_GRAVITY
Definition JPAFieldBlock.h:162
@ FIELD_CONVECTION
Definition JPAFieldBlock.h:169
@ FIELD_SPIN
Definition JPAFieldBlock.h:170
void getPosOrig(JGeometry::TVec3< f32 > *pos)
Definition JPAFieldBlock.h:141
JGeometry::TVec3< f32 > mDir
Definition JPAFieldBlock.h:158
u32 getType()
Definition JPAFieldBlock.h:125
Definition JPAFieldBlock.h:84
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:172
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:157
~JPAFieldConvection()
Definition JPAFieldBlock.h:88
JGeometry::TVec3< f32 > field_0x10
Definition JPAFieldBlock.h:90
JGeometry::TVec3< f32 > field_0x28
Definition JPAFieldBlock.h:92
JGeometry::TVec3< f32 > field_0x1c
Definition JPAFieldBlock.h:91
Definition JPAFieldBlock.h:78
~JPAFieldDrag()
Definition JPAFieldBlock.h:81
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:200
Definition JPAFieldBlock.h:71
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:50
~JPAFieldGravity()
Definition JPAFieldBlock.h:75
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:61
Definition JPAFieldBlock.h:62
JGeometry::TVec3< f32 > mDir
Definition JPAFieldBlock.h:68
~JPAFieldMagnet()
Definition JPAFieldBlock.h:66
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:99
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:92
Definition JPAFieldBlock.h:52
JGeometry::TVec3< f32 > mDir
Definition JPAFieldBlock.h:58
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:115
~JPAFieldNewton()
Definition JPAFieldBlock.h:56
f32 mCutoff
Definition JPAFieldBlock.h:59
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:107
Definition JPAFieldBlock.h:46
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:189
~JPAFieldRandom()
Definition JPAFieldBlock.h:49
Definition JPAFieldBlock.h:35
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:211
JGeometry::TVec3< f32 > field_0x1c
Definition JPAFieldBlock.h:42
JGeometry::TVec3< f32 > field_0x10
Definition JPAFieldBlock.h:41
JGeometry::TVec3< f32 > field_0x28
Definition JPAFieldBlock.h:43
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:224
~JPAFieldSpin()
Definition JPAFieldBlock.h:39
Definition JPAFieldBlock.h:24
void prepare(JPAEmitterWorkData *, JPAFieldBlock *)
Definition JPAFieldBlock.cpp:128
f32 field_0x1c
Definition JPAFieldBlock.h:31
JGeometry::TVec3< f32 > field_0x10
Definition JPAFieldBlock.h:30
~JPAFieldVortex()
Definition JPAFieldBlock.h:28
f32 field_0x20
Definition JPAFieldBlock.h:32
void calc(JPAEmitterWorkData *, JPAFieldBlock *, JPABaseParticle *)
Definition JPAFieldBlock.cpp:138
static u8 pos[12]
Definition d_a_obj_kago.cpp:839
static initFunc init[]
Definition d_menu_collect.cpp:42
static volatile BOOL flag
Definition dspproc.cpp:20
Definition JGeometry.h:55
Definition JPAEmitter.h:21
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
unsigned short u16
Definition types.h:9
unsigned char u8
Definition types.h:8