91
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
1 #ifndef LIBPS2_H
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
2 #define LIBPS2_H
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
3
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
4 //dummy file
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
5
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
6 typedef float FVECTOR[4] __attribute__((aligned (16)));
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
7 typedef float FMATRIX[4][4] __attribute__((aligned (16)));
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
8
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
9
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
10 //object.h よりコピー
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
11 typedef struct texture {
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
12 int width; // texture's width size
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
13 int height; // texture's height size
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
14 char *name; // texture's name
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
15 // TexEnv *texenv;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
16 char *free_texenv; // pointer for free texenv
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
17 char *free_image; // pointer for free actual image data
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
18 // struct ps2_image g_img; // this struct must not be alignmented by 128bit
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
19 } TEXTURE;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
20
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
21
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
22 //また object.h よりコピー
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
23 typedef struct surface {
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
24 int size;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
25 char *surf_name; // object's surface name
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
26 char *tex_name; // surface's texture name
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
27 TEXTURE *texture; // pointer of this surface's texture
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
28 // ps2_giftag giftag; // own GIFtag data
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
29 // ps2_dmatag *packet; // pointer of actual object data
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
30 char *free_packet; // pointer for free object data
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
31 struct surface *next;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
32 } SURFACE;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
33
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
34
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
35 //またまた object.h よりコピー
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
36 typedef struct object {
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
37 FVECTOR xyz; // position
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
38 FVECTOR angle; // angle
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
39 FMATRIX transfer; // transfer matrix
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
40 char *name; // object's name
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
41 char *free_me; // pointer for free myself
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
42 SURFACE *surfaces;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
43 } OBJECT;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
44
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
45
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
46 /*
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
47 構造体 PolygonInfo が見当たらないので自作
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
48 作りは適当
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
49 */
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
50 typedef struct popygon {
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
51 int siz;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
52 FVECTOR pnts;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
53 } PolygonInfo;
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
54
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
55
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
56 extern int malloc_align16(void *head, void *aligned, int size);
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
57
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
58
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
59
|
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
diff
changeset
|
60 #endif
|