Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Already in |
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
The view now scrolls: the player walks freely in the middle of the screen, and 32 px from a side (the bottom one measured from the HUD) it stays there while the background scrolls 1 px a frame. The 256x256 map wraps around, so the grove goes on forever. Stacked on #93 (harvest): this PR shows only the scroll; it lands in
developafter #93.What changed
src/engine/sprites.rs,src/engine/mod.rs,src/prelude.rs:SpriteManager::when_composite_free(id, Direction, distance, hitbox, solid, body)runs any code when a step is free; new publicDirectionenum. Themove_composite_*_blockedmoves are built on it and emit the same asm (unit test compares them; no other snapshot changes). Also proposed forrefactorin a stacked PR on engine: Var::increment, when_composite_touches, queue_tile_block_write #94.src/bin/olive-empire/inputs.rs: each D-pad direction iswhen_composite_free { if leading half at the margin: scroll_by(±1) else: move 1 px }; limits are now the 32 px margins (SCROLL_MARGIN). No raw asm.tests/emulator.rs: the trunk test's edge checks now walk to the four margins and check exact SCX/SCY; the free row is found in world coordinates.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, snapshots, doctests).RGBDS_LINK_CHECK=1 cargo test --lib --test emulator: 117 pass, including the scroll checks and the harvest test.scripts/run.sh olive-empireassembles the ROM. Not looked at in a GUI emulator (none installed).Generated-asm impact
examples/olive-empire/main.asmonly (the D-pad bindings). Other examples unchanged.Risks and follow-ups
🤖 Generated with Claude Code