Page 2 of 2

PostPosted: 06 Jan 2008, 20:54
by harold
just wondering: will the decoding-progress of the .rx files be updated?

PostPosted: 29 May 2008, 00:44
by harold
Update on decoding:
The text0.dat through text3.dat files also contain palette's
and forget most other things I said about those textX.dat files - it was mostly wrong.
Among other things that is
They look a lot like the normal palette's (pal0 etc) and I bet they're used to decode the rest of those files. Not 100% certain though, and those files still contain more information that I can fully explain. Hopefully it's water animation..

Also, I successfully decoded guimain.rx but it required a hardcoded LUT so I'm cheating - the location of this LUT in the data is unknown, if it's there at all. It uses the following palettes: setup.lbm, Setup2.bbm, Map.bbm, Mapgold.bbm if these are numbered 1 through 4, the lut is
  Code:
 { 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, the rest is also 1 };[/quote] If you do not count the gaps. I'm not going to give the LUT that includes the gaps - if you know what I'm talking about you can figure it out yourself easily enough anyway and otherwise you don't need it.

PostPosted: 29 May 2008, 01:50
by JBSnorro
Harold forgot to mention that he didn't do it on his own, thanks for mentioning me :x
Anyway, he also forgot to mention quite a important number, which is 47.
All palettes in the four bbm files Harold mentioned, the palette starts at the 47th byte, al along to 47 + 3 * 256 = 815.
Contradictionary this number is 48 to the pal[x].bbm files, but this seems so odd to me I strongly doubt my own conclusion :P
I must have made a silly mistake somewhere.

And about the order of the 40 bytes Harold mentioned, I created a code that searched every file in the KaM - The Peasants Rebellion directory, but no results. The specific order doesn't appear anywhere, so unfortunately we cannot tell how the original KaM knows this sequence. It might be a if, else if, else if, etc-construction or something like it.

PostPosted: 29 May 2008, 09:35
by Krom
The text0.dat through text3.dat files also contain palette's
and forget most other things I said about those textX.dat files - it was mostly wrong.
Among other things that is
They look a lot like the normal palette's (pal0 etc) and I bet they're used to decode the rest of those files. Not 100% certain though, and those files still contain more information that I can fully explain. Hopefully it's water animation..
Indeed. That is self-sufficient ILBM files. They have animation data (can be based on pallete-cycling and other methods). Data is compressed, that makes it very hard to decode. To ones help TSK and TPR tiles are mostly the same with few difference, it can be used as a hint.
And about the order of the 40 bytes Harold mentioned, I created a code that searched every file in the KaM - The Peasants Rebellion directory, but no results. The specific order doesn't appear anywhere, so unfortunately we cannot tell how the original KaM knows this sequence. It might be a if, else if, else if, etc-construction or something like it.
I guess with such short image library (only 32 images) this can be hardcoded in EXE. After all most obvious place for such info would be .rx palette header.

PostPosted: 30 May 2008, 01:19
by JBSnorro
Krom, do you know exactly how the cyclying of the values at the CRNG-headers work? Or the compressionmethod? All I found out was that in pal0.bbm for instance, the same data appears twice(at header TINY and at header BODY).
Still haven't got a clue what both could mean, even if it wasn't compressed.

Anyway, in the BMHD is it suggested that the CmpByteRun1-compression is used, but it isn't... If it were, I would know what to do with 4296 values between -80 and -60... Those numbers don't make much sence to me.

PostPosted: 30 May 2008, 10:09
by Krom
If you download BitViewer from my site you see that there's a tileset in those files, but it's compressed/tweaked somehow. It's not looking square and it's using only part of whole file.
Now you know as much as I do :D
I can suggest only Googling for those header tags...