From 0c9b0ad7938e2ba7e994574b4947e25c82440b8c Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 23 Mar 2026 23:59:26 +0100 Subject: Implement the "take off" animation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the animation that is done after clearing a stage. Moreover, and for the first time since I started development, now we can move into the next level as intended from the game's design. Signed-off-by: Miquel Sabaté Solà --- src/background.s | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'src/background.s') diff --git a/src/background.s b/src/background.s index 0facde6..369def9 100644 --- a/src/background.s +++ b/src/background.s @@ -107,4 +107,58 @@ ;; End of the list. .byte $FF + + ;; Clear out the shuttle from the background. + ;; + ;; NOTE: this should only be called from NMI code. + .proc clear_shuttle + ;; The low part of the rocket. + bit PPU::m_status + ldx #$2B + stx PPU::m_address + ldx #$15 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + ;; High part of the rocket. + bit PPU::m_status + ldy #$2A + sty PPU::m_address + ldx #$75 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + bit PPU::m_status + sty PPU::m_address + ldx #$95 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + bit PPU::m_status + sty PPU::m_address + ldx #$B5 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + ;; Middle part of the rocket. + bit PPU::m_status + sty PPU::m_address + ldx #$D5 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + bit PPU::m_status + sty PPU::m_address + ldx #$F5 + stx PPU::m_address + sta PPU::m_data + sta PPU::m_data + + rts + .endproc .endscope -- cgit v1.2.3