0
|
1 #ifndef OBJECT_H
|
|
2 #define OBJECT_H
|
|
3
|
|
4
|
|
5 typedef float FVECTOR[4];
|
|
6 typedef float FMATRIX[4][4];
|
|
7
|
|
8 typedef struct width_height{
|
|
9 short w;
|
|
10 short h;
|
|
11 } WX;;
|
|
12
|
|
13 typedef struct surface {
|
|
14 int size;
|
|
15 char *name;
|
|
16 char *parent_name;
|
|
17 short w;
|
|
18 short h;
|
|
19 FVECTOR *data[4];
|
|
20 FVECTOR xyz;
|
|
21 FVECTOR angle;
|
|
22 int *texture; // pointer of this surface's texture
|
|
23 char *image_name;
|
|
24 struct surface *next;
|
|
25 struct surface *child;
|
|
26 struct surface *parent;
|
|
27 struct surface *brother;
|
|
28 } SURFACE;
|
|
29
|
|
30 typedef struct object {
|
|
31 FVECTOR xyz; // position
|
|
32 FVECTOR angle; // angle
|
|
33 FMATRIX transfer; // transfer matrix
|
|
34 char *name; // object's name
|
|
35 char *free_me; // pointer for free myself
|
|
36 SURFACE *surfaces;
|
|
37 } OBJECT;
|
|
38
|
|
39 void init_object(OBJECT *obj);
|
|
40 void free_object(OBJECT *obj);
|
|
41
|
|
42 extern OBJECT *font;
|
|
43 extern OBJECT *chara;
|
|
44 extern OBJECT *effect;
|
|
45 extern OBJECT *boss;
|
|
46
|
|
47 #endif
|