porcusprites2

by soapagent

Game: SMW

Description: snydej's boosprites2 except with porcupuffers

!replace_sprite = $C3 ;Porcu-puffer
!koopakid = $29
!frame_counter = $13
!sprite_id_table = $9e
!player_direction = $76
!saved_sprite_table = $7FBA00
	LDA !frame_counter
	AND #$0f
	CMP #$0c
	BPL Done
	TAX
	LDA !sprite_id_table,X
	CMP #!koopakid
	BEQ Done
	CMP #!replace_sprite
	BEQ SkipStore
	STA !saved_sprite_table,X
SkipStore:
	JSL SubHorizPos
	TYA
	EOR !player_direction
	BEQ Facing
	LDA #!replace_sprite
	BRA Change
Facing:
	LDA !saved_sprite_table,X
Change:
	STA !sprite_id_table,X
Done:
	RTL
SubHorizPos:
	PEA $AD2E
	JML $01AD30
back to listings