Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Moved to #97, which targets |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A public check of the blocked moves for any code:
when_composite_freeruns a body when a composite's hitbox can step towards a direction without touching a solid tile. olive-empire uses it to scroll the background instead of moving the player at the view's margins (#95). Stacked on #94 (and so #92); it reachesrefactorwith them.What changed
src/engine/sprites.rs:pub enum Direction { Left, Right, Up, Down };SpriteManager::when_composite_free(id, direction, distance, hitbox, solid, body)(the privateblocked_points+TileCollision::when_free); the fourmove_composite_*_blockedandwhen_composite_touchesare built on it.src/engine/mod.rs,src/prelude.rs: exportDirection.Task.md,CHANGELOG.md: entries.How it was verified
cargo fmt --check,cargo clippy --all-targets -- -D warnings: clean.cargo test: all pass (478 lib tests); new test: each blocked move emits exactlywhen_composite_freewith the limited move, and a non-move body reads the expected points. Snapshots unchanged.RGBDS_LINK_CHECK=1 cargo test --lib --test emulator: 115 pass.Generated-asm impact
Risks and follow-ups
Directionin the prelude.🤖 Generated with Claude Code