Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBN segment #1032

Closed
wants to merge 2 commits into from
Closed

SBN segment #1032

wants to merge 2 commits into from

Conversation

bates64
Copy link
Member

@bates64 bates64 commented Apr 28, 2023

Resolves #866!

unk_3C: int

def decode(self, data: bytes) -> int:
self.signature, = struct.unpack(">4s", data[0x00:0x04])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we make this a dataclass, you can make a from_bytes that looks like

@staticmethod
def from_bytes(data: bytes) -> SBNHeader:
    return SBNHeader(*struct.unpack(">4siiiiiiiiiiiiiiii"))

to avoid manually setting each specific field and calling unpack a bunch of times in a row

unk_14: bytes

def decode(self, data: bytes) -> int:
self.signature, = struct.unpack(">4s", data[0x00:0x04])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here would be another good candidate for that

]

def get_song_symbol_name(song_id: int) -> str:
song_names = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be in a separate yaml file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, probably... and separated by version. so like ver/us/song-names.yaml

@bates64 bates64 added the asset Relates to a particular asset in the build graph label May 24, 2023
@ethteck
Copy link
Member

ethteck commented Jul 15, 2023

Closing in favor of #1085

@ethteck ethteck closed this Jul 15, 2023
@ethteck ethteck deleted the sbn branch July 25, 2023 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asset Relates to a particular asset in the build graph
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audio assets
3 participants