static const DWORD newbuttaction1=0x00443C98;
static void _declspec(naked) newbuttonaction() {
_asm {
mov eax,dword ptr ds:[0x510944];
cmp eax,3;
jz end_cppf;
mov edx,1;
mov eax,0x2B7;
call newbuttaction1;
end_cppf:
mov eax,0x502074;
retn;
}
}
static const DWORD newbutt1=0x4d87f8;
static const DWORD newbutt2=0x419c88;
static const DWORD newbutt3=0x419188;
static const DWORD newbutt4=0x45e440;
static const DWORD newbutt5=0x419c88;
static const DWORD newbutt6=0x419188;
static const DWORD newbutt7=0x4d8260;
static const DWORD newbutt8=0x45e440;
static const DWORD newbutt9=0x45e440;
static void _declspec(naked) newbuttonfct() {
_asm {
mov ebx,0x451990;
mov edx,0x451988;
call newbutt1;
xor ecx,ecx;
push +0x0;
mov edx,0x1D6; //number from intrface.lst for button-up
mov eax,0x6;
xor ebx,ebx;
call newbutt2;
mov ecx,0x518f28;
xor ebx,ebx;
xor edx,edx;
call newbutt3;
mov ds:[0x59d3fc],eax;
test eax,eax;
jnz nbtnj1;
mov edx,0xffffffff;
call newbutt4;
mov eax,edx;
add esp,+0x4;
pop ebp;
pop edi;
pop esi;
pop edx;
pop ecx;
pop ebx;
ret;
nbtnj1:
push +0x0;
mov edx,0x1D5; //number from intrface.lst for button-down
mov eax,0x6;
xor ecx,ecx;
xor ebx,ebx;
call newbutt5;
mov ecx,0x518f2c;
xor ebx,ebx;
xor edx,edx;
call newbutt6;
mov ds:[0x59d400],eax;
test eax,eax;
jnz nbtnj2;
mov edx,0xffffffff;
call newbutt9;
mov eax,edx;
add esp,+0x4;
pop ebp;
pop edi;
pop esi;
pop edx;
pop ecx;
pop ebx;
ret;
nbtnj2:
push +0x0;
push +0x0;
push eax;
mov edi,ds:[0x59d3fc];
push edi;
push +0x2F; //returns this value when press
push -0x1;
push -0x1;
push -0x1;
mov ecx,0x29; //button width
mov ebx,0x13; //y-position
push +0x13; //button height
mov edx,0x20E; //x-position
mov eax,ds:[0x519024];
call newbutt7;
mov ds:[0x518f24],eax;
cmp eax,-0x1;
jnz nbtnj3;
mov edx,eax;
call newbutt8;
mov eax,edx;
add esp,+0x4;
pop ebp;
pop edi;
pop esi;
pop edx;
pop ecx;
pop ebx;
ret;
nbtnj3:
mov ebx,0x451990;
retn;
}
}
.......
// skill button x-position
SafeWrite8(0x0045DC04, 0x3F);
// adding new button
SafeWrite8(0x0045DA30, 0xE8);
SafeWrite32(0x0045DA31, ((DWORD)&newbuttonfct) - 0x0045DA35);
// new button event (replace original '/' event. I have no time for something else)
SafeWrite8(0x004437e9, 0xE8);
SafeWrite32(0x004437eA, ((DWORD)&newbuttonaction) - 0x004437ee);
SafeWrite8(0x00443838, 0x90);
SafeWrite32(0x00443839, 0x90909090);
// replace map-button y-position with characters-button y-position
SafeWrite8(0x0045dd40, 0x4e);
SafeWrite8(0x0045de1e, 0x28);
Alray said:M005193b8 (+1) - current slot for save\load
M005186c4 - total number of GVARs
Wasteland Ghost said:PS Lexx, to be honest this is an insult not for Alray, but for me. I was consulting dozens of modders, but I never, never leaked any information from them to the community. Never. Alray was working on this several month. Alone. Of cource he's insulted by such unjustified hostility. Please, I beg you to understand the situation and stop this. Any of this. We can speak personally if you want and resolve any vagueness left.
Darek said:In the mapper you can set one of the flags for a critter to multihex.