Debian Codegraph @

gba/ppu/state.hpp

raw
1 struct Pixel {
2 bool enable;
3 unsigned priority;
4 unsigned color;
5
6 //objects only
7 bool translucent;
8 bool mosaic;
9
10 alwaysinline void write(bool e) { enable = e; }
11 alwaysinline void write(bool e, unsigned p, unsigned c) { enable = e; priority = p; color = c; }
12 alwaysinline void write(bool e, unsigned p, unsigned c, bool t, bool m) { enable = e; priority = p; color = c; translucent = t; mosaic = m; }
13 } layer[6][240];
14
15 bool windowmask[3][240];
16 unsigned vmosaic[5];
17 unsigned hmosaic[5];
18
19 struct Object {
20 uint8 y;
21 uint1 affine;
22 uint1 affinesize;
23 uint2 mode;
24 uint1 mosaic;
25 uint1 colors; //0 = 16, 1 = 256
26 uint2 shape; //0 = square, 1 = horizontal, 2 = vertical
27
28 uint9 x;
29 uint5 affineparam;
30 uint1 hflip;
31 uint1 vflip;
32 uint2 size;
33
34 uint10 character;
35 uint2 priority;
36 uint4 palette;
37
38 //ancillary data
39 unsigned width;
40 unsigned height;
41 } object[128];
42
43 struct ObjectParam {
44 int16 pa;
45 int16 pb;
46 int16 pc;
47 int16 pd;
48 } objectparam[32];
49
50 struct Tile {
51 uint10 character;
52 uint1 hflip;
53 uint1 vflip;
54 uint4 palette;
55 };