Prev: D1F5 Up: Map Next: D2AD
D251: The update routine for the walker from the sky
Graphics 168 to 171, a creature that falls from the sky (SKY_DROP) and walks. As ROAMER, but its picture changes every turn between the two graphics of a pair (bit 0), which is its walk, and bit 1 of the graphic is what goes with the way it runs.
Input
IX the object record
SKY_WALKER D251 CALL DRAW_AT_L16_D8 the drawing nudge; deadly; fall
D254 CALL MAKE_DEADLY
D257 CALL DEC_DZ_AND_UPDATE_UVZ
D25A LD A,(IX+$00) the next step of the walk
D25D XOR $01
D25F LD (IX+$00),A
D262 LD A,(IX+$03) no lower than 129
D265 CP $81
D267 JR NC,SKY_WALKER_0
D269 LD (IX+$03),$81
D26D LD (IX+$0B),$00
SKY_WALKER_0 D271 LD A,(IX+$09) still moving: redraw
D274 OR (IX+$0A)
D277 JP NZ,SET_WIPE_AND_DRAW_FLAGS
D27A LD A,R stopped: four units, either way
D27C AND $08
D27E SUB $04
D280 BIT 1,(IX+$0C) not bumped in V: along V, the second pair, not mirrored...
D284 JR NZ,SKY_WALKER_1
D286 LD (IX+$0A),A
D289 SET 1,(IX+$00)
D28D RES 6,(IX+$07)
D291 JR SKY_WALKER_2
SKY_WALKER_1 D293 LD (IX+$09),A ...bumped in V: along U, the first pair, mirrored
D296 RES 1,(IX+$00)
D29A SET 6,(IX+$07)
SKY_WALKER_2 D29E AND A going backwards: the other pair; redraw
D29F JP P,SET_WIPE_AND_DRAW_FLAGS
D2A2 LD A,(IX+$00)
D2A5 XOR $02
D2A7 LD (IX+$00),A
D2AA JP SET_WIPE_AND_DRAW_FLAGS
Prev: D1F5 Up: Map Next: D2AD