>// File: mazeserver.cpp" ^; S4 {9 S$ h6 s, i9 U' n
ackets.h"
>//-----------------------------------------------------------------------------3 F ^- a$ H% O1 e4 s; i8 t
> m_dwServerReliableRate = 15;! _* v) s* l' ~5 ^
> m_ClientNetConfig.ubReliableRate = 15;, }3 H1 U9 P/ X
> m_ClientNetConfig.dwThreadWait = 0;</P>
> m_ClientNetConfig.ubClientPackIndex = 0;
>
aram"), E_FAIL );</P>( F1 L6 m- r$ [, A! x. a
> // Grab height and width of maze
> m_ClientNetConfig.dwMazeWidth = m_dwWidth;) A+ E& w4 R" N. e( J$ U. J
> // Validate size. Must be a power-of-2 times LOCK_GRID_SIZE. Compute the shifts.
> DWORD scale = m_dwWidth / LOCK_GRID_SIZE;# R# K) `2 x0 y& f8 O! s
> scale = m_dwHeight / LOCK_GRID_SIZE;
> if( ((DWORD(LOCK_GRID_SIZE) << m_dwMazeXShift) != m_dwWidth) ||" m$ [- Q3 @* [) Y- p
> // Initialise the player list2 @7 L. A1 r9 |. P& h+ E8 W. d
> m_PlayerDatas[0].pNext = &m_PlayerDatas[1];
> // Initialise the cells
> return S_OK;
>5 ]' [8 V' T; I+ z; G& S- p2 _
>
ockRange( DWORD x1, DWORD y1, DWORD x2, DWORD y2 )
>
>- C# U1 u m* R+ }1 b5 W6 z# Y
ockCell( DWORD x, DWORD y )
>
>/ }( t; b+ @1 q/ K# Y
ockCellPair( DWORD x1, DWORD y1, DWORD x2, DWORD y2 )+ c% w1 E$ f3 r Z! B% j+ ^5 R8 F! p& K
> return;
> DWORD x1shift = x1>>m_dwMazeXShift;2 B5 V9 ?' X# ?6 i* v" W# E
> if( x1 == 0xffff ), J) \6 J! d9 f2 m5 ~
>
> return;* _# I2 n$ ^5 F2 m& K, |; U
estroyPlayerData( PlayerData* pPlayerData )
isplayNextConnectionInfo()
rintStats()! P8 S$ G, P# r; h
isplayConnectionInfo( DWORD dwID ) Z! j3 U$ @8 H| 欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) | Powered by Discuz! X2.5 |