-
-
Save ihaveamac/f8ae182ba0786ddad39daf3cdb63c6ea to your computer and use it in GitHub Desktop.
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
def getContentIndex(count): | |
# this is a disaster | |
# but this will just get longer and longer... | |
# i'll figure out a better way to do this later | |
content_index = 0 | |
content_index_string = "" | |
content_index_offset = 0 | |
for i in range(0, count): | |
if int(content_index) == 0xFF: | |
content_index = 0 | |
content_index_string += "FF" | |
content_index_offset = 0 | |
content_index += (0x80 / (2 << content_index_offset)) * 2 | |
content_index_offset += 1 | |
return content_index_string + format(int(content_index), 'X') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment