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

BUCT #199

Merged
merged 2 commits into from
Aug 3, 2024
Merged

BUCT #199

merged 2 commits into from
Aug 3, 2024

Conversation

steven11sjf
Copy link
Contributor

fixes #170

BUCT = Struct(
_magic = Const(b"MUCT"),
_is_sr = Computed(game_check.current_game_at_most(game_check.Game.SAMUS_RETURNS)),
version = IfThenElse(
Copy link
Contributor

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(
Copy link
Contributor

Choose a reason for hiding this comment

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

see above

Copy link
Contributor

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)),
Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

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

again

Copy link

codecov bot commented Jul 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.91%. Comparing base (13d1bbc) to head (7737dbe).

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.
📢 Have feedback on the report? Share it here.

- added buct (glyph table) format for SR and Dread
- 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(
Copy link
Contributor

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?

@duncathan duncathan added this pull request to the merge queue Aug 3, 2024
Merged via the queue into randovania:main with commit bbce177 Aug 3, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSR: Implement parsing for BUCT
2 participants