Mercurial > hg > old > magoroku_racing
annotate car.h @ 153:0a375e9c4288 gongo tip
close
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 30 Jul 2011 14:45:21 +0900 |
parents | 4f50f5a3b363 |
children |
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 { |
130 | 10 |
96
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
11 FVECTOR direction; // 向き |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
12 FVECTOR vertical; // |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
13 FVECTOR location; // 位置 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
14 float speed; // 速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
15 float speed_accel; // 加速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
16 float speed_max; // 最高速度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
17 float brake; // ブレーキ |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
18 float rotation_angle; // 回転度数 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
19 float y_angle; // 角度 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
20 void *free_addr; |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
21 struct car *next; |
128 | 22 |
23 OBJECT* body; // | |
24 | |
0 | 25 } Car, *CarPtr; |
43 | 26 |
109
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 game.h から |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
29 相互に読み込むのを禁止するために移動 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
30 */ |
115 | 31 /* |
109
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
32 typedef struct game { |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
33 CarPtr jiki; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
34 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
|
35 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
|
36 int camera_type; // カメラのタイプ |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
37 int play_id; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
38 int rap; |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
39 } Game, *GamePtr; |
115 | 40 */ |
110
8a525ec378fc
bool.h change stdbool.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
109
diff
changeset
|
41 //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
|
42 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
43 |
96
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
44 CarPtr car_init(int id); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
45 void car_accelerate(CarPtr, int); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
46 void car_swerve(CarPtr, int); |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
47 |
0b65ca27f113
compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
91
diff
changeset
|
48 // ここで宣言したらgame.hと相互にincludeしちゃうからschedule.hのほうに書いてしまいました |
115 | 49 //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
|
50 |
165b4d902ca4
Error is corrected game.h and car.h
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
97
diff
changeset
|
51 |
115 | 52 //game.hに既存? //自作関数 |
53 //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
|
54 |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
88
diff
changeset
|
55 #endif |