RIPPLE_CX			FDB	64
RIPPLE_CY			FDB 160

RIPPLE_C0			FCB	0		; C0 and COUNT must be adjacent
RIPPLE_COUNT		FCB	5

RIPPLE_R0			FCB 10
RIPPLE_STEP			FCB	10



RENDER_RIPPLE
					PSHS	A,B,X,Y,U
					LDX		RIPPLE_C0,PCR
					STX		RIPPLE_COLOR,PCR
					LDA		RIPPLE_R0,PCR
					STA		RIPPLE_R,PCR

					LDX		RIPPLE_CX,PCR
					STX		DRAW_CIRCLE_SUBCPU_CX,PCR
					LDX		RIPPLE_CY,PCR
					STX		DRAW_CIRCLE_SUBCPU_CY,PCR

RENDER_RIPPLE_LOOP
					BSR		RENDER_RIPPLE_DRAW_CIRCLE

					LDA		RIPPLE_STEP,PCR
					ADDA	RIPPLE_R,PCR
					STA		RIPPLE_R,PCR

					LDA		RIPPLE_COLOR,PCR
					INCA
					CMPA	#5
					BLO		RENDER_RIPPLE_NO_OVERFLOW
					CLRA
RENDER_RIPPLE_NO_OVERFLOW
					STA		RIPPLE_COLOR,PCR

					DEC		RIPPLE_REMAIN,PCR
					BPL		RENDER_RIPPLE_LOOP

					PULS	A,B,X,Y,U,PC



RENDER_RIPPLE_DRAW_CIRCLE
					LDB		RIPPLE_R,PCR
					CLRA
					STD		DRAW_CIRCLE_SUBCPU_R,PCR
					LDX		#COMMON_LINEBUFPTR
					STX		DRAW_CIRCLE_BUFFADDR,PCR

					LDA		RIPPLE_COLOR,PCR
					INCA
					STA		DRAW_CIRCLE_COLOR,PCR
					LBSR	DRAW_CIRCLE_COLOR_SUBCPU
					RTS



RIPPLE_COLOR		FCB		1
RIPPLE_REMAIN		FCB		1
RIPPLE_R			FCB		1
