飞飞世界论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 18587|回复: 0
打印 上一主题 下一主题

自动饮血和登录视频

[复制链接]

197

主题

203

帖子

1086

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1086
QQ
跳转到指定楼层
楼主
发表于 2016-1-10 03:46:41 | 只看该作者 回帖奖励 |正序浏览 |阅读模式
食品车:
+ r+ j& Z( G0 E: Q  E+ a: |6 o尾翼:$ k( U7 F+ r6 d% o( T2 [/ @2 k% n

4 Q3 J5 u0 \6 ?" b8 Y代码:0 U/ c% @* A4 x6 R6 G
CWndAutoFood::CWndAutoFood()/ f: X4 S* n( O0 |; N( V3 }+ ]# B4 n
{
5 |) f- F" h8 Z. k2 p  V/ g( m  m        m_pItemElem = NULL;) V0 ]+ d/ H* o5 q/ ?: N7 V
        m_pTexture = NULL;
# }6 H) G* U3 U" ?        bStart = FALSE;4 q# X( X8 E. \8 R9 @
}% @' L+ [, T8 M* ?& \
1 T- S( P6 T6 O6 |( B* u
CWndAutoFood::~CWndAutoFood()
$ m( J! N6 }/ R* P3 g8 v{- l: H1 c6 F- f& O. K
        AfxMessageBox( "AutoFood ist gestorben " );  s2 ^" L9 D/ s, ]' K
}
8 P  W1 w$ G6 [  J" L7 RBOOL CWndAutoFood::Initialize( CWndBase* pWndParent, DWORD nType )
, `1 D8 a6 N, z4 @: P7 I9 v8 u+ Z' m% h{$ u4 l- j; m2 g( T3 Q- ]8 n1 k+ c
        return InitDialog( g_Neuz.GetSafeHwnd(), APP_AUTOFEED, WBS_MODAL, CPoint( 0, 0 ), pWndParent );
  N3 G2 [9 n" _/ d4 s( r6 c2 H}
" U+ B1 p% u# E- _" Y' [; J
3 f3 ~3 L; w3 O( dBOOL CWndAutoFood::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )! _* B& i& q, P; A/ ]
{- p+ a- ^* b$ `4 a6 Q3 o) E( B' N
        LPWNDCTRL pWndCtrl = GetWndCtrl( WIDC_CUSTOM1 );: P8 d7 |$ f6 z/ D, g
        CRect rect = pWndCtrl->rect;
3 w  z5 y% B2 \( W        if( rect && rect.PtInRect( point ) )
5 F" a# k3 T: B) X/ C( E        {' Z' M9 b  [) Z  ^$ b+ R4 q* _1 V
                CItemElem *pItemElem = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );' U, f1 R& \; Y2 f
                if( pItemElem && pItemElem->GetProp() && pItemElem->GetProp()->dwItemKind2 == IK2_FOOD )
+ j/ t+ i2 q7 ?4 r                {$ t& ^+ O+ V, V4 V
                        if( m_pItemElem )
4 P5 D! u4 f+ p) G                        {
& y- a/ j$ e2 F' `  N3 t- q6 U                                m_pItemElem = NULL;  S. T3 ?) [, \
                        }
, {( O) S$ e1 i7 o- c                        m_pItemElem = pItemElem;! N: S) a0 }7 |* i/ Q
                        m_pTexture = CWndBase::m_textureMng.AddTexture( D3DDEVICE, MakePath( DIR_ITEM, m_pItemElem->GetProp()->szIcon ), 0xffff00ff );" n8 G  B# O! F5 {# a0 |
                }else{3 N6 {  ?: @! W# E' ^: x7 i4 I
                        SetForbid( TRUE );, @$ k1 a3 A: h
                }3 j' ^4 F2 g' H  e  q6 w5 T+ C* j) f
        }else{
2 b: [* D' {; ]9 M                SetForbid( TRUE );! V% u6 n; a: K' i
        }' o* y8 n9 ]7 F& n* Z' m- M% R
        return TRUE;
$ H! y; v; ^# f}, k+ k8 t6 x* H* x: Z; o1 M0 L
5 N% y5 |% u1 y& t5 [; n
BOOL CWndAutoFood::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )4 ]4 R7 `* G7 A0 l* ?5 F, p9 l
{6 o) D7 j* i. z( K+ N
        switch( nID )- |* k: q: @4 }, g) Q" W- ^' d
        {
0 r3 Z( e4 g9 U! U3 n        case WIDC_BUTTON3:/ z+ z* z% ?0 J, h
                {7 F+ m1 q* Y2 p+ K6 h
                        bStart = TRUE;3 C- ]3 ~8 Z/ l7 A- Z* q8 p
                        break;9 }& Y. L, m: L5 q3 ?9 H4 D
                }
6 s0 B6 H  K9 L4 f, {8 `        case WIDC_BUTTON4:' u- Z7 z# {4 U4 M- x
                {
' U; A" I5 |# B7 O6 R0 g                        bStart = FALSE;2 V3 x; M2 F* B2 M
                        break;
" G3 E4 g% k5 [: |                }+ W- |$ _8 q  M% u& a/ M* x
        }% J! y$ A( P' M: |
        return CWndNeuz::OnChildNotify( message, nID, pLResult );
9 k8 L, Q) B2 s9 Y9 c( l$ v}       
! q: C; }) J1 o6 E) `( M6 B" wvoid CWndAutoFood::OnDraw( C2DRender* p2DRender )
, U, `, V  l" L" p3 a  E{
: s1 M% q+ R  ?8 Z* U        CWndButton* pBtn = (CWndButton*)GetDlgItem( WIDC_BUTTON3 );
, n- o  w/ b! U/ M! p  j        if( bStart || !m_pItemElem )4 U4 h, p* H( r
        {
0 k2 F8 A% A5 ^) V' X: O: V9 J                pBtn->EnableWindow( FALSE );# e) ~5 k  b* A
        }else# {  P1 ]* \; U" q
                pBtn->EnableWindow( TRUE );: j* e4 [/ g7 u, ~
        if( m_pTexture )+ F! \3 }4 `& G, p+ r$ x7 p
        {
( S1 O8 }, i5 g, x                LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_CUSTOM1 );, k3 r. M- H4 e. c/ U" S1 @
                if( wndCtrl && wndCtrl->rect )
, Y/ h% U* }8 ?                {6 A. J1 N. Y8 J: Q
                        m_pTexture->Render( p2DRender, CPoint( wndCtrl->rect.left, wndCtrl->rect.top ) );
5 i/ C! u( G5 S                }
1 ^3 e( c! C9 R2 L$ N5 l        }; Y: z9 O# ~7 R, ?" z4 I% F
}2 Q3 m8 p: F8 |( |

$ Q5 a9 a3 {  CBOOL CWndAutoFood:rocess()
7 n+ s; E; C! T1 |4 v- |0 ?' h& `{
% ]- v9 I9 v* Z5 Y8 V4 i, M        if( bStart )" D* t1 }3 h$ B: s
        {0 A- I+ l/ h: s
                if( m_pItemElem && m_pItemElem->GetProp() && m_pItemElem->m_nItemNum > 0 )
: }- Z. K( C" r& Y! e                {
* S' ^) B& H1 x' z0 V) i9 g                        if( g_pPlayer->m_cooltimeMgr.CanUse(g_pPlayer->m_cooltimeMgr.GetGroup( m_pItemElem->GetProp() ) ) && m_pItemElem->GetProp()->nAdjParamVal1 + g_pPlayer->GetHitPoint() <= g_pPlayer->GetMaxHitPoint() )! g; x9 Q% ]8 }0 N( g: k
                                g_DPlay.SendDoUseItem( MAKELONG( ITYPE_ITEM, m_pItemElem->m_dwObjId ), NULL_ID, m_pItemElem->GetProp()->dwParts );; c/ H1 O$ w& e
                }else{% Z- S2 h- D; n" K2 F* C3 R/ ~
                        bStart = FALSE;
6 {' }2 |3 |4 k                        m_pItemElem = NULL;; c" n2 v3 h* S; a6 H
                }2 e1 }+ @; P8 S% w
        }, B- I9 C, s4 ]+ g2 J" a' d9 g
        return TRUE;
