rand64

by tjb0607

Game: smw

Description: randomizes $64

!current64 = $7fb3c0
!GetRand = $01ACF9

	LDA $100	; \ only run in gamemode 14
	EOR #$14	; |
	ORA $9D		; | and when the game isn't paused
	BEQ +		; |
	RTL		; |
	+		; /

LDA $14   ; run once every 256 frames
BEQ +
LDA !current64
STA $64
RTL
+

JSL.L $01ACF9 ; rng routine
EOR $13
STA !current64
STA $64

RTL
back to listings