NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_bg_parameter.hpp
1
#pragma once
2
3
#include <types.h>
4
#include <game/mLib/m_vec.hpp>
5
#include <game/bases/d_actor.hpp>
6
7
class
dBgParameter_c
{
8
public
:
9
/// @unofficial
10
enum
BG_SCROLL_DIR_X_e
{
11
BG_SCROLL_X_NONE,
12
BG_SCROLL_X_LEFT,
13
BG_SCROLL_X_RIGHT,
14
};
15
16
/// @unofficial
17
enum
BG_SCROLL_DIR_Y_e
{
18
BG_SCROLL_Y_NONE,
19
BG_SCROLL_Y_DOWN,
20
BG_SCROLL_Y_UP,
21
};
22
23
u8 mPad1[0x38];
24
mVec2_c
mPos;
25
mVec2_c
mSize;
26
u8 mPad2[0x38];
27
u8
mScrollDirX
;
///< See BG_SCROLL_DIR_X_e.
28
u8
mScrollDirY
;
///< See BG_SCROLL_DIR_Y_e.
29
30
const
mVec2_c
&pos()
const
{
return
mPos; }
31
const
mVec2_c
&size()
const
{
return
mSize; }
32
33
float
xStart()
const
{
return
pos().x; }
34
float
yStart()
const
{
return
pos().y; }
35
float
xSize()
const
{
return
size().x; }
36
float
ySize()
const
{
return
size().y; }
37
float
xEnd()
const
{
return
xStart() + xSize(); }
38
float
yEnd()
const
{
return
yStart() - ySize(); }
39
40
void
getBounds(
float
&startX,
float
&startY,
float
&endX,
float
&endY)
const
{
41
startX = xStart();
42
startY = yStart();
43
endX = xEnd();
44
endY = yEnd();
45
}
46
47
bool
check(
float
y,
float
offset) {
48
return
y - offset > yStart();
49
}
50
51
static
dBgParameter_c *getInstance() {
return
ms_Instance_p; }
52
53
static
dBgParameter_c *ms_Instance_p;
54
};
dBgParameter_c
Definition
d_bg_parameter.hpp:7
dBgParameter_c::BG_SCROLL_DIR_Y_e
BG_SCROLL_DIR_Y_e
Definition
d_bg_parameter.hpp:17
dBgParameter_c::BG_SCROLL_DIR_X_e
BG_SCROLL_DIR_X_e
Definition
d_bg_parameter.hpp:10
dBgParameter_c::mScrollDirY
u8 mScrollDirY
See BG_SCROLL_DIR_Y_e.
Definition
d_bg_parameter.hpp:28
dBgParameter_c::mScrollDirX
u8 mScrollDirX
See BG_SCROLL_DIR_X_e.
Definition
d_bg_parameter.hpp:27
mVec2_c
A two-dimensional floating point vector.
Definition
m_vec.hpp:16
include
game
bases
d_bg_parameter.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.15.0