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