Browse Source

Vergil's Trick Down in Human form script is fully functional!

master
5 years ago
parent
commit
2ed23b46f0
2 changed files with 494 additions and 418 deletions
  1. 38
    13
      CEAs/vergil-allow-non-DT-trick-down-wip.CEA
  2. 456
    405
      DevilMayCry4SpecialEdition.CT

+ 38
- 13
CEAs/vergil-allow-non-DT-trick-down-wip.CEA View File

@@ -1,7 +1,10 @@
[enable]
alloc(newmem,2048)
alloc(newmem,135)
label(returnhere)
label(in_air)
label(no_anim)
label(maybe_do_it)
label(do_it)
label(exit)
//Vergil currently does not have a input combination:
//Lock-ON + Back + Jump
@@ -13,6 +16,9 @@ test byte ptr [esi+00001A64],01
pushfd //keep flags for the conditional jump on returning
je in_air
no_anim:
xor al, al
exit:
popfd //restore flags
jmp returnhere
@@ -22,37 +28,56 @@ in_air:
//now for preliminary checks
//these are done also on Trick Down (air)
cmp dword ptr [esi+3924], 02
jne exit
jne no_anim
cmp byte ptr [esi+3928], 01
jne exit
jne no_anim
test byte ptr [esi+392c], 10
je exit
je no_anim
movq xmm0, [esi+3930] //prepare registers for function call
mov ecx, [esi+3940]
mov ecx, [esi+3940] //this and above will placed on stack
sub esp, 14 //make room on the stack
mov eax, esp
mov eax, esp //use eax for moving stuff to stack addresses
movq [eax], xmm0
movq xmm0, [esi+3938]
movq [eax+8], xmm0
mov [eax+10], ecx
call DevilMayCry4SpecialEdition.exe+4CCD40 //listen lock-on input
//cmp [esi+1bfc], C //input for "back"
//jne exit
//mov eax, [esi] //get starting address for player character methods
//mov eax, [eax+234]
//push 2a //push animation i.d for trick down
//call eax
//don't add esp even though it's reasonable
cmp [esi+1bfc], C //input for back
jne maybe_do_it
do_it:
mov eax, [esi] //get starting address for player character methods
mov eax, [eax+234]
push 2a //push animation i.d for trick down
mov ecx, esi //set ecx to address of player character
call eax
mov al, 01
//don't add esp, end of real function will do that instead
jmp exit
maybe_do_it:
//*internally screams*
cmp [esi+1bfc], 6 //integer representation for diagonal back
je do_it
jmp exit //otherwise exit
"DevilMayCry4SpecialEdition.exe"+D2C77:
jmp newmem
nop
nop
returnhere:
DevilMayCry4SpecialEdition.exe+D2C80:
//script needs to set al
//if a move is to be done, al = 1
//otherwise, al = 0
nop
nop
[disable]
dealloc(newmem)
"DevilMayCry4SpecialEdition.exe"+D2C77:
test byte ptr [esi+00001A64],01
DevilMayCry4SpecialEdition.exe+D2C80:
xor al,al

+ 456
- 405
DevilMayCry4SpecialEdition.CT
File diff suppressed because it is too large
View File


Loading…
Cancel
Save