Little Fighter Empire - Forums
Action on game finish - Printable Version

+- Little Fighter Empire - Forums (https://lf-empire.de/forum)
+-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7)
+--- Forum: [2.0] Exe Editing (https://lf-empire.de/forum/forumdisplay.php?fid=43)
+--- Thread: Action on game finish (/showthread.php?tid=5878)



Action on game finish - Xidd - 12-12-2010

couldnt think of a better title... basically makes characters go to a specific frame when the summary screen shows up

code:
    ASM-Code:
action_on_finish proc
 
	MOV DWORD PTR DS:[44D02Ch],1 ;original line
 
	cmp dword ptr ds:[451160h],0 ;only for VS mode
	jne return
 
	xor eax,eax
 
next:
	cmp byte ptr ds:[458B00h+eax+4],0
	je skip ;object doesn't exist
	mov ecx, dword ptr ds:[458B00h+eax*4+194h]
	mov edx, dword ptr ds:[ecx+368h]
	cmp dword ptr ds:[edx+6f8h],0 ;object isn't type 0
	jne skip
	cmp dword ptr ds:[ecx+2fch],0 ;character is dead
	JLE skip
	mov dword ptr ds:[ecx+70h],201 ;set frame to 201, change this
	skip:
	inc eax
	cmp eax,400
	JL next
	return:
	ret
 
action_on_finish endp


and

    ASM-Code:
invoke CallPatch,0041DB8Dh, addr action_on_finish
	invoke WriteMem,0041DB92h, addr FourNOP,4
	invoke WriteMem,0041DB96h, addr oneNOP, 1

you actually need the WriteMem stuff since this is a CallPatch and not a JmpPatch

anyway this basically:
*) checks if in vs mode
*) loops through all objects
*) checks if the object exists
*) checks if the object is type 0
*) checks if the character has more than 0 health
*) sets frame number to x (here it is 201 for testing)

could be useful for victory stance or something - could also be used to fix any bugs which may occur during weird transforms and summary screens and stuff... yeah


RE: Action on game finish - YinYin - 12-12-2010

has anyone ever made winning stances so far?




anyway

noted for lf½


RE: Action on game finish - Xidd - 12-12-2010

not that i know of... i was just looking through silvas old threads to try and find some hidden gems when i stumbled upon "Supra"

one of the issues was with characters not transforming back properly and screwing up the summary screen - this should be a fix for it


RE: Action on game finish - Marshall - 12-12-2010

>has anyone ever made winning stances so far?
well, quality spriters can now. a nice addition imo

Good man, Xidd!


RE: Action on game finish - Surik - 02-02-2011

Good work Xidd! Very necessary thing