NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
global.hpp
1#pragma once
2#include <types.h>
3#include <game/mLib/m_2d.hpp>
4#include <nw4r/ut.h>
5#include <nw4r/lyt.h>
6
7/// @brief 2D engine namespace.
8/// Deals with drawing anything 2D, like the HUD and small scores.
9namespace d2d {
10
11void init(); ///< Initializes the 2D engine.
12
13void draw(); ///< Draws all registered 2D objects.
14void drawBefore(); ///< Draws all registered background 2D objects.
15void drawAfter(); ///< Draws all registered foreground 2D objects.
16void drawBtween(u8 after, u8 before); ///< Draws all registered 2D objects between the @p after and @p before draw orders.
17
18/// @brief Visitor function for setting the opacity of panes.
19/// @param pane Pointer to the pane being visited.
20/// @param opacity Pointer to the opacity value to set.
21int setAlpha_patrolPane_patrol(nw4r::lyt::Pane *pane, void *opacity);
22void setAlpha(m2d::Simple_c *layout, u8 opacity); ///< Sets the opacity of an entire layout.
23
24} // namespace d2d
2D engine namespace. Deals with drawing anything 2D, like the HUD and small scores.
Definition global.hpp:9
void drawAfter()
Draws all registered foreground 2D objects.
Definition d_2d.cpp:21
void drawBefore()
Draws all registered background 2D objects.
Definition d_2d.cpp:17
void init()
Initializes the 2D engine.
Definition d_2d.cpp:11
void draw()
Draws all registered 2D objects.
Definition d_2d.cpp:13
void drawBtween(u8 after, u8 before)
Draws all registered 2D objects between the after and before draw orders.
Definition d_2d.cpp:25
int setAlpha_patrolPane_patrol(nw4r::lyt::Pane *pane, void *opacity)
Visitor function for setting the opacity of panes.
Definition d_2d.cpp:34
void setAlpha(m2d::Simple_c *layout, u8 opacity)
Sets the opacity of an entire layout.
Definition d_2d.cpp:41