-
Notifications
You must be signed in to change notification settings - Fork 12
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
BUCT #199
BUCT #199
Conversation
BUCT = Struct( | ||
_magic = Const(b"MUCT"), | ||
_is_sr = Computed(game_check.current_game_at_most(game_check.Game.SAMUS_RETURNS)), | ||
version = IfThenElse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
game_check.is_sr_or_else()
is a function that exists
), | ||
size = Rebuild(Int32ul, construct.len_(construct.this.data)), | ||
_padding = If(lambda ctx: not ctx._is_sr, Const(0xFFFFFFFF, Int32ul)), | ||
_data_start = IfThenElse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually this one could probably just be a Pointer
?
VersionAdapter("1.4.0") | ||
), | ||
size = Rebuild(Int32ul, construct.len_(construct.this.data)), | ||
_padding = If(lambda ctx: not ctx._is_sr, Const(0xFFFFFFFF, Int32ul)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If(current_game_at_least(Game.DREAD), Const(0xFFFFFFFF, Int32ul))
data=Array(construct.this.size, Struct( | ||
char_maybe = Int16ul, # I think this could be utf8 chars? | ||
_padding = IfThenElse( | ||
lambda ctx: ctx._._is_sr, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #199 +/- ##
==========================================
+ Coverage 76.69% 76.91% +0.21%
==========================================
Files 74 75 +1
Lines 3446 3457 +11
==========================================
+ Hits 2643 2659 +16
+ Misses 803 798 -5 ☔ View full report in Codecov by Sentry. |
- uses correct game_check functions - no longer caches whether the file is sr
), | ||
size = Rebuild(Int32ul, construct.len_(construct.this.data)), | ||
_padding = If(lambda ctx: not ctx._is_sr, Const(0xFFFFFFFF, Int32ul)), | ||
_data_start = IfThenElse( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually this one could probably just be a Pointer
?
fixes #170