Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Percentage system in lf2 loading text
#1
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
...............
Reply
Thanks given by:
#2
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.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#3
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.
...............
Reply
Thanks given by:
#4
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!
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#5
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.)
...............
Reply
Thanks given by:
#6
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.
[Image: 78f0db68c4.jpg]
Reply
Thanks given by:
#7
(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.
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: A-Man , Dr. Time
#8
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
[Image: 78f0db68c4.jpg]
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)