Prev: B034 Up: Map Next: B1A9
B16E: Update Drutt Animation
Used by the routine at Update_Drutt.
Update Drutt Animation for Drutt using complex state at StateData_Drutt.
Update_Drutt_Animation B16E LD IY,$8EE9 Point IY at Boney's complex entity state (StateData_Boney).
B172 LD DE,$000E Each entity record is 000E bytes long, then load that length into DE.
Accept only a live room-03 entity under Drutt's mouth band; otherwise scan on.
Update_Drutt_Animation_CheckType B175 LD A,(IY+$00) Load A with the referenced entity's entity type.
B178 CP $32 Is referenced entity's entity type equal to 32? If so, return? If not, jump to Update_Drutt_Animation_NextEntity.
B17A RET Z
B17B JR NC,Update_Drutt_Animation_NextEntity
B17D OR A Is referenced entity's entity type zero? If so, jump to Update_Drutt_Animation_NextEntity.
B17E JR Z,Update_Drutt_Animation_NextEntity
B180 BIT 7,A Is bit 07 of referenced entity's entity type set? If so, jump to Update_Drutt_Animation_NextEntity.
B182 JR NZ,Update_Drutt_Animation_NextEntity
B184 LD A,(IY+$04) Load A with the referenced entity's room index.
B187 CP $03 Is referenced entity's room index equal to 03? If not, jump to Update_Drutt_Animation_NextEntity.
B189 JR NZ,Update_Drutt_Animation_NextEntity
B18B LD A,(IY+$07) Load A with the referenced entity's x-coordinate.
B18E CP $AB Is referenced entity's x-coordinate less than AB? If so, jump to Update_Drutt_Animation_NextEntity.
B190 JR C,Update_Drutt_Animation_NextEntity
B192 LD A,$B1 Load A with B1.
B194 CP (IY+$08) Is B1 less than the referenced entity's x-extent? If so, jump to Update_Drutt_Animation_NextEntity.
B197 JR C,Update_Drutt_Animation_NextEntity
B199 BIT 5,(IY+$01) Is bit 05 of the referenced entity's flags byte 1 set? If so, jump to Update_Drutt_Animation_NextEntity.
B19D JR NZ,Update_Drutt_Animation_NextEntity
B19F CP $AB Compare B1 with AB.
B1A1 LD A,(IY+$00) Load A with the referenced entity's entity type.
B1A4 RET Return.
Advance to the next entity and continue the Drutt catchability scan.
Update_Drutt_Animation_NextEntity B1A5 ADD IY,DE Advance IY to the next entity record.
B1A7 JR Update_Drutt_Animation_CheckType Jump to Update_Drutt_Animation_CheckType to continue the Drutt animation scan.
Prev: B034 Up: Map Next: B1A9