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
float
m_48;
27
u8 mPad2[0x34];
28
u8
mScrollDirX
;
///< See BG_SCROLL_DIR_X_e.
29
u8
mScrollDirY
;
///< See BG_SCROLL_DIR_Y_e.
30
31
float
getLoopScrollDispPosX(
float
x);
32
33
const
mVec2_c
&pos()
const
{
return
mPos; }
34
const
mVec2_c
&size()
const
{
return
mSize; }
35
36
float
xStart()
const
{
return
pos().x; }
37
float
yStart()
const
{
return
pos().y; }
38
float
xSize()
const
{
return
size().x; }
39
float
ySize()
const
{
return
size().y; }
40
float
xEnd()
const
{
return
xStart() + xSize(); }
41
float
yEnd()
const
{
return
yStart() - ySize(); }
42
43
void
getBounds(
float
&startX,
float
&startY,
float
&endX,
float
&endY)
const
{
44
startX = xStart();
45
startY = yStart();
46
endX = xEnd();
47
endY = yEnd();
48
}
49
50
bool
check(
float
y,
float
offset) {
51
return
y - offset > yStart();
52
}
53
54
static
dBgParameter_c *getInstance() {
return
ms_Instance_p; }
55
56
static
dBgParameter_c *ms_Instance_p;
57
};
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:29
dBgParameter_c::mScrollDirX
u8 mScrollDirX
See BG_SCROLL_DIR_X_e.
Definition
d_bg_parameter.hpp:28
mVec2_c
A two-dimensional floating point vector.
Definition
m_vec.hpp:26
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