JayFoxRox / futurama-tools-nifxml

Staging repository for nifxml; intended for "Futurama" (2003) video-game
GNU General Public License v3.0
1 stars 1 forks source link

Length of `unk7` in `NiBsp` is unknown #1

Open JayFoxRox opened 5 years ago

JayFoxRox commented 5 years ago

The lack of support for this makes it impossible to automate file-loading.

See comment in nif.xml for more information as to how these values were found. It requires the following change in pyffi:

--- a/pyffi/object_models/xml/struct_.py
+++ b/pyffi_modded/object_models/xml/struct_.py
@@ -264,6 +264,9 @@ class StructBase(GlobalNode, metaclass=_MetaStructBase):
             rt_arg = attr.arg if isinstance(attr.arg, (int, type(None))) \
                      else getattr(self, attr.arg)

+
+            #print(attr.arr1)
+
             # instantiate the class, handling arrays at the same time
             if attr.arr1 == None:
                 attr_instance = rt_type(
@@ -340,6 +343,8 @@ class StructBase(GlobalNode, metaclass=_MetaStructBase):
         """Read structure from stream."""
         # read all attributes
         for attr in self._get_filtered_attribute_list(data):
+            print()
+            print("Reading %s at %d" % (attr.name, stream.tell()))
             # skip abstract attributes
             if attr.is_abstract:
                 continue
@@ -350,6 +355,7 @@ class StructBase(GlobalNode, metaclass=_MetaStructBase):
             attr_value = getattr(self, "_%s_value_" % attr.name)
             attr_value.arg = rt_arg
             attr_value.read(stream, data)
+            print("value", attr_value)
             ### UNCOMMENT FOR DEBUGGING WHILE READING
             #print("* %s.%s" % (self.__class__.__name__, attr.name)) # debug
             #val = getattr(self, "_%s_value_" % attr.name) # debug
JayFoxRox commented 5 years ago

Original Xbox

PAL: FutPAL00.img

PlayStation 2

NTSC: NTSC.img