DCDecomp
A decompilation of Dark Cloud for the PlayStation 2
Loading...
Searching...
No Matches
spritetable.hpp
1
#pragma once
2
3
#include "common.h"
4
5
#include <libgraph.h>
6
7
#include "
rect.hpp
"
8
12
struct
MG_SPRITE
{
13
u_long
tex0
;
14
RECT
source
;
15
u8
red
;
16
u8
green
;
17
u8
blue
;
18
u8
alpha
;
19
};
20
21
STATIC_ASSERT(
sizeof
(
MG_SPRITE
) == 0x20);
22
26
struct
SPRITE_TABLE
{
27
s16
x
;
28
s16
y
;
29
s16
width
;
30
s16
height
;
31
s16
u
;
32
s16
v
;
33
s16
u_width
;
34
s16
v_height
;
35
s16
red
;
36
s16
green
;
37
s16
blue
;
38
s16
alpha
;
39
u8 unk_18[0x10];
40
u_long
tex0
;
41
SPRITE_TABLE
*
next
;
42
u8 unk_34[4];
43
};
44
45
STATIC_ASSERT(
sizeof
(
SPRITE_TABLE
) == 0x38);
46
50
class
CSpriteTable
{
51
public
:
52
SPRITE_TABLE
*
pool
;
53
s32
list_count
;
54
s32
pool_count
;
55
SPRITE_TABLE
*
heads
[16];
56
SPRITE_TABLE
*
tails
[16];
57
SPRITE_TABLE
*
current
;
58
SPRITE_TABLE
*
end
;
63
CSpriteTable
() {
64
pool
= NULL;
65
list_count
= 0;
66
}
67
75
void
DrawTable
();
76
84
void
AddTable
(
int
x,
int
y,
MG_SPRITE
*sprite,
int
layer,
int
align_flags);
85
93
void
AddTable
(
int
x,
int
y,
sceGsTex0
*tex0,
RECT
*source,
int
layer,
int
align_flags);
94
102
void
Initialize
(
SPRITE_TABLE
*new_pool,
int
entry_count,
int
layer_count);
103
111
SPRITE_TABLE
*
GetNext
();
112
120
void
ClearPointer
();
121
};
122
123
STATIC_ASSERT(
sizeof
(
CSpriteTable
) == 0x94);
CSpriteTable
Definition
spritetable.hpp:50
CSpriteTable::list_count
s32 list_count
Definition
spritetable.hpp:53
CSpriteTable::heads
SPRITE_TABLE * heads[16]
Definition
spritetable.hpp:55
CSpriteTable::end
SPRITE_TABLE * end
Definition
spritetable.hpp:58
CSpriteTable::DrawTable
void DrawTable()
Definition
spritetable.cpp:8
CSpriteTable::pool_count
s32 pool_count
Definition
spritetable.hpp:54
CSpriteTable::pool
SPRITE_TABLE * pool
Definition
spritetable.hpp:52
CSpriteTable::CSpriteTable
CSpriteTable()
Definition
spritetable.hpp:63
CSpriteTable::current
SPRITE_TABLE * current
Definition
spritetable.hpp:57
CSpriteTable::ClearPointer
void ClearPointer()
Definition
spritetable.cpp:192
CSpriteTable::AddTable
void AddTable(int x, int y, MG_SPRITE *sprite, int layer, int align_flags)
Definition
spritetable.cpp:92
CSpriteTable::Initialize
void Initialize(SPRITE_TABLE *new_pool, int entry_count, int layer_count)
Definition
spritetable.cpp:168
CSpriteTable::tails
SPRITE_TABLE * tails[16]
Definition
spritetable.hpp:56
CSpriteTable::GetNext
SPRITE_TABLE * GetNext()
Definition
spritetable.cpp:181
rect.hpp
MG_SPRITE
Definition
spritetable.hpp:12
MG_SPRITE::blue
u8 blue
Definition
spritetable.hpp:17
MG_SPRITE::alpha
u8 alpha
Definition
spritetable.hpp:18
MG_SPRITE::tex0
u_long tex0
Definition
spritetable.hpp:13
MG_SPRITE::source
RECT source
Definition
spritetable.hpp:14
MG_SPRITE::green
u8 green
Definition
spritetable.hpp:16
MG_SPRITE::red
u8 red
Definition
spritetable.hpp:15
RECT
Definition
title.cpp:61
SPRITE_TABLE
Definition
spritetable.hpp:26
SPRITE_TABLE::u
s16 u
Definition
spritetable.hpp:31
SPRITE_TABLE::blue
s16 blue
Definition
spritetable.hpp:37
SPRITE_TABLE::x
s16 x
Definition
spritetable.hpp:27
SPRITE_TABLE::v_height
s16 v_height
Definition
spritetable.hpp:34
SPRITE_TABLE::tex0
u_long tex0
Definition
spritetable.hpp:40
SPRITE_TABLE::red
s16 red
Definition
spritetable.hpp:35
SPRITE_TABLE::green
s16 green
Definition
spritetable.hpp:36
SPRITE_TABLE::y
s16 y
Definition
spritetable.hpp:28
SPRITE_TABLE::v
s16 v
Definition
spritetable.hpp:32
SPRITE_TABLE::next
SPRITE_TABLE * next
Definition
spritetable.hpp:41
SPRITE_TABLE::width
s16 width
Definition
spritetable.hpp:29
SPRITE_TABLE::height
s16 height
Definition
spritetable.hpp:30
SPRITE_TABLE::alpha
s16 alpha
Definition
spritetable.hpp:38
SPRITE_TABLE::u_width
s16 u_width
Definition
spritetable.hpp:33
sceGsTex0
Definition
libgraph.h:230
ps2
include
spritetable.hpp
Generated by
1.9.8