###################################
reachable:
can reach:
cannot reach:
building:
static building:
-------------cannot reach
-------------can reach
dynamic building:
-------------have==>cannot reach
-------------have==>can reach
############File storage format
maxsize:512*512
back_pic
pullback: cannot arrive grid
pullback_grid_type: 1 BYTE
type ----:BYTE 00000000----[coltype:1 | rawtype:1 | xxx:6]
pullback_items: 4 BYTE *n
col ----:BYTE coltype==0{0~255}|coltype==1{256~512}
raw ----:BYTE rawtype==0{0~255}|rawtype==1{256~512}
col_n ----:BYTE max_col_len = col_n
raw_n ----:BYTE max_raw_len = raw_n
static_one_item: 4 BYTE
id ----:BYTE static_item_id{0~255}
col ----:BYTE coltype==0{0~255}|coltype==1{256~512}
raw ----:BYTE rawtype==0{0~255}|rawtype==1{256~512}
type ----:BYTE 00000000----[coltype:1 | rawtype:1 | idtype:2 | gridtype:4]
reach_type--:BYTE 00000000----[reach:1 | across:2 | xxxxx:5]
static_area_item: 6 BYTE
id ----:BYTE static_item_id{0~255}
col ----:BYTE coltype==0{0~255}|coltype==1{256~512}
raw ----:BYTE rawtype==0{0~255}|rawtype==1{256~512}
col_n ----:BYTE max_col_len = col+col_len[gridtype]*col_n
raw_n ----:BYTE max_raw_len = raw+raw_len[girdtype]*raw_n
type ----:BYTE 00000000----[coltype:1 | rawtype:1 | idtype:2 | gridtype:4]
reach_type--:BYTE 00000000----[reach:1 | across:2 | xxxxx:5]
//dynamic_one_item: 4 BYTE
// id ----:BYTE dynamic_item_id{0~255}
// col ----:BYTE coltype==0{0~255}|coltype==1{256~512}
// raw ----:BYTE rawtype==0{0~255}|rawtype==1{256~512}
// type ----:BYTE 00000000----[coltype:1 | rawtype:1 | idtype:2 | gridtype:4]
// reach_type--:BYTE 00000000----[reach:1 | across:2 | xxxxx:5]
//dynamic_area_item: 6 BYTE
// id ----:BYTE dynamic_item_id{0~255}
// col ----:BYTE coltype==0{0~255}|coltype==1{256~512}
// raw ----:BYTE rawtype==0{0~255}|rawtype==1{256~512}
// col_n ----:BYTE max_col_len = col+col_len[gridtype]*col_n
// raw_n ----:BYTE max_raw_len = raw+raw_len[girdtype]*raw_n
// type ----:BYTE 00000000----[coltype:1 | rawtype:1 | idtype:2 | gridtype:4]
// reach_type--:BYTE 00000000----[reach:1 | across:2 | xxxxx:5]
###################Run Mem Storage Data
512*512=262144---->256K
256*256=65536----->64K
##Server Mem
grid_data:
reach:BYTE 00000000----[ static_canreach:1 | dynamic_canreach:1 | static_item:1 | dyn_item:1 ]
##Client Mem
grid_data:
reach:BYTE 00000000----[ static_canreach:1 | dynamic_canreach:1 | static_item:1 | dyn_item:1 ]
down_ly:----change canreach
//static_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
//dyn_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
up_ly:----no change canreach
//static_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
//dyn_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
ins_ly:----change canreach
static_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
dyn_grid:BYTE 00000000----[ gridtype:4 | gridpart:4 ]
#######################Pre Define Type
across type:--------client display use
00: down layer
01: ins layer----draw deapth
11: up layer
gridtype:
1-->0x00 1*1
2-->0x01 1*4
3-->0x02 1*6
4-->0x03 2*2
5-->0x04 2*4
6-->0x05 2*6
7-->0x06 4*1
8-->0x07 4*2
9-->0x08 4*4
10-->0x09 4*6
11-->0x0a 6*1
12-->0x0b 6*2
13-->0x0c 6*4
14-->0x0d 6*6
15-->0x0e 6*8
16-->0x0f 8*8
gridpart:
0000----0------空
0001----1------left_top
0010----2------right_top
0011----3------left_down
0100----4------right_down
0101----5------left
0110----6------right
0111----7------top
1000----8------down
1001----9------center
1010----10-----1*1