• Welcome to Valhalla Legends Archive.
 

[Resolved] Hex Translation

Started by Don Cullen, June 23, 2005, 09:18 PM

Previous topic - Next topic

Don Cullen

Can someone look at the area outlined in red, and tell me what it means? This is the timer offset for SC's ingame text display function.

*Screenshot removed due to issue being resolved*

And can someone tell me why does 0F0F0F0F result in Starcraft displaying a message permanently (unless scrolled off, in which case Starcraft usually modifies the timer offset to reflect new messages)?

Basically, the point of this is, I'm trying to figure out in what form Starcraft uses the timer offset...
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

Soul Taker

Well I'm going to ignore the first question since you say 12 bytes are supposed to be used for a timer which, although could be possible, I think you're probably leaving something out.
The reason that editing a timer value to 0x0f0f0f0f would make it display semi-permanently is because Starcraft probably uses some system like GetTickCount() - TimerValue to determine how many miliseconds to display the message.  So passing any random value has a high chance of making the message stay there for a very long time.

Don Cullen

Ah, I see... But the problem is, the offset seems to have what seems to be gibberish, I can't see how Starcraft would figure out what the delay length should be based on that... Any idea on what format Starcraft uses to set up the Starcraft timer?
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.

tA-Kane

Possibly a FILETIME struct?
Macintosh programmer and enthusiast.
Battle.net Bot Programming: http://www.bash.org/?240059
I can write programs. Can you right them?

http://www.clan-mac.com
http://www.eve-online.com

Don Cullen

#4
I figured out the format... it's in hex-- decimal converted to hex, that is. what it does is get the gettickcount function, then adds the delay in milliseconds to it. for example:

Delay = 4000

Delay = ((GetTickCount()) + Delay)

Then the next step is to write the hex code (dec into hex) into memory.

I did some checking at the msdn library, and rewrote the function a bit. Now I definitely know what's up. Thanks.
Regards,
Don
-------

Don't wonder why people suddenly are hostile when you treat them the way they shouldn't be- it's called 'Mutual Respect'.