def generate_map_info_string(self): string = HaloMap.generate_map_info_string(self) string += """ Tag index: tag count == %s tag types count == %s root tags count == %s index array pointer == %s""" % ( self.orig_tag_index.tag_count, self.orig_tag_index.tag_types_count, self.orig_tag_index.root_tags_count, self.tag_index.tag_index_offset - self.map_magic) for arr_name, arr in ( ("Partitions", self.map_header.partitions), ("Sections", self.map_header.sections), ): string += "\n%s:\n" % arr_name names = ("debug", "resource", "tag", "locale")\ if arr.NAME_MAP else range(len(arr)) for name in names: section = arr[name] string += """ %s: address == %s size == %s offset == %s""" % (name, section[0], section[1], section.file_offset) return string
def generate_map_info_string(self): string = HaloMap.generate_map_info_string(self) string += """ Calculated information: index magic == %s map magic == %s """ % (self.index_magic, self.map_magic) if self.engine == "halo2alpha": string += ((""" Tag index: tag count == %s scenario tag id == %s index array pointer == %s""") % (self.orig_tag_index.tag_count, self.orig_tag_index.scenario_tag_id & 0xFFff, self.tag_index.tag_index_offset)) else: used_tag_count = 0 local_tag_count = 0 for index_ref in self.tag_index.tag_index: if is_reserved_tag(index_ref): continue elif index_ref.meta_offset != 0: local_tag_count += 1 used_tag_count += 1 string += ((""" Tag index: tag count == %s used tag count == %s local tag count == %s tag types count == %s scenario tag id == %s globals tag id == %s index array pointer == %s""") % (self.orig_tag_index.tag_count, used_tag_count, local_tag_count, self.orig_tag_index.tag_types_count, self.orig_tag_index.scenario_tag_id & 0xFFff, self.orig_tag_index.globals_tag_id & 0xFFff, self.tag_index.tag_index_offset)) return string