annotate game.c @ 71:79b5720a09ae

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 04:31:25 +0000
parents 3e7db5ef4691
children 8edae89a3877
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
1 /*
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
2 * $Id$
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
3 */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
4
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
5 #include <stdio.h>
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
6 #include <stdlib.h>
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
7 #include "libps2.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
8 #include "ps2util.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
9 #include "controler.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
10 #include "lindaapi.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11 #include "car.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
12 #include "game.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
13
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14 /* schedule.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
15 extern void schedule();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
16 /* controler.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
17 extern Bool padCheck();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
18 /* linda.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
19 #ifdef LINDA
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
20 extern int linda_init();
47
d7e0a5c33540 *** empty log message ***
gongo
parents: 46
diff changeset
21 #else
65
3e7db5ef4691 *** empty log message ***
gongo
parents: 58
diff changeset
22 #define linda_init 1
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
23 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
24
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
25 Game game;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
26
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
27 void
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
28 game_main()
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
29 {
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
30 Bool flg = TRUE;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
31
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
32 game.play_id = linda_init();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
33
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
34 while (1) {
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
35 flg = padCheck();
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
36 if (flg == FALSE) {
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
37 break;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
38 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
39 schedule();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
40
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41 #ifdef LINDA
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
42 psx_sync_n();
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
43 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
44 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
45 }