|
|
转载
: ~- D& D) j5 x5 I7 W( T$ y% eBY SJ
, J) w I; `! X2 A! `" L. r4 W首先你要会搞D2MuitlRes113C.dll与D2MultiResExt.dll(后者我是跟狂三要的)
* Z4 v8 j X4 K* ]/ {+ B. p. O) |2 Q. w" f4 m8 x
D2Gfx::D2DrawImage-10041
7 T7 C/ |+ s5 t/ h! Y4 H1、修复技能的背景(不需要可以不要)
7 A$ U0 n# d: d7 ]$ Ooffset = D2Client::GetAddress(0x77AA8);
$ s$ @) A2 I# G8 g: rMemory::SetCursor(offset);& A1 s( o* c6 @7 K
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_SpellBackGroundFix);
, e7 }- p( P8 d. X2 h6 d4 M& O! j& S9 p& Y+ z" c& i9 j3 Q
void __stdcall m_NewStatShow_SpellBackGroundFix(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette[256][256])
) |$ s s% y1 `% Q2 B{ B& B( S' J0 s, F
//Init data for print image4 g1 v6 y& ^8 S, j0 V2 v9 m
sDrawImageInfo data;
* l- Y* j3 j0 D. e1 @ ZeroMemory(&data, sizeof(data));# S9 C: J G- A+ S/ |* u
9 b, S% l+ X' j: O* E //print background
6 e9 N: z: ]3 ~6 t& {* I setImage(&data, spellBackgroundImages);' B& F9 ~9 P* W; x; r: F6 ?
setFrame(&data, 0);6 `1 W3 H" i7 {) D& g
int fixx = 511;
$ m# U ~ u P, A0 Z6 H n) q8 y' _ int fixy = 9;
, N, u( j, ^& z% b+ c: X( s D2Gfx::D2DrawImage(&data, RX(0+ fixx), RY(256 + fixy), -1, 5, 0);
6 e! o4 h4 B& p y setFrame(&data, 1);
$ I7 g6 f/ H: H1 q7 L' p% z D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(256 + fixy), -1, 5, 0);//256
( M( X8 V6 W0 T% H6 d setFrame(&data, 2);; e& j/ O4 S6 y% }$ u( y) N
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(0 + fixy), -1, 5, 0);//432
7 Y! o( Z! b) e' k8 } setFrame(&data, 3);
, S6 J9 M4 V0 L1 A D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(0 + fixy), -1, 5, 0);
& m! W a6 |, q! Q5 R/ a}
# \/ B7 y- w+ ^( {__declspec(naked) void caller_SpellBackGroundFix()
8 Q3 r& ]" \; a5 y$ T{; z7 K" e; {$ _( p8 w/ H0 {" a
__asm: K: s- Q' Q5 f4 B
{1 `. s* F1 j# _ i
PUSHAD
9 j) E1 E. [5 y/ u! p; {; q lea eax, dword ptr ss : [esp + 0x38]2 b" ~% U6 e3 l. J/ f4 n
push eax
. m8 y; ]0 }$ s; S2 }- V push dword ptr ss : [esp + 0x38]5 X a% n8 I8 d$ P! M
push dword ptr ss : [esp + 0x38]
/ F. U9 m' B9 I9 _: o2 R1 K lea eax, dword ptr ss : [esp + 0x38]
" h$ l: y0 |8 X) e8 t push eax, o" b8 H0 Q: y8 k: Q# I% D
lea eax, dword ptr ss : [esp + 0x38], t1 u3 v" }0 z8 V: x( \
push eax; O2 @. ?9 V2 E. K. m/ V( |. s
push dword ptr ss : [esp + 0x38]( ?; T1 \7 J" _% @* r0 w* _" D6 Q/ c2 y
call m_NewStatShow_SpellBackGroundFix$ e, s5 m. I& x9 [. S z* z$ T
POPAD
! W5 @& d9 z6 u, {7 C JMP D2Gfx::D2DrawImage( v; f& C. T- o! u4 X
}
- G7 ^1 j6 C! o; x; H) g% k9 b}
" B" W+ } Y7 s; [4 c/ U# g5 y: P! o( k" o0 a G
2、我们如法炮制小站的背景
: w( |7 ^& t# x7 X1 r; }2 }( u+ W
8 b% S) P( s- w3 [; z$ Eoffset = D2Client::GetAddress(0xAB010);
) Q- \- d9 q0 S4 x! A/ jMemory::SetCursor(offset);! e: ?, W8 H# o2 Q3 B1 y
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_WayPointBackGroundFix);6 W. m% |: F9 {2 g; h, M
2 c1 H. h4 x# o2 W
void __stdcall m_NewStatShow_WayPointBackGroundFix(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette[256][256])0 C, y8 d0 W! w7 f
{) q; N8 M' i1 v: W
//Init data for print image
! ~# _" C8 y3 Z p. F4 q4 f sDrawImageInfo data;7 U$ s. I+ |, r; R2 V0 ?- M b- T
ZeroMemory(&data, sizeof(data));- P6 `' i+ V- C0 {
' {7 Z& c' t4 V0 B
//print background
1 _6 E- _8 [' M7 V0 r setImage(&data, waypointBackgroundImages);
c/ J2 ]8 U6 _0 T: E3 r$ L# g" I- K setFrame(&data, 0);- ~% o0 c" E. \
int fixx = 0;5 V5 P: F7 f: j9 b+ I( w+ A
int fixy = 9;, w5 w6 F2 g5 p) X
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(256 + fixy), -1, 5, 0);/ t5 X* [- k6 I9 m3 P% C) @; f
setFrame(&data, 1);
' a$ T7 T" {& e D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(256 + fixy), -1, 5, 0);//256
) w% V5 N1 T$ G5 \6 i9 s/ \9 w, _' r7 L setFrame(&data, 2);$ T/ ?3 l$ e8 X$ x9 \- f& k( z
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(0 + fixy), -1, 5, 0);//432% D6 N3 \! Y* _# r/ z" U
setFrame(&data, 3);
+ |0 R3 N, a) H* ] D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(0 + fixy), -1, 5, 0);
~+ W: H3 A8 M7 r$ H/ R) X0 i: N/ O' I k# ^7 x6 e9 V$ v
}# n4 g" Q# i, z% z, P% A
__declspec(naked) void caller_WayPointBackGroundFix()% C8 q, H( z! \# ?
{+ X) M, X5 s0 F
__asm+ T+ u- L" q' l% x7 X+ h/ S
{
" r1 S p/ \7 ~; e4 _1 w R1 m PUSHAD; ~ { t: k/ x2 r! Y7 H
lea eax, dword ptr ss : [esp + 0x38]- D: d, W p* l! F
push eax5 {. A h9 B3 B0 y& m
push dword ptr ss : [esp + 0x38]
6 K2 Q$ ]; R0 @8 ] ^& u; q push dword ptr ss : [esp + 0x38]
9 j9 o1 G# d& d3 O% \& ~ lea eax, dword ptr ss : [esp + 0x38]
}: o/ t: J! o5 D push eax
# x+ w% [8 k( a3 Q0 Z& K% l0 g lea eax, dword ptr ss : [esp + 0x38]! k3 G+ w( ^' \6 C
push eax
( u) ^! U7 i b3 Q push dword ptr ss : [esp + 0x38]) ~. y1 X. g1 s6 \+ s
call m_NewStatShow_WayPointBackGroundFix$ c) ]8 Q! O4 F6 ?8 U5 {# n
POPAD# y& x* h0 a: B4 ^0 e1 s' M
JMP D2Gfx::D2DrawImage
: y3 K' c4 F+ s- h9 x( P }5 g+ I6 `' |3 j9 _9 d/ o \6 k
}7 k6 U% D j1 Z
, r5 k. x3 {* ~6 _: O, X$ I3、以下可以搞16*16超级箱子-腾出我们需要的边缘
- v4 Y* Q' F" E' t3 N" i/ D$ H腾出我们需要的边缘(事实上可能会出现一些黑边,但是我没有修复)7 C" }2 F; Z* p" i+ k: F: \9 t
{' I" N$ X# Y7 @9 x
class D2MultiRes : public Library<D2MultiRes>( B& e/ r& u( i! @; u
{
h; x1 A" _4 n7 F. h public:
# i+ V5 `+ `8 D, \9 i6 g" L$ \* P) X static void Init()
9 Q0 G( B* S2 {/ n {' x6 ]' Q/ M% r u
Name = "D2MultiRes.dll"; Q/ _, i, T# R9 C" W% ?
Offset = LoadDiabloLibrary();
# d" d4 M' g7 n }
8 p+ [2 c' q6 M' v- Y7 p };
/ B* u1 s- [9 r8 V1 Q! ? D2MultiRes::Init();
5 ~) {2 S! S s D2MultiRes::HookLibrary();- n& B6 C+ ?1 I" W% m! J- q$ q8 W3 i
% \; k: I; D9 N& T% J
5 ~1 u! x: C; [, y+ a9 u2 K
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2468);% e3 h0 k- e% P; ?* i, r3 g6 I4 L0 g
Memory::SetCursor(MiscFunctionsOffset);0 t8 f% V8 h- T) h3 B2 v @
Memory::ChangeDword(0x1b0, 0x200);6 g- {4 s# n' G# t# d7 e
+ s+ L1 O5 k! ^/ ~, i( O1 y* x9 W
3 T1 e3 `) ]5 F6 \: s$ @. i' f
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2b0a);
( s9 A; w( e6 Y7 y8 ^ Memory::SetCursor(MiscFunctionsOffset);
# c1 A, s- G# C r Memory::ChangeDword(0x140, 0x200);
`( t! q4 w3 P8 N3 U0 L8 I$ y, x% I% |( j( w+ w; j1 t- l
7 V/ r& E' Z8 P. k9 z W! p MiscFunctionsOffset = D2MultiRes::GetAddress(0x2b10);
: e) E( O9 G0 V4 O6 c& ^ Memory::SetCursor(MiscFunctionsOffset); ~" }. _: L: x6 ^ X: _
Memory::ChangeDword(-0x234, -0x299);//280-295 290是上面多一块 310是下面多一块9 t. E$ u t; X& N, M" i1 H
" {! ^2 H5 ]" Q& g
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2bfe); h ?( y2 X n1 J) V. v5 S9 F
Memory::SetCursor(MiscFunctionsOffset);
% `5 t1 p2 O* W# o* c) M; N+ a Memory::ChangeDword(0x200,0x299);//下边缘 299最大
. ?( F" f' w# g9 \" F- Y
' J7 t% Q* t5 v+ Q0 h3 _& o' d6 N MiscFunctionsOffset = D2MultiRes::GetAddress(0x3301);9 ]5 m. b) z2 A0 A
Memory::SetCursor(MiscFunctionsOffset);/ |& F- _# ~+ r8 R6 [
Memory::ChangeDword(-0x280, -0x400);//这个不要动
# C% t6 F8 P4 u" m0 d& K2 N9 _: F }
; B$ P2 A6 I" {- a, S2 ]0 M9 l% B5 A2 g. Z- T
4、快完成了,是不是发现金币啥的位置不对??
* f- }2 s% i0 ^# d0 I
, u I, L. Y1 H" s, @# n9 i9 Q//这里修正我们的装备栏
4 G8 ^; C8 P8 x, f. q offset = D2Client::GetAddress(0x99B6C);
`- ~; R6 G2 e' F- q- _ Memory::SetCursor(offset);
, n% F) a; D0 y' `. P" C1 \ Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
! O7 d, A4 }& Z* ]0 d/ O8 `
. |' [- T$ ?2 F offset = D2Client::GetAddress(0x99BA7);
$ p3 p, R8 t8 u; K) s- ]' V3 Y Memory::SetCursor(offset);% Q$ n( F* k, f, ~
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
, V& A- ^3 G8 M% S: W
6 k3 N+ W9 d3 n$ G% X offset = D2Client::GetAddress(0x99BE2);9 o$ s _- v+ J' |0 i- T- j" \# }* c) `
Memory::SetCursor(offset);
6 T& {2 k6 P+ E- [/ t T Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);/ [ ^& P/ L" o
+ Y& W5 r$ @+ H9 Y: a offset = D2Client::GetAddress(0x99C1C);
6 [# ~2 C3 r) C7 U: X# O Memory::SetCursor(offset);# r) F! u& L% g- e- H4 \: }
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);" H5 F, I+ N0 O; @8 K
3 d; V( S/ O6 m( s# E+ v //取消两个popup,偷偷懒不过分
& `8 T2 i7 \5 Z8 m4 t, q: z4 P offset = D2Client::GetAddress(0x9386d);
# V# D" C" h% B; G) [ Memory::SetCursor(offset);
1 @! Z6 X, G) q% V; i0 U# t Memory::ChangeByte(0x8b, 0x33);& }% U% n# B8 @- _4 V6 X* W
Memory::ChangeByte(0xc8, 0xC9); j; Z) y* \5 U+ @( f3 z7 W
offset = D2Client::GetAddress(0x9390b);/ ~9 U0 ]7 n4 r7 N4 k4 g! Y3 A3 c
Memory::SetCursor(offset);
9 K J% u+ l; ~ Memory::ChangeByte(0x8b, 0x33);
/ f9 g, R( |- K" t) T Memory::ChangeByte(0xc8, 0xC9);5 I# | F# u# l: [5 R1 \) `0 A% s
0 y6 J: E- T7 P9 {: J2 }! }* S) J- ^! ` //修正提取金币" @ u* |- L4 |1 L: B
offset = D2Client::GetAddress(0x8D3E5);
! ^8 e8 c ]2 W* R' ~ Memory::SetCursor(offset);
4 d. c9 {& E; r" N Memory::ChangeByte(0xA1, 0xE9);
N- H& p; g- m2 ?1 e3 `. G Memory::ChangeCallA((DWORD)D2Client::ptNegWindowStartY, (DWORD)caller_goldcoin);$ t. h9 [1 e# a) @- h) X
- f n* {; o+ o5 l0 a( y8 { offset = D2Client::GetAddress(0x6FB3D2E0-0x6FAB0000);
5 T3 U% K9 w4 H, r3 q Memory::SetCursor(offset);# { h! c& i6 ?% }% u
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_goldcoinimg);- v/ Q. x6 `" }5 z+ B
2 i3 s0 t1 D7 M( q6 n6 S
offset = D2Client::GetAddress(0x6FB3D267 - 0x6FAB0000);
: S: a- B, d, p7 r) \ Memory::SetCursor(offset);
; ]2 D; E8 k# n. s% r9 } Memory::ChangeCallB((DWORD)D2Win::D2PrintString, (DWORD)caller_goldcointext);& D8 [, T- \: n6 \9 B
% F* Y# d" q+ T! B9 z& q) S9 }! k! {
//修正关闭按钮6 D! H; p# [2 r1 u
offset = D2Client::GetAddress(0x8BD90);" Z8 H. F0 a! K2 }8 B$ @' y5 B
Memory::SetCursor(offset);
* D$ b2 L& K8 }* {1 D Memory::ChangeByte(0xA1, 0xE9);# j r6 H+ j+ e% W
Memory::ChangeCallA((DWORD)D2Client::ptScreenSize, (DWORD)caller_close);- Z5 B* j; s$ f
: i# O& L$ o6 p$ I) g
offset = D2Client::GetAddress(0x6FB4A721 - 0x6FAB0000);
* w' i4 L* U/ |% ]+ M! c- s Memory::SetCursor(offset);
. p# Y! J) m+ j$ l; Q/ u) x Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_closeimg);
; A8 P- Y4 n) r1 E9 z' ^/ t) l" W) l$ o
; i% H: {. T" A& H2 M
//以下是细节
3 ?9 ~1 A+ H, Z) l5 `% r#define getXGoldCoinFixBtn() RX(0x2d0)
! T: Z% i4 {/ ?- m+ b#define getLGoldCoinFixBtn() 32& C* e( |' e7 c
#define getYGoldCoinFixBtn() RY(-0x59)+ L2 o) @) Y' U/ l. j/ ^$ `/ I9 ?
#define getHGoldCoinFixBtn() 321 U" |2 M0 y7 `# j( y
#define isOnGoldCoinFixBtn(x,y) isOnRect(x, y, getXGoldCoinFixBtn(), getYGoldCoinFixBtn(), getLGoldCoinFixBtn(), getHGoldCoinFixBtn())
[4 J. g8 }. u! i" s) G0 k
7 H# U! ?$ s% e. W/ M& a) L% P6 }#define getXInvCloseFixBtn() RX(0x3db)
/ L' Q8 z3 {. B& |; `0 O: _; e" d#define getLInvCloseFixBtn() 32
5 i8 e5 P- U- l" I; o6 z; n#define getYInvCloseFixBtn() RY(-0x63)
$ f- \3 X1 B1 {7 O5 v#define getHInvCloseFixBtn() 32
. F1 z( I8 D. ^#define isOnInvCloseFixBtn(x,y) isOnRect(x, y, getXInvCloseFixBtn(), getYInvCloseFixBtn(), getLInvCloseFixBtn(), getHInvCloseFixBtn())' D; e- m5 A8 `' ?- a
9 `( Q7 u1 K5 P/ O2 [. l7 ]3 mBOOL __fastcall m_NewStatShow_goldcoin(DWORD x,DWORD y)
! F+ l5 X* M$ g" D. ?{# n+ e. b# ]+ F' ^0 J
DWORD mx = *D2Client::ptMouseX;
" s3 i, C8 w' r7 Z c( n0 \ DWORD my = *D2Client::ptMouseY;
; V- G6 P0 D* T0 u4 A. v6 g3 {/ z if(isOnGoldCoinFixBtn(mx, my))
3 f6 i9 y! w4 }& T/ _) ?) e return TRUE;/ H4 Z7 O$ n4 E. o
return FALSE;
; X6 f% {5 R! x) F; C# e}( N; b$ @2 ]: t- r
__declspec(naked) void caller_goldcoin()
! |. s3 W6 U' D' Z0 R' N* N{
/ L2 ^. |4 J" \5 [/ I9 g __asm% o( H* k% ?' B. k
{
; z% e, z7 l" I' p8 @ [! v push ebx
/ D6 [. u4 @/ A% h D mov ecx, esi* {& o. C x! \% S) y, R1 O3 l
mov edx, edi
/ c3 f3 @1 Q; o" l: n call m_NewStatShow_goldcoin
* i$ A# n9 x/ E) M4 d0 |0 p pop ebx [2 `! E6 C& p% l9 t* _
pop esi- i( M1 d0 T. G3 C! ]% k& l
retn' ^. O% }# }' e6 e+ ?' B
}
0 g1 e- E' K( j( ?}1 k. Z8 g1 Z g5 I! q1 J$ Z
void __stdcall m_NewStatShow_goldcoinimg(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette[256][256])
. p6 f% O& t* n' I{
$ {% c7 y3 G* y: }, N% n" N1 p if (*nXpos > D2Client::ptScreenSize->x / 2)
/ U$ y& ~/ i4 l/ H {: Z' H0 T' x* d* q
*nXpos = getXGoldCoinFixBtn();3 }, x( U5 x* p" Z. W6 t
*nYpos = getYGoldCoinFixBtn();
4 j' ^& T, j$ X6 B }
8 X1 A6 ^/ Y( c/ j}0 c1 y: u' P5 `, Q8 {) o( r
__declspec(naked) void caller_goldcoinimg()2 U2 D5 v7 ?% x
{
' ^! w" n" q# T __asm3 I, S# d3 T5 t0 R3 q9 d
{" u9 a5 r+ F4 G# k6 ~( y" ]5 X
PUSHAD$ r- z) ^. p0 `0 K& J0 s
lea eax, dword ptr ss : [esp + 0x38]
# f6 h3 ]$ s1 D" x push eax4 O+ W2 D9 ?& m1 b! K- r
push dword ptr ss : [esp + 0x38]
/ x% D. C8 `! @, y. {" s3 O; k push dword ptr ss : [esp + 0x38]
; Y" r* {0 R3 n+ h; R3 d lea eax, dword ptr ss : [esp + 0x38]
( _- y- e1 ]) q) H, F9 E, ] push eax( u1 _6 Q* e8 a: a
lea eax, dword ptr ss : [esp + 0x38]
3 ?4 R7 k/ Q& X push eax
7 R- W' [7 b$ W* u: R. J% |+ w& @ push dword ptr ss : [esp + 0x38]
: M! t6 N9 c. Y& l call m_NewStatShow_goldcoinimg0 ?5 E, p1 P1 B6 \/ S! H
POPAD
3 n! R7 S4 K/ r/ X JMP D2Gfx::D2DrawImage
! C/ ]/ y2 u# }! ?) a1 \- ~ }7 P3 z3 X$ j. h
}
0 E. P2 N: x5 X, jDWORD __fastcall m_NewStatShow_goldcointext(DWORD x,DWORD* y)//返回x坐标
$ K. o% t: R5 z7 S3 O{' z' U6 b+ | j* T1 ]7 a* _
if (x > D2Client::ptScreenSize->x / 2)! P z( D; m; `, z: ]( W) @- f
{! M# N8 ?" ~9 Z% ?1 O: q {
*y = getYGoldCoinFixBtn();! Z- y, `5 T1 H, H$ F x; Z
return getXGoldCoinFixBtn() + 32;
1 X* b' _" x$ R5 B0 u7 a* n }8 ~" S# N- {4 T4 |2 h
return x;
, t- J& i2 l0 \+ G1 e}
3 `9 R" R. R4 l$ x( Y__declspec(naked) void caller_goldcointext()
* X; R+ u+ ^5 {1 C+ U) ]{; n' p a1 _* t6 q! d: h; ?6 d: j- q
__asm
1 P4 N! R: k+ }/ _7 w! I* a {; j, c% W$ @1 c7 o( W3 T% a
PUSH ECX& E. N8 y: _! ^) D% V/ D' q
PUSH EDI
( f+ a4 {7 E! F% i: k, N; h$ W' Z PUSH ESI! [' c R) F7 o* k, p. W, A' T
PUSH EAX
5 X/ W- S% ]) W; @. z3 B/ r; ^( i MOV ECX, EDX$ Q! n" M' S. v; W
LEA EDX,[ESP+0X4+0X10]. p- G" K( ]* D* d) n- }
CALL m_NewStatShow_goldcointext6 m+ |9 {2 i5 {, {; v2 i& Y) Z
MOV EDX,EAX
& ~- b$ z( h' {! |) G/ T POP EAX
: }+ i& q/ v3 C" ^" s! [5 I5 }: ] POP ESI+ D" ~' U/ }) o4 G; {
POP EDI8 w9 @" Z3 o7 w- U
POP ECX* h3 r" _7 R# w( T/ L! M( P: R
jmp D2Win::D2PrintString;
6 ]* u3 O/ X1 V/ j( J/ n* D }; R2 ] X# r$ q/ l+ U: _ V2 k
}
8 s% m, m4 D! [
# e2 J" M: D3 V+ B) CBOOL __fastcall m_NewStatShow_close(DWORD x, DWORD y)
7 `' e: F6 W; E. F! O* t5 q7 Y( m{
3 I" N; _+ k" ?3 d DWORD mx = *D2Client::ptMouseX;
' O4 _" b" ?4 o; f' U& `' n DWORD my = *D2Client::ptMouseY;
- u" M8 q W- e- n if (isOnInvCloseFixBtn(mx, my))) n* {5 y8 o; Q4 M' `
return TRUE;7 K' {7 `( W8 |$ Q
return FALSE;
6 G" c* L- x& r7 Z}
5 }3 Q. l' f1 x8 B/ T5 j__declspec(naked) void caller_close()6 q) h6 F2 c9 I( b4 @4 K- a( r: R
{% v& k) |5 t6 V& ^
__asm" z3 j) ~9 [" ~( w
{/ A; i6 S2 a. ^6 u" O
PUSH ESI
$ r$ |, q7 B X: I1 e H- O" z push ebx
5 g9 U+ A5 o- b& q1 g; \" e call m_NewStatShow_close
' E* a$ @/ Z- Y3 T; Y" w* P- [ pop ebx! X! p9 q- Y/ m5 z* u
pop esi
+ j1 h' v1 b$ D J8 Z6 \ retn
B6 Z6 X; W: P/ b }
7 l- V3 b7 {: w- \4 w. o$ g}
& e8 q6 `; u+ K( i S) D3 i8 Z5 avoid __stdcall m_NewStatShow_closeimg(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette[256][256])
( J4 K; l, F! X+ V% k/ B{
; R7 u1 B8 L4 K) d" E* B! W2 l *nXpos = getXInvCloseFixBtn();
8 O) l+ v8 [7 y6 N *nYpos = getYInvCloseFixBtn();
* ? P/ y/ W/ ~: i" l; h. x}
, H* W m- l# q5 ?0 i. E__declspec(naked) void caller_closeimg()
0 Q* }! n1 S- }{
% O: K& z7 W/ J; d- Z& r __asm
( z8 b$ q0 ?, ?+ c# C% ^7 a7 G8 P. u& z; Q {0 K/ d* I# N# J$ v6 Q) J
PUSHAD
' J* G# L1 z" _( K& Y. ~ lea eax, dword ptr ss : [esp + 0x38]
i2 q+ e* T( H G5 G) h1 D push eax+ y) R: k1 d, ]7 u, n+ C4 J
push dword ptr ss : [esp + 0x38]. O, j! J1 A5 ^
push dword ptr ss : [esp + 0x38]
0 s9 K3 N$ Y- y% l8 [- A; P lea eax, dword ptr ss : [esp + 0x38]
, J: P$ {" R9 F) r' h0 D5 T push eax( v* r; \2 T8 j) D: j9 f
lea eax, dword ptr ss : [esp + 0x38]
- ] o* y, K4 M, ]; H9 N push eax
, O/ I7 e% M( ] push dword ptr ss : [esp + 0x38]. v# G$ v- \$ t' j$ L
call m_NewStatShow_closeimg1 l! ?+ m e: d7 S/ ?
POPAD: L: `; Y ]4 H) c
JMP D2Gfx::D2DrawImage! k% X4 e! ~. p- C4 [
}
8 {/ A& E: E2 `/ d& o; D# [, Y0 g}! X& G0 b: n4 [* W7 R: Y7 X; f
1 N7 \, v4 K3 h2 N, W
* D& g0 }1 P- e$ u |
|