summaryrefslogtreecommitdiffstats
path: root/zoom/types.h
blob: 9e40ea69d1d024229f15f57a20ece20f292750b8 (plain)
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
#ifndef ZOOM_TYPES_H
#define ZOOM_TYPES_H

#include <neofx/types.h>

#define TRIANGLE_UNKNOWN 0
#define TRIANGLE_WALL 1
#define TRIANGLE_FLOOR 2

#define LIGHT_UNKNOWN 0
#define LIGHT_POINT 1
#define LIGHT_DIRECTIONAL 2
#define LIGHT_SPOT 3

#define THING_UNKNOWN 0
#define THING_MEDIPAK25 1
#define THING_MEDIPAK50 2
#define THING_MEDIPAK100 3

#define GATE_UNKNOWN 0
#define GATE_SIDE 1

#define STATE_UNKNOWN 0
#define STATE_OPENED 1
#define STATE_CLOSED 2
#define STATE_OPENING 3
#define STATE_CLOSING 4

#pragma pack(push, 2)
typedef struct WALL {
	unsigned char type;
	unsigned char visible;
	union {
		TRIANGLE triangle;
		struct {
			VERTEX vertices[3];
			VECTOR normal;
		};
	};
	int texture;
	TEXCOORDS texcoords[3];
} WALL;

typedef struct _COLOR {
	float r, g, b;
} COLOR;

typedef struct _LIGHT {
	unsigned char type;
	COLOR diffuse;
	VERTEX pos;
} LIGHT;

typedef struct _THING {
	unsigned char type;
	unsigned char visible;
	VERTEX pos;
} THING;

typedef struct _GATE {
	unsigned char type;
	unsigned char open;
	WALL walls[2];
	VERTEX point;
	int room;
	int gate;
} GATE;
#pragma pack(pop)

#endif