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
|
|
61 SP_TABLE_MAX_NUM // spTableの最大数になるはず
|
122
|
62 };
|
|
63
|
125
|
64
|
|
65
|
116
|
66 //スプライトの優先順位らしい ?
|
|
67 #define SPRITE_PRIO_FOREGROUND 1
|
95
|
68
|
116
|
69 typedef struct SpriteTable {
|
119
|
70 // short dx;
|
|
71 // short dy;
|
116
|
72 short w;
|
|
73 short h;
|
|
74 short mx;
|
|
75 short my;
|
|
76 int color;
|
|
77 int page;
|
|
78 int tex_w;
|
|
79 int tex_h;
|
|
80 int *texture;
|
119
|
81 int tex_id; // for open gl
|
128
|
82
|
116
|
83 } SpriteTable;
|
115
|
84
|
0
|
85
|
95
|
86
|
116
|
87 // extern とってみたけど、なにか不都合ありますか?:miya
|
|
88 void gSprite_Init();
|
|
89 void gSprite_Draw_Reset();
|
124
|
90
|
130
|
91 void gSprite_PutSprite(bool ScreenPos,int number, int x, int y, int z);
|
|
92
|
128
|
93 void gSprite_PutSpriteEx(bool ScreenPos, int number, int x, int y, int z, float scalex, float scaley, float angle);
|
124
|
94
|
130
|
95
|
|
96 void gSprite_DefSprite(int number, const char *name, float w, float h, int color);
|
95
|
97
|
116
|
98 #endif
|
119
|
99
|
|
100 void flip();
|
124
|
101
|
|
102 // rootのポインターを返す
|
|
103 SceneGraphPtr getRootPtr( void );
|
128
|
104
|
|
105 /*
|
|
106 float get_cameraPos(int n);
|
|
107 n==0 retrun x
|
|
108 n==1 return y
|
|
109 n==2 return z
|
130
|
110 n==3 ?
|
128
|
111 */
|
|
112 float get_cameraPos( int n );
|
|
113
|
|
114 // 引数の座標にカメラが追従する
|
130
|
115 void set_cameraPos( FVECTOR, FVECTOR );
|
128
|
116
|
130
|
117 void gSprite_PutObject(int number,OBJECT *obj);
|
|
118
|
128
|
119
|
|
120 // Viewer *drootにxmlファイルを追加
|
|
121 void call_createFromXMLfile( char *filename );
|
|
122
|
|
123 // createScenGraphe()する
|
130
|
124 /*
|
128
|
125 OBJECT* call_createSceneGraph( char *filename );
|
|
126 OBJECT* call_createSceneGraph( void );
|
130
|
127 */
|
|
128
|
|
129 // テスト用関数
|
|
130 void cameraControl( void );
|