Mercurial > hg > old > magoroku_racing
annotate car.h @ 110:8a525ec378fc
bool.h change stdbool.h
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 09 Jun 2011 01:45:25 +0900 |
parents | 165b4d902ca4 |
children | 31dd5c07f7c1 |
rev | line source |
---|---|
96
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
1 /* car.h */ |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
2 |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
3 #ifndef CAR_H |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
4 #define CAR_H |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
5 |
91 | 6 #include "libps2.h" |
110
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
7 //#include "game.h" |
91 | 8 |
0 | 9 typedef struct car { |
96
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
10 FVECTOR direction; // 向き |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
11 FVECTOR vertical; // |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
12 FVECTOR location; // 位置 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
13 float speed; // 速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
14 float speed_accel; // 加速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
15 float speed_max; // 最高速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
16 float brake; // ブレーキ |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
17 float rotation_angle; // 回転度数 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
18 float y_angle; // 角度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
19 void *free_addr; |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
20 struct car *next; |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
21 OBJECT* body; |
0 | 22 } Car, *CarPtr; |
43 | 23 |
109
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
24 /* |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
25 game.h から |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
26 相互に読み込むのを禁止するために移動 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
27 */ |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
28 typedef struct game { |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
29 CarPtr jiki; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
30 int course_id; // コースID |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
31 int car_id; // 自機ID |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
32 int camera_type; // カメラのタイプ |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
33 int play_id; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
34 int rap; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
35 } Game, *GamePtr; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
36 |
110
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
37 //extern Game *game; |
109
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
38 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
39 |
96
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
40 CarPtr car_init(int id); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
41 void car_accelerate(CarPtr, int); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
42 void car_swerve(CarPtr, int); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
43 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
44 // ここで宣言したらgame.hと相互にincludeしちゃうからschedule.hのほうに書いてしまいました |
110
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
45 extern void car_update( Game*, CarPtr ); |
109
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
46 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
47 |
110
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
48 //自作関数 |
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
49 void car_id_update(Game*, CarPtr ); |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
50 |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
51 #endif |