annotate game.c @ 9:2fdac80d03ae

*** empty log message ***
author gongo
date Sat, 04 Nov 2006 08:35:41 +0000
parents b6a1385f19be
children 41d3037c34c8
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
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
10 #include "camera.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11 #include "controler.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
12 #include "lindaapi.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
13 #include "col.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14 #include "field.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
15 #include "car.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
16 #include "game.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
17 #include "gSprite.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
18 #include "gFont.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
19
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
20 /* schedule.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
21 extern void schedule();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
22 /* controler.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
23 extern Bool padCheck();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
24 /* linda.c */
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
25 #ifdef LINDA
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
26 extern int linda_init();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
27 #else
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
28 #define linda_init() 1
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
29 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
30 extern void linda_update();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
31
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
32 Game game;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
33
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
34 extern void sche_game_init();
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
35 game.exec = sche_game_init;
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
36
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
37 void
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
38 game_main()
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
39 {
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
40 Bool flg = TRUE;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41 game.state = GAME_INIT;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
42
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
43 game.play_id = linda_init();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
44
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
45 while (1) {
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
46 flg = padCheck();
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
47 if (flg == FALSE) {
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
48 break;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
49 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
50 schedule();
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
51
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
52 #ifdef LINDA
9
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
53 linda_update();
2fdac80d03ae *** empty log message ***
gongo
parents: 2
diff changeset
54 psx_sync_n();
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
55 #endif
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
56 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
57 }