How to add Float Big Endian
-
- What is cheating?
- Posts: 2
- Joined: Fri Mar 03, 2017 2:09 pm
- Reputation: 0
How to add Float Big Endian
So the old forum is gone. I missed out on this how to [Link]. Any one able to help a fella out? Thanks!
Re: How to add Float Big Endian
Could you try these ?
Run this lua code 1st, In 1) Table/Lua Engine ; or 2) In a script subrround by {$lua} ... {$asm} tags
This is a quick conversion of some type to 4bytes or 8 bytes Big Endian equivalent integer.
To search BE float, which is 4 bytes, select 4byte type (not float), and enter something like : toBE(1.5,'f')
'f' is for float, 'd' is for double which is 8bytes.
But this method only for exact value search (ie. you know the in game float value exactly, not just approx.),
since there is no ce rounding to include possible tolerance, even in-between will not work.
bye~
ADDED:
google cache of OP's link:
[Link]
There are custom type scripts for BE float and double.
Run this lua code 1st, In 1) Table/Lua Engine ; or 2) In a script subrround by {$lua} ... {$asm} tags
Code: Select all
function toBE(n,sz)
if type(sz)=='string' then sz = sz:lower()end
sz = sz or 4
local ifmt = type(sz)=='number' and 'I'..sz or sz
local ofmt = sz=='f' and "I4" or sz=='d' and "I8" or "I"..sz
local p,u = string.pack,string.unpack
return (u("<"..ofmt,p(">"..ifmt,n)))
end
To search BE float, which is 4 bytes, select 4byte type (not float), and enter something like : toBE(1.5,'f')
'f' is for float, 'd' is for double which is 8bytes.
But this method only for exact value search (ie. you know the in game float value exactly, not just approx.),
since there is no ce rounding to include possible tolerance, even in-between will not work.
bye~
ADDED:
google cache of OP's link:
[Link]
There are custom type scripts for BE float and double.
-
- What is cheating?
- Posts: 2
- Joined: Fri Mar 03, 2017 2:09 pm
- Reputation: 0
Re: How to add Float Big Endian
Hmmm. I should have been more detailed in my request. Stupid me. I was actually looking to add Float Big Endian code to the Auto Assembler, but I will try this out when I get home to see if it works. Thanks!
Who is online
Users browsing this forum: osenbeichan