disco_sprites

by furyfulfawful

Game: SMW

Description: Make all sprites fallow mario like disco shells

; Base ASM file - feel free to copy/paste this and use this for your own code.

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /
	
; YOUR CODE HERE
LDX #$09
loop:
LDY.B #$00
LDA $D1
SEC
SBC $E4,X
STA $0F
LDA $D2
SBC.W $14E0,X
BPL +
INY
+
LDA $00B6,X
CPY.B #$00
BNE lool
CMP.B #$20
BPL pool
INC $00B6,X
INC $00B6,X
BRA pool
lool:
CMP.B #$E0
BMI pool
DEC $00B6,X
DEC $00B6,X
pool:
DEX
CPX #$00
BPL loop

	RTL

back to listings