浏览代码

Write offset for bytesig entries (for mempatches)

nosoop 10 月之前
父节点
当前提交
d1f50991d2
共有 1 个文件被更改,包括 2 次插入0 次删除
  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),
             }