Prev: 924D Up: Map Next: 92E1
9278: Draws objects (left hand version).
Called via dispatch at 901B.
Used to draw turn signs, tunnel lights, ... what else?
Input
B ?
IX ?
DE Address of arg, e.g. $6B0C
draw_object_left 9278 XOR A A = 0
9279 LD ($933E),A Self modify 'LD D,x' @ draw_object_right_8 to load A
927C LD A,B A = min(B,10)
927D CP $0A
927F JR C,draw_object_left_0
9281 LD A,$0A
draw_object_left_0 9283 EX DE,HL Put arg address in HL
9284 LD E,(HL) DE = wordat(HL); HL++ -- loads address of turn_sign_lods
9285 INC HL
9286 LD D,(HL)
9287 RLCA HL += A * 2 - 1 -- index the table
9288 DEC A
9289 LD C,A
928A LD B,$00
928C ADD HL,BC
928D LD B,(HL) B = *HL++ -- this reads 6AF8
928E INC HL
928F LD L,(HL) HL = *HL + DE -- read as byte
9290 LD H,$00
9292 ADD HL,DE
This entry point is used by the routine at draw_stretchy_object_left.
draw_object_left_stretchy_entrypt 9293 LD A,(IX+$00) A = IX[0] + 16 - B
9296 ADD A,$10
9298 SUB B
9299 RET C Return if carry (if IX[0] + 16 < B)
This entry point is used by the routines at sub_A9DE, helicopter_stuff and draw_hazards.
draw_object_left_1 929A CP $08 Return if A < 8
929C RET C
929D LD C,$00 C = 0
929F LD E,(HL) E = *HL
92A0 RLC E likely E << 3
92A2 RLC E
92A4 RLC E
92A6 SUB E A -= E
92A7 JR C,draw_object_left_2
92A9 CP $08 Jump if A >= 8
92AB JR NC,draw_object_right_4
92AD LD E,(HL) E = *HL
92AE RRCA
92AF RRCA
92B0 LD ($9396),A Self modify 'LD A,x' at $9395 to load A
92B3 LD A,E A = E - 1
92B4 DEC A
92B5 LD BC,$0101 BC = $0101
92B8 JP draw_object_left_3
draw_object_left_2 92BB LD E,(HL) E = *HL
92BC AND $FC A &= $FC
92BE RRCA
92BF RRCA
92C0 LD ($9396),A Self modify 'LD A,x' at $9395 to load A
92C3 RRA
92C4 LD B,A B = A
92C5 ADD A,E A += E - 33
92C6 SUB $21
92C8 RET C Return if carry or zero
92C9 RET Z
92CA LD D,A D = A
92CB NEG C = E - A
92CD ADD A,E
92CE LD C,A
92CF LD A,D A = D
92D0 LD B,$01 B = 1
draw_object_left_3 92D2 INC HL HL++
92D3 LD D,(HL) D = *HL >> 1
92D4 SRL D
92D6 JP Z,draw_object_right_6
92D9 DEC B B--
92DA INC A A++
92DB LD C,$00 C = 0
92DD EX AF,AF'
92DE JP draw_object_common Exit via draw_object_common
Prev: 924D Up: Map Next: 92E1