From 220c80b987ba54d709180e3d95e9e0d82af4249c Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Sat, 7 Mar 2026 23:27:28 +0100 Subject: Define the bitmap for multiplayer support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also give it a dummy value on start and initialize it properly after the player's selection on the title screen. Signed-off-by: Miquel Sabaté Solà --- src/jetpac.s | 1 + src/title.s | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/jetpac.s b/src/jetpac.s index 52ec1f7..e8d6543 100644 --- a/src/jetpac.s +++ b/src/jetpac.s @@ -124,6 +124,7 @@ ;; have zero as their initial values. Note that it's important to have these ;; variables defined before sta Globals::zp_flags + sta Globals::zp_multiplayer sta Joypad::zp_buttons1 sta Joypad::zp_buttons2 sta Player::zp_state diff --git a/src/title.s b/src/title.s index e3a2086..06ca1cb 100644 --- a/src/title.s +++ b/src/title.s @@ -89,9 +89,18 @@ rts .endproc - ;; Save the selection from the menu (TODO), hide all elements from the title + ;; Save the selection from the menu, hide all elements from the title ;; screen, and return always 1. .proc start + ;; Select whether player 2 is to be alive or not. + lda #%00000010 + ldx OAM::m_sprites + cpx #SPRITE_Y_POSITION1 + bne @set_multi + ora #%10000100 + @set_multi: + sta Globals::zp_multiplayer + ;; Hide the sprite from the menu. lda #$EF sta OAM::m_sprites -- cgit v1.2.3