Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/snes/alt/ppu-performance/sprite/sprite.hpp
2 views
1
class Sprite {
2
bool priority0_enable;
3
bool priority1_enable;
4
bool priority2_enable;
5
bool priority3_enable;
6
7
struct Regs {
8
unsigned priority0;
9
unsigned priority1;
10
unsigned priority2;
11
unsigned priority3;
12
13
unsigned base_size;
14
unsigned nameselect;
15
unsigned tiledata_addr;
16
unsigned first_sprite;
17
18
bool main_enable;
19
bool sub_enable;
20
21
bool interlace;
22
23
bool time_over;
24
bool range_over;
25
} regs;
26
27
struct List {
28
unsigned width;
29
unsigned height;
30
unsigned x;
31
unsigned y;
32
unsigned character;
33
bool use_nameselect;
34
bool vflip;
35
bool hflip;
36
unsigned palette;
37
unsigned priority;
38
bool size;
39
} list[128];
40
bool list_valid;
41
42
uint8 itemlist[32];
43
struct TileList {
44
unsigned x;
45
unsigned y;
46
unsigned priority;
47
unsigned palette;
48
unsigned tile;
49
bool hflip;
50
} tilelist[34];
51
52
struct Output {
53
uint8 palette[256];
54
uint8 priority[256];
55
} output;
56
57
LayerWindow window;
58
59
void frame();
60
void update_list(unsigned addr, uint8 data);
61
void address_reset();
62
void set_first();
63
alwaysinline bool on_scanline(unsigned sprite);
64
void render();
65
66
void serialize(serializer&);
67
Sprite(PPU &self);
68
69
PPU &self;
70
friend class PPU;
71
};
72
73