|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/bases/d_lytbase.hpp>
A 2D layout.
Definition at line 9 of file d_lytbase.hpp.
Public Member Functions | |
| LytBase_c () | |
| Constructs a new layout. | |
| virtual | ~LytBase_c () |
| Destroys the layout. | |
| virtual bool | build (const char *name, d2d::ResAccMult_c *resAcc) |
| Builds the layout from a binary layout file. | |
| LytTextBox_c * | findTextBox (const char *name) |
| Finds a text box by name. | |
| void | allocStringBuffer (nw4r::lyt::Pane *pane) |
| Recursively allocates string buffers for all text boxes in the layout. | |
| bool | ReadResourceEx (const char *name, int allocDirection, bool isLocalized) |
| Reads an .arc file which contains the layout. | |
| bool | ReadResource (const char *name, bool isLocalized) |
| Reads an .arc file which contains the layout. | |
| bool | ReadResource2 (const char *name, int allocDirection) |
| Reads an .arc file which contains the layout. | |
| bool | ReadResource3 (const char *name, int allocDirection) |
| Reads an .arc file which contains the layout. | |
| void | NPaneRegister (const char **paneNames, nw4r::lyt::Pane **panes, int count) |
| Finds null panes by name and registers them to the list. | |
| void | WPaneRegister (const char **windowPaneNames, nw4r::lyt::Window **panes, int count) |
| Finds windows by name and registers them to the list. | |
| void | PPaneRegister (const char **picPaneNames, nw4r::lyt::Picture **panes, int count) |
| Finds picture panes by name and registers them to the list. | |
| void | TPaneRegister (const char **textboxNames, LytTextBox_c **panes, int count) |
| Finds text boxes by name and registers them to the list. | |
| void | TPaneNameRegister (const char **textboxNames, const int *messageIDs, int messageGroup, int count) |
| Finds text boxes by name, sets their messages, and registers them to the list. | |
| void | AnimeResRegister (const char **animeNames, int count) |
| Loads animation resources given by their names. | |
| void | GroupRegister (const char **groupNames, const int *animeIdxs, int count) |
| Registers animation groups to the layout. | |
| void | AnimeStartBaseSetup (int animeIdx) |
| Base setup for starting an animation. | |
| void | AnimeStartSetup (int animeIdx, bool startAtEnd) |
| Prepares an animation to be played. | |
| void | LoopAnimeStartSetup (int animeIdx) |
| Prepares a looping animation to be played. | |
| void | ReverseAnimeStartSetup (int animeIdx, bool startAtEnd) |
| Prepares a reverse animation to be played. | |
| void | AnimeEndSetup (int animeIdx) |
| Prepares an animation to be stopped. | |
| void | AllAnimeEndSetup () |
| Prepares all animations to be stopped. | |
| void | AnimePlay () |
| Starts playing all enabled animations. | |
| bool | isAnime (int animeIdx) |
| Returns whether the specified animation is currently playing. | |
| bool | isAllAnime () |
| Returns whether any animation is currently playing. | |
| void | SetScissorMask (const nw4r::lyt::Pane *pane, d2d::ScissorMask &scissorMask) |
| bool | doDelete () |
| Cleans up all resources used by the layout. | |
| m2d::AnmGroup_c & | getAnmGroup (int index) const |
| Public Member Functions inherited from d2d::Multi_c | |
| Multi_c () | |
| Creates a layout. | |
| virtual | ~Multi_c () |
| Destroys the layout. | |
| virtual void | draw () |
| Draws the layout. | |
| virtual void | calc () |
| Applies the view matrix. | |
| void | entry () |
| Registers the layout to be drawn. | |
| void | calcBefore () |
| Calculates an animation step before the main calculation. | |
| void | calcAfter () |
| Calculates the view rectangle and view matrix after the main calculation. | |
| nw4r::lyt::Pane * | getRootPane () |
| Gets the root pane of the layout. | |
| nw4r::lyt::Pane * | findPaneByName (const char *name) |
| Finds a pane by name. | |
| nw4r::lyt::TextBox * | findTextBoxByName (const char *name) |
| Finds a text box pane by name. | |
| nw4r::lyt::Picture * | findPictureByName (const char *name) |
| Finds a picture pane by name. | |
| nw4r::lyt::Window * | findWindowByName (const char *name) |
| Finds a window pane by name. | |
| Public Member Functions inherited from m2d::Base_c | |
| void | entry () |
Static Public Attributes | |
| static TagProcessor_c | s_TagPrc |
| The tag processor for layouts. | |
Private Attributes | |
| d2d::ResAccMultLoader_c | mResAccessorLoader |
| The resource loader used to load the layout's resources. | |
| m2d::AnmResV2_c * | mpAnimRes |
| The animations used by the layout. | |
| m2d::AnmGroup_c * | mpAnimGroup |
| The animation groups used by the layout. | |
| bool * | mpEnabledAnims |
| A list of the enabled animations. | |
| int | mAnimCount |
| The number of animations used by the layout. | |
| int | mAnimGroupCount |
| The number of animation groups used by the layout. | |
| int | mLastStartedAnimNum |
| The number of the most recently started animation. | |
Additional Inherited Members | |
| Public Attributes inherited from d2d::Multi_c | |
| ResAccMult_c * | mpResAccessor |
| The resource accessor for the layout. | |
| mVec2_c | mPos |
| The position of the layout. | |
| ScissorMask | mScissorMask |
| The scissor mask for the layout. | |
| Public Attributes inherited from m2d::Base_c | |
| u8 | mDrawOrder |
| Protected Attributes inherited from d2d::Multi_c | |
| m2d::Layout_c | mLayout |
| The layout instance. | |
| nw4r::lyt::DrawInfo | mDrawInfo |
| The parameters for drawing the layout. | |
| LytBase_c::LytBase_c | ( | ) |
Constructs a new layout.
Definition at line 11 of file d_lytbase.cpp.
|
virtual |
Destroys the layout.
Definition at line 13 of file d_lytbase.cpp.
|
virtual |
Builds the layout from a binary layout file.
| name | The name of the binary layout file. |
| resAcc | The resource accessor to use. If nullptr, uses the internal accessor. |
Reimplemented from d2d::Multi_c.
Definition at line 15 of file d_lytbase.cpp.
| LytTextBox_c * LytBase_c::findTextBox | ( | const char * | name | ) |
Finds a text box by name.
Definition at line 24 of file d_lytbase.cpp.
| void LytBase_c::allocStringBuffer | ( | nw4r::lyt::Pane * | pane | ) |
Recursively allocates string buffers for all text boxes in the layout.
Definition at line 28 of file d_lytbase.cpp.
| bool LytBase_c::ReadResourceEx | ( | const char * | name, |
| int | allocDirection, | ||
| bool | isLocalized ) |
Reads an .arc file which contains the layout.
| name | The name of the archive. |
| allocDirection | The allocation direction. |
| isLocalized | Whether the layout is in a localized folder (/<Region>/<Language>/). |
Definition at line 46 of file d_lytbase.cpp.
| bool LytBase_c::ReadResource | ( | const char * | name, |
| bool | isLocalized ) |
Reads an .arc file which contains the layout.
| name | The name of the archive. |
| isLocalized | Whether the layout is in a localized folder (/<Region>/<Language>/). |
Definition at line 65 of file d_lytbase.cpp.
| bool LytBase_c::ReadResource2 | ( | const char * | name, |
| int | allocDirection ) |
Reads an .arc file which contains the layout.
| name | The name of the archive. |
| allocDirection | The allocation direction. |
Definition at line 69 of file d_lytbase.cpp.
| bool LytBase_c::ReadResource3 | ( | const char * | name, |
| int | allocDirection ) |
Reads an .arc file which contains the layout.
| name | The name of the archive. |
| allocDirection | The allocation direction. |
Definition at line 83 of file d_lytbase.cpp.
| void LytBase_c::NPaneRegister | ( | const char ** | paneNames, |
| nw4r::lyt::Pane ** | panes, | ||
| int | count ) |
Finds null panes by name and registers them to the list.
| paneNames | The names of the panes to find. |
| panes | The list to register the panes to. |
| count | The number of panes in paneNames. |
Definition at line 96 of file d_lytbase.cpp.
| void LytBase_c::WPaneRegister | ( | const char ** | windowPaneNames, |
| nw4r::lyt::Window ** | panes, | ||
| int | count ) |
Finds windows by name and registers them to the list.
| windowPaneNames | The names of the windows to find. |
| panes | The list to register the windows to. |
| count | The number of windows in windowPaneNames. |
Definition at line 102 of file d_lytbase.cpp.
| void LytBase_c::PPaneRegister | ( | const char ** | picPaneNames, |
| nw4r::lyt::Picture ** | panes, | ||
| int | count ) |
Finds picture panes by name and registers them to the list.
| picPaneNames | The names of the picture panes to find. |
| panes | The list to register the picture panes to. |
| count | The number of picture panes in picPaneNames. |
Definition at line 108 of file d_lytbase.cpp.
| void LytBase_c::TPaneRegister | ( | const char ** | textboxNames, |
| LytTextBox_c ** | panes, | ||
| int | count ) |
Finds text boxes by name and registers them to the list.
| textboxNames | The names of the text boxes to find. |
| panes | The list to register the text boxes to. |
| count | The number of text boxes in textboxNames. |
Definition at line 114 of file d_lytbase.cpp.
| void LytBase_c::TPaneNameRegister | ( | const char ** | textboxNames, |
| const int * | messageIDs, | ||
| int | messageGroup, | ||
| int | count ) |
Finds text boxes by name, sets their messages, and registers them to the list.
| textboxNames | The names of the text boxes to find. |
| messageIDs | The message IDs of the messages to set for the text boxes. |
| messageGroup | The message group of the messages to set for the text boxes. |
| count | The number of text boxes in textboxNames. |
Definition at line 120 of file d_lytbase.cpp.
| void LytBase_c::AnimeResRegister | ( | const char ** | animeNames, |
| int | count ) |
Loads animation resources given by their names.
| animeNames | The names of the animation resources to load. |
| count | The number of animations in animeNames. |
Definition at line 128 of file d_lytbase.cpp.
| void LytBase_c::GroupRegister | ( | const char ** | groupNames, |
| const int * | animeIdxs, | ||
| int | count ) |
Registers animation groups to the layout.
| groupNames | The names of the animation groups to register. |
| animeIdxs | The indices of the animations to use for the animation groups. |
| count | The number of animation groups in groupNames. |
Definition at line 137 of file d_lytbase.cpp.
| void LytBase_c::AnimeStartBaseSetup | ( | int | animeIdx | ) |
Base setup for starting an animation.
| animeIdx | The index of the animation to start. |
Definition at line 146 of file d_lytbase.cpp.
| void LytBase_c::AnimeStartSetup | ( | int | animeIdx, |
| bool | startAtEnd ) |
Prepares an animation to be played.
| animeIdx | The index of the animation to start. |
| startAtEnd | Whether to skip to the end of the animation. |
Definition at line 156 of file d_lytbase.cpp.
| void LytBase_c::LoopAnimeStartSetup | ( | int | animeIdx | ) |
Prepares a looping animation to be played.
| animeIdx | The index of the animation to start. |
Definition at line 164 of file d_lytbase.cpp.
| void LytBase_c::ReverseAnimeStartSetup | ( | int | animeIdx, |
| bool | startAtEnd ) |
Prepares a reverse animation to be played.
| animeIdx | The index of the animation to start. |
| startAtEnd | Whether to skip to the end of the animation. |
Definition at line 169 of file d_lytbase.cpp.
| void LytBase_c::AnimeEndSetup | ( | int | animeIdx | ) |
Prepares an animation to be stopped.
| animeIdx | The index of the animation to be stopped. |
Definition at line 180 of file d_lytbase.cpp.
| void LytBase_c::AllAnimeEndSetup | ( | ) |
Prepares all animations to be stopped.
Definition at line 187 of file d_lytbase.cpp.
| void LytBase_c::AnimePlay | ( | ) |
Starts playing all enabled animations.
Definition at line 194 of file d_lytbase.cpp.
| bool LytBase_c::isAnime | ( | int | animeIdx | ) |
Returns whether the specified animation is currently playing.
| animeIdx | The index of the animation to check. |
Definition at line 206 of file d_lytbase.cpp.
| bool LytBase_c::isAllAnime | ( | ) |
Returns whether any animation is currently playing.
Definition at line 213 of file d_lytbase.cpp.
| void LytBase_c::SetScissorMask | ( | const nw4r::lyt::Pane * | pane, |
| d2d::ScissorMask & | scissorMask ) |
Definition at line 222 of file d_lytbase.cpp.
| bool LytBase_c::doDelete | ( | ) |
Cleans up all resources used by the layout.
Definition at line 276 of file d_lytbase.cpp.
|
inline |
Definition at line 129 of file d_lytbase.hpp.
|
private |
The resource loader used to load the layout's resources.
Definition at line 132 of file d_lytbase.hpp.
|
private |
The animations used by the layout.
Definition at line 134 of file d_lytbase.hpp.
|
private |
The animation groups used by the layout.
Definition at line 135 of file d_lytbase.hpp.
|
private |
A list of the enabled animations.
Definition at line 137 of file d_lytbase.hpp.
|
private |
The number of animations used by the layout.
Definition at line 138 of file d_lytbase.hpp.
|
private |
The number of animation groups used by the layout.
Definition at line 139 of file d_lytbase.hpp.
|
private |
The number of the most recently started animation.
Definition at line 141 of file d_lytbase.hpp.
|
static |
The tag processor for layouts.
Definition at line 144 of file d_lytbase.hpp.