Prev: 9E5C Up: Map Next: 9E72
9E64: Choose Flame Colour
Used by the routine at HandlerFlame.
Chooses a colour for the flame from the low bits of the random seed at RandomNumber. The result is a bright ink colour from red to white.
Output
A The colour
ChooseFlameColour 9E64 LD A,($9695) Fetch the random seed from RandomNumber.
9E67 AND %00000111 Keep only bits 0-2.
9E69 CP $02 Jump to ChooseFlameColour_Bright if the colour is 02 or more.
9E6B JR NC,ChooseFlameColour_Bright
9E6D OR %00000110 Set bits 1-2.
ChooseFlameColour_Bright 9E6F OR %01000000 Set bit 6 (bright).
9E71 RET Return.
Prev: 9E5C Up: Map Next: 9E72