116
|
1 #ifndef GSPRITE_H
|
|
2 #define GSPRITE_H
|
95
|
3
|
124
|
4 #include "Magoroku.h"
|
|
5
|
|
6 //+415.692169
|
126
|
7 #define TEST_Z_GRID -700 // とりあえず
|
124
|
8
|
130
|
9 // enum_SpriteNameの略
|
|
10 // 数値に意味が無いんだったら、普通に0から始めましょう
|
122
|
11 enum eSpName {
|
130
|
12 TITLE = 10,
|
|
13 SELECT = 17,
|
|
14 SP_METER = 23,
|
|
15 R_ARROW = 24,
|
|
16 L_ARROW = 25,
|
|
17 KM = 26, // Km/h
|
|
18 RAP = 27,
|
|
19 PLAYER_1 = 28,
|
|
20 PLAYER_2 = 29,
|
|
21
|
|
22 SELECT_CAR_1 = 51,
|
|
23 SELECT_CAR_2 = 52,
|
|
24 SELECT_CAR_3 = 53,
|
|
25
|
122
|
26 SELECT_CORSE_1 = 81,
|
128
|
27 SELECT_CORSE_2 = 82,
|
|
28
|
130
|
29 /*
|
|
30 CAR_ASURADA,
|
|
31 CAR_KART,
|
|
32 CAR_ASURADA_GSX,
|
|
33 CAR_KURUMA,
|
|
34 */
|
|
35 CHOICE_CAR, // プレイヤーが選択した車.
|
|
36
|
|
37 COURSE1_1,
|
|
38 COURSE1_2,
|
|
39 COURSE1_3,
|
|
40
|
|
41 COURSE2_1,
|
|
42 COURSE2_2,
|
|
43 COURSE2_3,
|
|
44
|
|
45 COURSE3_1,
|
|
46 COURSE3_2,
|
|
47 COURSE3_3,
|
|
48
|
|
49 COURSE4_1,
|
|
50 COURSE4_2,
|
|
51 COURSE4_3,
|
|
52
|
|
53 COURSE5_1,
|
|
54 COURSE5_2,
|
|
55 COURSE5_3,
|
|
56
|
|
57 COURSE6_1,
|
|
58 COURSE6_2,
|
|
59 COURSE6_3,
|
|
60
|
146
|
61 HIT_TEST,
|
|
62
|
|
63 SP_TABLE_MAX_NUM // spTableの最大数+1になるはず
|
122
|
64 };
|
|
65
|
125
|
66
|
|
67
|
116
|
68 //スプライトの優先順位らしい ?
|
|
69 #define SPRITE_PRIO_FOREGROUND 1
|
95
|
70
|
116
|
71 typedef struct SpriteTable {
|
119
|
72 // short dx;
|
|
73 // short dy;
|
116
|
74 short w;
|
|
75 short h;
|
|
76 short mx;
|
|
77 short my;
|
|
78 int color;
|
|
79 int page;
|
|
80 int tex_w;
|
|
81 int tex_h;
|
|
82 int *texture;
|
119
|
83 int tex_id; // for open gl
|
128
|
84
|
116
|
85 } SpriteTable;
|
115
|
86
|
0
|
87
|
95
|
88
|
116
|
89 // extern とってみたけど、なにか不都合ありますか?:miya
|
|
90 void gSprite_Init();
|
|
91 void gSprite_Draw_Reset();
|
124
|
92
|
130
|
93 void gSprite_PutSprite(bool ScreenPos,int number, int x, int y, int z);
|
|
94
|
128
|
95 void gSprite_PutSpriteEx(bool ScreenPos, int number, int x, int y, int z, float scalex, float scaley, float angle);
|
124
|
96
|
130
|
97
|
|
98 void gSprite_DefSprite(int number, const char *name, float w, float h, int color);
|
95
|
99
|
116
|
100 #endif
|
119
|
101
|
|
102 void flip();
|
124
|
103
|
|
104 // rootのポインターを返す
|
|
105 SceneGraphPtr getRootPtr( void );
|
128
|
106
|
|
107 /*
|
|
108 float get_cameraPos(int n);
|
|
109 n==0 retrun x
|
|
110 n==1 return y
|
|
111 n==2 return z
|
130
|
112 n==3 ?
|
128
|
113 */
|
|
114 float get_cameraPos( int n );
|
|
115
|
|
116 // 引数の座標にカメラが追従する
|
130
|
117 void set_cameraPos( FVECTOR, FVECTOR );
|
128
|
118
|
130
|
119 void gSprite_PutObject(int number,OBJECT *obj);
|
|
120
|
128
|
121
|
|
122 // Viewer *drootにxmlファイルを追加
|
|
123 void call_createFromXMLfile( char *filename );
|
|
124
|
|
125 // createScenGraphe()する
|
130
|
126 /*
|
128
|
127 OBJECT* call_createSceneGraph( char *filename );
|
|
128 OBJECT* call_createSceneGraph( void );
|
130
|
129 */
|
|
130
|
|
131 // テスト用関数
|
|
132 void cameraControl( void );
|