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 PutSprite(int zorder, short x, short y, int number);
|
|
89 void DefSprite(int number, char *name, float w, float h, int color, OBJECT *obj);
|
|
90 void DefSpriteEx(int number, short middlex, short middley);
|
|
91 void PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle);
|
|
92
|
|
93
|
|
94 /* Joypad - Below member are implemented in sgoex_ps2.c */
|
|
95 extern SGO_PAD pad[2];
|
|
96 void Pad();
|
|
97 void keybord();
|