飞飞世界论坛

标题: 自动饮血和登录视频 [打印本页]

作者: admin    时间: 2016-1-10 03:46
标题: 自动饮血和登录视频
食品车:
% j: h- Q1 m" t8 ]/ w. t1 Q. L尾翼:
8 w3 ?- z' t; {; t3 s  A8 }4 Z3 w7 k* K5 o+ Z; m
代码:
7 |( i! m- e1 H* ~CWndAutoFood::CWndAutoFood()  t0 Z/ L2 X  a0 a$ a* j
{/ Q4 K" _3 n% E! T5 g1 v0 P
        m_pItemElem = NULL;
4 r+ x3 x+ v" C, ^3 o        m_pTexture = NULL;5 Y# K% i8 G" i+ a/ [( z/ b# N
        bStart = FALSE;- O6 g. w+ n- q) O
}" N  Y! \6 x- r( ~+ R2 K. d- q
: S& w: [! b1 G- w
CWndAutoFood::~CWndAutoFood()
. S4 g) C( @9 @7 z: Z* _: x{
9 ~: V4 v- w+ j$ K% D9 A4 @& x        AfxMessageBox( "AutoFood ist gestorben " );
& y$ K+ G) h4 N. G" x& P3 I" |}" b% u5 S" H; j# b9 H5 Y) b4 c9 i
BOOL CWndAutoFood::Initialize( CWndBase* pWndParent, DWORD nType )
; q  A' C  z1 o) d7 ~{* e8 W5 h, E8 [7 i3 {6 g+ T
        return InitDialog( g_Neuz.GetSafeHwnd(), APP_AUTOFEED, WBS_MODAL, CPoint( 0, 0 ), pWndParent );
% W, {. H* h3 L  |) h}
  n% h% C. [2 H8 B: `
( I+ J! H& a6 I: t# sBOOL CWndAutoFood::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )1 G# [9 ?  A) ^1 _
{
9 O  H) U) {* s+ o' k& _9 V8 g        LPWNDCTRL pWndCtrl = GetWndCtrl( WIDC_CUSTOM1 );
- g4 ~+ J: `: ~5 M) K7 a        CRect rect = pWndCtrl->rect;# S2 E* L; ?" R7 T2 D
        if( rect && rect.PtInRect( point ) )
/ h# y, z7 a$ L2 X6 p2 t0 |        {
4 I" T6 o' r1 ~) b2 ^* F  e                CItemElem *pItemElem = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );
7 G1 J, E% R; D) s                if( pItemElem && pItemElem->GetProp() && pItemElem->GetProp()->dwItemKind2 == IK2_FOOD )
# e: l4 v0 t0 V+ F                {
9 C4 M, n! K% j' Q                        if( m_pItemElem )
7 B( X/ {4 }. i' M, o                        {
2 ]% `( z) e) _7 K/ J( Q5 y                                m_pItemElem = NULL;
' m2 }* H5 ^3 ]8 M                        }: t$ E' K+ M2 T, s
                        m_pItemElem = pItemElem;
- \  K0 P) \4 E3 ]6 W; c: J" O                        m_pTexture = CWndBase::m_textureMng.AddTexture( D3DDEVICE, MakePath( DIR_ITEM, m_pItemElem->GetProp()->szIcon ), 0xffff00ff );
  I& _) A" ~2 [* U' L                }else{( S- t4 g" m& G3 P9 b( ^
                        SetForbid( TRUE );7 n* _  E& Z6 A" t1 {% @6 j! E) B$ Q- J
                }5 F2 k+ l; Y+ {2 l# b
        }else{
  v% l4 [9 T3 ]  D1 f9 v7 n                SetForbid( TRUE );9 k# t3 ?* q1 x( |; p, p
        }! \* X! r; g$ J6 \1 v9 I' n
        return TRUE;0 {7 t; g; e2 `
}- p2 K7 \) Y  R4 r. W
  a7 e2 U. }3 B' @5 |1 F
BOOL CWndAutoFood::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )% w/ Y; {4 \) F
{
8 r( P9 E, j- W6 m. z8 ]% N        switch( nID )  K* f2 J: X/ j1 f# Q- b) [0 E' i
        {
# [  k. \( q( m+ f+ |        case WIDC_BUTTON3:
- m: j: w% J+ }9 Y$ D+ O& F                {
% M6 K4 X) \; `2 G$ f4 L; G                        bStart = TRUE;
% \3 l+ E6 N8 M, e1 \0 U1 p                        break;
) f. O4 `5 |; D1 C8 U                }
0 X% D% l4 |! t; U        case WIDC_BUTTON4:
$ W2 l# T7 z' Q4 \                {
/ V( R% ^) ?* v                        bStart = FALSE;
' }1 i% s, D5 \) m- P; {* h                        break;  o. S6 \. u, ?
                }" w0 [2 f  j7 a
        }
5 N4 D# J, U5 h1 p. O        return CWndNeuz::OnChildNotify( message, nID, pLResult );" U) r1 k* D0 I1 `6 b$ Z
}       
* V1 Q. D- K: H9 _4 @void CWndAutoFood::OnDraw( C2DRender* p2DRender )2 Y: o! }6 Q- l" x" i
{
" g# w% |$ j8 u% K7 v        CWndButton* pBtn = (CWndButton*)GetDlgItem( WIDC_BUTTON3 );
7 V  R8 F8 D/ D$ D        if( bStart || !m_pItemElem )
( l) a  R. C7 K% N( z% B        {
1 I& F! b$ n9 i* d8 a1 i, n& q                pBtn->EnableWindow( FALSE );
) H* y. A) ~7 h! {* r  a        }else
- c2 V& }  m: x9 e# v3 h                pBtn->EnableWindow( TRUE );( E% n3 J; |- ?, n# V9 |
        if( m_pTexture )  g- I- w1 r# C. ?9 `9 [# X
        {
7 |' l3 y& |2 `$ X7 B                LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_CUSTOM1 );$ M, ~; I! L) I  m. T
                if( wndCtrl && wndCtrl->rect )
& M9 y- O+ K- Z4 i6 P/ I5 F% L                {) T5 l: f  {0 ]! |7 E0 A) P4 p
                        m_pTexture->Render( p2DRender, CPoint( wndCtrl->rect.left, wndCtrl->rect.top ) );$ F' i) Q+ A6 I7 \
                }
* Y, C+ J' U  m$ o+ q: v        }+ R+ G( y' I4 }
}
' w: H; X) G+ C5 v* A$ f+ j
  s8 r4 U  i; F  _BOOL CWndAutoFood:rocess()
