Little Fighter Empire - Forums
Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking - 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)
+---- Forum: Solved Problems (https://lf-empire.de/forum/forumdisplay.php?fid=45)
+---- Thread: Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking (/showthread.php?tid=3142)



Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking - 1477 - 06-27-2009

*Ahem*, ok, here's the official question.

Question:

I've been wanting to create an 'itr/kind 8' effect that tracks the object on 'centery' as well as 'centerx', and be able to track 'type: 3 objects' as well as 'type: 0' objects. How would I go about do this?

If the question cannot be answered directly, where is the source code for 'itr/kind8'?

Thanks...


~Solomon Leung


RE: Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking - TheNave - 06-27-2009

I made some different ik8's already

put this into
-generic.inc in the .data part
    ASM-Code:
;itr/kind8
ik8_pos1	dd 00430CECh
ik8_pos2	dd 00430D4Bh
ik8_pos3	dd 004318DAh
ik8_pos4	dd 00447A00h
;itr/kind8_2
ik8_other1	dd 004176EBh
ik8_other2	dd 00417F7Dh


-generic.inc in the .code part
    ASM-Code:
itr_kind8 proc
 
	CMP EDX,8
	JE SHORT kind8
	CMP EDX,80
	JE SHORT kind80
	CMP EDX,81
	JE kind81
	CMP EDX,82
	JE SHORT kind80
	CMP EDX,83
	JE SHORT kind80
	JMP ik8_pos2
 
kind8:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
kind80:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	JMP ik8_pos3
 
kind81:
	MOV EAX,DWORD PTR SS:[ESP+0Ch]
	MOV EDX,DWORD PTR DS:[EAX+44h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	ADD EDX,3E8h
	MOV DWORD PTR DS:[ECX+0E0h],EDX
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[EAX+14h]
	MOV DWORD PTR DS:[EDX+70h],EAX
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+58h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+58h]
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[ECX+60h]
	MOV EDX,DWORD PTR DS:[EBX*4+ESI+194h]
	FSTP QWORD PTR DS:[EDX+60h]
	MOV EAX,DWORD PTR DS:[EDI*4+ESI+194h]
	FLD QWORD PTR DS:[EAX+68h]
	MOV ECX,DWORD PTR DS:[EBX*4+ESI+194h]
	FADD QWORD PTR DS:[ik8_pos4]
	FSTP QWORD PTR DS:[ECX+68h]
	JMP ik8_pos3
 
 
 
 
itr_kind8 endp
itr_kind8_2 proc
 
	CMP EDX,8
	JE SHORT kind8
	CMP EDX,80
	JE SHORT kind8
	CMP EDX,81
	JE SHORT kind8
	CMP EDX,82
	JE SHORT kind82
	CMP EDX,83
	JE SHORT kind83
	JMP ik8_other1
 
kind8:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JNE skip
	JMP ik8_other1
 
kind82:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],3
	JNE skip
	JMP ik8_other1
 
kind83:
	MOV ECX,DWORD PTR DS:[EDI*4+ESI+194h]
	MOV EAX,DWORD PTR DS:[ECX+368h]
	CMP DWORD PTR DS:[EAX+6F8h],0
	JE skip
	JMP ik8_other1	
 
skip:
	JMP ik8_other2
 
itr_kind8_2 endp


-rarara.asm in the dllStartup proc part
    ASM-Code:
invoke JmpPatch, 00430CECh, addr itr_kind8
	invoke JmpPatch, 004176CCh, addr itr_kind8_2


Itr/Kind: 80 - Works like Itr/Kind: 8 but does not change your position
Itr/Kind: 81 - Works like Itr/Kind: 8 but also changes your y-position
Itr/Kind: 82 - Works like Itr/Kind: 80 but works on Type: 3 objects only
Itr/Kind: 83 - Works like Itr/Kind: 80 but works on everything except Type: 0 objects

I think it can be done better but atleast my way works^^


RE: Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking - Boop - 06-27-2009

(06-27-2009, 09:47 AM)TheNave Wrote:  <snip>
I think it can be done better but atleast my way works^^

That's all that matters :p. I'm sure most of my code is pretty crap, but since no one notices it, it makes no difference :).


RE: Itr/Kind 8 - 'Centery' Tracking/'Type: 3 'Tracking - 1477 - 06-27-2009

NICE!!! Thanks, Nave, do you mind reviewing my coding on my reply to the DLL Framework thread?

I've checked it over and over, but I couldn't seem to find the problem.

Thanks...

Problem Solved.


~Solomon Leung