A Community discussion forum for Halo Custom Edition, Halo 2 Vista, Portal and Halo Machinima

Home  Search Register  Login Member ListRecent Posts
»Forums Index »Halo Custom Edition (Bungie/Gearbox) »Halo CE General Discussion »Bitmap Tag Offsets and Structure

Author Topic: Bitmap Tag Offsets and Structure (2 messages, Page 1 of 1)
Moderators: Dennis

Joined: Jun 8, 2014

Posted: Today @ 01:15 PM    Msg. 1 of 2       
I'm looking for the structure and offsets for a bitmap and sound tag that's already been compiled into a map.

Specifically, I need the offset inside the tag to where the flag for internal/externally stored bitmaps and sounds are. Additionally, if there's any variations to how the tag is stored in a CE .map file vs a PC .map file, that's important as well.

Not info on the bitmaps.map file and it's data, not info on a .bitmap tag from Guerilla. A compiled [BITM] class tag inside a .map file for PC or CE.

Any help would be appreciated and will be immediately used for a useful update to an already useful tool.

Joined: Apr 3, 2013

Posted: Today @ 01:39 PM    Msg. 2 of 2       
Look in the "notes" folder of the MEK. If you haven't downloaded the mek, you can grab the relevant odt documents here:

These are very incomplete, but they explain just enough to answer your questions. The
"Constants, Enumerators, and Structures" file is what you want to look at, as I've heavily commented all of the fields in the structures, including the bitmap structs.

The "Mapfiles" one is also heavily incomplete, but the bottom contains a section describing all the differences people should care about between metadata and tagdata. Everything explained in it is taken directly from Refinery's ripping routines.

If you have any specific questions about structures, skim through my reclaimer library first.

Additionally, there is a description of the jms model file type, and a definition extractor to extract very verbose descriptions of the tag structures. They aren't in any specific language, but you should be able to figure them out. They are pulled directly from reclaimer's definitions, but they have all the macros removed and have offsets explicitly defined for each field. Here's an example of what they look like.
# bitmap

{ Struct, size:48, entries:17, bitmap
{ UEnum32, offset:0, size:4, bitm_id
bitm }
{ UInt16, offset:4, size:2, width }
{ UInt16, offset:6, size:2, height }
{ UInt16, offset:8, size:2, depth }
{ SEnum16, offset:10, size:2, type
texture_2d }
{ SEnum16, offset:12, size:2, format
a8 }
{ Bool16, offset:14, size:2, flags
{ mask:0x1, power_of_2_dim }
{ mask:0x2, compressed }
{ mask:0x4, palletized }
{ mask:0x8, swizzled }
{ mask:0x10, linear }
{ mask:0x20, v16u16 }
{ mask:0x40, unknown }
{ mask:0x80, prefer_low_detail }
{ mask:0x100, data_in_resource_map }
{ UInt16, offset:16, size:2, registration_point_x }
{ UInt16, offset:18, size:2, registration_point_y }
{ UInt16, offset:20, size:2, mipmaps }
{ FlUInt16, offset:22, size:2, pixels }
{ UInt32, offset:24, size:4, pixels_offset }
{ UInt32, offset:28, size:4, pixels_meta_size }
{ UInt32, offset:32, size:4, bitmap_id_unknown1 }
{ UInt32, offset:36, size:4, bitmap_data_pointer }
{ UInt32, offset:40, size:4, bitmap_id_unknown2 }
{ UInt32, offset:44, size:4, base_address }

EDIT: The bitmap flag is easy to find in its struct, but the sound one is in a general struct. To avoid confusion, i'm just going to paste it in here:
typedef struct RawdataRef {
SInt32 size;
/* This flag is used to determine if the rawdata is in a Halo PC
** or Halo CE resource map rather than the map this RawdataRef
** struct is in. It appears that this flag is ONLY used to
** specify if a sound permutations samples/mouth data is stored
** in the resource map. Bitmaps use a different flag to specify
** this while font, hud_message_text, and unicode_string_list
** tags assume the data is in the same map as the RawdataRef.*/
Bool32 data_in_resource_map : 1; // only used inside a map

UInt32 raw_pointer; /* only used inside a map.
** should only be used if pointer == 0 */
UInt32 pointer; /* only used inside a map(uses magic).
** if pointer == 0, use raw_pointer instead.*/
UInt32 id; // only used inside a map(purpose unknown).
} RawdataRef; // struct size == 20 bytes

Edited by MosesofEgypt on Jan 19, 2018 at 01:43 PM


Previous Older Thread   

Time: Fri January 19, 2018 2:07 PM 250 ms.
A Halo Maps Website