Prev: CDEF Up: Map Next: CE22
CE14: Choose the head sprite
Used by the routine at head_follows_legs.
Normally the head is the legs' type plus 16: the same creature, facing and animation frame. About one frame in 64 (the random byte at $5BA5 being 0 or 1, or $FE or $FF) the head is given one of two other frames of its type group instead -- frame 6 or frame 7 -- which it then holds for eight frames. The legs only ever use frames 0 to 5, so frames 6 and 7 exist only as heads. What the two look like has not been checked against the sprites.
choose_head_sprite CE14 LD A,($5BA5) random byte below 2: frame 6
CE17 CP $02
CE19 JR C,head_frame_six
CE1B CP $FE $FE or above: frame 7
CE1D JR NC,head_frame_seven
CE1F LD A,(IY+$00) otherwise the legs' type
Prev: CDEF Up: Map Next: CE22