Prev: 938D Up: Map Next: 944C
93F2: Update routine for type $13, the clouds
A cloud slows the ship (contact effect $80, contact_slow_ship), cannot be shot (its +$10 has bit 5 set from the start, spawn_tick), and explodes when it drifts below the bottom of page row 10 or into row 3. Clouds made high up (top speed 4) do not drift in Y. White clouds (+$D = $77) drop things on the ship (attacker_fires, kind 3). The big one (frame 1, one in eight) counts twice in the load. It moves bouncing off the landscape in a 48 by 32 box. Identified as clouds by their place in the sky, their colours and their harmlessness, not by name.
Input
IX The cloud's record
update_cloud 93F2 LD A,$80 Its contact effect
93F4 LD (contact_effect),A
93F7 LD A,(IX+$04) Below row 10's line $A0: it explodes
93FA CP $0A
93FC JR NZ,update_cloud_0
93FE LD A,(IX+$05)
9401 CP $A0
9403 JR C,update_cloud_1
9405 SET 3,(IX+$17)
9409 JR update_cloud_1
update_cloud_0 940B CP $03 In row 3: it explodes
940D JR NZ,update_cloud_1
940F SET 3,(IX+$17)
update_cloud_1 9413 LD A,$03 White ones drop things
9415 LD (scratch_count),A
9418 LD A,(IX+$0D)
941B CP $77
941D PUSH IY
941F CALL Z,attacker_fires
9422 POP IY
9424 LD A,(IX+$10) The high ones keep their height
9427 AND $03
9429 CP $03
942B JR NZ,update_cloud_2
942D LD (IX+$0E),$00
9431 LD (IX+$0F),$00
update_cloud_2 9435 CALL accelerate Accelerate
9438 LD BC,$2030 48 by 32; the big one counts twice; move and draw (update_attacker)
943B LD A,(IX+$13)
943E AND A
943F JP Z,move_draw
9442 LD A,(object_load)
9445 INC A
9446 LD (object_load),A
9449 JP move_draw
Prev: 938D Up: Map Next: 944C