& ?! Y( [' n( {6 S}
6 m8 R: L' n1 d# K3 [" ?# o! s  v# ~
登录视频废话:
# A8 m3 P; P: @5 p5 ~尾翼:+ U4 ^  V; d% _. u
# e% V/ I6 @: n4 \8 H
代码:7 K3 t3 I9 L2 u% c5 v

- J4 R& D  x3 x3 I: S$ Uvoid CWorld::SetLight( BOOL bLight )
0 c% {- V8 I# tdurch
8 g. A( O# [1 X' c- rCode:
5 l, H, Z" g( ?4 Uvoid CWorld::SetLight( BOOL bLight )
2 O" E  Y4 c0 _, w0 R{
+ c- M( L) n  L: G        //ACE("SetLight %d \n", bLight);# _' ?1 ]) w' Y( l
       
* x" X6 F( H$ n6 X#ifndef  __WORLDSERVER " C  R" B" _; J* z0 z
        DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);
- w$ {' K% T6 V+ ^5 q& Z8 h* M! Z        CLight* pLight = NULL;
  n# P& P$ O6 {+ V! l) O  a% V  O  B' `# B1 O! K7 z
        D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) );( G. H$ g% ^- D4 S0 j
7 u2 {" c$ v, V2 S/ s( J
        pLight = GetLight( "direction" );
5 U* z0 O. h- S3 c1 o4 p
2 O% }4 u6 a/ k/ `) ]# C8 f+ W' X* ~# Z#if __VER >= 15 // __BS_CHANGING_ENVIR
. Q: `' t" A1 A3 t: Y" P        if( g_pPlayer ){
7 P6 @- N! P* n1 E0 z, E, ^. i% Z/ B                ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) );
2 E" h4 [8 b6 c( s5 W                if( pInfo && m_kCurContinent._bUseEnvir )                // ′??ú ?èàì°í ′??úá¤o??| àì???ò °??ì?? !!& j  R: I. @! ?2 |6 t  R3 P
                {* Z( j, w+ M4 q( F( g/ e
                        if( pLight )) w0 F! l: g; Y
                        {4 }3 D( T7 L. u! f
                                pLight->Ambient.r =  pInfo->_fAmbient[ 0 ];
0 \) A' K/ a6 f: J" H                                pLight->Ambient.g =  pInfo->_fAmbient[ 1 ];
2 C" N& D" b- ]" O0 t% p* y                                pLight->Ambient.b =  pInfo->_fAmbient[ 2 ];
  n) k) c8 n- y$ w- [
; F1 m+ I$ s, C                                pLight->Specular.r = 2.0f;
# W9 z! A8 u$ {: v& _# F/ H! p                                pLight->Specular.g = 2.0f;4 n7 z$ U5 U/ L1 G/ i, m3 l
                                pLight->Specular.b = 2.0f;# L% O* m4 n; ^- E
        / G8 n% t3 G3 Z+ L+ B& n9 G/ T
                                pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ];
; Z% q4 M) ]) a0 ^                                pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];( K3 t6 F# s9 }+ [
                                pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];: {0 H9 P. i# b* ?+ n6 o
        1 n* E( O8 t' h; \! H9 h
                                HookUpdateLight( pLight );
/ W& V: W+ [9 r! _% }5 A2 A5 Z0 ]& m* l
                                memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );+ m/ ?9 f5 j4 o/ X% o% m5 P
                9 {! h3 M" ~! f0 h* h
                                pLight->Diffuse.r *= 1.2f;6 T! K/ V' [, w1 C
                                pLight->Diffuse.g *= 1.2f;4 }! r' ]6 a9 e3 s
                                pLight->Diffuse.b *= 1.2f;, ]( R) l$ u) M9 C' h9 p
