mirror of
https://github.com/imjasonh/nescript
synced 2026-07-14 19:46:46 +00:00
Add example builds to CI, document sprite name behavior
- CI: new "Build Examples" job compiles all .ne files and validates the output ROMs have correct iNES headers - Examples: add notes explaining that sprite names (Smiley, Ball) are parsed but not yet resolved — all draws use the built-in CHR tile 0. Custom sprite declarations come in M3. - Codegen: explicit `let _ = &draw.sprite_name` to document the intentional skip, with comment about M2/M3 scope https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3
This commit is contained in:
parent
a20ddcbbab
commit
fd5a940c89
5 changed files with 51 additions and 4 deletions
|
|
@ -540,7 +540,10 @@ impl CodeGen {
|
|||
fn gen_draw(&mut self, draw: &DrawStmt) {
|
||||
// OAM buffer is at $0200-$02FF
|
||||
// Each sprite entry: Y, tile, attributes, X
|
||||
// For M1: use OAM slot 0 (bytes $0200-$0203)
|
||||
// For M1: sprite name (draw.sprite_name) is parsed but ignored —
|
||||
// all draws use OAM slot 0 with tile index 0 (the built-in CHR tile).
|
||||
// Sprite name resolution and multiple OAM slots come in M2/M3.
|
||||
let _ = &draw.sprite_name;
|
||||
// Y position (stored at $0200)
|
||||
self.gen_expr(&draw.y);
|
||||
self.emit(STA, AM::Absolute(0x0200));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue