-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRasterize.h
53 lines (41 loc) · 957 Bytes
/
Rasterize.h
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
#ifndef __RASTERIZE_H__
#define __RASTERIZE_H__
#include "VectorLibrary/VectorFixed.h"
#include "VectorLibrary/MatrixFixed.h"
void RasterizeInit();
void Rasterize();
typedef struct {
ivec4_t p;
ivec3_t n;
uint32_t c;
} vertex_t;
typedef struct {
ivec3_t p;
uint8_t clip;
int16_t uw;
int16_t vw;
} ss_vertex_t;
typedef struct {
ss_vertex_t v[3];
} triangle_t;
typedef struct {
int16_t v[4];
uint8_t indices;
uint8_t shade;
} index_triangle_t;
typedef ivec3_t init_vertex_t;
#define SHADECOORD(u,v) ((v)*16+(u))
#include "Cityscape.h"
#define NumberOfDotStars 2
struct RasterizeData {
ss_vertex_t transformedVertices[numVertices];
index_triangle_t sortedTriangles[numFaces];
uint8_t shadetex0[16*16];
uint8_t shadetex1[16*16];
uint8_t shadetex2[16*16];
uint8_t shadetex3[16*16];
ivec3_t star[300];
ivec3_t streeta[50];
ivec3_t streetb[50];
};
#endif