. x  a5 x- z! t! A
                                pLight->Ambient.r *= 0.8f;
! K0 {- A& ~6 S                                pLight->Ambient.g *= 0.8f;
; g7 G$ a) R- o) e* M" C3 S                                pLight->Ambient.b *= 0.8f;
  G. ?4 F. Y1 q: C8 L6 }* c       
3 Z: f! }. z" G" A7 w, f                                memcpy( &m_light, pLight, sizeof( m_light ) );
8 Q1 y6 h8 l, _+ Y; ?) Y* K7 m* ]7 J, V
                                D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);+ ]1 A" q  i: X1 ]. |7 b
                                D3DXVec3Normalize(&(vecSun),&(vecSun));7 ~9 h8 G7 i) V! A( R( ^* ]" n
                                pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z );
9 b5 V+ ?$ O3 _+ {; B+ s- D! a                                 pLight->Appear( m_pd3dDevice, TRUE );8 Z+ `/ O+ r* M3 N1 h# L4 K
               
6 ^& O2 E9 Y8 G) S                                DWORD dwR, dwG, dwB;
3 v& C2 v3 j/ ?& @  i& m                                dwR = (DWORD)( pLight->Ambient.r * 255 );
! F# t; J# y& [( W( G  R                                dwG = (DWORD)( pLight->Ambient.g * 255 );: a& B3 B& b# {) S* f2 e
                                dwB = (DWORD)( pLight->Ambient.b * 255 );; O9 S6 U) [1 G7 L7 O
                                dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );& x  }' [) R) l, x, K2 u2 r) |
                        }
8 h) s6 A7 A1 Q8 G3 |                }6 w8 a- W) g# |+ T* l- M
        }) N& L6 K6 v4 }
        else+ y: p3 t( `3 A/ f0 o# J
#endif
' g9 a) h% T* @0 l
) k9 L5 B7 W6 Z; Q- z        if( m_bIsIndoor )
0 M3 q" s) W3 ^! y- R        {
5 H" ?) h2 `8 F) {$ g5 `                if( pLight )
1 s! G0 w# A8 ]& a                {                ! ?7 z! _8 z, B& m- c+ |; S8 v& q  J
                        // à??μ oˉè* : ~6 d. q2 S# D2 c" j
                        pLight->Diffuse.r = ((m_dwDiffuse>>16) & 0xff) / 255.f;
