thread: .lvl files
View Single Post
  #599  
01-25-2010, 02:59 PM
Paul's Avatar
Paul
Outlaw Sniper
 
: Jun 2007
: MilkyWay
: 1,535
Rep Power: 20
Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)Paul  (718)

:
@ThibG But i have no idea where the values are. it doesn't say where they are and stuff. Its hard to hex edit without Addresses. @paul But the dos version has what the names of values are called. And i think a decompresser called. dcc or something can give you source code.
Its impossible to get the original source back, the win32 version is easier to reverse because it actually runs on my computer and I can debug it. Also since the win32 version was compiled with the MSVC 6.0 compiler its easier to identify vtables and construct/destructors (and hence the inheritance tree).

Edit: By the way for offsets..

struct PlainSavFile { // 8096 bytes
char unknown1[32]; // Unknown, zeros
char unknown2[32]; // Unknown, non-zero
char unknown3[448]; // Unknown, zeros
char unknown4[4]; // Unknown
uint32_t gnframes; // Global frame counter
char unknown5[2];
uint16_t level_part; // first integer in sublevel name %sP%02dC%02d
uint16_t level_component; // second integer in sublevel name
char unknown6[2];
uint16_t hero_x;
uint16_t hero_y; // In fact, hero_y - 1
char unknown7[2];
int16_t score_saved; // Number of escaped mudokons
int16_t score_killed; // Number of killed mudokons
// 0x021d
char unknown8[937];
// 0x05c6
uint16_t have_ring_1;
uint8_t number_of_projectiles;
uint8_t unknown9; // WTF?!
// 0x05ca
char unknown10[82];
// 0x061c
uint16_t have_soulstorm_fart;
// And many other unknown things...
};

You calculate it from the size of each element so:

uint32_t gnframes; // Global frame counter

is at offset

char unknown1[32]; // Unknown, zeros
char unknown2[32]; // Unknown, non-zero
char unknown3[448]; // Unknown, zeros
char unknown4[4]; // Unknown
uint32_t gnframes; // Global frame counter

32+32+448+4 = 516, or in hex 0x204
__________________
[ http://www.paulsapps.com ]

Crawling sligs will shout "Mommy!" while running around and then the slig mommy will appear and help them put their pants on.


Last edited by Paul; 01-25-2010 at 03:02 PM..
Reply With Quote