Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on July 30, 2015 at 06:45 AM

Section 1 (Text)

SPRITE_CODE_START
	JSR SUB_GFX				; graphics routine
	LDA $9D					; \ if sprites locked, return
	BNE RETURN				; /

	JSR SUB_OFF_SCREEN_X3	; handle off screen situation

	LDA $13					; \ if the animated frame is zero...
	AND #$00				;  |
	BNE CALC_FRAME				; /
	LDA $C2,x				; \ if the sprite state is set
	BEQ CALC_FRAME				; /
	LDA $1570,x				; \ calculate which frame to show
	BEQ CALC_FRAME				; /
	DEC $1570,x				; decrease number of frames
CALC_FRAME
	LDA $1570,x				; \ calculate which frame to show
	BEQ UPDATE				; /

	JSL $018022 				; update speed position without y speed

	STA $1528,x				; prevent Mario from sliding horizontally
	JSL $01B44F				; interact with sprites
	BCC RETURN				; return if no contact
            
	LDA $B6,x				;\ NEW CODE
	BNE RETURN				;/ don't force x speed if already moving
			
X_SPEED	
	LDA EXTRA_PROP_1,x			; \ set direction depending on the extra property 1
	STA $B6,x				; / 
	STA $C2,x				; store sprite state
RETURN	
	RTS					; return
                    
UPDATE
	JSL $01802A				; update position based on speed values
	LDA $1491				; amount to move Mario                    
	STA $1528,x				; prevent Mario from sliding horizontally
	JSL $01B44F				; interact with sprites
	RTS					; return