![]() |
Get tileset and music file
Hey, has anyone done the reverse engineering and found out how to read the level files and retrieve the filename of the tileset and the music file? And, while we are at it, the next level :p
It would be a lot helpful to write some code to read this and figure out missing dependencies in one's level collection. Thanks. |
That's no doubt been done :D
|
|
Whatever has been said. In addition, if you program in C++, I have created some (messy and uncommented) classes that deal with such files, which you might be interested in.
|
(-), I only asked how to extract a few strings, not a complete file specification :)
I'm only writing a mIRC script, but I guess that since I have to use zlib, I'll have to write a mIRC DLL in C/C++, so, yes, I'm interested in what you have. Thank you |
IRC Client
Are you going to release this when you're done Cata?
(If not can u give it to just me? I won't give it out to anyone else :D ) |
To Drmoo: it'll be part of version 4 of my add on.
I've followed you example, but I always find a mismatch between what you say to be the declared size of the output stream and the actual size of the output stream as reported by uncompress(). I'm using zlib 1.2.3 Code:
#include <stdio.h>battle 3 (the 1998 file): input size 3264, actual output size 33517, expected output size 16814 Written: 33517 bytes ab5btl11.j2l input size 2039, actual output size 34029, expected output size 6810 Written: 34029 bytes ab5btl12.j2l input size 1389, actual output size 34029, expected output size 5452 Written: 34029 bytes Actual output size for 1.24 files is usually 73069. |
There are 4 data streams, and the sizes you are reading from (offset 254) actually refer to the 4th one. What you want to read, or are reading, is the first data stream, so you need the sizes for that. I would suggest you read the first 262 bytes into a STRUCT of some sort, but if not you can always try the following amendments (marked in red):
Code:
if (fseek(file, (long int) 230, SEEK_SET) != 0) { |
Somehow I got the idea the stream was immediately preceded by the sizes.
Anyhow, I've finished the program, now it's just a matter of rearranging it and compile as a dll to use with mIRC. Maybe then I'll start doing something more interesting with the level files. I'm going to post the code for the completeness of this thread. Thanks to those who replied. j2linfo.h Code:
typedef struct cstream {Code:
#include <stdio.h> |
| All times are GMT -8. The time now is 09:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online