![]() |
|
|
#1 |
|
UT Package signature
I'm trying to create a utility in Java to read the information contained in a package file.
However, the information on the link below doesn't seem to correspond. For example, the signature at the start should be "0x9E2A83C1" but it's not. Am I doing things wrong or was the format changed after this was written ? http://wiki.beyondunreal.com/Legacy:Package_File_Format
__________________
![]()
Last edited by Zur; 20th Mar 2009 at 08:50 AM. |
|
|
|
|
|
|
#2 |
|
Open packages with a hex editor to see the real thing. Keep in mind that Java, unlike most other programming languages, uses big-endian byte order by default. The Unreal package file format is defined to use little-endian, though.
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#3 |
|
Good remark. I'll see if it's possible to convert from little-endian to big-endian.
__________________
![]()
|
|
|
|
|
|
|
#4 |
|
Either use "Integer.reverseBytes(in.readInt())" or simply read the value byte-wise and use bit-shifting and bitwise OR to combine them in little endian order.
__________________
Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication (but were afraid to ask) [in German] | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|