-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
179e361
commit 5fd6107
Showing
11 changed files
with
336 additions
and
10 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
generated/formats/semanticflexicolours/compounds/ColorOverride.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
33 changes: 33 additions & 0 deletions
33
generated/formats/semanticflexicolours/compounds/FloatColor.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
37 changes: 37 additions & 0 deletions
37
generated/formats/semanticflexicolours/compounds/GameOverride.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
39 changes: 39 additions & 0 deletions
39
generated/formats/semanticflexicolours/compounds/SemanticFlexiColourOverridesRoot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
from generated.formats.semanticflexicolours.compounds.SemanticFlexiColourOverridesRoot import \ | ||
SemanticFlexiColourOverridesRoot | ||
from generated.formats.semanticflexicolours.compounds.SemanticFlexiColoursRoot import SemanticFlexiColoursRoot | ||
from modules.formats.BaseFormat import MemStructLoader | ||
|
||
|
||
class SemanticFlexiColoursLoader(MemStructLoader): | ||
target_class = SemanticFlexiColoursRoot | ||
extension = ".semanticflexicolours" | ||
|
||
|
||
class SemanticFlexiColourOverridesLoader(MemStructLoader): | ||
target_class = SemanticFlexiColourOverridesRoot | ||
extension = ".semanticflexicolouroverrides" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0733d0119 - Tue Apr 23 16:48:39 2024 +0200 | ||
179e361ea - Sat Apr 27 10:58:14 2024 +0200 |