-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathxconfig.h
149 lines (110 loc) · 2.57 KB
/
xconfig.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/**
* This file belongs to the 'xlab' game engine.
* Copyright 2009 xfacter
* Copyright 2016 wickles
* This work is licensed under the LGPLv3
* subject to all terms as reproduced in the included LICENSE file.
*/
#pragma once
#include <stdio.h>
#include <pspkernel.h>
#include <psptypes.h>
#include "xlog.h"
#ifdef __cplusplus
extern "C" {
#endif
/* TODO:
* 3D text (xtext.h) (fix)
* custom draw function (allowing user to enable special options like clipping, cel shading, and .. other stuff)
* ?
**/
#define X_DEBUG
#define X_PSP_USER
//#define X_PSP_KERNEL
//#define X_GRAPHICS_2D
#define X_GRAPHICS_3D
#define X_DLIST_SINGLE
//#define X_DLIST_DOUBLE
#define X_SCREEN_WIDTH 480
#define X_SCREEN_HEIGHT 272
#define X_SCREEN_STRIDE 512
#define X_SCREEN_PSM GU_PSM_5650
#define X_LIST_KB 512
#define X_TEX_TGA
//#define X_TEX_PNG
//#define X_TEX_BMP
#define X_SOUND_CHANNEL 0
#define X_MD2_SOFTWARE
//#define X_MD2_HARDWARE
typedef struct xVector3f {
float x, y, z;
} xVector3f;
typedef struct xColor4f {
float r, g, b, a;
} xColor4f;
typedef struct {
int start;
int size;
float delay;
} x_anim;
/* vertex structures */
typedef struct {
float x, y, z;
} VertexF;
#define VertexF_vtype (GU_VERTEX_32BITF)
typedef struct {
float u, v;
float x, y, z;
} TVertexF;
#define TVertexF_vtype (GU_TEXTURE_32BITF|GU_VERTEX_32BITF)
typedef struct {
u32 color;
float x, y, z;
} CVertexF;
#define CVertexF_vtype (GU_COLOR_8888|GU_VERTEX_32BITF)
typedef struct {
float nx, ny, nz;
float x, y, z;
} NVertexF;
#define NVertexF_vtype (GU_NORMAL_32BITF|GU_VERTEX_32BITF)
typedef struct {
float u, v;
float nx, ny, nz;
float x, y, z;
} TNVertexF;
#define TNVertexF_vtype (GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF)
typedef struct {
float u, v;
u32 color;
float x, y, z;
} TCVertexF;
#define TCVertexF_vtype (GU_TEXTURE_32BITF|GU_COLOR_8888|GU_VERTEX_32BITF)
typedef struct {
u32 color;
float nx, ny, nz;
float x, y, z;
} CNVertexF;
#define CNVertexF_vtype (GU_COLOR_8888|GU_NORMAL_32BITF|GU_VERTEX_32BITF)
typedef struct {
s16 x, y, z;
} Vertex2D;
#define Vertex2D_vtype (GU_VERTEX_16BIT)
typedef struct {
u32 color;
s16 x, y, z;
} CVertex2D;
#define CVertex2D_vtype (GU_COLOR_8888|GU_VERTEX_16BIT)
typedef struct {
s16 u, v;
s16 x, y, z;
} TVertex2D;
#define TVertex2D_vtype (GU_TEXTURE_16BIT|GU_VERTEX_16BIT)
typedef struct {
s16 u, v;
u32 color;
s16 x, y, z;
} TCVertex2D;
#define TCVertex2D_vtype (GU_TEXTURE_16BIT|GU_COLOR_8888|GU_VERTEX_16BIT)
#ifdef __cplusplus
}
#endif