Prev: 916C Up: Map Next: 9278
924D: Draws tunnel lights via the shared draw_object_left/right drawing code
The entry point for lights on the left hand side of the tunnel. It loads draw_object_left_entrypt (draw_object_left_entrypt) as the drawing callback and dispatches to the common object-drawing code with PUSH HL / RET.
Input
B Depth index of the light, 0 being nearest. Offset added to the $E6xx address; the routine is skipped if it's >= 16
DE Depth set pointer for the light object
IX X-position table pointer
IY Height table pointer
draw_tunnel_light_left 924D LD HL,$9279 HL = $9279
9250 JR draw_tunnel_light_common
draw_tunnel_light_right 9252 LD HL,$92E2 HL = $92E2
draw_tunnel_light_common 9255 LD A,B Return if B >= 16
9256 CP $10
9258 RET NC
9259 PUSH HL Push return address
925A LD A,($A23F) A = fast_counter & $E0
925D AND $E0
Reduces A by 31.25%
925F LD L,A L = A
9260 RRC L L >>= 2
9262 RRC L
9264 SUB L A -= L
9265 RRC L L >>= 2
9267 RRC L
9269 SUB L A -= L
926A ADD A,B A += B -- B was passed in
926B LD L,A L = A
926C LD H,$E6 H = $E6 -- $E6xx data
926E LD A,(HL) A = *HL
926F LD C,A A = (A>>2) - A
9270 SRL C
9272 SRL C
9274 SUB C
9275 NEG
9277 RET Return via earlier PUSH
Prev: 916C Up: Map Next: 9278