summaryrefslogtreecommitdiff
path: root/smg_common.py
diff options
context:
space:
mode:
authorOwl <isaclien9752@gmail.com>2025-08-22 00:15:50 -0400
committerOwl <isaclien9752@gmail.com>2025-08-22 00:15:50 -0400
commit51077c2fe8c160743a67303fb516126bb98afff7 (patch)
tree3cd3ccce7ab529c259b8796d22e4a56b3e03a9d8 /smg_common.py
parentef4d0e08b2d312bcf3034aa3ae48436f5d8b56a5 (diff)
downloadblenxy-51077c2fe8c160743a67303fb516126bb98afff7.tar.gz
blenxy-51077c2fe8c160743a67303fb516126bb98afff7.zip
changes until now - test
Diffstat (limited to 'smg_common.py')
-rw-r--r--smg_common.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/smg_common.py b/smg_common.py
index c278382..3c7bb0f 100644
--- a/smg_common.py
+++ b/smg_common.py
@@ -1,6 +1,30 @@
-# paddng string
-padding =
+# padding stuff
+# padding string
+class padding():
+
+ # the fill string
+ def __init__(self):
+ self.string = "This is padding data to alignme"
+
+ # return the padding string to align data at a
+ # given start_index with a specific byte_alignment
+ def string_fill(self, byte_alignment, start_index):
+ # check the variables first
+ if ((type(start_index) != int)
+ or (type(byte_alignment) != int)
+ or (start_index < 0)
+ or (byte_alignment != 4 and byte_alignment != 32):
+ return None
+ # return the fill string
+ i = 0
+ rtn = ""
+ while (start_index % byte_alignment != 0):
+ rtn += self.padding[i]
+ i += 1
+ start_index += 1
+ return rtn
+
# name tables
# read name tables found in SMG binary files