-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.h
50 lines (42 loc) · 908 Bytes
/
defines.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
#pragma once
#include <stdint.h>
typedef struct FTRI {
short v[3];
short n;
uint8_t mat;
} FTRI; //Struct for untextured polys
typedef struct FTTRI {
short v[3];
short n;
short t[3];
} FTTRI; //Struct for textured polys
typedef struct UV_COORDS {
uint8_t u, v;
} UV_COORDS; //Coords for Textured Polys
typedef struct HEADER {
short numUntex;
short numTex;
short numVerts;
short numNorms;
short numUV;
uint8_t numMat;
} HEADER; //File Header
typedef struct VECTOR {
int vx, vy, vz;
} VECTOR; //psn00bsdk Vector
typedef struct COLVECTOR {
unsigned char r, g, b;
} COLVECTOR; //Simple Colour Vector
typedef struct MODEL {
HEADER h;
VECTOR* vIndex;
VECTOR* nIndex;
COLVECTOR* matIndex;
UV_COORDS* uvIndex;
FTRI* untexFaces;
FTTRI* texFaces;
} MODEL; //PSM file struct
typedef struct MAT {
char name[255];
COLVECTOR colour;
} MAT; //Used for transferring material data from an obj