annotate game.cc @ 102:31b24eaf05cc

remove .o
author Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
date Thu, 02 Jun 2011 23:11:44 +0900
parents c534f339ee8b
children 68e6cc686f48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
1 /* game.c */
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
2
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
3 #include <stdio.h>
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
4 #include <stdlib.h>
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
5 #include <stdbool.h>
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
6 #include "libps2.h"
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
7 #include "ps2util.h"
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
8 #include "controler.h"
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
9 //#include "linda/lindaapi.h"
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
10 #include "game.h"
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11 #include "car.h"
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
12
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
13 #include "schedule.h"
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
15
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
16 /* linda.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
17 #ifdef LINDA
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
18 //extern int linda_init();
47
d7e0a5c33540 *** empty log message ***
gongo
parents: 46
diff changeset
19 #else
65
3e7db5ef4691 *** empty log message ***
gongo
parents: 58
diff changeset
20 #define linda_init 1
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
21 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
22
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
23 void game_main()
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
24 {
98
1033fece71ce text_vector
e085768
parents: 96
diff changeset
25 Game game;
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
26 bool flg = true;
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
27 #ifdef LINDA
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
28 game->play_id = linda_init();
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
29 #endif
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
30
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
31 while (1) {
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
32 flg = padCheck();
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
33
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
34 if (flg == false) {
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
35 break;
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
36 }
98
1033fece71ce text_vector
e085768
parents: 96
diff changeset
37 schedule(&game);
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
38
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
39 #ifdef LINDA
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
40 psx_sync_n();
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41 #endif
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
42 }
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
43 }
90
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ルーチンに直す。