0
|
1 /*
|
|
2 * $Id$
|
|
3 */
|
|
4
|
|
5 #include <stdio.h>
|
|
6 #include <stdlib.h>
|
|
7 #include "libps2.h"
|
|
8 #include "ps2util.h"
|
|
9 #include "controler.h"
|
|
10 #include "lindaapi.h"
|
|
11 #include "car.h"
|
|
12 #include "game.h"
|
|
13
|
|
14 /* schedule.c */
|
|
15 extern void schedule();
|
|
16 /* controler.c */
|
|
17 extern Bool padCheck();
|
|
18 /* linda.c */
|
|
19 #ifdef LINDA
|
|
20 extern int linda_init();
|
47
|
21 #else
|
55
|
22 #define linda_init linda_init0
|
0
|
23 #endif
|
|
24
|
|
25 Game game;
|
|
26
|
9
|
27 extern void sche_game_init();
|
21
|
28 extern void set_schedule(void*);
|
9
|
29
|
46
|
30 static Bool
|
|
31 ret()
|
|
32 {
|
|
33 return TRUE;
|
|
34 }
|
|
35
|
|
36 static int
|
47
|
37 linda_init0()
|
46
|
38 {
|
|
39 game.linda_exec = &ret;
|
|
40 return 1;
|
|
41 }
|
|
42
|
0
|
43 void
|
|
44 game_main()
|
|
45 {
|
|
46 Bool flg = TRUE;
|
21
|
47 set_schedule(sche_game_init);
|
0
|
48
|
|
49 game.play_id = linda_init();
|
|
50
|
9
|
51 while (1) {
|
0
|
52 flg = padCheck();
|
9
|
53 if (flg == FALSE) {
|
|
54 break;
|
0
|
55 }
|
|
56 schedule();
|
|
57
|
|
58 #ifdef LINDA
|
9
|
59 psx_sync_n();
|
0
|
60 #endif
|
|
61 }
|
|
62 }
|