Bmp.MDL files

Discussion area for user-created Allegiance models, textures, voicechats, music, and other ingame content.
Post Reply
Your_Persona
Posts: 773
Joined: Sat Dec 04, 2004 8:00 am
Contact:

Post by Your_Persona »

[Necro post:4/8/2001]

QUOTE Indeed, I cracked the MDL bitmap format (or a very large portion of it anyways). I didn't do too much research on the format, but I noticed when looking at them in a hex editor that they were similar in structure to files that came with X-Wing Alliance, another game I like to edit. Basically, they are 24-bit standard bitmaps, except they have a unique header section and the color data is compressed into 2 bytes rather than 3. Let me first explain some of the offsets in each MDL bmp file:

LONG 80: Width of bitmap
LONG 84: Height of bitmap
LONG 87: # of bytes of color data
OFFSET 120: Start of color data

Each RGB pixel is determined by a 2-byte value, where the first 5 bits determine the red component, the middle 6 bits determine the green component, and the last 5 bits determine the blue component. Byte extracting these color components and converting them into the 3 byte (BGR) format of a standard bitmap, the picture can be opened in any image program. Any questions? .

Com_Trooper[/quote]
-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
Post Reply