3 X9 \  S) \. v                        pLight->Diffuse.g = ((m_dwDiffuse>>8) & 0xff)  / 255.f;
; t& k9 Q+ \* E                        pLight->Diffuse.b = ((m_dwDiffuse) & 0xff)     / 255.f;
: o, k) T- B2 s% \+ `9 p* w2 Z. c* s9 i/ j5 I" D
                        // oˉè* ??à? , M5 Y2 x7 B  I- I$ z0 m
                        pLight->Specular.r = 1.0f;
8 ]2 l. w6 K+ H4 c4 r" a5 ^                        pLight->Specular.g = 1.0f;8 ~+ g* J3 R$ |5 ^1 U2 f+ `
                        pLight->Specular.b = 1.0f;
' H/ V0 Q& \7 C  f, \; N                        // àü?? oˉè* % z, a" @5 U, F4 v: N( y9 A
                        pLight->Ambient.r  = ((m_dwAmbient>>16) & 0xff) / 255.f;3 Q& c  g6 [7 l/ S
                        pLight->Ambient.g  = ((m_dwAmbient>>8) & 0xff)  / 255.f;
. u# C' E/ G! r( y* y0 H( @2 g                        pLight->Ambient.b  = ((m_dwAmbient) & 0xff)     / 255.f;
& @& c8 N/ }1 k, b# ?, X
' N1 R  x. _" S& L2 |2 {1 ^                        if( g_Option.m_nBloom )                // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.
5 q3 X, m& V9 Y" Z* |9 X  ]( D) |( \                        {
4 j* X, C! t' @# s9 B                                pLight->Diffuse.r *= 0.6f;3 R+ G7 v- o' h( l
                                pLight->Diffuse.g *= 0.6f;
* t$ H$ R% @( D3 f9 |                                pLight->Diffuse.b *= 0.6f;' s2 K# y+ d0 Q( O# W0 x' j9 E- J; h
                                pLight->Ambient.r *= 0.7f;
/ [" q4 G! R3 \( P( Y  g6 Q* d                                pLight->Ambient.g *= 0.7f;
5 z) \/ G- q: g/ I. Y" _6 c, m                                pLight->Ambient.b *= 0.7f;) x! f6 F1 E  j4 {) L
                        }
8 Z6 R$ i# d2 c. Y9 k9 R
/ I& X& B7 T2 ]1 I* v+ _( a#if __VER >= 15 // __BS_CHANGING_ENVIR. D. i' R' g0 `1 x1 D
                        if( g_pPlayer )
' P& X# U* y3 e" V& e, V! K+ ~! N& z                                HookUpdateLight( pLight );- R3 U8 y7 k  i+ b
#endif  M; z6 n+ l2 ?: m2 l: ~, N& }1 d
                        memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );1 ]. V/ u* q3 k+ M* D; c: {

( O; s7 W8 v) T  P) y- G1 g9 |                        pLight->Diffuse.r  += 0.1f;
) M% T# ~" h9 c- h                        pLight->Diffuse.g  += 0.1f;# c: w* q) s$ Q
                        pLight->Diffuse.b  += 0.1f;
) ^* O' Y: f1 @8 w5 l) [$ r                        // oˉè* ??à? 9 W2 x7 D8 G! ?7 }! G0 H
                        pLight->Specular.r = 2.0f;
