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

audio_macros.asm: Add "Assertions" #270

Merged
merged 7 commits into from
Jul 3, 2020
Merged

audio_macros.asm: Add "Assertions" #270

merged 7 commits into from
Jul 3, 2020

Conversation

martendo
Copy link
Contributor

Assembly will fail if set_envelope_duty, notelen, or note comes across an invalid argument.

Assembly will fail if set_envelope_duty, notelen, or note comes across an invalid argument.
Copy link
Collaborator

@kemenaran kemenaran left a comment

Choose a reason for hiding this comment

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

Neat 👌

@kemenaran
Copy link
Collaborator

Although it makes the build fail with this message:

ERROR: src/main.asm(294) -> src/code/audio/music_1.asm(1760) -> src/data/music/music_tracks_data_1b_1.asm(120) -> src/code/audio_macros.asm::note(108) -> src/code/audio_macros.asm::note::REPT~1(110):
note: Invalid note value NOISE_5

@martendo
Copy link
Contributor Author

The noise channel's values are different from the others and there isn't really a way to check for that unless there's a separate macro that performs a different "assertion." The best thing to do without that is to fail if \1 < $1 || (\1 > $90 && \1 < $ff).

@kemenaran kemenaran merged commit d584ab5 into zladx:master Jul 3, 2020
@kemenaran
Copy link
Collaborator

Merged. Thanks!

@martendo martendo deleted the patch-1 branch July 3, 2020 19:43
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.

2 participants