>// File: mazeserver.cpp
ackets.h" _, r* r! Y: J0 r7 v' n, `
>//------------------------------------------------------------------------------ u# c* {; L3 e/ n
> m_dwServerReliableRate = 15;# ?4 n* ?5 S: z, }0 `% Y1 S' u0 G
> m_ClientNetConfig.ubReliableRate = 15;# e1 \$ x. X n ]$ a1 b0 {. ?
> m_ClientNetConfig.dwThreadWait = 0;</P>( e1 K/ R. H/ k4 m1 N
> m_ClientNetConfig.ubClientPackIndex = 0;
>/ N: v; c* `0 N" S
aram"), E_FAIL );</P>
> // Grab height and width of maze
> m_ClientNetConfig.dwMazeWidth = m_dwWidth;
> // Validate size. Must be a power-of-2 times LOCK_GRID_SIZE. Compute the shifts.
> DWORD scale = m_dwWidth / LOCK_GRID_SIZE;
> scale = m_dwHeight / LOCK_GRID_SIZE;
> if( ((DWORD(LOCK_GRID_SIZE) << m_dwMazeXShift) != m_dwWidth) ||7 N) v ^, G. O4 V; u
> // Initialise the player list
> m_PlayerDatas[0].pNext = &m_PlayerDatas[1];" q0 s+ Y' n$ K/ P! ?( y
> // Initialise the cells
> return S_OK;! o' c8 G/ _! `2 x& E* S+ x
>
>
ockRange( DWORD x1, DWORD y1, DWORD x2, DWORD y2 )7 |" |! y8 ?* O$ E& ?0 [: z, ^
>8 E0 b% L j: h% D& j
>% A8 s2 m) n$ x4 g- \# W1 F; A2 n
ockCell( DWORD x, DWORD y ). U- V& u( I- Q; V* C
># ?# o! p0 o1 u
>* q7 Q$ z; J) K9 q' H
ockCellPair( DWORD x1, DWORD y1, DWORD x2, DWORD y2 ): C* g/ i. D+ z V8 I9 J5 e4 ^
> return;
> DWORD x1shift = x1>>m_dwMazeXShift;# Y! E j+ Y! h2 q4 a# X: N
> if( x1 == 0xffff )3 `/ B) K! S1 W5 \% O: D3 X
>
> return;" h7 \2 ^( F6 G5 \# C6 `: t
estroyPlayerData( PlayerData* pPlayerData )) ?# h) V/ [6 d1 {- t% T
isplayNextConnectionInfo()) {: d1 T: T9 S% ]
rintStats()
isplayConnectionInfo( DWORD dwID ), c) s% s7 Y% I0 L- z| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |