diff --git a/generated/formats/semanticflexicolours/compounds/ColorOverride.py b/generated/formats/semanticflexicolours/compounds/ColorOverride.py new file mode 100644 index 000000000..6c486b7c8 --- /dev/null +++ b/generated/formats/semanticflexicolours/compounds/ColorOverride.py @@ -0,0 +1,31 @@ +from generated.formats.ovl_base.compounds.MemStruct import MemStruct +from generated.formats.semanticflexicolours.imports import name_type_map + + +class ColorOverride(MemStruct): + + """ + PZ: 24 bytes + """ + + __name__ = 'ColorOverride' + + + def __init__(self, context, arg=0, template=None, set_default=True): + super().__init__(context, arg, template, set_default=False) + self.color = name_type_map['FloatColor'](self.context, 0, None) + self.flexi_name = name_type_map['Pointer'](self.context, 0, name_type_map['ZString']) + if set_default: + self.set_defaults() + + @classmethod + def _get_attribute_list(cls): + yield from super()._get_attribute_list() + yield 'flexi_name', name_type_map['Pointer'], (0, name_type_map['ZString']), (False, None), (None, None) + yield 'color', name_type_map['FloatColor'], (0, None), (False, None), (None, None) + + @classmethod + def _get_filtered_attribute_list(cls, instance, include_abstract=True): + yield from super()._get_filtered_attribute_list(instance, include_abstract) + yield 'flexi_name', name_type_map['Pointer'], (0, name_type_map['ZString']), (False, None) + yield 'color', name_type_map['FloatColor'], (0, None), (False, None) diff --git a/generated/formats/semanticflexicolours/compounds/FloatColor.py b/generated/formats/semanticflexicolours/compounds/FloatColor.py new file mode 100644 index 000000000..3b566bce9 --- /dev/null +++ b/generated/formats/semanticflexicolours/compounds/FloatColor.py @@ -0,0 +1,33 @@ +from generated.formats.ovl_base.compounds.MemStruct import MemStruct +from generated.formats.semanticflexicolours.imports import name_type_map + + +class FloatColor(MemStruct): + + __name__ = 'FloatColor' + + + def __init__(self, context, arg=0, template=None, set_default=True): + super().__init__(context, arg, template, set_default=False) + self.r = name_type_map['Float'](self.context, 0, None) + self.g = name_type_map['Float'](self.context, 0, None) + self.b = name_type_map['Float'](self.context, 0, None) + self.a = name_type_map['Float'](self.context, 0, None) + if set_default: + self.set_defaults() + + @classmethod + def _get_attribute_list(cls): + yield from super()._get_attribute_list() + yield 'r', name_type_map['Float'], (0, None), (False, None), (None, None) + yield 'g', name_type_map['Float'], (0, None), (False, None), (None, None) + yield 'b', name_type_map['Float'], (0, None), (False, None), (None, None) + yield 'a', name_type_map['Float'], (0, None), (False, None), (None, None) + + @classmethod + def _get_filtered_attribute_list(cls, instance, include_abstract=True): + yield from super()._get_filtered_attribute_list(instance, include_abstract) + yield 'r', name_type_map['Float'], (0, None), (False, None) + yield 'g', name_type_map['Float'], (0, None), (False, None) + yield 'b', name_type_map['Float'], (0, None), (False, None) + yield 'a', name_type_map['Float'], (0, None), (False, None) diff --git a/generated/formats/semanticflexicolours/compounds/GameOverride.py b/generated/formats/semanticflexicolours/compounds/GameOverride.py new file mode 100644 index 000000000..fda9d57a1 --- /dev/null +++ b/generated/formats/semanticflexicolours/compounds/GameOverride.py @@ -0,0 +1,37 @@ +from generated.formats.ovl_base.compounds.MemStruct import MemStruct +from generated.formats.semanticflexicolours.imports import name_type_map + + +class GameOverride(MemStruct): + + """ + PZ: 32 bytes + """ + + __name__ = 'GameOverride' + + + def __init__(self, context, arg=0, template=None, set_default=True): + super().__init__(context, arg, template, set_default=False) + self.game_names_count = name_type_map['Uint64'](self.context, 0, None) + self.num_flexi_names = name_type_map['Uint64'](self.context, 0, None) + self.game_names = name_type_map['Pointer'](self.context, self.game_names_count, name_type_map['ZStringList']) + self.flexi_names = name_type_map['Pointer'](self.context, self.num_flexi_names, name_type_map['ZStringList']) + if set_default: + self.set_defaults() + + @classmethod + def _get_attribute_list(cls): + yield from super()._get_attribute_list() + yield 'game_names', name_type_map['Pointer'], (None, name_type_map['ZStringList']), (False, None), (None, None) + yield 'game_names_count', name_type_map['Uint64'], (0, None), (False, None), (None, None) + yield 'flexi_names', name_type_map['Pointer'], (None, name_type_map['ZStringList']), (False, None), (None, None) + yield 'num_flexi_names', name_type_map['Uint64'], (0, None), (False, None), (None, None) + + @classmethod + def _get_filtered_attribute_list(cls, instance, include_abstract=True): + yield from super()._get_filtered_attribute_list(instance, include_abstract) + yield 'game_names', name_type_map['Pointer'], (instance.game_names_count, name_type_map['ZStringList']), (False, None) + yield 'game_names_count', name_type_map['Uint64'], (0, None), (False, None) + yield 'flexi_names', name_type_map['Pointer'], (instance.num_flexi_names, name_type_map['ZStringList']), (False, None) + yield 'num_flexi_names', name_type_map['Uint64'], (0, None), (False, None) diff --git a/generated/formats/semanticflexicolours/compounds/SemanticFlexiColourOverridesRoot.py b/generated/formats/semanticflexicolours/compounds/SemanticFlexiColourOverridesRoot.py new file mode 100644 index 000000000..9dbf43d7f --- /dev/null +++ b/generated/formats/semanticflexicolours/compounds/SemanticFlexiColourOverridesRoot.py @@ -0,0 +1,39 @@ +from generated.formats.ovl_base.compounds.MemStruct import MemStruct +from generated.formats.semanticflexicolours.imports import name_type_map + + +class SemanticFlexiColourOverridesRoot(MemStruct): + + __name__ = 'SemanticFlexiColourOverridesRoot' + + + def __init__(self, context, arg=0, template=None, set_default=True): + super().__init__(context, arg, template, set_default=False) + self.num_color_overrides = name_type_map['Ushort'](self.context, 0, None) + self.num_game_overrides = name_type_map['Ushort'](self.context, 0, None) + self._z_0 = name_type_map['Int'](self.context, 0, None) + self._z_1 = name_type_map['Uint64'](self.context, 0, None) + self.color_overrides = name_type_map['ArrayPointer'](self.context, self.num_color_overrides, name_type_map['ColorOverride']) + self.game_overrides = name_type_map['ArrayPointer'](self.context, self.num_game_overrides, name_type_map['GameOverride']) + if set_default: + self.set_defaults() + + @classmethod + def _get_attribute_list(cls): + yield from super()._get_attribute_list() + yield 'color_overrides', name_type_map['ArrayPointer'], (None, name_type_map['ColorOverride']), (False, None), (None, None) + yield 'game_overrides', name_type_map['ArrayPointer'], (None, name_type_map['GameOverride']), (False, None), (None, None) + yield 'num_color_overrides', name_type_map['Ushort'], (0, None), (False, None), (None, None) + yield 'num_game_overrides', name_type_map['Ushort'], (0, None), (False, None), (None, None) + yield '_z_0', name_type_map['Int'], (0, None), (False, None), (None, None) + yield '_z_1', name_type_map['Uint64'], (0, None), (False, None), (None, None) + + @classmethod + def _get_filtered_attribute_list(cls, instance, include_abstract=True): + yield from super()._get_filtered_attribute_list(instance, include_abstract) + yield 'color_overrides', name_type_map['ArrayPointer'], (instance.num_color_overrides, name_type_map['ColorOverride']), (False, None) + yield 'game_overrides', name_type_map['ArrayPointer'], (instance.num_game_overrides, name_type_map['GameOverride']), (False, None) + yield 'num_color_overrides', name_type_map['Ushort'], (0, None), (False, None) + yield 'num_game_overrides', name_type_map['Ushort'], (0, None), (False, None) + yield '_z_0', name_type_map['Int'], (0, None), (False, None) + yield '_z_1', name_type_map['Uint64'], (0, None), (False, None) diff --git a/generated/formats/semanticflexicolours/imports.py b/generated/formats/semanticflexicolours/imports.py index 7ab9b335d..6e1e047a3 100644 --- a/generated/formats/semanticflexicolours/imports.py +++ b/generated/formats/semanticflexicolours/imports.py @@ -40,6 +40,10 @@ 'Empty': 'generated.formats.ovl_base.compounds.Empty', 'ZStringList': 'generated.formats.ovl_base.compounds.ZStringList', 'SemanticFlexiColoursRoot': 'generated.formats.semanticflexicolours.compounds.SemanticFlexiColoursRoot', + 'SemanticFlexiColourOverridesRoot': 'generated.formats.semanticflexicolours.compounds.SemanticFlexiColourOverridesRoot', + 'FloatColor': 'generated.formats.semanticflexicolours.compounds.FloatColor', + 'ColorOverride': 'generated.formats.semanticflexicolours.compounds.ColorOverride', + 'GameOverride': 'generated.formats.semanticflexicolours.compounds.GameOverride', } name_type_map = {} diff --git a/generated/formats/semanticflexicolours/semanticflexicolours.xml b/generated/formats/semanticflexicolours/semanticflexicolours.xml index c44cada02..371fffeea 100644 --- a/generated/formats/semanticflexicolours/semanticflexicolours.xml +++ b/generated/formats/semanticflexicolours/semanticflexicolours.xml @@ -9,4 +9,34 @@ + + + + + + + + + + + + + + + + + + PZ: 24 bytes + + + + + + PZ: 32 bytes + + + + + + diff --git a/icons/semanticflexicolouroverrides.svg b/icons/semanticflexicolouroverrides.svg new file mode 100644 index 000000000..a960accc7 --- /dev/null +++ b/icons/semanticflexicolouroverrides.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + diff --git a/icons/semanticflexicolours.svg b/icons/semanticflexicolours.svg index 7153deabb..e594131a0 100644 --- a/icons/semanticflexicolours.svg +++ b/icons/semanticflexicolours.svg @@ -1,15 +1,65 @@ - - - - - + + + + - - + + - - + + diff --git a/modules/formats/SEMANTICFLEXICOLOURS.py b/modules/formats/SEMANTICFLEXICOLOURS.py index 94d6c96e5..f362abb2a 100644 --- a/modules/formats/SEMANTICFLEXICOLOURS.py +++ b/modules/formats/SEMANTICFLEXICOLOURS.py @@ -1,3 +1,5 @@ +from generated.formats.semanticflexicolours.compounds.SemanticFlexiColourOverridesRoot import \ + SemanticFlexiColourOverridesRoot from generated.formats.semanticflexicolours.compounds.SemanticFlexiColoursRoot import SemanticFlexiColoursRoot from modules.formats.BaseFormat import MemStructLoader @@ -5,3 +7,8 @@ class SemanticFlexiColoursLoader(MemStructLoader): target_class = SemanticFlexiColoursRoot extension = ".semanticflexicolours" + + +class SemanticFlexiColourOverridesLoader(MemStructLoader): + target_class = SemanticFlexiColourOverridesRoot + extension = ".semanticflexicolouroverrides" diff --git a/source/formats/semanticflexicolours/semanticflexicolours.xml b/source/formats/semanticflexicolours/semanticflexicolours.xml index c44cada02..371fffeea 100644 --- a/source/formats/semanticflexicolours/semanticflexicolours.xml +++ b/source/formats/semanticflexicolours/semanticflexicolours.xml @@ -9,4 +9,34 @@ + + + + + + + + + + + + + + + + + + PZ: 24 bytes + + + + + + PZ: 32 bytes + + + + + + diff --git a/version.txt b/version.txt index 15bd4a209..7cafedc97 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0733d0119 - Tue Apr 23 16:48:39 2024 +0200 \ No newline at end of file +179e361ea - Sat Apr 27 10:58:14 2024 +0200 \ No newline at end of file