static.c
2.95 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
77
78
79
80
81
82
83
84
85
86
87
88
#include <ultra64.h>
#include "perf.h"
#include "static.h"
Vp vp =
{
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* scale */
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* translate */
};
Vp smallvp =
{
SCREEN_WD, SCREEN_HT, G_MAXZ/2, 0, /* scale */
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* translate */
};
Vtx v[16] = {
{ 0, -20, 0, 0, 0, 0, 0, 240, 0, 255 },
{ 0, -20, 4000, 0, 0, 0, 0, 240, 0, 255 },
{ 4000, -20, 4000, 0, 0, 0, 0, 240, 0, 255 },
{ 4000, -20, 0, 0, 0, 0, 0, 240, 0, 255 },
{ 0, 0, 400, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 400, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 800, 0, 0, 0, 255, 255, 255, 255 },
{ 0, 0, 800, 0, 0, 0, 255, 255, 255, 255 },
{ 0, 0, 1200, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 1200, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 1600, 0, 0, 0, 255, 255, 255, 255 },
{ 0, 0, 1600, 0, 0, 0, 255, 255, 255, 255 },
{ 0, 0, 2000, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 2000, 0, 0, 0, 255, 255, 255, 255 },
{ 400, 0, 2400, 0, 0, 0, 255, 255, 255, 255 },
{ 0, 0, 2400, 0, 0, 0, 255, 255, 255, 255 },
};
Vtx smalltri[3] = {
{ 600, 600, 0, 0, ( 0 << 6), ( 0 << 6), 0x00, 0x00, 0x00, 255 },
{ 600, 612, 0, 0, ( 0 << 6), ( 31<< 6), 0xff, 0xff, 0xff, 255 },
{ 612, 612, 0, 0, ( 31<< 6), ( 31<< 6), 0x00, 0x00, 0x00, 255 },
};
Vtx w[3] = {
{ 400, 400, 0, 0, ( 0 << 6), ( 0 << 6), 0x00, 0x00, 0x00, 255 },
{ 400, 800, 0, 0, ( 0 << 6), ( 31<< 6), 0xff, 0xff, 0xff, 255 },
{ 800, 800, 0, 0, ( 31<< 6), ( 31<< 6), 0x00, 0x00, 0x00, 255 },
};
Vtx largetris[4] = {
{ 0 << 2, 0 << 2, 0, 0, ( 0 << 6), ( 0 << 6), 0x00, 0xff, 0x00, 255 },
{ 0 << 2, 240 << 2, 0, 0, ( 0 << 6), ( 31<< 6), 0xff, 0x00, 0x00, 255 },
{ 320 << 2, 240 << 2, 0, 0, ( 31<< 6), ( 31<< 6), 0x00, 0xff, 0x00, 255 },
{ 320 << 2, 0 << 2, 0, 0, ( 0 << 6), ( 31<< 6), 0x00, 0x00, 0xff, 255 },
};
Vp clipvp =
{
SCREEN_WD, SCREEN_HT, G_MAXZ/2, 0, /* scale */
SCREEN_WD*2, SCREEN_HT*2, G_MAXZ/2, 0, /* translate */
};
Vtx clip1[] =
{
{ -2, 2, 0, 0, 0, 0, 0xff, 0x00, 0x00, 0xff },
{ 2, 4, 0, 0, 0, 0, 0x00, 0xff, 0x00, 0xff },
{ 4, 4, 0, 0, 0, 0, 0x00, 0x00, 0xff, 0xff },
};
Vtx clip2[] =
{
{ -2, -2, 0, 0, 0, 0, 0xff, 0x00, 0x00, 0xff },
{ 2, 4, 0, 0, 0, 0, 0x00, 0xff, 0x00, 0xff },
{ 4, 4, 0, 0, 0, 0, 0x00, 0x00, 0xff, 0xff },
};
Vtx ztris[] = {
{ 107 << 2, 120 << 2, 0, 0, ( 0 << 6), ( 0 << 6), 0x00, 0xff, 0x00, 255 },
{ 214 << 2, 80 << 2, 0, 0, ( 0 << 6), ( 63<< 6), 0xff, 0x00, 0x00, 255 },
{ 214 << 2, 160 << 2, 0, 0, ( 63<< 6), ( 63<< 6), 0x00, 0x00, 0xff, 255 },
{ 214 << 2, 120 << 2, 1, 0, ( 0 << 6), ( 0 << 6), 0x7f, 0x7f, 0x00, 255 },
{ 107 << 2, 80 << 2, -1, 0, ( 0 << 6), ( 63<< 6), 0x7f, 0x00, 0x7f, 255 },
{ 107 << 2, 160 << 2, -1, 0, ( 63<< 6), ( 63<< 6), 0x00, 0x7f, 0x7f, 255 },
};