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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
1 #include <stdio.h>
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
8 #include "car.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14 /* linda.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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
d7e0a5c33540 *** empty log message ***
gongo
parents: 46
diff changeset
17 #else
65
3e7db5ef4691 *** empty log message ***
gongo
parents: 58
diff changeset
18 #define linda_init 1
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
19 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
20
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
21 void
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
22 game_main()
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
23 {
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
30
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
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
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
34 break;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
35 }
90
8edae89a3877 compile on Mac OS X
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 65
diff changeset
36 schedule(game);
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
37
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
38 #ifdef LINDA
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
39 psx_sync_n();
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
40 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
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ルーチンに直す。