( ^4 f, u6 q. G8 i! }1 r9 ]. C                        pLight->Specular.g = 2.0f;/ E6 d7 S# C) D. |0 _
                        pLight->Specular.b = 2.0f;: ^0 }8 N4 ~! n, A" l
                        // á?oˉ / o' h7 g6 t7 q$ |8 t
                        pLight->Ambient.r  *= 0.9f;9 c3 R5 |3 g% g3 T- J
                        pLight->Ambient.g  *= 0.9f;
: V. J! F* W# r, i: i. v                        pLight->Ambient.b  *= 0.9f;/ G! \" ]  f2 o
8 j7 V% f" C. x% c( Y; ~# G
                        memcpy( &m_light, pLight, sizeof( m_light ) );
- U7 g) S. `# j& q8 T  j( u                       
* @+ y3 H7 E# G" G! j                        pLight->SetDir( m_v3LightDir.x, m_v3LightDir.y, m_v3LightDir.z );3 b8 x: `. k; z$ v% L3 @& X
                        pLight->Appear( m_pd3dDevice, TRUE );$ F. r' `/ n5 N
       
- D: O! Z$ |" Y6 _7 g* ^8 K                        DWORD dwR, dwG, dwB;
* B( B1 g3 x/ q- i' x                        dwR = (DWORD)( pLight->Ambient.r * 255 );- w* e$ [2 F# I4 \
                        dwG = (DWORD)( pLight->Ambient.g * 255 );
' P1 |) y$ M; ~- r                        dwB = (DWORD)( pLight->Ambient.b * 255 );4 J& d+ q; L; a3 m
                        dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );' e& P  v  k7 J, n$ e" ^; l
                }, I) N. b. f; L. f) ^
        }
