-
Notifications
You must be signed in to change notification settings - Fork 2
/
scene.h
64 lines (47 loc) · 1.02 KB
/
scene.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
#include "object.h"
#define ENTRY_UNKNOWN 0
#define ENTRY_OBJECT 1
#define ENTRY_CAMERA 2
#define ENTRY_LIGHT 3
typedef struct{
matrix mat;
prs prs;
float fov;
float near_clip;
float far_clip;
BOOL fog;
color fog_color;
float fog_start;
float fog_end;
}camera;
typedef struct{
prs prs;
color col;
float strenght;
}light;
typedef struct{
unsigned int id;
unsigned int entry_type;
void *entry;
}scene_entry;
typedef struct{
color ambient;
color background;
unsigned int object_count;
object **objects;
unsigned int camera_count;
camera *cameras;
unsigned int light_count;
light *lights;
unsigned int entry_count;
scene_entry *entries;
float start;
float end;
unsigned int controller_count;
controller **controllers;
}scene;
void set_camera(IDirect3DDevice9 *device, camera *cam);
scene *load_scene(IDirect3DDevice9 *device, char *filename);
void free_scene(scene *input);
void animate_scene(scene *input, float time);
void draw_scene(IDirect3DDevice9 *device, scene *input, int cam, BOOL clear);