|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_a_en_snake_block.hpp>
A single block segment within the Snake Block actor.
Manages its own 3D model, animations, collision, and physics.
Definition at line 19 of file d_a_en_snake_block.hpp.
Public Member Functions | |
| 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 | |
| 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 |
Static Public Attributes | |
| 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. | |
|
inline |
Creates a block.
Definition at line 22 of file d_a_en_snake_block.hpp.
|
inlinevirtual |
Destroys the block.
Definition at line 25 of file d_a_en_snake_block.hpp.
| void daEnSnakeBlock_c::dBlock_c::createMdl | ( | mAllocator_c * | allocator | ) |
Initializes the 3D model, textures, and color animations.
| allocator | The allocator to use for the model and animation data. |
Definition at line 16 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::initCollision | ( | daEnSnakeBlock_c * | parent, |
| mVec3_c & | blockPos, | ||
| bool | icy ) |
Initializes the block's collision.
| parent | The parent Snake Block actor. |
| blockPos | The block position. |
| icy | Whether the surface must be icy. |
Definition at line 68 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::setAnmClr | ( | const char * | name | ) |
Sets the color animation for the block.
| name | The animation name. |
Definition at line 49 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::draw | ( | const mVec3_c & | offset | ) |
Renders the block model.
| offset | The offset from the block position, used for the shaking animation. |
Definition at line 56 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::calcCollapse1 | ( | s8 * | moveSequence | ) |
Updates the block's position when in the Collapse1 state.
Definition at line 106 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::calcCollision | ( | ) |
Updates the block's collision based on its offset from the parent.
Definition at line 91 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::calcFallSpeed | ( | ) |
Updates the block's falling speed.
Definition at line 99 of file d_a_en_snake_block.cpp.
| void daEnSnakeBlock_c::dBlock_c::calcAnm | ( | ) |
Advances the animations for the block.
Definition at line 44 of file d_a_en_snake_block.cpp.
|
inline |
Definition at line 51 of file d_a_en_snake_block.hpp.
|
inline |
Definition at line 52 of file d_a_en_snake_block.hpp.
|
inline |
Moves the block by its speed.
Definition at line 53 of file d_a_en_snake_block.hpp.
| void daEnSnakeBlock_c::dBlock_c::deleteBlock | ( | ) |
Releases the model and associated animation resources.
Definition at line 38 of file d_a_en_snake_block.cpp.
|
inline |
Releases the block's collision.
Definition at line 58 of file d_a_en_snake_block.hpp.
|
static |
The floor collision callback.
Definition at line 64 of file d_a_en_snake_block.hpp.
|
static |
The ceiling collision callback.
Definition at line 65 of file d_a_en_snake_block.hpp.
|
static |
The side collision callback.
Definition at line 66 of file d_a_en_snake_block.hpp.
| nw4r::g3d::ResFile daEnSnakeBlock_c::dBlock_c::mResFile |
The resource file.
Definition at line 68 of file d_a_en_snake_block.hpp.
| m3d::mdl_c daEnSnakeBlock_c::dBlock_c::mModel |
The block model.
Definition at line 69 of file d_a_en_snake_block.hpp.
| m3d::anmMatClr_c daEnSnakeBlock_c::dBlock_c::mAnmClr |
The color animation.
Definition at line 70 of file d_a_en_snake_block.hpp.
| nw4r::g3d::ResAnmTexSrt daEnSnakeBlock_c::dBlock_c::mResTexSrt |
The texture animation resource.
Definition at line 71 of file d_a_en_snake_block.hpp.
| m3d::anmTexSrt_c daEnSnakeBlock_c::dBlock_c::mAnmTexSrt |
The texture animation.
Definition at line 72 of file d_a_en_snake_block.hpp.
| mVec3_c daEnSnakeBlock_c::dBlock_c::mPos |
The block's position (center of block).
Definition at line 74 of file d_a_en_snake_block.hpp.
| mVec3_c daEnSnakeBlock_c::dBlock_c::mSpeed |
The block' speed.
Definition at line 75 of file d_a_en_snake_block.hpp.
| mVec3_c daEnSnakeBlock_c::dBlock_c::mLastPos |
The block's position in the previous movement.
Definition at line 76 of file d_a_en_snake_block.hpp.
| dBg_ctr_c daEnSnakeBlock_c::dBlock_c::mBgCtr |
The collision.
Definition at line 78 of file d_a_en_snake_block.hpp.
| int daEnSnakeBlock_c::dBlock_c::mMoveSequenceIdx |
The block's current step in the movement sequence.
Definition at line 79 of file d_a_en_snake_block.hpp.
| daEnSnakeBlock_c* daEnSnakeBlock_c::dBlock_c::mpOwner |
The parent Snake Block actor.
Definition at line 80 of file d_a_en_snake_block.hpp.
| s16 daEnSnakeBlock_c::dBlock_c::m_1b4 |
Definition at line 82 of file d_a_en_snake_block.hpp.