View Single Post
Old 01-05-2004, 04:03 PM   #19
Phelon
Rookie
 
Join Date: Dec 2003
Posts: 23
Devanstator:

That damn MSN doesn't really work at my end... oh well.

But that's not why I'm here. I finally found out where we can determine the encoding, and an estimate of how the encoding variants look like.

---------------------------------------------------------------------
Possible Header (Hexadecimal Listing)
---------------------------------------------------------------------
00 00 04 00 | 00 00 80 3F | 00 02 00 02 | 04 01 00 00
---------------------------------------------------------------------

1. (4 Bytes) These bytes are the exact Image-Size in bytes (scrap the rest of the file). If zeroed out, it might be that the encoding variant is RGBA. I have found this true for Redfill, etc.

2. (4 Bytes) Still Unknown, but defenitley not so important

3. (4 Bytes) X & Y Sizes, as we both know

4. (1 Byte ) 16-Bit Encoding Method

I have found 2 types of encoding methods by now. All create a 4x4 rectangle that is blitted on screen.

Variant 1 [04] = 16 Bytes - That's the variant I explained in my post above

Variant 2 [02] = 8 Bytes

Built up like this :

2 Bytes .... 16-Bit Background Color (565-Encoding)
2 Bytes .... 16-Bit Foreground Color (565-Encoding)
4 Bytes .... Pixel settings in the 4x4 rectangle using exactly the same method as mentioned in Variant 1.

5. (1 Byte) Unknown, a resource number perhaps

6. (2 Bytes) Always 00 00, therefore unknown
--------------------------------------------------------------------------------
Summary :

Once we can figure out how the color set is calculated by the Drawing Methods I outlined, we KNOW how to deal with all of KotORs textures.
Phelon is offline   you may: quote & reply,