|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_a_en_snake_block.hpp>
Specialized block representing the head or tail of the Snake Block.
Contains logic for advancing the block along the precalculated path.
Definition at line 87 of file d_a_en_snake_block.hpp.
Public Types | |
| enum | SnakeSpeed_e { SNAKE_SPEED_SLOW , SNAKE_SPEED_MEDIUM , SNAKE_SPEED_FAST , SNAKE_SPEED_COUNT } |
| The possible speed modes of a Snake Block. More... | |
Public Member Functions | |
| dCtrlBlock_c () | |
| Creates a block. | |
| virtual | ~dCtrlBlock_c () |
| Destroys the block. | |
| bool | moveBlock (s8 *moveSequence) |
| Moves the block in the direction specified by the current sequence step. | |
| bool | nextTravelMove (s8 *moveSequence) |
| Snaps the block to the grid and advances the sequence index to the next step. | |
| Public Member Functions inherited from daEnSnakeBlock_c::dBlock_c | |
| dBlock_c () | |
| Creates a block. | |
| virtual | ~dBlock_c () |
| Destroys the block. | |
| void | createMdl (mAllocator_c *allocator) |
| Initializes the 3D model, textures, and color animations. | |
| void | initCollision (daEnSnakeBlock_c *parent, mVec3_c &blockPos, bool icy) |
| Initializes the block's collision. | |
| void | setAnmClr (const char *name) |
| Sets the color animation for the block. | |
| void | draw (const mVec3_c &offset) |
| Renders the block model. | |
| void | calcCollapse1 (s8 *moveSequence) |
| Updates the block's position when in the Collapse1 state. | |
| void | calcCollision () |
| Updates the block's collision based on its offset from the parent. | |
| void | calcFallSpeed () |
| Updates the block's falling speed. | |
| void | calcAnm () |
| Advances the animations for the block. | |
| mVec3_c | getPos () const |
| void | setPos (mVec3_c pos) |
| void | posMove () |
| Moves the block by its speed. | |
| void | deleteBlock () |
| Releases the model and associated animation resources. | |
| void | releaseBgCtr () |
| Releases the block's collision. | |
Public Attributes | |
| SnakeSpeed_e | mSnakeSpeed |
| The speed mode for this block. | |
| Public Attributes inherited from daEnSnakeBlock_c::dBlock_c | |
| nw4r::g3d::ResFile | mResFile |
| The resource file. | |
| m3d::mdl_c | mModel |
| The block model. | |
| m3d::anmMatClr_c | mAnmClr |
| The color animation. | |
| nw4r::g3d::ResAnmTexSrt | mResTexSrt |
| The texture animation resource. | |
| m3d::anmTexSrt_c | mAnmTexSrt |
| The texture animation. | |
| mVec3_c | mPos |
| The block's position (center of block). | |
| mVec3_c | mSpeed |
| The block' speed. | |
| mVec3_c | mLastPos |
| The block's position in the previous movement. | |
| dBg_ctr_c | mBgCtr |
| The collision. | |
| int | mMoveSequenceIdx |
| The block's current step in the movement sequence. | |
| daEnSnakeBlock_c * | mpOwner |
| The parent Snake Block actor. | |
| s16 | m_1b4 |
Additional Inherited Members | |
| Static Public Attributes inherited from daEnSnakeBlock_c::dBlock_c | |
| static dBg_ctr_c::CallbackF | callBackF |
| The floor collision callback. | |
| static dBg_ctr_c::CallbackH | callBackH |
| The ceiling collision callback. | |
| static dBg_ctr_c::CallbackW | callBackW |
| The side collision callback. | |
The possible speed modes of a Snake Block.
Definition at line 90 of file d_a_en_snake_block.hpp.
|
inline |
Creates a block.
Definition at line 97 of file d_a_en_snake_block.hpp.
|
inlinevirtual |
Destroys the block.
Definition at line 98 of file d_a_en_snake_block.hpp.
| bool daEnSnakeBlock_c::dCtrlBlock_c::moveBlock | ( | s8 * | moveSequence | ) |
Moves the block in the direction specified by the current sequence step.
| moveSequence | The sequence of movement directions. |
Definition at line 176 of file d_a_en_snake_block.cpp.
| bool daEnSnakeBlock_c::dCtrlBlock_c::nextTravelMove | ( | s8 * | moveSequence | ) |
Snaps the block to the grid and advances the sequence index to the next step.
| moveSequence | The sequence of movement directions. |
Definition at line 192 of file d_a_en_snake_block.cpp.
| SnakeSpeed_e daEnSnakeBlock_c::dCtrlBlock_c::mSnakeSpeed |
The speed mode for this block.
Definition at line 110 of file d_a_en_snake_block.hpp.