SMG-Decomp
A decompilation of Super Mario Galaxy 1
Loading...
Searching...
No Matches
MarioActor.hpp
1#pragma once
2
3#include "Game/LiveActor/LiveActor.hpp"
4#include "Game/Player/Mario.hpp"
5
6class FootPrint;
7class JAIAudible;
8class MarioNullBck;
10class MarioParts;
11class RushEndInfo;
12class MarioConst;
13class MarioEffect;
14class MarioAnimator;
15class MarioMessenger;
16class CollisionShadow;
17
18namespace MR {
19 unsigned int getFrameBufferWidth();
20}
21
22bool gIsLuigi; // (cc68 - 10000)(r13)
23
24class MarioActor : public LiveActor {
25public:
26 MarioActor(const char *);
27
29
30 virtual const TVec3f &getLastMove() const;
31 virtual void getLastMove(TVec3f *) const;
32 virtual void getFrontVec(TVec3f *) const;
33
34 void init(const JMapInfoIter &);
35 void init2(const TVec3f &, const TVec3f &, long);
36 void initAfterPlacement();
37 void initAfterOpeningDemo();
38 void calcBaseFrontVec(const TVec3f &);
39 void playSound(const char *, long);
40 void changeAnimation(const char *, const char *);
41 void changeAnimationNonStop(const char *);
42 void changeAnimationUpper(const char *);
43 void stopAnimation(const char *);
44 bool isAnimationRun(const char *) const;
45 void changeNullAnimation(const char *, signed char);
46 void clearNullAnimation(signed char);
47 bool isStopNullAnimation() const;
48 void changeGameOverAnimation();
49 XjointTransform *getJointCtrl(const char *) const;
50 void updateRotationInfo();
51 void exeWait();
52 void movement();
53 void control();
54 void control2();
55 void controlMain();
56 void updateBehavior();
57 void updateBindRatio();
58 bool isInPunchTimerRange() const;
59 void updatePunching();
60 bool doRush();
61 void updateSwingTimer();
62 void updateSwingAction();
63 bool checkClapCatchStart();
64 void updateRealMtx();
65 void setUpperRotateY(f32);
66 void decLife(unsigned short);
67 void decLifeLarge();
68 void decLifeMiddle();
69 void decLifeSmall();
70 void resetWaterLife();
71 void updateLife();
72 void incLife(unsigned long);
73 void changeMaxLife(long);
74 bool doPressing();
75 void careMovingObject();
76 bool doStun();
77 void scaleMtx(MtxPtr);
78 void updateBaseScaleMtx();
79 void getRealMtx(f32 (*)[4], const char *);
80 void getGlobalJointMtx(const char *);
81 void calcAnimInMovement();
82 void forceSetBaseMtx(f32 (*)[4]);
83 void calcAnim();
85 void setBlendMtxTimer(unsigned short);
86 void getGroundPos(TVec3f *dst) const;
87 void getShadowPos() const;
88
89 bool isTurning() const;
90 bool isJumping() const;
91 bool isJumpRising() const;
92 bool isPunching() const;
93 bool isItemSwinging() const;
94 bool isDamaging() const;
95 bool isNeedDamageFog() const;
96 bool isStaggering() const;
97 bool isSleeping() const;
98 bool isRefuseTalk() const;
99 bool isDebugMode() const;
100 bool isRequestSpin() const;
101
102 void jumpHop();
103 void calcCenterPos();
104 void calcHeadPos();
105 void setPress(unsigned char, int);
106 void getResourceTable() const;
107
108 bool isEnableMoveMario() const;
109 bool isEnableNerveChange() const;
110
111 void forcceGameOver();
112 void forceGameOverAbyss();
113 void forceGameOverBlackHole();
114 void forceGameOverNonStop();
115 void forceGameOverSink();
116
117 void updateCameraInfo();
118 bool binderFilter(const Triangle *);
119
120 void setPunchHitTimer(unsigned char);
121 void initEffect();
122 void addSoundObjHolder();
123 void initParts();
124 void initMorphStringTable();
125 void setupSensors();
126 void updateTransForCamera();
127
128 void initMember();
129
130 void init2D();
131
132 void initDrawAndModel();
133
134 void resetPadSwing();
135 void initActionMatrix();
136
137 TVec3f &getGravityVec();
138 TVec3f &getGravityVector();
139 void updateGravityVec(bool, bool);
140 void changeTeresaAnimation(const char *, long);
141
142 void playEffect(const char *);
143 void stopEffect(const char *);
144
145 void updateActionTrigger();
146 void updateControllerSwing();
147 void updateControllerSwingLeft();
148 void update2D();
149 void updateTakingPosition();
150 void updateSearchLight();
151 void updateThrowing();
152 void updateBeeWingAnimation();
153 void updateFairyStar();
154 void updatePlayerMode();
155 void updateEffect();
156 void updateThrowVector();
157 void updateForCamera();
158 void updateTornado();
159
160 bool tryJumpRush();
161 void initForJump();
162 void lockOnDPD();
163 bool tryCoinPull();
164 bool tryThrow();
165 bool tryStandardRush();
166 void checkPriorRushTarget();
167 unsigned char selectAction(const char *) const;
168 bool tryRushInRush();
169 void bodyClap();
170 bool selectWaterInOut(const char *) const;
171 bool selectWaterInOutRush(const HitSensor *) const;
172 void playEffectRT(const char *, const TVec3f &, const TVec3f &);
173 void emitEffectWaterColumn(const TVec3f &, const TVec3f &);
174 bool selectRecoverFlyMeter(const HitSensor *) const;
175 void endRush(const RushEndInfo *);
176 void stopSpinTicoEffect(bool);
177 void stopEffectForce(const char *);
178 bool isRequestRush() const;
179 bool isRequestSpinJump2P() const;
180 bool tryReleaseBombTeresa();
181 bool isEnableSpinPunch();
182 bool trySpinPunch();
183 void shootFireBall();
184 void doFreezeAttack();
185 void setBlink(const char *);
186 void resetSensorCount();
187 void getStickValue(f32 *, f32 *);
188 const HitSensor &getCarrySensor() const;
189
190 const MarioConst &getConst() const { return *mConst; }
191
192 inline u32 getHealth() const { return mHealth; }
193
194 inline const Mario::MovementStates &getMovementStates() const { return mMario->mMovementStates; }
195
196 inline const Mario::DrawStates &getDrawStates() const { return mMario->mDrawStates; }
197
198 inline const Mario::DrawStates &getPrevDrawStates() const { return mMario->mPrevDrawStates; }
199
200 struct FBO {
201 u32 _0;
202 u32 _4;
203 };
204
205 u8 _8C;
206 u32 _90;
207 u32 _94[0x40];
208 u32 _194;
209 u32 _198;
210 u32 _19C;
211 u8 _1A0;
212 u8 _1A1;
213 f32 _1A4;
214 u16 _1A8;
215 u16 _1AA;
216 f32 _1AC;
217 Color8 _1B0;
218 u8 _1B4;
219 bool _1B5;
220 u32 _1B8;
221 MarioMessenger *_1BC;
222 bool _1C0;
223 bool _1C1;
224 bool _1C2;
225 bool _1C3;
226 u16 _1C4;
227 u16 _1C6;
228 f32 _1C8;
229 f32 _1CC;
230 u8 _1D0;
231 u8 _1D1;
232 f32 _1D4;
233 FBO *_1D8;
234 FBO *_1DC;
235 bool _1E0;
236 u8 _1E1;
237 u8 _1E2;
238 // padding
239 f32 _1E4;
240 u16 _1E8;
241 // padding
242 f32 _1EC;
243 TVec3f _1F0;
244 TVec3f _1FC;
245 f32 _208;
246 u32 _20C;
247 u8 _210;
248 u8 _211;
249 // padding
250 CollisionShadow *_214;
251 u32 _218;
252 u32 _21C;
253 u32 _220;
254 u32 _224;
255 u32 _228;
256 u32 _22C;
257 Mario *mMario; // _230
258 MarioAnimator *mMarioAnim; // _234
259 MarioEffect *mMarioEffect; // _238
260 MarioConst *mConst; // _23C
261 TVec3f _240;
262 TVec3f _24C;
263 TVec3f _258;
264 TVec3f _264;
265 TVec3f _270;
266 TVec3f _27C;
267 TVec3f _288;
268 TVec3f _294;
269 TVec3f _2A0;
270 TVec3f _2AC;
271 TVec3f _2B8;
272 TVec3f _2C4;
273 TVec3f _2D0;
274 TVec3f _2DC;
275 TVec3f _2E8;
276 TVec3f _2F4;
277 TVec3f _300;
278 TVec3f _30C;
279 TVec3f _318;
280 TVec3f _324;
281 u16 _330;
282 u16 _332;
283 u16 _334;
284 u16 _336;
285 u16 _338;
286 // padding
287 TVec3f _33C;
288 TVec3f _348;
289 TVec3f _354;
290 TVec3f _360;
291 GravityInfo *_36C;
292 u8 _370;
293 // padding
294 f32 _374;
295 u16 _378;
296 // padding
297 u32 _37C;
298 u32 mHealth; // _380
299 u32 _384;
300 u32 _388;
301 u16 _38C;
302 u32 _390;
303 u32 _394;
304 u32 _398;
305 ;
306 u8 _39C;
307 u8 _39D;
308 u8 _39E;
309 u32 _3A0;
310 u32 _3A4;
311 u16 _3A8;
312 u16 _3AA;
313 u16 _3AC;
314 // padding
315 float _3B0;
316 TVec3f _3B4;
317 bool _3C0;
318 bool _3C1;
319 // padding
320 TVec3f _3C4;
321 u16 _3D0;
322 u16 _3D2;
323 u16 _3D4;
324 u16 _3D6;
325 u16 _3D8;
326 u16 _3DA;
327 u16 _3DC;
328 u8 _3DE;
329 u8 _3DF;
330 u32 mMaxHealth; // _3E0
331 bool _3E4;
332 bool _3E5;
333 bool _3E6;
334 bool _3E7;
335 bool _3E8;
336 // padding
337 TMtx34f _3EC;
338 u32 _41C;
339 u32 _420;
340 u32 _424;
341 u32 _428[4];
342 u8 _438[0x30];
343 union {
344 JGeometry::TVec3<long> _468;
345 TVec3f _468f;
346 };
347 u32 _474;
348 f32 _478;
349 u32 _47C;
350 u8 _480;
351 u8 _481;
352 bool _482;
353 u8 _483;
354 TVec3f _484;
355 f32 _490;
356 u32 _494;
357 FixedPosition *_498;
358 FixedPosition *_49C;
359 u32 _4A0;
360 u32 _4A4;
361 u32 _4A8;
362 f32 _4AC;
363 f32 _4B0;
364 f32 _4B4;
365 TVec3f _4B8;
366 TVec3f _4C4;
367 u32 _4D0[0x80];
368 // padding
369 u8 _6D0;
370 f32 _6D4;
371 f32 _6D8;
372 u32 _6DC[0x40];
373 u16 _7DC;
374 u16 _7DE;
375 u16 _7E0;
376 u8 _7E2;
377 u32 _7E4[0x40];
378 u8 _8E4[0x40];
379 HitSensor *_924;
380 u32 _928;
381 u32 _92C;
382 u32 _930;
383 bool _934;
384 bool _935;
385 TVec3f _938;
386 u8 _944;
387 u8 _945;
388 u16 _946;
389 u16 _948;
390 u16 _94A;
391 u16 _94C;
392 u16 _94E;
393 u8 _950;
394 u8 _951;
395 u32 _954[8];
396 u8 _974;
397 TVec3f _978;
398 f32 _984;
399 u8 _988;
400 u8 _989;
401 u32 _98C;
402 u8 _990;
403 u32 _994;
404 u32 _998;
405 u32 _99C;
406 u32 _9A0;
407 MarioParts *_9A4;
408 f32 _9A8;
409 f32 _9AC;
410 f32 _9B0;
411 u16 _9B4;
412 u32 _9B8;
413 u32 _9BC;
414 u32 _9C0;
415 u32 _9C4;
416 u32 _9C8;
417 f32 _9CC;
418 f32 _9D0;
419 u32 _9D4;
420 TVec3f _9D8;
421 u32 _9E4;
422 u32 _9E8;
423 u32 _9EC;
424 bool _9F0;
425 bool _9F1;
426 u16 _9F2;
427 TVec3f _9F4;
428 u32 _A00;
429 u32 _A04;
430 u8 _A08;
431 u8 _A09;
432 u8 _A0A;
433 u8 _A0B;
434 u8 _A0C;
435 u32 _A10;
436 u32 _A14;
437 TVec3f _A18;
438 u8 _A24;
439 u8 _A25;
440 // padding
441 u32 _A28[6];
442 u32 _A40;
443 u32 _A44;
444 u32 _A48;
445 u32 _A4C;
446 u32 _A50;
447 u32 _A54;
448 u8 _A58;
449 u8 _A59;
450 u8 _A5A;
451 u8 _A5B;
452 u32 _A5C;
453 bool _A60;
454 bool _A61;
455 bool _A62;
456 // padding
457 u32 _A64;
458 f32 _A68;
459 u16 _A6C;
460 bool _A6E;
461 // padding
462 u32 _A70[8];
463 u32 _A90[8];
464 TMtx34f _AB0;
465 TMtx34f _AE0;
466 u16 _B10;
467 u16 _B12;
468 u16 _B14;
469 // padding
470 TVec3f _B18;
471 f32 _B24;
472 f32 _B28;
473 f32 _B2C;
474 f32 _B30;
475 f32 _B34;
476 f32 _B38;
477 f32 _B3C;
478 f32 _B40;
479 u32 _B44;
480 FootPrint *_B48;
481 u32 _B4C;
482 u16 _B50;
483 // padding
484 u32 _B54[3];
485 u16 _B60;
486 // padding
487 u32 _B64;
488 u8 _B68;
489 // padding
490 u16 _B6A;
491 u32 _B6C;
492 u16 _B70;
493 u8 _B72;
494 // padding
495 u16 _B74;
496 // padding
497 u32 _B78;
498 u32 _B7C;
499 u32 _B80;
500 u32 _B84;
501 u16 _B88;
502 MarioNullBck *mNullAnimation; // _B8C
503 bool _B90;
504 bool _B91;
505 s8 _B92;
506 // padding
507 u16 _B94;
508 u8 _B96;
509
510 u32 _B98;
511
512 u16 _B9C;
513 u16 _B9E;
514 u32 _BA0;
515 u32 _BA4;
516 u32 _BA8;
517 TVec3f _BAC;
518 TVec3f _BB8;
519 u16 _BC4;
520 TMtx34f _BC8;
521 TMtx34f _BF8;
522 void *_C28;
523 TMtx34f _C2C;
524 TMtx34f _C5C;
525 TMtx34f _C8C;
526 TMtx34f _CBC;
527 TMtx34f _CEC;
528 TMtx34f _D1C;
529 TMtx34f _D4C;
530 TMtx34f _D7C;
531 TMtx34f _DAC;
532 TMtx34f _DDC;
533 TMtx34f _E0C;
534 TMtx34f _E3C;
535 TMtx34f _E6C;
536 u16 _E9C;
537 f32 _EA0;
538 bool _EA4;
539 bool _EA5;
540 bool _EA6;
541 TMtx34f _EA8;
542 TVec3f _ED8;
543 u32 _EE4;
544 bool mSuperKinokoCollected; // _EE8
545 bool mPowerupCollected; // _EE9
546 bool mTransforming; // _EEA
547 bool _EEB;
548 bool _EEC;
549 bool _EED;
550 bool _EEE;
551 // padding
552 u16 _EF0;
553 u16 _EF2;
554 u16 _EF4;
555 u16 _EF6;
556 u32 _EF8;
557 u32 _EFC;
558 u8 _F00;
559 // padding
560 u32 _F04;
561 u32 _F08;
562 bool _F0C;
563 u8 _F0D;
564 u16 _F0E;
565 u16 _F10;
566 u16 _F12;
567 u16 _F14;
568 u16 _F16;
569 u16 _F18;
570 u16 _F1A;
571 u16 _F1C;
572 u16 _F1E;
573 u8 _F20;
574 u8 _F21;
575 // padding
576 u32 _F24;
577 u16 _F28;
578 // padding
579 TVec3f _F2C;
580 u8 _F38;
581 // padding
582 union {
583 JAIAudible *_F3C;
584 TVec3f *_F3C_vec;
585 };
586 u16 _F40;
587 u16 _F42;
588 bool _F44;
589 // padding
590 u32 _F48;
591 u32 _F4C;
592 TVec3f _F50;
593 TVec3f _F5C;
594 TVec3f _F68;
595 u8 _F74;
596 // padding
597 TVec3f _F78;
598 TVec3f _F84;
599 TVec3f _F90;
600 TVec3f _F9C;
601 TVec3f _FA8;
602 const Nerve *_FB4;
603 u16 _FB8;
604 u32 _FBC;
605 u32 _FC0;
606 u32 _FC4;
607 u32 _FC8;
608 bool _FCC;
609 bool _FCD;
610};
611
612namespace NrvMarioActor {
613 NERVE(MarioActorNrvWait);
614 NERVE(MarioActorNrvGameOver);
615 NERVE(MarioActorNrvGameOverAbyss);
616 NERVE(MarioActorNrvGameOverAbyss2);
617 NERVE(MarioActorNrvGameOverFire);
618 NERVE(MarioActorNrvGameOverBlackHole);
619 NERVE(MarioActorNrvGameOverSink);
620 NERVE(MarioActorNrvTimeWait);
621 NERVE(MarioActorNrvNoRush);
622} // namespace NrvMarioActor
The basis of a drawable actor that can contain states (see: Nerve)
Definition LiveActor.hpp:24
void calcAndSetBaseMtx()
Calculates and sets the base matrix of the actor.
void init(const JMapInfoIter &)
Intializes the NameObj and can set various settings and construct necessary classes.
Used for executing states of a LiveActor.
Definition Nerve.hpp:6