annotate linda.h @ 44:3b71b39411b1

*** empty log message ***
author gongo
date Wed, 08 Nov 2006 05:21:58 +0000
parents
children abadcc080667
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
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
32 #degine MODE_SELECT_COURSE 5
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
33 #degine MODE_READY 6
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
34 #degine MODE_MAIN_INIT 7
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
35 #degine MODE_MAIN 8
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
36 #degine MODE_MAIN_PAUSE 9
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
37 #degine MODE_MAIN_GOAL 10
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
38 #degine MODE_MAIN_FINISH 11
3b71b39411b1 *** empty log message ***
gongo
parents:
diff changeset
39 #degine MODE_FINISH 12