Mercurial > hg > old > magoroku_racing
comparison game.c @ 0:0fae5658fb0b
Initial revision
author | gongo |
---|---|
date | Thu, 02 Nov 2006 08:55:19 +0000 |
parents | |
children | b6a1385f19be |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0fae5658fb0b |
---|---|
1 /* | |
2 * $Id$ | |
3 */ | |
4 | |
5 #include <stdio.h> | |
6 #include <stdlib.h> | |
7 #include "libps2.h" | |
8 #include "ps2util.h" | |
9 | |
10 #include "camera.h" | |
11 #include "controler.h" | |
12 #include "lindaapi.h" | |
13 #include "col.h" | |
14 #include "field.h" | |
15 #include "car.h" | |
16 #include "game.h" | |
17 #include "gSprite.h" | |
18 #include "gFont.h" | |
19 | |
20 /* schedule.c */ | |
21 extern void schedule(); | |
22 /* controler.c */ | |
23 extern Bool padCheck(); | |
24 /* linda.c */ | |
25 #ifdef LINDA | |
26 extern int linda_init(); | |
27 #else | |
28 #define linda_init() 1 | |
29 #endif | |
30 extern void linda_update(); | |
31 | |
32 Game game; | |
33 | |
34 void | |
35 game_main() | |
36 { | |
37 Bool flg = TRUE; | |
38 game.state = GAME_INIT; | |
39 | |
40 game.play_id = linda_init(); | |
41 | |
42 while (flg) { | |
43 flg = padCheck(); | |
44 if (flg == FALSE && game.demo_flg == 1) { | |
45 game.state = GAME_FINISH; | |
46 flg = TRUE; | |
47 } | |
48 schedule(); | |
49 | |
50 #ifdef LINDA | |
51 if (game.demo_flg == 0) { | |
52 linda_update(); | |
53 psx_sync_n(); | |
54 } | |
55 #endif | |
56 } | |
57 } |