annotate linda.h @ 58:1cccf6d964b7

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 01:43:07 +0000
parents c875add6256e
children 74c59d9abde3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
1 /*
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
2 +-------+-------+-------+-----------+
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
3 | game | car | course| data |
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
4 | mode | id | id | (fmatrix) |
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
5 +-------+-------+-------+-----------+
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
6
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
7 mode : ゲームの状態(オープニング、車選択等)
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
8 car id : ユーザの選んだ車
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
9 course id : 走るコース(1Pのみ選択可能)
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
10 data : ユーザの車の状態(location、angle等)
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
11
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
12 ユーザのIDはLinda_IDで判断する
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
13 linda_seq[i]: ユーザID=i
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
14 */
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
15 #define PKT_MODE_OFFSET 0
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
16 #define PKT_CARID_OFFSET 4
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
17 #define PKT_COURSEID_OFFSET 8
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
18 #define PKT_DATA_OFFSET 12
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
19
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
20 #define PKT_HEADER_SIZE 12
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
21
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
22
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
23 #define CLIENT_MAX 2
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
24 #define LINDA_ASK_ID 65535
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
25 #define LINDA_HOST "firefly.cr.ie.u-ryukyu.ac.jp"
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
26
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
27 #define MODE_INIT 0
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
28 #define MODE_WAIT 1
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
29 #define MODE_WAIT_READY 2
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
30 #define MODE_OPENING 3
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
31 #define MODE_SELECT_CAR 4
46
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
32 #define MODE_SELECT_COURSE 5
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
33 #define MODE_READY 6
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
34 #define MODE_MAIN_INIT 7
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
35 #define MODE_MAIN 8
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
36 #define MODE_MAIN_PAUSE 9
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
37 #define MODE_MAIN_GOAL 10
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
38 #define MODE_MAIN_FINISH 11
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
39 #define MODE_FINISH 12
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
40
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
41
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
42 #define PLAYER_1P 1
abadcc080667 *** empty log message ***
gongo
parents: 44
diff changeset
43
58
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
44 static Bool linda_sche_wait0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
45 static Bool linda_sche_wait1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
46 static Bool linda_sche_wait_ready0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
47 static Bool linda_sche_wait_ready1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
48 static Bool linda_sche_opening0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
49 static Bool linda_sche_opening1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
50 static Bool linda_sche_select_car0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
51 static Bool linda_sche_select_car1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
52 static Bool linda_sche_select_course0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
53 static Bool linda_sche_select_course1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
54 static Bool linda_sche_ready0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
55 static Bool linda_sche_ready1(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
56 static Bool linda_sche_main0(int);
1cccf6d964b7 *** empty log message ***
gongo
parents: 52
diff changeset
57 static Bool linda_sche_main1(int);