NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_a_bullet.hpp
1#pragma once
2
3#include <game/bases/d_actor_state.hpp>
4#include <game/bases/d_heap_allocator.hpp>
5
6class daBullet_c : public dActorState_c {
7public:
8 /// @unofficial
9 enum HitType_e {
10 HIT_NONE,
11 HIT_REFLECT,
12 HIT_STAR,
13 HIT_SHELL,
14 HIT_YOSHI_BULLET
15 };
16
17 daBullet_c();
18 virtual ~daBullet_c() {}
19
20 virtual int create();
21 virtual int preExecute();
22 virtual int execute();
23 virtual int draw();
24 virtual void deleteReady();
25 virtual int doDelete();
26
27 virtual void setEatTongue(dActor_c *eatingActor);
28 virtual bool setEatSpitOut(dActor_c *eatingActor);
29 virtual void waterSplashEffect(const mVec3_c &pos, float size);
30
31 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, EatIn);
32 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, EatNow);
33 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, SpiteMove);
34 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, Reflect);
35 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, HitReflect);
36 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, HitStar);
37 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, HitShell);
38 STATE_VIRTUAL_FUNC_DECLARE(daBullet_c, HitYoshiBullet);
39
40 virtual void createMdl();
41 virtual void removeMdl();
42 virtual void initialize();
43
44 virtual void setSpitOutMove(dActor_c *eatingActor);
45 virtual void setDeadMove(const mVec3_c &speed, short angle);
46 virtual void cullingProc();
47
48 virtual bool hitProc_Star(dCc_c *other);
49 virtual bool hitProc_Shell(dCc_c *other);
50 virtual bool hitProc_YoshiBullet(dCc_c *other);
51 virtual bool hitProc_Reflect(dCc_c *other);
52
53 virtual void revengeHitSE();
54 virtual void spitRoll();
55 virtual void moveSE();
56 virtual void deadRoll();
57
58 void allocate();
59
60 bool checkPlayerDamage(dCc_c *self, dCc_c *other);
61 bool checkYoshiDamage(dCc_c *self, dCc_c *other);
62
63 bool splashProc();
64 void setDamage_Player(dActor_c *actor);
65
66 static void collisionCallback(dCc_c *self, dCc_c *other);
67 static void revengeCallback(dCc_c *self, dCc_c *other);
68
69private:
70 dHeapAllocator_c mAllocator;
71 BOOL mHasSplashed;
72 int mDeadMoveDirection;
73 int mHitType;
74 mAng3_c mDeadRollDelta;
75
76 static const float smc_DEAD_FALL_GRAVITY;
77 static const float smc_DEAD_FALL_YMAXSPEED;
78 static const float smc_DIR_PRM[];
79};
dActorState_c()
Constructs a new actor.
dActor_c()
Constructs a new actor.
Definition d_actor.cpp:46
virtual void waterSplashEffect(const mVec3_c &pos, float size)
Generates a water splash effect.
virtual int doDelete()
do method for the delete operation.
virtual int preExecute()
pre method for the execute operation.
virtual void setEatTongue(dActor_c *eatingActor)
Callback for when the actor is targeted by Yoshi's tongue.
virtual int create()
do method for the create operation.
virtual bool setEatSpitOut(dActor_c *eatingActor)
Callback for when the actor is about to be spat out.
virtual int execute()
do method for the execute operation.
virtual int draw()
do method for the draw operation.
virtual void deleteReady()
Informs the base that it's about to be deleted.
#define STATE_VIRTUAL_FUNC_DECLARE(class, name)
Declares a virtual state.
Definition s_State.hpp:22