0
|
1 #ifndef SGOEX_H
|
|
2 #define SGOEX_H
|
|
3 #include <SDL.h>
|
|
4
|
|
5
|
|
6 #define DEFOBJ 320 // sprite definition max num
|
|
7 #define MAXOBJ 320 // sprite drawing max num
|
|
8 #define BOOL char // define bool
|
|
9 #define TRUE 1 // TRUE value
|
|
10 #define FALSE 0 // FALSE value
|
|
11
|
|
12 /*PS2_PAD*/
|
|
13 #define PS2_CROSS 0
|
|
14 #define PS2_CIRCLE 1
|
|
15 #define PS2_SQUARE 2
|
|
16 #define PS2_TRIANGLE 3
|
|
17 #define PS2_L1 4
|
|
18 #define PS2_R1 5
|
|
19 #define PS2_L2 6
|
|
20 #define PS2_R2 7
|
|
21 #define PS2_START 8
|
|
22 #define PS2_SELECT 9
|
|
23 #define PS2_L3 10
|
|
24 #define PS2_R3 11
|
|
25
|
|
26 /*PS3_PAD*/
|
|
27 /*
|
|
28 #define PS2_CROSS 14
|
|
29 #define PS2_CIRCLE 13
|
|
30 #define PS2_SQUARE 15
|
|
31 #define PS2_TRIANGLE 12
|
|
32 #define PS2_L1 10
|
|
33 #define PS2_R1 11
|
|
34 #define PS2_L2 8
|
|
35 #define PS2_R2 9
|
|
36 #define PS2_START 3
|
|
37 #define PS2_SELECT 0
|
|
38 #define PS2_L3 1
|
|
39 #define PS2_R3 2
|
|
40 */
|
|
41
|
|
42 typedef struct SGO_PAD {
|
|
43 short up;
|
|
44 short down;
|
|
45 short right;
|
|
46 short left;
|
|
47 short k0;
|
|
48 short k1;
|
|
49 short k3;
|
|
50 short k4;
|
|
51 short r1;
|
|
52 short r2;
|
|
53 short r3;
|
|
54 short l1;
|
|
55 short l2;
|
|
56 short l3;
|
|
57 short se;
|
|
58 short st;
|
|
59
|
|
60 // 勝手に付けた
|
|
61 short quit;
|
|
62 } SGO_PAD;
|
|
63
|
|
64 typedef struct SpriteView {
|
|
65 int x;
|
|
66 int y;
|
|
67 BOOL extend;
|
|
68 short scalex;
|
|
69 short scaley;
|
|
70 long rotate;
|
|
71 int no;
|
|
72 } SpriteView;
|
|
73
|
|
74 typedef struct SpriteTable {
|
|
75 short dx;
|
|
76 short dy;
|
|
77 short w;
|
|
78 short h;
|
|
79 short mx;
|
|
80 short my;
|
|
81 int color;
|
|
82 int page;
|
|
83 int tex_w;
|
|
84 int tex_h;
|
|
85 int *texture;
|
|
86 } SpriteTable;
|
|
87
|
|
88 //extern GsSPRITE sprite[MAXOBJ];
|
|
89 extern SpriteTable sptable[DEFOBJ];
|
|
90
|
|
91
|
|
92 void PutSprite(int zorder, short x, short y, int number);
|
|
93 void DefSprite(int number, const char *name, float w, float h, int color, OBJECT *obj);
|
|
94 void DefSpriteEx(int number, short middlex, short middley);
|
|
95 void PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle);
|
|
96
|
|
97
|
|
98 /* Joypad - Below member are implemented in sgoex_ps2.c */
|
|
99 extern SGO_PAD pad[2];
|
|
100 void Pad(SDL_Joystick *joy);
|
|
101
|
|
102 void keybord();
|
|
103
|
|
104 #endif // SGOEX_H
|