annotate sgoex.h @ 0:01387a2e419e

initial version
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 07 Dec 2010 15:39:45 +0900
parents
children 6541f0bebb81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define DEFOBJ 320 // sprite definition max num
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 #define MAXOBJ 320 // sprite drawing max num
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #define BOOL char // define bool
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #define TRUE 1 // TRUE value
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #define FALSE 0 // FALSE value
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 /*PS2_PAD*/
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #define PS2_CROSS 0
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #define PS2_CIRCLE 1
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 #define PS2_SQUARE 2
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 #define PS2_TRIANGLE 3
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #define PS2_L1 4
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #define PS2_R1 5
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 #define PS2_L2 6
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 #define PS2_R2 7
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 #define PS2_START 8
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 #define PS2_SELECT 9
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 #define PS2_L3 10
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 #define PS2_R3 11
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 /*PS3_PAD*/
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 /*
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 #define PS2_CROSS 14
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 #define PS2_CIRCLE 13
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #define PS2_SQUARE 15
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 #define PS2_TRIANGLE 12
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 #define PS2_L1 10
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 #define PS2_R1 11
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 #define PS2_L2 8
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 #define PS2_R2 9
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 #define PS2_START 3
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 #define PS2_SELECT 0
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 #define PS2_L3 1
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 #define PS2_R3 2
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 */
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 typedef struct SGO_PAD {
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 short up;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 short down;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 short right;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 short left;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 short k0;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 short k1;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 short k3;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 short k4;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 short r1;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 short r2;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 short r3;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 short l1;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 short l2;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 short l3;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 short se;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 short st;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 // 勝手に付けた
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 short quit;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 } SGO_PAD;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 typedef struct SpriteView {
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 int x;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 int y;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 BOOL extend;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 short scalex;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 short scaley;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 long rotate;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 int no;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 } SpriteView;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 typedef struct SpriteTable {
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 short dx;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 short dy;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 short w;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 short h;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 short mx;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 short my;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 int color;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 int page;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 int tex_w;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 int tex_h;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 int *texture;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 } SpriteTable;
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84 //extern GsSPRITE sprite[MAXOBJ];
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 extern SpriteTable sptable[DEFOBJ];
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 void Ginit();
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 void Gfinish(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 void Gdraw(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 void *init_png(char *png_file);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 void PutSprite(int zorder, short x, short y, int number);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 //void PutSprite();
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 void DefSprite(int number, char *name, float w, float h, int color, OBJECT *obj);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 void DefSpriteEx(int number, short middlex, short middley);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 void sound_init(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 void view_init(int p);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 void view_move(int x, int y, int z, int rx, int ry, int rz);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 void model_init(int model_no, unsigned long *dop, int m1_x, int m1_y,
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 int m1_z, int m2_x, int m2_y, int m2_z);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 char xml_model_init(int model_no, void *template_obj, int m1_x, int m1_y,
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 int m1_z, int m2_x, int m2_y, int m2_z);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 void m2move(int model_no, int x, int y, int z, int rx, int ry, int rz);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 void PutPolygon(int number);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 void PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 //void PutSpriteEx(int zorder, short scalex, short scaley, long rotate);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 void sgoex_ps2_Set_camera(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 void sgoex_ps2_Put_sprite(int num, float x, float y);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110 char sgoex_ps2_Create_sprites(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 char sgoex_ps2_Init_xmlCube(char *redCube_file,
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 char *blueCube_file,
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 char *greenCube_file, char *yellowCube_file);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 char sgoex_ps2_Init_xmlFloor(char *file_name);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 void *sgoex_ps2_Get_redCube(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 void *sgoex_ps2_Get_blueCube(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 void *sgoex_ps2_Get_greenCube(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 void *sgoex_ps2_Get_yellowCube(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 void *sgoex_ps2_Get_xmlFloor(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 void xml_floor_Finish(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 /* Joypad - Below member are implemented in sgoex_ps2.c */
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 extern SGO_PAD pad[2];
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 //void Pad(void);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126 void Pad();
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 void keybord();
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128 //void Pad1(SGO_PAD * padls);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 //void Pad2(SGO_PAD * padls);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 //void GsSortBoxFill(GsBOXF * bp, GsOT * otp, unsigned int pri);
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 /* dummies */
01387a2e419e initial version
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 // void init_tim( int tim_addr );