8 H1 I1 @! ~8 s9 W        else# c, k' o4 U# f: t$ l3 b, g5 Y( @
        {
0 P* l( i7 M2 w& O                if( pLight )0 V( h. y1 w( o, j1 \) w: L
                {5 B, o7 S) Y/ a  }$ T
               
% N) h# [! i5 r: H5 r                        int nHour = 8, nMin = 0;
$ d2 c0 K/ b7 K( y9 c- B* H" T3 A        #ifdef __CLIENT
1 M5 J! K# |$ X9 N                        // ???óàì?e??′? ??°£à? g_GameTimer???* °?á???′ù.
- j- Q1 [, i5 k0 z* g9 x4 W                        nHour = g_GameTimer.m_nHour;
6 L& r' k. y6 p, @( {0 `                        nMin  = g_GameTimer.m_nMin ;  L) E0 d+ U  R+ ?5 K! m
        #else( D# n/ ?6 o$ Y! r- t1 @
                        // o??o??′? ??°£à? m_nLightHour???* °?á???′ù.
# L& f" Z7 _7 x) v                        if( m_nLightType == 1 )
" H4 |9 `- R! r! [8 Q. ?                                nHour = m_nLightHour;
$ J7 L* z3 J8 k; x+ }5 o4 G" g        #endif
8 L3 t6 K4 G; ~, H. x/ l                        nHour--;
4 @6 j9 y; S5 N; j+ [( b                        if( nHour < 0 ) nHour = 0;! B" O" y2 Y/ }+ W! S
                        if( nHour > 23 ) nHour = 23;
1 g8 @) `5 C; I4 G& t1 a+ `/ T$ f& O* Q" e" _' h6 Y7 r
                        //if( m_bFixedHour )' c* H. O3 F# I5 ~3 R5 u
                        //        nHour = m_nFixedHour, nMin = 0;
, b: _' s( `( |1 u6 l& B                        LIGHTCOLOR lightColorPrv = m_k24Light[ ( nHour - 1 == -1 ) ? 23 : nHour - 1 ];1 O2 H$ \1 b, D5 X0 Z2 W( X) g/ x
                        LIGHTCOLOR lightColor = m_k24Light[ nHour ];" r; ^6 |# e7 L) a. C' q: q, G

# N/ n1 A/ A( r6 j                        //m_lightColor = lightColorPrv;1 m  \2 X6 B' D+ L' m
                        lightColorPrv.r1 += ( lightColor.r1 - lightColorPrv.r1) * nMin / 60;/ H/ Q- t: w- u
                        lightColorPrv.g1 += ( lightColor.g1 - lightColorPrv.g1) * nMin / 60;
( i' L7 a: X' g$ h3 ^# t- t                        lightColorPrv.b1 += ( lightColor.b1 - lightColorPrv.b1) * nMin / 60;
: c- x( O$ H. v) u, O% U                        lightColorPrv.r2 += ( lightColor.r2 - lightColorPrv.r2) * nMin / 60;
& F: K2 v/ j( P" T% B) F                        lightColorPrv.g2 += ( lightColor.g2 - lightColorPrv.g2) * nMin / 60;' i3 k- h1 A8 s; A7 h6 q, X' K7 l
                        lightColorPrv.b2 += ( lightColor.b2 - lightColorPrv.b2) * nMin / 60;
- s: ?+ j# f, P2 u  {6 J% S1 ]                        // 60(minMax) : 15(curMin) = 0.5(colorDistant) : x(curCol)
' D  A) s+ a. i0 \, E( p( A: f0 x9 r3 c' V; ?
                        // à??μ oˉè*
, W9 }4 S: B; X/ J( n) N                        pLight->Diffuse.r  = lightColorPrv.r1;$ o9 [* {: B2 Z6 d: s5 _/ C
                        pLight->Diffuse.g  = lightColorPrv.g1;+ ?# S# Y- Y+ y0 j) q
                        pLight->Diffuse.b  = lightColorPrv.b1;
( q+ `2 j* q9 P" ~) @" a- r                        // oˉè* ??à? - d8 R& P- f1 w
                        pLight->Specular.r = 1.0f;
. ~% z! ]1 Q8 I4 |                        pLight->Specular.g = 1.0f;
" g1 M0 |, t6 J: y                        pLight->Specular.b = 1.0f;  l/ n: F& b! O" W
                        // àü?? oˉè* 4 w" M! ~8 u( v' I! N: H& p
                        pLight->Ambient.r  = lightColorPrv.r2;6 \/ v- m2 ?1 U4 W( e  [
                        pLight->Ambient.g  = lightColorPrv.g2;" `. K7 q' {- Y+ ?
                        pLight->Ambient.b  = lightColorPrv.b2;  H, Z% Q. y" D0 T+ N% V' W

/ p9 l; r$ u! t/ N, N6 T                        if( g_Option.m_nBloom )                // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.( W) {3 @# t; i% ~) S1 [
                        {
1 i% C8 H3 G9 e4 B                                pLight->Diffuse.r *= 0.6f;7 b; D9 _. }. y1 G" P) J
                                pLight->Diffuse.g *= 0.6f;5 i8 m1 z8 u* X
                                pLight->Diffuse.b *= 0.6f;7 K, ~0 `4 |# Q. Q8 Z  [" ~' g9 D
                                pLight->Ambient.r *= 0.7f;
% r8 ]* \: M- l5 I! x" X: k                                pLight->Ambient.g *= 0.7f;
. J5 I) t7 b! X9 w* r; p5 d                                pLight->Ambient.b *= 0.7f;
1 \2 ]5 U# {! @6 K                        }
+ I$ F$ Y% ~5 [                        3 R# f/ e% Q7 j& b, ?
#if __VER >= 15 // __BS_CHANGING_ENVIR
& c, S" B& y$ b- G( f$ P/ D8 `, F* i                        if( g_pPlayer )2 G2 I) S+ W$ ]4 F7 q7 `+ y
                                HookUpdateLight( pLight ); $ q9 V: o/ ?% S- V, p) S
#endif& N6 M7 K" w* n
                        memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );( y; j6 C4 e1 Y- |% Q
8 Y$ g  Z- }# \! _: {3 G# @
#ifdef __YENV% C0 c% x4 p2 K( q
                        pLight->Diffuse.r  *= 1.1f;$ f4 }- q6 J4 K; O
                        pLight->Diffuse.g  *= 1.1f;% G* \/ X4 Y# H
                        pLight->Diffuse.b  *= 1.1f;
! a9 X, n) @+ G4 C5 ]9 ]                        // oˉè* ??à?
* ]8 x1 p8 a! o) p                        pLight->Specular.r = 2.0f;0 c+ E7 F. Z: O) w
                        pLight->Specular.g = 2.0f;
( _+ f" A" c1 R: @/ y& }                        pLight->Specular.b = 2.0f;% }4 M3 Q) \# M+ {
                        // á?oˉ 8 h9 y: Y/ n& s% x& h- M' A
                        pLight->Ambient.r  *= 1.0f;, s: x# X, o. |, ~
                        pLight->Ambient.g  *= 1.0f;
  Y; n( d' F2 O/ q6 v5 Q                        pLight->Ambient.b  *= 1.0f;
( t( [' }4 U- x* ]2 w#else //__YENV1 j: F4 m3 {4 L
                        pLight->Diffuse.r  *= 1.1f;$ Z4 l2 N2 Q. v! K& a
                        pLight->Diffuse.g  *= 1.1f;
. b8 O/ z; |  X+ l2 i3 C                        pLight->Diffuse.b  *= 1.1f;" y5 R0 r# ^; x, q: I' u  P
                        // oˉè* ??à? 1 m: l/ g0 o- `5 W4 m6 d# X
                        pLight->Specular.r = 2.0f;. Q- Q5 `5 {% @
                        pLight->Specular.g = 2.0f;2 g/ P+ N2 N! {/ c) s+ [0 ^1 I1 T
                        pLight->Specular.b = 2.0f;
8 P5 j! U. D% H( K$ ^                        // á?oˉ & y9 h5 j9 {, b7 E4 |
                        pLight->Ambient.r  *= 0.9f;
, O6 r; h3 B% b, U- D: \% y( `                        pLight->Ambient.g  *= 0.9f;) [  V7 f3 S- f8 W( }" x
                        pLight->Ambient.b  *= 0.9f;' e6 H8 y3 S; A; W
#endif //__YENV
* p/ ~. p" x/ c. Y  _5 K9 r3 L! T                        / T5 W- o" {9 v: S6 A9 n$ e) e( ?
                        memcpy( &m_light, pLight, sizeof( m_light ) );
% i5 w2 s% t  D' O: o                        3 U% g' _1 K0 j
                        D3DXVECTOR3 vecSun=D3DXVECTOR3( 0.0f, 0.0f,1.0f);. \# P/ V, K7 f# `" Q( ^& T& f" `
                        D3DXMATRIX  matTemp;
$ E  T  U) D' L- O* q                        static const float CONS_VAL = 3.1415926f / 180.f;
: R! E5 x9 W7 n2 f3 W/ f5 j, P8 z9 j# n
                        D3DXMatrixRotationX( &matTemp,(m_skyBox.m_fSunAngle +180)*CONS_VAL);% j& f# U5 S0 q  l
                        D3DXVec3TransformCoord(&vecSun,&vecSun,&matTemp);' T) T4 u& O: D4 g
                        pLight->SetDir( vecSun.x, vecSun.y, vecSun.z ); / E  T) V7 t) H0 A2 v0 Z3 @
                        pLight->Appear( m_pd3dDevice, TRUE );! m# ]$ |& w8 x# P4 X+ U' e

- A; Z8 p) D' k( v7 e! T                        //        D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);0 g& k! ^' Q- M& a/ Q; Y  @* y, t
                        //        D3DXVec3Normalize(&(vecSun),&(vecSun));
0 i0 o# E: J7 x; v                        //        pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); % h, d; @4 G2 G% t" J5 r

# k, v! O9 O5 i, \; e                        DWORD dwR, dwG, dwB;
9 h+ z7 k. n' N0 V# y; y, R: P+ |( H$ M' }                        dwR = (DWORD)( pLight->Ambient.r * 255 );8 p9 G) i% g4 u
                        dwG = (DWORD)( pLight->Ambient.g * 255 );/ J: u1 A- r$ U" `1 ~3 k7 x
                        dwB = (DWORD)( pLight->Ambient.b * 255 );7 O+ d' _$ b3 {9 |: \& S
                        dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );                       
