Little Fighter Empire - Forums
Percentage system in lf2 loading text - 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: Percentage system in lf2 loading text (/showthread.php?tid=9004)



Percentage system in lf2 loading text - InPhiKnight - 10-27-2013

I tried o understand the system of this exe using percentage as loading text
http://www.mediafire.com/?8748buzh3dxdu34
[Image: i325870_Untitled1314.jpg]

Normal lf2 exe has the loading system near
Code:
0042436D
but the percentage exe has in
Code:
004243EC

I tried to understand it ..... rather implement it on another exe, went through all the CALLs and PUSHes and what not but due to lack of knowledge I was unsuccessful.

Here I am again asking help again.....help would be appreciated


RE: Percentage system in lf2 loading text - Boop - 10-27-2013

Address Hex dump Command Comments
004243AF |. 50 PUSH EAX ; |

String is pointed to by EAX.

Address Hex dump Command Comments
0042439B |> \8B4424 1C MOV EAX,DWORD PTR SS:[ESP+1C] ; |Default case of switch lf2.42437B

eax is written there.

Replace MOV EAX,DWORD PTR SS:[ESP+1C] with MOV EAX, YOUR_ADDRESS

where YOUR_ADDRESS is where your percentage is held.



RE: Percentage system in lf2 loading text - InPhiKnight - 10-28-2013

Couldn't understand what you wrote up there. Tried to understand it for about 1½ hrs but couldn't.

If possible please explain by giving an example.


RE: Percentage system in lf2 loading text - A-Man - 10-28-2013

Suppose you want to change the loading text to just say "Loading.. Please wait".
You're first going to go scroll downwards to the area where you can find lots of free addresses (where there are lots of "add byte ptr ds:..etc stuff"), right click on any line => Binary => Edit. At the "Ascii" box above, type "Loading.. Please wait" and go OK. Now you see the address you wrote the text at ? Lets call that X. Now replace X in here:
0042439B MOV EAX, X ;

I suppose PUSHing X once and for all at 004243AF would work as well.

Now for the percentage, the address you point at should contain "(current data/total data) *100" evaluated and,I guess, as a string.

Goood luck!


RE: Percentage system in lf2 loading text - InPhiKnight - 10-28-2013

I know how to change the loading text.

I think your theory is right about current data/total no. of data .....but the thing is how to implement it( make the exe calculate the total no. of data.)


RE: Percentage system in lf2 loading text - Dr.Death - 10-28-2013

I dunno where you got your stuff form but I actually have an LF2-Version on my Computer which is loading with %(called LF-S i think).
So if your goal is to implement that too somewhere, maybe another way of implementing will help you.


RE: Percentage system in lf2 loading text - Silverthorn - 10-28-2013

(10-28-2013, 04:12 PM)Dr.Death Wrote:  I dunno where you got your stuff form but I actually have an LF2-Version on my Computer which is loading with %(called LF-S i think).

Didn't that one just have renamed dat-files? :p
For example, instead of "Julian.dat", renamed to "01%.dat" or so.


RE: Percentage system in lf2 loading text - Dr.Death - 10-28-2013

I have no idea, i am just a LF2-Gamer who eventually wrote a few Stages but that's it :P
I just encountered it and remembered it so i thought it might help :)

EDIT: I looked it up and you're right BP