mirror of
https://github.com/imjasonh/nescript
synced 2026-07-12 10:39:31 +00:00
IR codegen: Player 2 controller support
ReadInput now takes an explicit player index (0 = P1, 1 = P2). The IR lowering for ButtonRead threads the player through, and the IR codegen selects the correct zero-page input byte ($01 for P1, $08 for P2). https://claude.ai/code/session_01W6eQFStA66EuMKHUFo2rx3
This commit is contained in:
parent
adf50aaa7f
commit
8a6441071e
5 changed files with 17 additions and 10 deletions
|
|
@ -124,8 +124,9 @@ pub enum IrOp {
|
|||
y: IrTemp,
|
||||
frame: Option<IrTemp>,
|
||||
},
|
||||
/// Read the current player 1 input byte into a temp.
|
||||
ReadInput(IrTemp),
|
||||
/// Read a controller input byte into a temp.
|
||||
/// Second arg: 0 for player 1, 1 for player 2.
|
||||
ReadInput(IrTemp, u8),
|
||||
WaitFrame,
|
||||
Transition(String),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue