飞飞世界论坛
标题:
自动饮血和登录视频
[打印本页]
作者:
admin
时间:
2016-1-10 03:46
标题:
自动饮血和登录视频
食品车:
! N- a( [& Z' w2 q
尾翼:
% C N$ w: ^, Z2 I1 K, P) w/ F! J
. d5 L! |2 m. ^3 j) [
代码:
" ?+ k9 M6 ]3 Q+ F8 l% j
CWndAutoFood::CWndAutoFood()
/ I( h. m+ R$ G& a' V7 q1 ?
{
+ F( r0 f5 j: ~6 f( T
m_pItemElem = NULL;
' f( g8 U" p# F8 D4 s0 r8 W
m_pTexture = NULL;
9 P8 \" G5 T' ^& s
bStart = FALSE;
5 ]7 {2 R8 G9 P' n; Z
}
5 K! Z; w* D+ H: C4 j8 T% ~
! S) u$ n2 b) b1 d6 e: J4 P0 s
CWndAutoFood::~CWndAutoFood()
1 F- F+ L1 x+ V5 {2 |, {7 U1 x7 c
{
8 _$ o( w0 r# t5 l* u" y8 F
AfxMessageBox( "AutoFood ist gestorben
" );
1 @7 j+ I, l1 v. O; `# F& S/ i
}
3 K, \, _# ?- J+ K$ _' H5 S
BOOL CWndAutoFood::Initialize( CWndBase* pWndParent, DWORD nType )
4 j7 M' M3 P# Y$ ?% B
{
0 e4 T- Y! R* E4 H9 r6 B
return InitDialog( g_Neuz.GetSafeHwnd(), APP_AUTOFEED, WBS_MODAL, CPoint( 0, 0 ), pWndParent );
K: E0 d- z2 t% t7 g
}
+ W* G, B& `% U! b% x
- i3 ^ L: h: @ k: C) k
BOOL CWndAutoFood::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
- M+ M. S( V6 P& @+ j% h: P
{
8 E4 k2 H0 b8 B
LPWNDCTRL pWndCtrl = GetWndCtrl( WIDC_CUSTOM1 );
% g& m) k/ s4 a: C$ m m
CRect rect = pWndCtrl->rect;
6 a' J# K2 b7 w* w# w) N% a- k
if( rect && rect.PtInRect( point ) )
$ Q" l7 q; S P! ~9 W8 [
{
* ^" Y b% ~) B/ T; h: G3 L
CItemElem *pItemElem = (CItemElem*)g_pPlayer->GetItemId( pShortcut->m_dwId );
- T/ e; H5 M x" F# K8 w
if( pItemElem && pItemElem->GetProp() && pItemElem->GetProp()->dwItemKind2 == IK2_FOOD )
8 \" m! `8 W: Y# m! b
{
y. p, t1 ^, g7 V
if( m_pItemElem )
- s1 [7 q2 U6 w1 N: {9 R$ R
{
3 t0 j$ Q) e2 ?3 k3 l& f5 o
m_pItemElem = NULL;
2 ?' ?0 a- o% z) C$ q* ~
}
3 L0 K! R+ f" E, f) d% X3 W1 t6 ^7 X
m_pItemElem = pItemElem;
7 Q! x1 ^" Q6 C" e; t) x9 d
m_pTexture = CWndBase::m_textureMng.AddTexture( D3DDEVICE, MakePath( DIR_ITEM, m_pItemElem->GetProp()->szIcon ), 0xffff00ff );
, z7 y$ ?; U8 P9 s" [
}else{
3 O8 L$ V+ {4 F3 c
SetForbid( TRUE );
4 j. c% u% C2 ^# ]& L5 |; Z
}
2 ^* L$ y3 u6 | g7 D
}else{
. d1 B; L3 E2 @
SetForbid( TRUE );
, d8 n. |4 u1 s$ K
}
% ?4 {8 S1 k; V5 p3 |8 T) n
return TRUE;
5 L1 l& v8 r% g5 U
}
$ V) l, `# \. c
" ?# d% r# e$ N% V
BOOL CWndAutoFood::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
, `/ X" d3 _2 @* B, n K+ F
{
% ~2 L* N$ _, e+ C9 g6 o
switch( nID )
- u \* v% N1 Z* L; z
{
! h! L# q2 s8 L' L5 F: C% y& u
case WIDC_BUTTON3:
/ F: I% I9 g1 Q5 y0 U/ p7 _
{
& h$ l8 g. X: W8 A& F7 \
bStart = TRUE;
0 l+ x/ J/ X7 l, ^- d
break;
1 E. L1 j. Z0 t2 w1 |( Y5 z. ~7 `
}
2 e) I# y' P+ u& u& {
case WIDC_BUTTON4:
: S, p0 [& m: w+ F8 M( V6 a' p% o
{
( N7 Y) j% D) b& d6 X1 C( K
bStart = FALSE;
! v X4 l6 f# N9 s5 x0 V
break;
+ `+ D6 d" y7 A3 ^. n
}
5 z* k. J$ K8 w
}
- F7 Z H e6 ?
return CWndNeuz::OnChildNotify( message, nID, pLResult );
! U2 z' Y2 ?7 z, W9 y: o
}
, U, u/ z w0 Z
void CWndAutoFood::OnDraw( C2DRender* p2DRender )
/ s3 a( y# {" O0 `4 X
{
: o3 ?: E X5 ]$ B8 S: q6 d2 `
CWndButton* pBtn = (CWndButton*)GetDlgItem( WIDC_BUTTON3 );
* q9 m$ j) \$ ~$ P) l/ Q
if( bStart || !m_pItemElem )
% A) y; D! a) x3 f, P' \
{
, i0 e$ w& |: P$ [
pBtn->EnableWindow( FALSE );
& ?' c2 p- s+ _: o; k3 u/ r7 g
}else
* A% j K0 D( s
pBtn->EnableWindow( TRUE );
% b' t# |# @0 d3 S. I/ }' E
if( m_pTexture )
: r1 `' S& H% p5 ~' ?6 Y9 z
{
$ f( a; h3 ~* W: k
LPWNDCTRL wndCtrl = GetWndCtrl( WIDC_CUSTOM1 );
2 e6 z! R& s! J. T5 p
if( wndCtrl && wndCtrl->rect )
4 O- ^' E" N$ v! S' M
{
7 F, ]5 L# e9 A- g/ d% A
m_pTexture->Render( p2DRender, CPoint( wndCtrl->rect.left, wndCtrl->rect.top ) );
+ j, |; ~0 h6 ` p' {) I
}
0 r3 U8 q0 |: D5 C. T8 B
}
: n$ j8 R" j0 z& I/ r) g5 I
}
4 t' | m1 g/ ~5 ?- M" a: Z5 c
6 M4 I: r- @ L( Q" K1 h+ U$ z. k9 h
BOOL CWndAutoFood:
rocess()
$ O" M9 h, l- X# K
{
- B1 o% j. T0 ?: Q: {0 g. S
if( bStart )
4 k/ a% b1 y5 u, U
{
1 v6 C9 D0 l' I7 ]: `4 J6 r; z( w o
if( m_pItemElem && m_pItemElem->GetProp() && m_pItemElem->m_nItemNum > 0 )
$ C8 r. ~; W2 l8 Z* c" A
{
0 ]0 W! g0 r d* x* h+ Z% O8 u
if( g_pPlayer->m_cooltimeMgr.CanUse(g_pPlayer->m_cooltimeMgr.GetGroup( m_pItemElem->GetProp() ) ) && m_pItemElem->GetProp()->nAdjParamVal1 + g_pPlayer->GetHitPoint() <= g_pPlayer->GetMaxHitPoint() )
6 V4 g( z( k# s; b( k9 c4 K; @" g
g_DPlay.SendDoUseItem( MAKELONG( ITYPE_ITEM, m_pItemElem->m_dwObjId ), NULL_ID, m_pItemElem->GetProp()->dwParts );
8 H+ Q- N0 P6 @- {7 Q5 A( _! K, I
}else{
; K, l3 a7 Y7 K2 Y1 C+ I
bStart = FALSE;
" a% I& D( N: _. L0 l/ f& z
m_pItemElem = NULL;
2 d M1 x. J6 L. \8 l
}
$ j ~8 L6 y1 O( c
}
# K) L5 T x. ]: p' s7 Q+ ]. x9 B& H
return TRUE;
, ~, z5 l8 O k5 z$ j
}
/ N1 N5 J+ D) ^ P% Z' H3 M
- e; E- o+ z# z0 H) ^
登录视频废话:
p/ i/ ?% e; R8 O! ~9 q [2 p, |
尾翼:
9 p* \0 g& h( O' @: H v5 O
, E, j; O. p* i3 o7 u; J
代码:
3 i+ x! s) J) D( ]4 V
/ x4 a& [; L/ ?- k" L( }0 c# q
void CWorld::SetLight( BOOL bLight )
. X% l6 @9 T: i" N: }
durch
4 K6 b7 t' \+ ]2 B$ T
Code:
- J9 [% K% r* W6 Z& T
void CWorld::SetLight( BOOL bLight )
* c$ ]+ o) S2 Q" P: _/ U% S& s
{
! \+ y* O: m* g4 }
//ACE("SetLight %d \n", bLight);
0 e/ @1 K! M* [0 C
]9 Z* |) G* I$ F6 C& q: {
#ifndef __WORLDSERVER
) J0 O8 S7 W1 m2 v' |0 D, K
DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);
( H% p" k9 A, H& {$ H
CLight* pLight = NULL;
- r/ _. X6 ? ^2 u: {* V7 ~3 H2 s
- ?0 B. K) c9 U1 a* o; {; q: k
D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) );
3 D) M# X2 `% O) z9 R7 M, o
& t. x9 f) B4 T4 t# n! B: A
pLight = GetLight( "direction" );
0 J: e, c2 m' H! f$ G) {3 W" J4 E8 o
) V+ d7 z# F: M5 q0 ]5 M- A3 Q( _
#if __VER >= 15 // __BS_CHANGING_ENVIR
! U6 T* C6 }' a% N& K% j
if( g_pPlayer ){
' W5 }$ [) D- S3 f* p
ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) );
: O) ?5 e7 G) Q+ q. @
if( pInfo && m_kCurContinent._bUseEnvir ) // ′??ú ?èàì°í ′??úá¤o??| àì???ò °??ì?? !!
- D0 m9 b- l! k* u. z3 p2 y- G
{
; u% a3 y/ W# y6 N5 O
if( pLight )
, R: v/ h+ z- W4 z J$ Y9 Q
{
2 ^1 D2 f8 {* V9 ?( f* z
pLight->Ambient.r = pInfo->_fAmbient[ 0 ];
8 c* \$ T, b2 j/ y& Y
pLight->Ambient.g = pInfo->_fAmbient[ 1 ];
& S3 s7 ^: p; O; k, n. E' d
pLight->Ambient.b = pInfo->_fAmbient[ 2 ];
+ b- v% \9 @, ?8 t9 G
+ C8 U% s) D( `
pLight->Specular.r = 2.0f;
1 E3 E; r* T9 F
pLight->Specular.g = 2.0f;
( o& U& d4 @" F' r) | f
pLight->Specular.b = 2.0f;
' w8 F% [& L' A0 m$ U9 x
3 H0 P5 @ |4 U7 j2 q% ]
pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ];
F0 @# G2 [8 _ f8 Y
pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];
! B) B! }7 b* z0 h1 N8 H" W
pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];
- ?) [5 ?' Y' v; N( ^; O
& K" X% k" s' J$ k0 d# o
HookUpdateLight( pLight );
* f0 Y! m" q& U0 u; {
* A# f8 r& h9 M2 ?
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
; w7 n; ]. ^/ [1 C
; |$ J7 [* G6 v1 F+ @
pLight->Diffuse.r *= 1.2f;
( q* c1 |* Y" u, D
pLight->Diffuse.g *= 1.2f;
* n! k( y' s! S* W+ a7 o
pLight->Diffuse.b *= 1.2f;
9 P) n9 }4 M# O+ n& C# J' ~
/ n; h6 A1 u& [/ U' U3 g E
pLight->Ambient.r *= 0.8f;
5 U9 ?! n* k8 ?( B W
pLight->Ambient.g *= 0.8f;
2 M% V" W: u2 |2 W5 h9 R% T8 x
pLight->Ambient.b *= 0.8f;
2 q0 a( e! X A$ F% D0 v
. A# f: t7 A" {- Z- i
memcpy( &m_light, pLight, sizeof( m_light ) );
& a% O6 q, D; {. ^! r& Y& r. v
0 X% ], w" j; Y5 ?( ]. N, Y" S; U4 l
D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
$ i* T9 s# V" [/ V7 w3 Y
D3DXVec3Normalize(&(vecSun),&(vecSun));
K1 y1 l6 Y- [5 ^3 k
pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z );
# r6 g$ E M: x; z( R
pLight->Appear( m_pd3dDevice, TRUE );
) g: ^/ z8 H) [+ l4 h, Y. g+ v
' j1 G+ s5 C( s. V6 a
DWORD dwR, dwG, dwB;
1 y! R" i8 [1 C* O* |1 ?
dwR = (DWORD)( pLight->Ambient.r * 255 );
6 F3 \$ J+ o8 G1 d% [1 s; n5 J
dwG = (DWORD)( pLight->Ambient.g * 255 );
- A( }; l$ a A
dwB = (DWORD)( pLight->Ambient.b * 255 );
6 S( z3 J. f# W& E) ]# V
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
+ |+ B2 a7 n$ P
}
" N1 V' l) [0 l* o8 s
}
; M2 C! t& e8 B9 @- M
}
- ], `0 x' k8 g7 \# t; m4 `
else
. T9 {7 d5 g9 B5 C5 U1 `* Z! J
#endif
9 D* n1 w" W2 Q+ ^4 e7 j5 N7 U) C
) A8 e5 O, _+ J
if( m_bIsIndoor )
( [ t/ L% Z% b' \( `' ~8 g' B
{
3 i, i( _, e5 Y0 R/ D* \
if( pLight )
- C J# n0 \. F6 a! E k' ]4 Q
{
$ T; u* S; l+ y* Y6 L
// à??μ oˉè*
D5 v, w- \% J3 ~7 Y2 a4 P" O
pLight->Diffuse.r = ((m_dwDiffuse>>16) & 0xff) / 255.f;
! H/ j) o- y$ k* ]5 q: G" `8 z
pLight->Diffuse.g = ((m_dwDiffuse>>8) & 0xff) / 255.f;
( M! E7 V3 A2 b" a" |9 O2 V2 B
pLight->Diffuse.b = ((m_dwDiffuse) & 0xff) / 255.f;
0 H7 @) C" J( |& {* S" Q' p* N( f
# S7 Z( a X4 ^9 K5 O8 ^
// oˉè* ??à?
1 B6 v2 I3 R$ \# q4 f4 X
pLight->Specular.r = 1.0f;
6 }1 X/ C7 a4 j6 D1 H
pLight->Specular.g = 1.0f;
- u% {5 Y* I4 q0 s# s2 l8 J) l; `/ Q1 o
pLight->Specular.b = 1.0f;
# K6 ^) {0 I+ q: g; I! q( F
// àü?? oˉè*
( b. a5 `, [( {1 Y% w
pLight->Ambient.r = ((m_dwAmbient>>16) & 0xff) / 255.f;
; c* S7 z& f$ M7 N; J: K/ x' s
pLight->Ambient.g = ((m_dwAmbient>>8) & 0xff) / 255.f;
x/ q: G$ A" @) `& I* ?
pLight->Ambient.b = ((m_dwAmbient) & 0xff) / 255.f;
7 q4 G/ K! w: P8 l
6 O$ U( Y) ?% p, \ p& \
if( g_Option.m_nBloom ) // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.
7 n7 q O* K0 y- F* u; p
{
- I1 V% f2 x. R8 z f
pLight->Diffuse.r *= 0.6f;
) E" x/ O. A2 }& Y% y4 v. T
pLight->Diffuse.g *= 0.6f;
1 F3 z4 h$ ~3 T) D, U% X) b6 [
pLight->Diffuse.b *= 0.6f;
E) D: B9 a9 t% G8 d3 x' O8 ^
pLight->Ambient.r *= 0.7f;
- N& i! s% c) m; N. ~$ I
pLight->Ambient.g *= 0.7f;
: |+ @& O8 B4 z, H: k! ]+ ^
pLight->Ambient.b *= 0.7f;
! x3 C" h* V/ P: S. O9 }
}
' S8 r( K7 C! i8 G1 y
2 V7 z$ t# o% ]) P
#if __VER >= 15 // __BS_CHANGING_ENVIR
; I8 H x$ W# C/ H8 `
if( g_pPlayer )
* N% |3 r' z. E4 T
HookUpdateLight( pLight );
2 r) n' j' |+ |6 D( I
#endif
; G. v; Z r$ |+ E$ v
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
0 I8 h9 v+ z5 E8 C+ ]7 e
0 {2 s8 O* P; P2 p
pLight->Diffuse.r += 0.1f;
% u G( J) X; @. L
pLight->Diffuse.g += 0.1f;
/ D' k4 [) _+ i2 D4 O5 A# i3 s2 A
pLight->Diffuse.b += 0.1f;
" C8 @( h8 [( k; h3 }: Z; d/ z" N
// oˉè* ??à?
# d4 f% r6 ^( F- H8 ~: B6 ]
pLight->Specular.r = 2.0f;
# u8 Q/ R& c! J+ ?" c K w
pLight->Specular.g = 2.0f;
' B8 q/ w' l# L: s; N( q1 X
pLight->Specular.b = 2.0f;
+ H) f+ F3 s! X
// á?oˉ
& A& l( E+ F* {4 ]
pLight->Ambient.r *= 0.9f;
/ x7 e* m$ ~. U
pLight->Ambient.g *= 0.9f;
+ b) @0 [6 T& z0 }
pLight->Ambient.b *= 0.9f;
" i* ]0 w% Z2 p. D8 G8 X
' v- P% N9 x5 B ^5 V) H. s
memcpy( &m_light, pLight, sizeof( m_light ) );
2 R% u z, T/ `+ J
& @& r5 L' j A- L! C6 I: Y
pLight->SetDir( m_v3LightDir.x, m_v3LightDir.y, m_v3LightDir.z );
" [$ x% d5 x) ]6 C z8 I% P
pLight->Appear( m_pd3dDevice, TRUE );
N9 i5 a8 Y9 G1 w5 l$ O- h5 \
- y8 m! b, ~0 H% k i2 U/ x
DWORD dwR, dwG, dwB;
* {9 Q. N( ~- j6 W D" p4 m
dwR = (DWORD)( pLight->Ambient.r * 255 );
& \8 X, V3 @, b! v( V
dwG = (DWORD)( pLight->Ambient.g * 255 );
: U R- b9 U* ~$ t; R; x
dwB = (DWORD)( pLight->Ambient.b * 255 );
4 ~( H" B- }: k9 Q$ {6 O: j
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
9 ?2 I( K# n4 p& j" x0 u3 i
}
0 {7 {7 U& O; J2 d
}
2 t, v. K5 F% Z0 H9 {
else
) g0 j% p* o5 F, i# I
{
! I; B( v. r* m& [6 v
if( pLight )
9 {# G" T/ y# y) p3 v3 A) v
{
* k3 l4 s" _$ i
* M9 X7 G, ? ~8 O
int nHour = 8, nMin = 0;
" Q+ U5 y5 Q/ Q- }$ o
#ifdef __CLIENT
6 y% m- L8 a8 a# H' P
// ???óàì?e??′? ??°£à? g_GameTimer???* °?á???′ù.
+ T- c, K) x* |$ [& H
nHour = g_GameTimer.m_nHour;
' T4 n i1 H$ ` B9 Y, c- j {$ x9 E& b' m
nMin = g_GameTimer.m_nMin ;
% \" ?% h& F& W9 O
#else
' f/ f. i4 l) c
// o??o??′? ??°£à? m_nLightHour???* °?á???′ù.
- n' {' x5 N O9 d9 J6 @1 n7 f+ f
if( m_nLightType == 1 )
6 j0 S9 S0 P% {* C' o0 ~5 W
nHour = m_nLightHour;
8 d. A. E- s2 Q8 x3 T% h1 ]' t
#endif
( h" c3 B3 q m7 D
nHour--;
3 [3 ]# P, p$ H
if( nHour < 0 ) nHour = 0;
# U. a1 j/ G" C7 O* r$ D6 w
if( nHour > 23 ) nHour = 23;
8 ?# [( \, Z5 a# |; l
! @+ u: d4 Z9 ~4 L
//if( m_bFixedHour )
7 P |0 a p, W0 g. N* @' \
// nHour = m_nFixedHour, nMin = 0;
8 m- S7 H2 N/ p2 h
LIGHTCOLOR lightColorPrv = m_k24Light[ ( nHour - 1 == -1 ) ? 23 : nHour - 1 ];
- A. M' {. `2 l. @, y0 K l+ Z9 J
LIGHTCOLOR lightColor = m_k24Light[ nHour ];
' ]# g7 y3 P( T/ s9 X+ W7 r
% @9 r) v* |9 Y0 M( q+ a/ `6 i
//m_lightColor = lightColorPrv;
' l. f7 ]8 ]3 d6 q1 l4 q
lightColorPrv.r1 += ( lightColor.r1 - lightColorPrv.r1) * nMin / 60;
6 n/ Y& G- I: i) ^: U0 L
lightColorPrv.g1 += ( lightColor.g1 - lightColorPrv.g1) * nMin / 60;
& J, j4 Q- n+ i4 j( L
lightColorPrv.b1 += ( lightColor.b1 - lightColorPrv.b1) * nMin / 60;
7 Z2 X8 _: ?8 `1 K5 w
lightColorPrv.r2 += ( lightColor.r2 - lightColorPrv.r2) * nMin / 60;
! P3 Y+ {. z+ K
lightColorPrv.g2 += ( lightColor.g2 - lightColorPrv.g2) * nMin / 60;
7 R% B3 e; D I$ g; U
lightColorPrv.b2 += ( lightColor.b2 - lightColorPrv.b2) * nMin / 60;
3 N& p0 U0 i9 H+ i
// 60(minMax) : 15(curMin) = 0.5(colorDistant) : x(curCol)
. d& _- K/ p; T0 R& l( {3 x
u' E0 e3 Y( c8 ~9 h: x- l1 B, U
// à??μ oˉè*
# R) E2 v0 h) I) W
pLight->Diffuse.r = lightColorPrv.r1;
) T- p4 N1 X3 T0 U9 R4 A* g
pLight->Diffuse.g = lightColorPrv.g1;
" }; c7 d8 a4 @" x" m
pLight->Diffuse.b = lightColorPrv.b1;
3 K- S6 v+ |3 o& T' N
// oˉè* ??à?
7 K/ U8 y# \$ l9 f, L
pLight->Specular.r = 1.0f;
/ K0 s# d; @, e) |
pLight->Specular.g = 1.0f;
6 t8 s- ~6 I) Z8 [- P) w
pLight->Specular.b = 1.0f;
' k4 Z. |) i: P" T( r
// àü?? oˉè*
2 c# r" d; G( h
pLight->Ambient.r = lightColorPrv.r2;
, k& f; `) q8 ~+ d0 f
pLight->Ambient.g = lightColorPrv.g2;
6 g: y+ I# j& P+ Z
pLight->Ambient.b = lightColorPrv.b2;
$ L% {2 W4 e. O9 F# E
# M7 r' H; c- k6 q1 Q- L
if( g_Option.m_nBloom ) // ???t?? ?é??àì ??á?à?à??? á??íà? á? 3???áà?? ??′ù. ?è±×?ˉ?é 3ê1? 1à??.
7 U* U$ V* w% X) J6 {) b
{
$ i* k* `( }, I; f, A& Q
pLight->Diffuse.r *= 0.6f;
. _ F9 z- I4 M- h
pLight->Diffuse.g *= 0.6f;
! \! H4 }+ D) E; r2 X8 [
pLight->Diffuse.b *= 0.6f;
, o6 f( ^7 T ~# I, t
pLight->Ambient.r *= 0.7f;
" I$ `2 H6 N# j2 d4 e( l6 t
pLight->Ambient.g *= 0.7f;
5 ?1 \/ ^" ?: t0 X# j$ v
pLight->Ambient.b *= 0.7f;
* t, ^4 S8 o7 f4 @- f. s
}
; R2 D! l5 T r
$ a! |* i/ f$ W" O" c V/ n
#if __VER >= 15 // __BS_CHANGING_ENVIR
- C3 q3 q' u1 c& `# ~
if( g_pPlayer )
, L" h# R( L3 |: d) D r
HookUpdateLight( pLight );
. B! v; {! q+ _" y$ X9 E
#endif
8 v0 p% N: x# Y, W- C
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
4 ^; F5 U3 y N. [8 D
& A+ x6 g! [3 z$ ^& y
#ifdef __YENV
) ]$ d$ A" ]! l
pLight->Diffuse.r *= 1.1f;
1 {1 K& H- k' J" n+ A; c/ j
pLight->Diffuse.g *= 1.1f;
$ ?: Z0 l' V' F' E/ k: G
pLight->Diffuse.b *= 1.1f;
, ]- s6 C( Q& D* _ K7 N
// oˉè* ??à?
/ h5 Y% J0 I8 ~' [$ M/ [
pLight->Specular.r = 2.0f;
6 L1 i+ r, @" w2 ^ b# `6 e
pLight->Specular.g = 2.0f;
U% _; I% y4 j q4 `
pLight->Specular.b = 2.0f;
$ S O/ t2 Z- d; r. X/ }
// á?oˉ
/ Z K n! s: Q0 f, D* L
pLight->Ambient.r *= 1.0f;
1 L9 b8 R; t8 h( l M% J/ Z
pLight->Ambient.g *= 1.0f;
0 ?* E. d3 ?& V7 C0 v
pLight->Ambient.b *= 1.0f;
( h+ e: U6 K$ W3 x. S2 O! h n3 b
#else //__YENV
[ `" P+ P; O* I) _
pLight->Diffuse.r *= 1.1f;
! @: H3 B5 r2 {; V/ l) \; P
pLight->Diffuse.g *= 1.1f;
: K7 y) P W" | Y
pLight->Diffuse.b *= 1.1f;
: A. d: r- c% K! M! a3 d2 J. `
// oˉè* ??à?
% r; z4 ~: n2 |' f/ ?; L
pLight->Specular.r = 2.0f;
3 t7 F% e+ l9 d2 j! f9 x6 m+ o, z
pLight->Specular.g = 2.0f;
# a& c* e6 C I( v
pLight->Specular.b = 2.0f;
; }) _* u( Y* m4 L: H
// á?oˉ
/ h2 g, e6 U2 j
pLight->Ambient.r *= 0.9f;
. n' X/ ]- h( N- w4 y+ e- ?2 c* E
pLight->Ambient.g *= 0.9f;
( _4 B" o. ?4 U2 b7 u- A
pLight->Ambient.b *= 0.9f;
6 f: ~/ n7 \" E- ?8 G/ A/ n
#endif //__YENV
/ O$ e' R. E. T( U" s
# c8 p$ `. _; Z N+ x2 W- j
memcpy( &m_light, pLight, sizeof( m_light ) );
% ] B. D# r* A$ e- r1 n r2 ]* m
7 c' W: Y- r5 X" n: s# E/ y; {
D3DXVECTOR3 vecSun=D3DXVECTOR3( 0.0f, 0.0f,1.0f);
O' {2 P- |. _% ]
D3DXMATRIX matTemp;
" v4 W5 q7 R7 Z" V5 [) H, S
static const float CONS_VAL = 3.1415926f / 180.f;
- g& q7 w0 r6 l1 e8 o5 e
4 K0 L; y" `5 S
D3DXMatrixRotationX( &matTemp,(m_skyBox.m_fSunAngle +180)*CONS_VAL);
; v% \4 ^* P; N, W& D
D3DXVec3TransformCoord(&vecSun,&vecSun,&matTemp);
3 H9 J$ K3 T( G; o
pLight->SetDir( vecSun.x, vecSun.y, vecSun.z );
" h6 r2 Y, O5 N
pLight->Appear( m_pd3dDevice, TRUE );
* C- S( t" {* B" o4 S
9 [- E$ ]$ q3 Z8 \$ R) C
// D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
6 n# G3 c, Q& K# H
// D3DXVec3Normalize(&(vecSun),&(vecSun));
1 c& e% B% L4 K# U& B. o2 {2 l/ J
// pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z );
) {0 a0 ~' e4 X) Z( O$ k/ l
1 S0 f5 r4 x5 a; ~- ~
DWORD dwR, dwG, dwB;
; G, u2 v5 D. r7 {. z. E
dwR = (DWORD)( pLight->Ambient.r * 255 );
" h9 K8 j2 V$ l+ o) u$ J0 U
dwG = (DWORD)( pLight->Ambient.g * 255 );
$ j: H. {8 ?0 W/ x; i
dwB = (DWORD)( pLight->Ambient.b * 255 );
5 {! B9 W1 }6 a* T) Y
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
3 U! W& C3 y, f. j
}
8 T3 _5 b8 u3 E) ~. G9 Z9 K) g
}
h4 A |0 E i+ o& C/ |# p
1 E: t1 E2 F {- m
m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, bLight );//m_bViewLight );
) c7 w& Q- n, R
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) );
* j! j2 g# R( ^2 b4 p/ Q
::SetLight( bLight );
1 V- k! Q( P3 D/ T5 I
$ d# S' y; s8 g' K
// ±ao? ?D?í???ó á¤à?
1 U3 l: R- r) K; a& o3 d* x) v
m_pd3dDevice->SetMaterial( &m_baseMaterial );
7 r% E5 s+ V1 Q5 s
$ T' n; H7 |# z5 F3 E+ R' Y$ X! i' ^
#endif // not WORLDSERVER
1 B! f6 [3 V* O( q: g- }0 W, X
}
8 D3 S. |: M0 I
并更换
# o' J0 V6 e& a. a+ @/ R8 T4 d/ v
Code:
% F4 j5 W, a, J) E! q
__FLYFF_INITPAGE_EXT
8 a, w4 z. q+ \+ x
定义
' }4 F3 ] e! R5 D) d3 J
/ c( ?5 j7 q: X
: T- J' ?6 N+ Q1 C, S+ A
! H/ t! s1 w7 A9 E* x
7 j3 `# }+ z" j" Z( {
现在终于删除我的狗屁加速...
4 {* w. d# i/ X5 V; ^% Z
% H! O4 I9 W# E6 H' L. g0 \
j U% x: {# [' u" T6 Z( q
1 U C/ p6 I8 Y+ E' g, q+ {$ W! Y
欢迎光临 飞飞世界论坛 (http://www.ffwold.com/)
Powered by Discuz! X3.2