Ejemplo n.º 1
0
        map_size=field.UInt32(offset=4),
        index_offset=field.UInt32(offset=16),
        metadata_size=field.UInt32(offset=20),
        map_name=field.Asciiz(offset=32, maxlength=32),
        map_build=field.Asciiz(offset=64, maxlength=64),
        map_type=field.UInt32(offset=128))

IndexHeader = \
    define_basic_struct(struct_size=40,
        primary_magic=field.UInt32(offset=0),
        base_tag_ident=field.UInt32(offset=4),
        map_id=field.UInt32(offset=8),
        tag_count=field.UInt32(offset=12),
        verticie_count=field.UInt32(offset=16),
        verticie_offset=field.UInt32(offset=20),
        indicie_count=field.UInt32(offset=24),
        indicie_offset=field.UInt32(offset=28),
        model_data_length=field.UInt32(offset=32),
        integrity=field.Ascii(offset=36, length=4, reverse=True))

TagHeader = \
    define_halo_struct(struct_size=32,
        first_class=field.Ascii(offset=0, length=4, reverse=True),
        second_class=field.Ascii(offset=4, length=4, reverse=True),
        third_class=field.Ascii(offset=8, length=4, reverse=True),
        ident=field.UInt32(offset=12),
        name=halofield.AsciizPtr(offset=16),
        meta_offset_raw=field.UInt32(offset=20),
        indexed=field.UInt32(offset=24))

Ejemplo n.º 2
0
 def __init__(self, *, offset, docs="", **kwargs):
     super().__init__(offset, docs)
     self.struct_type = define_halo_struct(**kwargs)
     self.children = None
Ejemplo n.º 3
0
# license as detailed in the LICENSE file.
"""TODO"""

from basicstruct import field
from halolib.structs.halostruct import define_halo_struct
from halolib.structs import halofield


tag_types = {}
# type: Dict[str, HaloMapStruct]

tag_types['bipd'] = define_halo_struct(struct_size=0x450,
    model=halofield.TagReference(offset=0x28),
    animation=halofield.TagReference(offset=0x38),
    collision=halofield.TagReference(offset=0x70),
    physics=halofield.TagReference(offset=0x80),
    turn_speed=field.Float32(offset=0x2F0),
    jump_velocity=field.Float32(offset=0x3B4),
    melee_damage=halofield.TagReference(offset=0x288),
    weapons=halofield.StructArray(offset=0x2D8, struct_size=36,
        held_weapon=halofield.TagReference(offset=0x0)))


tag_types['effe'] = define_halo_struct(struct_size=0x700,
    events=halofield.StructArray(offset=0x34, struct_size=68,
        parts=halofield.StructArray(offset=0x2C, struct_size=104,
            spawned_object=halofield.TagReference(offset=0x18))))


tag_types['proj'] = define_halo_struct(struct_size=0x248,
    model=halofield.TagReference(offset=0x28),
    animation=halofield.TagReference(offset=0x38),