lorom

;This changes the arm cannon palette based on what beam you have chosen.
;it overwrites any palette change from the game, meaning you'll have the same arm cannon color for all suits and palette flashes (eg during charge or speedboosting)
;if you want to change that you need to insert proper checks yourself.
;Priority is as follows (most significant being first): Ice, Plasma, Spazer, Wave, Power (affected by palette change)

;1778D - 0F, enter this in SABS to edit the arm cannon's color (there are 4 per beam (except power beam), in the same order as above,)

org $82DBB2

	JSR $F720

org $82F720
	PHA
	PHY
	LDA $09A6
	BIT #$0002
	BNE ICE
	BIT #$0008
	BNE PLASMA
	BIT #$0004
	BNE SPAZER
	BIT #$0001
	BNE WAVE
	BRA QUIT
ICE:
	LDY #$0000
	JSR CHANGE
	BRA QUIT
PLASMA:
	LDY #$0008
	JSR CHANGE
	BRA QUIT
SPAZER:
	LDY #$0010
	JSR CHANGE
	BRA QUIT

WAVE:
	LDY #$0018
	JSR CHANGE

	QUIT:
	PLA
	PLY
	LDA $09DA
	RTS

CHANGE:

	LDA PALETTE,y
	STA $7EC19A
	INY
	INY
	LDA PALETTE,y
	STA $7EC18A
	INY
	INY
	LDA PALETTE,y
	STA $7EC190
	INY
	INY
	LDA PALETTE,y
	STA $7EC18E
	RTS


org $82F78D
PALETTE:	
