% ~) }$ Q  p/ }7 O0 a5 p{
/ V* G2 n; Z( h: x! S2 H        if( bStart )5 o7 T% h2 i; V8 _- W5 }2 o
        {
* `6 `* O8 V. K: G% a                if( m_pItemElem && m_pItemElem->GetProp() && m_pItemElem->m_nItemNum > 0 )2 ?9 O" C# H/ ]
                {
3 u; O# ?% w3 t                        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- }0 i2 ~& t7 ]- o/ h
                                g_DPlay.SendDoUseItem( MAKELONG( ITYPE_ITEM, m_pItemElem->m_dwObjId ), NULL_ID, m_pItemElem->GetProp()->dwParts );) X- E0 d1 z( S( W
                }else{
- |0 I' q6 [8 x0 s                        bStart = FALSE;
; I. u: X6 Z3 m7 s! L/ G5 y                        m_pItemElem = NULL;# k% ]) D  ]3 D' f/ \& ^3 r
                }; |$ P; b. j/ I$ K' R, i, q* [, M8 q# @
        }% b; T$ y' H: `
        return TRUE;! H5 z$ @! K, M, S0 \% `
}# D# v2 a3 w" q* W
6 `% I8 X8 B0 W& M9 i: v$ }
登录视频废话:: ]; F, t7 R2 V( O0 m5 w
尾翼:
0 M; E( i# e) c+ c! R  K
4 x/ X& m& F( |% G: \代码:" D* d6 }. ]+ V+ O9 B3 ~# A( ^

& j8 K" b* V2 t/ Z% C  d4 Q& avoid CWorld::SetLight( BOOL bLight )$ g6 _2 v2 s. J9 P4 W
durch; m% p' ]/ {2 F
Code:: g: S/ }7 F0 ?) H& f: D
void CWorld::SetLight( BOOL bLight )
) l5 U3 W4 ^3 P$ \& M) q; y{
$ \: E( D  e: Y! |, Z        //ACE("SetLight %d \n", bLight);, ^; H, W5 _# D5 T
        ; x9 Z3 p5 n- D; h- V- N
#ifndef  __WORLDSERVER 8 c4 Y4 c4 R1 U" L5 N5 S8 ?3 @; V: h6 T
        DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);6 A; I* [; |1 h8 P: ]2 o- j
        CLight* pLight = NULL;
. m% E. Q4 x* \5 k% X# n% f
3 R: ~: A: g( v! u2 t        D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) );6 @$ y3 n+ {/ O7 J3 _
1 w, ~+ Y. K. [1 D
        pLight = GetLight( "direction" );
. @0 B  u1 W5 i2 S$ y
. o5 J6 y8 L& u! L  v# _! W  Z#if __VER >= 15 // __BS_CHANGING_ENVIR
- H  W$ @% G/ N& w; a        if( g_pPlayer ){
6 o, s$ O# i( e- _                ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) );& ^" m- P# R8 x) h+ l% q
                if( pInfo && m_kCurContinent._bUseEnvir )                // ′??ú ?èàì°í ′??úá¤o??| àì???ò °??ì?? !!. K' T- @' k& Q& x' U
                {
7 _/ _+ n4 m) v( k8 G; q                        if( pLight )" X* x, B. h7 k0 m4 d/ X! e
                        {* g& s3 p  K! h. u! q  F
                                pLight->Ambient.r =  pInfo->_fAmbient[ 0 ];# s$ N: w: B4 U& Y9 m1 b- M
                                pLight->Ambient.g =  pInfo->_fAmbient[ 1 ];
) t0 ?4 O4 d3 s  p1 D9 S                                pLight->Ambient.b =  pInfo->_fAmbient[ 2 ];$ o5 P. e  p; F6 w; E2 r; f
4 {$ o$ S; p  ]
                                pLight->Specular.r = 2.0f;
; ~: K/ S  U- Y2 ^) A. D0 F                                pLight->Specular.g = 2.0f;
( L, M, T9 ]2 p1 D1 S& p- t/ b                                pLight->Specular.b = 2.0f;
6 Y" V$ r/ V, f       
; V2 }5 F! q$ j! Y4 p; Y                                pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ];
% J# X: L! Y# t2 R* S8 e4 G& L  _                                pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];1 ^. @- f, }! L' |
                                pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];+ |# s9 q: V3 P4 Y2 t, @
        ; x/ j& x6 T0 f5 [. B. G
                                HookUpdateLight( pLight );
! v& m# E: `* I' w, P0 Z% R4 b% y8 g4 p: d' t% S% ~& q
                                memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
" a' R% V2 K* |, \+ r                , O- g/ X7 R- s
                                pLight->Diffuse.r *= 1.2f;, n3 k7 l$ I; D
                                pLight->Diffuse.g *= 1.2f;
6 \- d3 G7 z" V* b  F! H- b                                pLight->Diffuse.b *= 1.2f;
0 C! V) L  V2 Y5 Z$ f8 O2 l6 h$ e1 B( \. H& B! F
                                pLight->Ambient.r *= 0.8f;
3 C  q0 x, n* S' O) X8 n8 O% a                                pLight->Ambient.g *= 0.8f;
3 R7 _% [5 H7 `3 t' E0 f7 x* @                                pLight->Ambient.b *= 0.8f;+ q- K5 X+ W& K3 o: [- H) J% [1 {
       
& T- G# p% C& ~  a3 b6 k1 T0 I                                memcpy( &m_light, pLight, sizeof( m_light ) );
% S. ], J8 }  m. X! C
/ ]1 E5 h, M0 [! \: z  a' k                                D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
) O. K3 ]4 ~2 p" Z# `                                 D3DXVec3Normalize(&(vecSun),&(vecSun));4 i4 n$ x8 M- e7 D2 N) ~
                                pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); 4 f6 `( o3 V  j# h) ?
                                pLight->Appear( m_pd3dDevice, TRUE );
( z3 g3 Z! T+ p( e3 v6 _% T               
$ o8 D" j. Q- b( ~6 k0 x                                DWORD dwR, dwG, dwB;0 M  j. w- C% f# k& W1 Z
                                dwR = (DWORD)( pLight->Ambient.r * 255 );
' U; z) @+ q' {! Z$ l* `+ O                                dwG = (DWORD)( pLight->Ambient.g * 255 );
0 [" X6 j' O: ^+ y, Z* l                                dwB = (DWORD)( pLight->Ambient.b * 255 );
) F0 a- Q+ Q, }3 a/ r                                dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );  ~+ k3 p% X# p8 `
                        }0 q6 ~/ B5 B* a- c" @1 c
                }! C5 B2 q& d1 K1 K+ h1 M: E
        }5 E9 c1 v" A# v$ b5 [
        else: \* k' S* Z8 ?0 q0 p' _- T- [
#endif
5 a' B) G$ }: m+ W8 E/ e7 u3 U; c, a' w2 m, L4 U' w
        if( m_bIsIndoor )3 ~  @, {0 ~0 s; m
        {; I1 ?( C$ U7 V5 {6 G; ~( W
                if( pLight )( d6 H' g# R9 _9 x
                {                1 K' s6 i, I& S: G
                        // à??μ oˉè*
, C6 B  c1 W3 L6 V: a- D# a7 @5 N                        pLight->Diffuse.r = ((m_dwDiffuse>>16) & 0xff) / 255.f;
, V2 I4 R/ b% v; p% F& t                        pLight->Diffuse.g = ((m_dwDiffuse>>8) & 0xff)  / 255.f;3 J( @0 O! O* J) a, F; A
                        pLight->Diffuse.b = ((m_dwDiffuse) & 0xff)     / 255.f;
3 Y# Z: E. g+ M6 i4 H
/ @! i3 d' ^4 \: j4 `6 ]# v; S                        // oˉè* ??à? / ^' O& d; Y# l. v& Q
                        pLight->Specular.r = 1.0f;' [8 \" X/ a$ p
                        pLight->Specular.g = 1.0f;- I( L% B# l: c" Q% @) l  ~" C
                        pLight->Specular.b = 1.0f;& A0 ^9 c% L4 M
                        // àü?? oˉè*
& n7 [3 S8 h( u( M* I                        pLight->Ambient.r  = ((m_dwAmbient>>16) & 0xff) / 255.f;
+ h# ]$ L2 ]  a3 B/ y0 ?, \" K" m                        pLight->Ambient.g  = ((m_dwAmbient>>8) & 0xff)  / 255.f;$ `& L% J" U* {4 n
                        pLight->Ambient.b  = ((m_dwAmbient) & 0xff)     / 255.f;
$ J9 [6 o  X9 @  m
4 {: A& L9 n* g. A" l2 m& V1 E                        if( g_Option.m_nBloom )                // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.
. T; G( A% \2 `/ i" z* ~: U8 Y                        {
2 b' n9 [+ L* P                                pLight->Diffuse.r *= 0.6f;
5 W% a" u9 U, K, i7 e                                pLight->Diffuse.g *= 0.6f;, |" j, b2 s9 ^( L* T
                                pLight->Diffuse.b *= 0.6f;7 l; I! e% n2 c# W$ ^3 i
                                pLight->Ambient.r *= 0.7f;
% @' F6 s' w+ z- p- j* w% j                                pLight->Ambient.g *= 0.7f;
6 F" X) \: I$ G8 _+ k* P0 ]                                pLight->Ambient.b *= 0.7f;
% e* [' d- x' @# [' t                        }
" R# d7 _0 _9 F7 d# w' c8 ~( ^& ^! y* s% F5 @4 o  e# j
#if __VER >= 15 // __BS_CHANGING_ENVIR
: @2 t' w9 t5 W5 ~- I* S# W/ A9 C                        if( g_pPlayer )
6 A) \5 m1 q* M0 t% m7 ~                                HookUpdateLight( pLight );+ j* a( \0 I7 _2 j$ _0 a
#endif" e; X# o# s. `1 `% G6 l
                        memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );* p! R* Y" ]1 l3 Q
9 A" S9 E5 O/ f3 o8 V0 \
                        pLight->Diffuse.r  += 0.1f;. Q, C' ^7 m7 E' m! r# @9 t
                        pLight->Diffuse.g  += 0.1f;
% [8 g9 K) ^* k! C7 R4 d5 E4 s                        pLight->Diffuse.b  += 0.1f;
7 d1 }/ {, x3 e3 f# y                        // oˉè* ??à? 7 A% ~2 ]2 c. K
                        pLight->Specular.r = 2.0f;# o8 L1 m/ \3 X$ `2 i
                        pLight->Specular.g = 2.0f;$ b1 ]* \2 M! z8 s5 ^% B! ]) S
                        pLight->Specular.b = 2.0f;
4 ?& a! X' g) A) t2 A1 X- Q                        // á?oˉ : C1 x1 \' `5 X7 f' ?$ f& Q5 B4 ]) t% {
                        pLight->Ambient.r  *= 0.9f;
  P. W: {4 h  `* j" C% b' \( i, N$ ~                        pLight->Ambient.g  *= 0.9f;" ]+ y1 Z4 x0 d
                        pLight->Ambient.b  *= 0.9f;
$ b5 q# u5 u6 p- ~' w
) ~% b: n) b+ X0 |8 A                        memcpy( &m_light, pLight, sizeof( m_light ) );5 e  \- g, l# V  Z* f0 l
                       
- Z, Q6 n- R; \8 {                        pLight->SetDir( m_v3LightDir.x, m_v3LightDir.y, m_v3LightDir.z );2 i& b% f, C" S4 |. c& S0 |' {1 B
                        pLight->Appear( m_pd3dDevice, TRUE );5 ^9 X' L, G8 s. C. J3 G. O
       
" j: R+ h: ]) z: _* ^. r                        DWORD dwR, dwG, dwB;, K" _& w* l- \3 @, t$ Y2 E
                        dwR = (DWORD)( pLight->Ambient.r * 255 );- L  `; n4 p- l- @3 I1 s5 O
                        dwG = (DWORD)( pLight->Ambient.g * 255 );+ n1 g) H/ k: I6 I' b( R7 A  m
                        dwB = (DWORD)( pLight->Ambient.b * 255 );# M$ J1 l- w4 m1 P2 n0 [  Q
                        dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
% y8 z% @3 V1 L+ V                }
3 j, N. s' n" s2 f, ?( p. y# R  S        }- i) {+ ~; ~4 d; C/ I9 V
        else5 }" H/ T" M  k
        {+ d0 {6 }6 |8 P8 n5 @
                if( pLight )+ J$ J, O% p/ G3 G
                {
4 r' W1 u6 m$ G; H               
$ Y) n0 }' J; g' l8 Y# O                        int nHour = 8, nMin = 0;
: C, ]. x  q1 y; F, W( y5 j        #ifdef __CLIENT! D9 {8 e/ k6 ^
                        // ???óàì?e??′? ??°£à? g_GameTimer???* °?á???′ù. ! z( @5 B% F. g
                        nHour = g_GameTimer.m_nHour;
2 S4 e& [0 Q" S# |: b; V                        nMin  = g_GameTimer.m_nMin ;$ A; X3 x* e3 N; r0 k; n+ W
        #else4 {  S% Z- p  H7 p9 b. Q
                        // o??o??′? ??°£à? m_nLightHour???* °?á???′ù.
; C* w, u6 ~/ q0 U                        if( m_nLightType == 1 )
+ N+ S' g# m* @+ J( b3 l3 I: w8 ]/ M                                nHour = m_nLightHour;; c4 B: S" M- Z; |5 I  J
        #endif2 p! K' K* m' t9 F  C/ o& g
                        nHour--;5 ~4 [! q) [1 d! k' x, M# W
                        if( nHour < 0 ) nHour = 0;
) S9 n" x5 L- c' x4 {7 k! v/ q                        if( nHour > 23 ) nHour = 23;$ G' t; ~, h$ l% C

3 d, d5 ?, N+ m: [                        //if( m_bFixedHour )' I. k/ Q: g# ^2 ~- U; Q( `
                        //        nHour = m_nFixedHour, nMin = 0;0 M0 G- L0 S' ^: `9 K+ ?
                        LIGHTCOLOR lightColorPrv = m_k24Light[ ( nHour - 1 == -1 ) ? 23 : nHour - 1 ];2 `" w- s- {+ u- F) c$ ?* s; a
                        LIGHTCOLOR lightColor = m_k24Light[ nHour ];
7 l4 H# d8 M5 g
* w0 g/ r( d9 x' j! x                        //m_lightColor = lightColorPrv;" P+ N% e) r7 U
                        lightColorPrv.r1 += ( lightColor.r1 - lightColorPrv.r1) * nMin / 60;. @- Z3 D' h. l% F% |
                        lightColorPrv.g1 += ( lightColor.g1 - lightColorPrv.g1) * nMin / 60;% l+ w: R) I. [% \8 Z0 L, k' g$ Y
                        lightColorPrv.b1 += ( lightColor.b1 - lightColorPrv.b1) * nMin / 60;
# B' x: q( m1 `                        lightColorPrv.r2 += ( lightColor.r2 - lightColorPrv.r2) * nMin / 60;
! g# w' f2 L5 M# s, M                        lightColorPrv.g2 += ( lightColor.g2 - lightColorPrv.g2) * nMin / 60;
9 e2 {4 x6 y' d( h/ D) n6 q+ p                        lightColorPrv.b2 += ( lightColor.b2 - lightColorPrv.b2) * nMin / 60;
! {/ s! l% B- }' B                        // 60(minMax) : 15(curMin) = 0.5(colorDistant) : x(curCol)
+ R& z" G9 R# c2 z  K9 n" D" M& V5 u5 n0 W/ ]/ ~$ S- `- E- _9 O
                        // à??μ oˉè* + h6 }% g0 Y6 A  k
                        pLight->Diffuse.r  = lightColorPrv.r1;+ ?; K" a0 {& \
                        pLight->Diffuse.g  = lightColorPrv.g1;
" i6 G2 M5 W1 Q                        pLight->Diffuse.b  = lightColorPrv.b1;
/ z6 S' g! w( H7 R( u                        // oˉè* ??à?
: u% E% u0 U- U/ B. y                        pLight->Specular.r = 1.0f;
% [, t* _) D0 U3 ~/ \                        pLight->Specular.g = 1.0f;
# X) L; s% l/ H5 f% |& \                        pLight->Specular.b = 1.0f;  }( }% l$ u: y" p$ `4 J5 H
                        // àü?? oˉè*
% x8 z$ k$ [4 }2 ]$ a9 L5 C                        pLight->Ambient.r  = lightColorPrv.r2;
' p9 E0 ^  b/ z3 H2 k! M                        pLight->Ambient.g  = lightColorPrv.g2;
9 F9 j; a8 [- r                        pLight->Ambient.b  = lightColorPrv.b2;- p4 X* P+ p! N1 m8 C- t7 i
5 F  n" j3 E, R: s0 b4 c) _9 k
                        if( g_Option.m_nBloom )                // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.
5 A$ P: F, {8 A" T8 p8 U2 i& j2 t                        {# O+ M" B" u9 X5 F
                                pLight->Diffuse.r *= 0.6f;
4 ?% T3 w2 C) M                                pLight->Diffuse.g *= 0.6f;$ {$ v" v1 B: z; A  j8 z- ~( Y
                                pLight->Diffuse.b *= 0.6f;
& A  B4 R' Y: X  b6 C                                pLight->Ambient.r *= 0.7f;
* D! S7 ^8 e4 X: n% B                                pLight->Ambient.g *= 0.7f;
* y; {" ]$ A" ~3 V0 L                                pLight->Ambient.b *= 0.7f;7 Z3 z' D2 F  k
                        }. u. i5 W( F% e+ j
                       
0 s0 x  V" V  R; ^: P$ D1 S2 h#if __VER >= 15 // __BS_CHANGING_ENVIR9 L3 c+ F$ K) m  F$ Q, `
                        if( g_pPlayer )7 |  I8 o! ~, o" {1 R, \7 Z
                                HookUpdateLight( pLight ); ) R- ~# \/ [/ A: c9 ~
#endif0 V9 \0 Y/ b' {
                        memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
) O0 V1 [  ?8 i; l, b5 I1 f" Z8 N9 J( D3 r1 s8 l0 J0 j
#ifdef __YENV
  s' H0 I2 W* W8 N# c( u                        pLight->Diffuse.r  *= 1.1f;$ }# V) \, s6 I9 _& _/ h
                        pLight->Diffuse.g  *= 1.1f;
, P5 I. |: U) M/ `9 t                        pLight->Diffuse.b  *= 1.1f;
6 G% e; v& p: d: |, T  D+ f" N                        // oˉè* ??à? 7 N! r4 c0 o2 p5 b+ K5 Y( E
                        pLight->Specular.r = 2.0f;
( u. N: `, t: D) q  X% _9 E% K                        pLight->Specular.g = 2.0f;
. X7 q8 S/ R; {% g* D                        pLight->Specular.b = 2.0f;
) Q% g' |$ o4 o                        // á?oˉ
: ]& y6 }9 u  ^' N% Y' A& i5 B8 Z                        pLight->Ambient.r  *= 1.0f;
' v) N7 c- B; l% w' x) M( G                        pLight->Ambient.g  *= 1.0f;+ Y5 b( N  Z4 P: _# J4 V4 H3 J
                        pLight->Ambient.b  *= 1.0f;
& p1 T" t. r7 B#else //__YENV! ]! V( J) F3 l) l
                        pLight->Diffuse.r  *= 1.1f;
* @- M& A$ d! b                        pLight->Diffuse.g  *= 1.1f;1 \3 A1 e; F$ ^. ^+ g. N
                        pLight->Diffuse.b  *= 1.1f;
- k  |& x! T7 X5 K9 \                        // oˉè* ??à? % q  Q+ a# J( w$ C/ ~
                        pLight->Specular.r = 2.0f;, n5 {" t# X! X6 I1 q
                        pLight->Specular.g = 2.0f;
) L! A0 z6 a8 r& {# D                        pLight->Specular.b = 2.0f;
. A! z5 |" N. t$ v                        // á?oˉ : H1 G7 c' _6 A- L+ z2 H
                        pLight->Ambient.r  *= 0.9f;3 {: j; X* |) @" U2 Z1 w
                        pLight->Ambient.g  *= 0.9f;1 t4 S" Z! a/ A6 s! v  `
                        pLight->Ambient.b  *= 0.9f;
0 Z  F( M; G  w#endif //__YENV
+ v) Q2 \7 [* ^( {6 v8 B                        0 @7 Q( Z6 y, x) }* [: l  _/ H
                        memcpy( &m_light, pLight, sizeof( m_light ) );
: o$ L  \2 x. K4 ?; w! H                        8 q* H0 Y) P" |5 s! ^$ q" T5 x
                        D3DXVECTOR3 vecSun=D3DXVECTOR3( 0.0f, 0.0f,1.0f);
( M& p! Q9 l+ c, f                        D3DXMATRIX  matTemp;, V5 I+ V. }3 \8 g6 Q8 b
                        static const float CONS_VAL = 3.1415926f / 180.f;
$ q1 X4 S2 `8 c& a0 d! O! j1 S/ ]$ X% ^$ W
                        D3DXMatrixRotationX( &matTemp,(m_skyBox.m_fSunAngle +180)*CONS_VAL);
2 g$ F! T1 S$ T$ ~. q1 W& Q, }( v( S8 |                        D3DXVec3TransformCoord(&vecSun,&vecSun,&matTemp);
# T0 z8 O% o# M- y- c                        pLight->SetDir( vecSun.x, vecSun.y, vecSun.z ); 0 k+ l6 ~. A* c7 `' ?, ?% e
                        pLight->Appear( m_pd3dDevice, TRUE );
$ w' a+ \. R0 T1 h) x! n: L7 I0 X* b2 T4 G( |! L
                        //        D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
4 l$ O6 ^' O! l                        //        D3DXVec3Normalize(&(vecSun),&(vecSun));" ~* `" |6 w& ~8 O1 I7 P
                        //        pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); ' A' B- n6 N0 F
- h' Y9 l8 e" T7 @, x
                        DWORD dwR, dwG, dwB;
3 Q9 Y8 k2 F; J8 P6 ?" g                        dwR = (DWORD)( pLight->Ambient.r * 255 );+ s! W2 _5 F* j; C
                        dwG = (DWORD)( pLight->Ambient.g * 255 );
1 R, H4 U# ~% B2 T- _                        dwB = (DWORD)( pLight->Ambient.b * 255 );( C( [& U& Z  h/ n7 P
                        dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );                       
" z" {1 {1 j5 ~5 L3 ?4 r) m% n/ s                }
* F+ J! l2 W8 O* i        }5 ?! p- t; h: g# s

/ L/ M" ~( W& {  S; }+ [1 l7 W0 B" w        m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, bLight );//m_bViewLight );
$ g+ h9 K) D6 p  t; f3 S        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) );9 Q& y7 q" T" |' \! Q( ?# Q
        ::SetLight( bLight );
2 `% e  N' G& `
, u, q  i  y! p& ^        // ±ao? ?D?í???ó á¤à?
& ~, D% b; C# E' F) I, y        m_pd3dDevice->SetMaterial( &m_baseMaterial );
4 v0 o0 W& v. P3 }- H* Q/ o3 t       
: X) F# [8 N# P8 n7 G; g: K#endif // not WORLDSERVER$ J% G$ x% U1 e% A  l* Z4 D
}
6 L/ j5 d# i" X6 u并更换
0 F0 m8 d6 _6 G' M  WCode:
2 W3 r4 @8 ], R8 U& ___FLYFF_INITPAGE_EXT
. E; ^9 H$ t/ l% w" g+ n定义
2 g# ?9 |7 X' p& t7 X2 B$ s2 y: R2 w

3 |/ B0 @% A( R
5 H- m9 y9 o8 H  n& K
- G$ s5 E: `. V$ H: R' ]& b现在终于删除我的狗屁加速...8 M4 I/ s1 i4 P! a9 \) C0 U3 A

' U! c! E. v: t9 r
: s. _! B5 f( M- g% R# W+ m5 T1 B& Z, ?1 n% v. k





欢迎光临 飞飞世界论坛 (http://ffwold.com/) Powered by Discuz! X3.2