From 1a74e6a1856673072a61abd0861759901bc2d939 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Mon, 10 Mar 2025 22:52:15 +0100 Subject: Bring code style to better standards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Be more careful on everything and try to follow along style.nes from my repository. This might change in the future, but it's in a much better state now. Signed-off-by: Miquel Sabaté Solà --- basics/flicker.s | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'basics/flicker.s') diff --git a/basics/flicker.s b/basics/flicker.s index 8db03e8..2522cb2 100644 --- a/basics/flicker.s +++ b/basics/flicker.s @@ -61,7 +61,6 @@ jmp @main_game_loop .endproc - ;;; ;; NOTE: this is the actual meat of the example :D .proc apply_flicker @@ -135,7 +134,7 @@ ;;; ;; NOTE: and from here on stuff that is not relevant for sprite flickering. -nmi: +.proc nmi bit $20 bpl @next @@ -168,15 +167,16 @@ nmi: pla @next: rti +.endproc -reset: +.proc reset sei cld ldx #$40 stx $4017 ; APU Frame Counter - ldx #$ff + ldx #$FF txs inx @@ -201,7 +201,7 @@ reset: inx bne @ram_reset_loop ; if x overflows back to #00, then we are done. - lda #$ef + lda #$EF @sprite_reset_loop: sta $200, x inx @@ -229,9 +229,11 @@ reset: bne @palettes_reset_loop jmp main +.endproc -irq: +.proc irq rti +.endproc .proc init_sprites NUM_SPRITES = 20 -- cgit v1.2.3