Mercurial > hg > old > magoroku_racing
annotate game.c @ 91:cb6c6de125dc
halfway
author | Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 26 May 2011 14:44:03 +0900 |
parents | 8edae89a3877 |
children | 0b65ca27f113 |
rev | line source |
---|---|
0 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
3 #include <stdbool.h> |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
4 //#include "libps2.h" |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
5 //#include "ps2util.h" |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
6 //#include "controler.h" |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
7 //#include "linda/lindaapi.h" |
0 | 8 #include "car.h" |
9 #include "game.h" | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
10 #include "schedule.h" |
0 | 11 |
12 /* controler.c */ | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
13 //extern Bool padCheck(); |
0 | 14 /* linda.c */ |
15 #ifdef LINDA | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
16 //extern int linda_init(); |
47 | 17 #else |
65 | 18 #define linda_init 1 |
0 | 19 #endif |
20 | |
21 void | |
22 game_main() | |
23 { | |
24 | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
25 Game *game; |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
26 bool flg = true; |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
27 #ifdef LINDA |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
28 game->play_id = linda_init(); |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
29 #endif |
0 | 30 |
9 | 31 while (1) { |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
32 flg = true;//padCheck(); |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
33 if (flg == false) { |
9 | 34 break; |
0 | 35 } |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
36 schedule(game); |
0 | 37 |
38 #ifdef LINDA | |
9 | 39 psx_sync_n(); |
0 | 40 #endif |
41 } | |
42 } | |
90
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
43 |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
44 |
8edae89a3877
compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents:
65
diff
changeset
|
45 //ceriumのmainルーチンに直す。 |