gfx.h
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef __viewergfx__
#define __viewergfx__
#include <sched.h>
#ifdef HI_RES
#define SCREEN_HT 480
#define SCREEN_WD 640
#define FRAME_WD 544
#define FRAME_HT 416
#define FRAME_X 48
#define FRAME_Y 0
#else
#define SCREEN_HT 240
#define SCREEN_WD 320
#define FRAME_WD 272
#define FRAME_HT 208
#define FRAME_X 24
#define FRAME_Y 16
#endif
#ifdef _LANGUAGE_C /* needed because file is included by "spec" */
/*
* Layout of our dynamic segment
*/
typedef struct {
Mtx projection;
Mtx viewing;
Mtx bg_model;
Mtx logo_scale;
Mtx logo_rotate;
Mtx logo_trans;
Gfx glist[10240]; /* buffer to hold display list */
} Dynamic;
typedef union {
struct {
short type;
} gen;
struct {
short type;
} done;
OSScMsg app;
} GFXMsg;
typedef struct {
OSScTask task;
Dynamic dp;
GFXMsg msg;
u16 *cfb;
} GFXInfo;
/* dynamic segment structure: */
extern Dynamic dynamic;
/* some static display lists: */
extern Gfx rdpinit_dl[];
extern Gfx rspinit_dl[];
/* global pointer for display list: */
extern Gfx *gpGfxList;
/* frame buffer, zbuffer: */
extern unsigned short cfb_16_a[];
extern unsigned short cfb_16_b[];
/* yield buffer: */
extern u64 gfxYieldBuf[];
/* matrix stack buffer: */
extern u64 dram_stack[];
#endif /* _LANGUAGE_C */
#endif /* __viewergfx__ */