" _" _! }, `5 o( e8 g% t+ S                }
  O+ N& e9 q; g; f, `  F        }8 y) _2 i! j: }$ `; i) Y
5 G' ^1 c% @; @3 L
        m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, bLight );//m_bViewLight );' |8 y( m. p6 t, H8 d: C
        m_pd3dDevice->SetRenderState( D3DRS_AMBIENT, dwAmbient );//D3DCOLOR_ARGB( 0,0,0,0) ); //m_dwAmbient );//D3DCOLOR_ARGB( 255,128,128,128) );//D3DCOLOR_ARGB( 255,50,50,70) );
/ V# @9 e+ C2 p7 O        ::SetLight( bLight );2 n; e; Z3 v6 U2 k! q

2 z# c, U$ y2 C( _( |* h7 h/ M        // ±ao? ?D?í???ó á¤à? : K# h5 x' K5 d+ X
        m_pd3dDevice->SetMaterial( &m_baseMaterial );
# a, o! Q3 {, L       
9 n$ U! F% A. k0 R* }) J# a( D- b#endif // not WORLDSERVER. j* L  C5 |* U5 v
}
- I6 L* b5 a% _& b并更换
9 t, q6 }% I& C0 _7 c! HCode:; c8 G- W  M  T
__FLYFF_INITPAGE_EXT
9 E2 e. h+ l$ c. ~# F1 u0 C定义
1 v% k8 ~$ g4 b/ H0 l* d, R/ c8 L5 O; }8 l, u6 |$ c

  p8 {, W& ~9 p7 D6 o4 w/ ]9 o' X# o# ~* K0 S' w

! a9 [% W7 ]* C8 S4 W4 z5 N. Q现在终于删除我的狗屁加速...4 ]. k) J0 y+ c- P) B

' g& v( }6 r1 ~5 v: [; g) g6 C* k" X" q

3 v! ?" i# Y9 e% d+ W# d. z+ }* s! D$ j
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|飞飞世界技术论坛  

GMT+8, 2026-1-12 20:27 , Processed in 0.070066 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表