Prev: 9E17 Up: Map Next: 9E6D
9E46: Update Shot Entity
Updates an entity of the type 0E which is made by UpdateSaucerEntity. The entity falls until its third coordinate reaches 0103.
Input
IX The entity
UpdateShotEntity 9E46 LD A,(IX+$16) Read field 16 of the entity.
9E49 AND %11110000 Keep the counter.
9E4B JR Z,UpdateShotEntity_Fall Jump to UpdateShotEntity_Fall if it is zero.
9E4D CALL DecreaseEntityCounter Call DecreaseEntityCounter to count down.
9E50 JP UpdateEntity_Project Jump to UpdateEntity_Project to carry on updating the entity.
UpdateShotEntity_Fall 9E53 LD A,(IX+$08) Fetch the first byte of the third coordinate of the entity.
9E56 DEC A Subtract one.
9E57 JR NZ,UpdatePuffEntity_Test Jump to UpdatePuffEntity_Test unless it was 01.
9E59 LD A,(IX+$09) Fetch the second byte of the third coordinate of the entity.
9E5C CP $03 Jump to UpdatePuffEntity_Test if it is 03 or more.
9E5E JR NC,UpdatePuffEntity_Test
9E60 LD (IX+$09),$03 Set the second byte of the third coordinate to 03.
9E64 XOR A Set A to zero.
9E65 LD (IX+$12),A Set field 12 of the entity to zero.
9E68 LD (IX+$13),A Set field 13 of the entity to zero.
9E6B JR UpdatePuffEntity_Test Jump to UpdatePuffEntity_Test.
Prev: 9E17 Up: Map Next: 9E6D