Ver Fonte

Write offset for bytesig entries (for mempatches)

nosoop há 10 meses atrás
pai
commit
d1f50991d2
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      src/smgdc/validate.py

+ 2 - 0
src/smgdc/validate.py

@@ -237,6 +237,7 @@ class ByteSigEntry(LocationEntry, tag="bytesig", kw_only=True):
                 )
             return {
                 KEY_AS_IS: self.contents.gameconf_str,
+                KEY_SUFFIX("OFFSET"): self.offset_fmt.format_value(self.offset),
             }
 
         with bin.mmap() as memory:
@@ -250,6 +251,7 @@ class ByteSigEntry(LocationEntry, tag="bytesig", kw_only=True):
                 raise AssertionError(f"Multiple matches found for {self.contents.display_str}")
             return {
                 KEY_AS_IS: self.contents.gameconf_str,
+                KEY_SUFFIX("OFFSET"): self.offset_fmt.format_value(self.offset),
             }