SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
Mario.hpp
1#pragma once
2
3#include "Game/Player/MarioModule.hpp"
4#include "Game/Util/TriangleFilter.hpp"
5
6class MarioActor;
7class MarioFlow;
8class MarioWall;
9class MarioDamage;
10class MarioFaint;
11class MarioBlown;
12class MarioHang;
13class MarioSwim;
14class MarioSlider;
15class MarioFireDamage;
16class MarioFireRun;
17class MarioFireDance;
19class MarioDarkDamage;
20class MarioStep;
21class MarioBump;
22class MarioParalyze;
23class MarioStun;
24class MarioCrush;
25class MarioFreeze;
26class MarioMagic;
27class MarioFpView;
28class MarioRecovery;
29class MarioFlip;
30class MarioSideStep;
31class MarioFrontStep;
32class MarioStick;
33class MarioRabbit;
34class MarioSukekiyo;
35class MarioBury;
36class MarioWait;
37class MarioClimb;
38class MarioSkate;
39class MarioFoo;
40class MarioWarp;
41class MarioTeresa;
42class MarioTalk;
43class MarioMove;
44class Triangle;
45class FloorCode;
46struct SoundList;
47class MarioState;
48
49class Mario : public MarioModule {
50public:
51 typedef bool (Mario::*Task)(const void *, void *, unsigned long);
53
54 virtual bool postureCtrl(MtxPtr);
55
56 void update();
57 void setHeadAndFrontVecFromRotate(const TVec3f &);
58 void initAfterConst();
59 void initMember();
60 void clearSlope();
61 void clear2DStick();
62 void initSound();
63 void recordRelativePosition();
64 unsigned long initSoundTable(SoundList *list, unsigned long);
65 void initTask();
66 bool isIgnoreTriangle(const Triangle *);
67 bool isStatusActive(unsigned long) const;
68 bool isSwimming() const;
69 bool isOnimasuBinderPressSkip() const;
70 void closeStatus(MarioState *);
71 void stopWalk();
72 void push(const TVec3f &);
73 void stopJump();
74 void updateGroundInfo();
75 void checkEnforceMove();
76 bool isDamaging() const;
77 bool tryWallPunch();
78 void decDamageAfterTimer();
79 void incAirWalkTimer();
80 void updateCubeCode();
81 void startSwim();
82 bool checkStartSwim();
83 bool forceExitSwim();
84 bool forceStartSwimAndShoot(const TVec3f &);
85 bool isForceStopRush() const;
86 unsigned long getCurrentStatus() const;
87 bool trySpinJump(unsigned char);
88 void startTeresaDisappear();
89 void startBas(const char *, bool, f32, f32);
90 bool checkVerticalPress(bool);
91 void powerAreaMove();
92 void powerRailMove();
93 void checkGround();
94 void updateFloorCode();
95 void inputStick();
96 void tryJump();
97 void tryForcePowerJump(const TVec3f &, bool);
98 const TVec3f &getShadowNorm() const;
99 const TVec3f &getWallNorm() const;
100 void setSideVec(const TVec3f &);
101 void setFrontVecKeepSide(const TVec3f &);
102 void setFrontVecKeepUp(const TVec3f &, f32);
103 void setFrontVecKeepUp(const TVec3f &, u32);
104 void setFrontVecKeepUp(const TVec3f &);
105 void setFrontVec(const TVec3f &);
106 void forceSetHeadVecKeepSide(const TVec3f &);
107 void lockGroundCheck(void *, bool);
108 void checkBaseTransBall();
109 void changeStatus(MarioState *);
110
112 unsigned _0 : 1;
113 unsigned _1 : 1;
114 unsigned _2 : 1;
115 unsigned _3 : 1;
116 unsigned _4 : 1;
117 unsigned _5 : 1;
118 unsigned _6 : 1;
119 unsigned _7 : 1;
120 unsigned _8 : 1;
121 unsigned _9 : 1;
122 unsigned _A : 1;
123 unsigned _B : 1;
124 unsigned _C : 1;
125 unsigned _D : 1;
126 unsigned _E : 1;
127 unsigned _F : 1;
128 unsigned _10 : 1;
129 unsigned _11 : 1;
130 unsigned _12 : 1;
131 unsigned _13 : 1;
132 unsigned _14 : 1;
133 unsigned _15 : 1;
134 unsigned _16 : 1;
135 unsigned _17 : 1;
136 unsigned _18 : 1;
137 unsigned _19 : 1;
138 unsigned _1A : 1;
139 unsigned _1B : 1;
140 unsigned _1C : 1;
141 unsigned _1D : 1;
142 unsigned _1E : 1;
143 unsigned _1F : 1;
144 unsigned _20 : 1;
145 unsigned _21 : 1;
146 unsigned _22 : 1;
147 unsigned _23 : 1;
148 unsigned _24 : 1;
149 unsigned _25 : 1;
150 unsigned _26 : 1;
151 unsigned _27 : 1;
152 unsigned _28 : 1;
153 unsigned _29 : 1;
154 unsigned _2A : 1;
155 unsigned _2B : 1;
156 unsigned _2C : 1;
157 unsigned _2D : 1;
158 unsigned _2E : 1;
159 unsigned _2F : 1;
160 unsigned _30 : 1;
161 unsigned _31 : 1;
162 unsigned _32 : 1;
163 unsigned _33 : 1;
164 unsigned _34 : 1;
165 unsigned _35 : 1;
166 unsigned _36 : 1;
167 unsigned _37 : 1;
168 unsigned _38 : 1;
169 unsigned _39 : 1;
170 unsigned _3A : 1;
171 unsigned _3B : 1;
172 unsigned _3C : 1;
173 unsigned _3D : 1;
174 unsigned _3E : 2;
175 };
176 struct DrawStates {
177 unsigned _0 : 1;
178 unsigned _1 : 1;
179 unsigned _2 : 1;
180 unsigned _3 : 1;
181 unsigned _4 : 1;
182 unsigned _5 : 1;
183 unsigned _6 : 1;
184 unsigned _7 : 1;
185 unsigned _8 : 1;
186 unsigned _9 : 1;
187 unsigned _A : 1;
188 unsigned _B : 1;
189 unsigned _C : 1;
190 unsigned _D : 1;
191 unsigned _E : 1;
192 unsigned _F : 1;
193 unsigned _10 : 1;
194 unsigned _11 : 1;
195 unsigned _12 : 1;
196 unsigned _13 : 1;
197 unsigned _14 : 1;
198 unsigned _15 : 1;
199 unsigned _16 : 1;
200 unsigned _17 : 1;
201 unsigned _18 : 1;
202 unsigned _19 : 1;
203 unsigned _1A : 1;
204 unsigned _1B : 1;
205 unsigned _1C : 1;
206 unsigned _1D : 1;
207 unsigned _1E : 1;
208 unsigned _1F : 1;
209 };
210
211 inline const MovementStates &getMovementStates() const { return mMovementStates; }
212 inline const DrawStates &getDrawStates() const { return mDrawStates; }
213 inline const DrawStates &getPrevDrawStates() const { return mPrevDrawStates; }
214
215 union {
216 MovementStates mMovementStates; // _8
217 struct {
218 u32 mMovementStates_LOW_WORD; // _8
219 u32 mMovementStates_HIGH_WORD; // _C
220 };
221 };
222
223 union {
224 MovementStates _10;
225 struct {
226 u32 _10_LOW_WORD; // _10
227 u32 _10_HIGH_WORD; // _14
228 };
229 };
230
231 union {
232 DrawStates mDrawStates; // _18
233 u32 mDrawStates_WORD;
234 };
235 union {
236 DrawStates _1C;
237 u32 _1C_WORD;
238 };
239 u32 _20;
240 u32 _24;
241 u32 _28;
242 u32 _2C;
243
244 DrawStates mPrevDrawStates; // _30
245 // FAKE
246 u32 _34;
247 // NOT FAKE
248
249 f32 _38;
250 f32 _3C;
251 TVec3f _40;
252 TVec3f _4C;
253 TVec3f _58;
254 TMtx34f _64;
255 TMtx34f _94;
256 TMtx34f _C4;
257 TMtx34f _F4;
258 f32 _124;
259 f32 _128;
260 u32 _12C;
261 TVec3f _130;
262 TVec3f _13C;
263 TVec3f _148;
264 TVec3f _154;
265 TVec3f _160;
266 TVec3f _16C;
267 TVec3f _178;
268 TVec3f _184;
269 TVec3f _190;
270 TVec3f _19C;
271 TVec3f _1A8;
272 TVec3f _1B4;
273 TVec3f _1C0;
274 TVec3f _1CC;
275 TVec3f _1D8;
276 TVec3f _1E4;
277 TVec3f _1F0;
278 TVec3f _1FC;
279 TVec3f _208;
280 TVec3f _214;
281 TVec3f _220;
282 TVec3f _22C;
283 TVec3f _238;
284 TVec3f _244;
285 TVec3f _250;
286 TVec3f _25C;
287 TVec3f _268;
288 u8 _274;
289 f32 _278;
290 f32 _27C;
291 f32 _280;
292 TVec3f _284;
293 TVec3f _290;
294 TVec3f _29C;
295 TVec3f _2A8;
296 f32 _2B4;
297 TVec3f _2B8;
298 TVec3f _2C4;
299 f32 _2D0;
300 TVec3f _2D4;
301 TVec3f _2E0;
302 TVec3f _2EC;
303 TVec3f _2F8;
304 TVec3f _304;
305 TVec3f _310;
306 TVec3f _31C;
307 TVec3f _328;
308 TVec3f _334;
309 f32 _340;
310 TVec3f _344;
311 TVec3f _350;
312 TVec3f _35C;
313 TVec3f _368;
314 TVec3f _374;
315 TVec3f _380;
316 TVec3f _38C;
317 TVec3f _398;
318 TVec3f _3A4;
319 TVec3f _3B0;
320 u16 _3BC;
321 u16 _3BE;
322 u16 _3C0;
323 u16 _3C2;
324 u16 _3C4;
325 u16 _3C6;
326 u16 _3C8;
327 u16 _3CA;
328 u16 _3CC;
329 u16 _3CE;
330 u16 _3D0;
331 u16 _3D2;
332 u16 _3D4;
333 TVec3f _3D8;
334 TVec3f _3E4;
335 f32 _3F0;
336 f32 _3F4;
337 u16 _3F8;
338 u16 _3FA;
339 u16 _3FC;
340 u16 _3FE;
341 u16 _400;
342 u16 _402;
343 u16 _404;
344 u16 _406;
345 u16 _408;
346 u16 _40A;
347 u16 _40C;
348 u16 _40E;
349 u16 _410;
350 u16 _412;
351 u16 _414;
352 u16 _416;
353 u16 _418;
354 u16 _41A;
355 u16 _41C;
356 u16 _41E;
357 u16 _420;
358 u16 _422;
359 u16 _424;
360 u16 _426;
361 u16 _428;
362 u16 _42A;
363 u16 _42C;
364 u32 _430;
365 u16 _434;
366 u16 _436;
367 u16 _438;
368 u16 _43A;
369 TVec3f _43C;
370 TVec3f _448;
371 f32 _454;
373 Triangle *_45C;
374 Triangle *_460;
375 Triangle *_464;
376 Triangle *_468;
377 Triangle *_46C;
378 Triangle *_470;
379 Triangle *_474;
380 Triangle *_478;
381 Triangle *_47C;
382 Triangle *_480;
383 Triangle *_484;
384 f32 _488;
385 TVec3f _48C;
386 TVec3f _498;
387 TVec3f _4A4;
388 TVec3f _4B0;
389 TVec3f _4BC;
390 Triangle *_4C8;
391 Triangle *_4CC;
392 Triangle *_4D0;
393 Triangle *_4D4;
394 Triangle *_4D8;
395 Triangle *_4DC;
396 f32 _4E0;
397 f32 _4E4;
398 TVec3f _4E8;
399 TVec3f _4F4;
400
401 // FAKE
402 TVec3f _500;
403 // NOT FAKE
404
405 TVec3f _50C;
406 TVec3f _518;
407 f32 _524;
408 f32 _528;
409 f32 _52C;
410 f32 _530;
411 u16 _534;
412 f32 _538;
413 f32 _53C;
414 f32 _540;
415 u16 _544;
416 f32 _548;
417 TVec3f _54C;
418 u32 _558;
419
420 // FAKE
421 u32 _55C;
422 u32 _560;
423 // NOT FAKE
424
425 s32 _564;
426 u32 _568;
427 u32 _56C;
428 u8 _570;
429 u32 _574;
430 u32 _578;
431 Triangle *_57C[0x20];
432 u32 _5FC;
433 TVec3f _600;
434 u8 _60C;
435 u8 _60D;
436 u8 _60E;
437 u8 _60F;
438 u8 _610;
439 u8 _611;
440 f32 _614;
441 f32 _618;
442 f32 _61C;
443 f32 _620;
444 u8 _624;
445 TVec3f _628;
446 f32 _634;
447
448 u8 _638;
449 TVec3f _63C;
450 TVec3f _648;
451 TVec3f _654;
452 TVec3f _660;
453
454 u8 _66C;
455 TVec3f _670;
456 TVec3f _67C;
457
458 TVec3f _688;
459 TVec3f _694;
460 TVec3f _6A0;
461 u8 _6AC;
462 u8 _6AD;
463 TVec3f _6B0;
464 TVec3f _6BC;
465 f32 _6C8;
466 f32 _6CC;
467 TVec3f _6D0;
468 TVec3f _6DC;
469 TVec3f _6E8;
470 TVec3f _6F4;
471 TVec3f _700;
472 TVec3f _70C;
473 f32 _718;
474 u8 _71C;
475 u8 _71D;
476 u8 _71E;
477 u8 _71F;
478 u32 _720;
479 u32 _724;
480 u32 _728;
481 f32 _72C;
482 u32 _730;
483 u8 _734;
484 u8 _735;
485 f32 _738;
486 f32 _73C;
487 f32 _740;
488 f32 _744;
489 u8 _748;
490 f32 _74C;
491 u32 _750;
492 u32 _754;
493 MarioWall *mWall;
494 TVec3f _75C;
495 MarioStick *mStick;
496 u16 _76C;
497 f32 _770;
498 u16 _774;
499 MarioRabbit *mRabbit; // _778
500 MarioFoo *mFoo; // _77C
501 MarioSukekiyo *mSukekiyo; // _780
502 MarioBury *mBury; // _784
503 MarioWait *mWait; // _788
504 MarioClimb *mClimb; // _78C
505 TVec3f _790;
506 MarioHang *mHang; // _79C
507 MarioRecovery *mRecovery; // _7A0
508 MarioWarp *mWarp; // _7A4
509 MarioFlip *mFlip; // _7A8
510 MarioSideStep *mSideStep; // _7AC
511 MarioFrontStep *mFrontStep; // _7B0
512 MarioSkate *mSkate; // _7B4
513 MarioTalk *mTalk; // _7B8
514 MarioTeresa *mTeresa; // _7BC
515 MarioDamage *mDamage; // _7C0
516 TVec3f _7C4;
517 u16 _7D0;
518 TVec3f _7D4;
519 Triangle *_7E0;
520 TMtx34f _7E4;
521 TVec3f _814;
522 Triangle *_820;
523 TMtx34f _824;
524 MarioFlow *mFlow; // _854
525 MarioFireDamage *mFireDamage; // _858
526 MarioFireDance *mFireDance; // _85C
527 MarioFireRun *mFireRun; // _860
528 MarioParalyze *mParalyze; // _864
529 MarioStun *mStun; // _868
530 MarioCrush *mCrush; // _86C
531 MarioFreeze *mFreeze; // _870
532 MarioAbyssDamage *mAbyssDamage; // _874
533 MarioDarkDamage *mDarkDamage; // _878
534 MarioFaint *mFaint; // _87C
535 MarioBlown *mBlown; // _880
536 MarioSwim *mSwim; // _884
537 MarioSlider *mSlider; // _888
538 MarioStep *mStep; // _88c
539 MarioBump *mBump; // _890
540 MarioMagic *mMagic; // _894
541 u8 _898;
542 MarioFpView *mFpView; // _89C
543 MarioMove *mMove; // _8A0
544 TVec3f _8A4;
545 TVec3f _8B0;
546 TVec3f _8BC;
547 Triangle *_8C8;
548 Triangle *_8CC;
549 Triangle *_8D0;
550 u32 _8D4;
551 u32 _8D8;
552 TVec3f _8DC;
553 Triangle *_8E8;
554 u8 _8EC;
555
556 // FAKE
557 u32 _8F0;
558 // NOT FAKE
559
560 f32 _8F4;
561
562 // FAKE
563 TVec3f _8F8;
564 TVec3f _904;
565 // NOT FAKE
566
567 TVec3f _910;
568 TVec3f _91C;
569 TVec3f _928;
570 f32 _934;
571 TVec3f _938;
572 TVec3f _944;
573 TVec3f _950;
574 FloorCode *_95C;
575 u16 _960;
576 u16 _962;
577 u16 _964[3];
578 u16 _96A;
579
580 HashSortTable *_96C; // Sounds
581 const char *_970; // Sounds or somthing
582 u32 _974;
583
584 // Fake
585 u32 _978;
586 // Not fake
587
588 MarioState *_97C;
589 MarioState *_980;
590
591 Task _984[0xb];
592 u32 _A08[11];
593 u16 _A34;
594 u32 _A38;
595 u16 _A3C;
596 TVec3f _A40;
597 TVec3f _A4C;
598 TVec3f _A58;
599 f32 _A64;
600 u32 _A68;
601 u8 _A6C[0x20];
602 TVec3f _A8C[9];
603};