Prev: 45108 Up: Map Next: 45481
45422: Update Drutt Animation
Used by the routine at Update_Drutt.
Update Drutt Animation for Drutt using complex state at StateData_Drutt.
Update_Drutt_Animation 45422 LD IY,36585 Point IY at Boney's complex entity state (StateData_Boney).
45426 LD DE,14 Each entity record is 0014 bytes long, then load that length into DE.
Accept only a live room-3 entity under Drutt's mouth band; otherwise scan on.
Update_Drutt_Animation_CheckType 45429 LD A,(IY+0) Load A with the referenced entity's entity type.
45432 CP 50 Is referenced entity's entity type equal to 50? If so, return? If not, jump to Update_Drutt_Animation_NextEntity.
45434 RET Z
45435 JR NC,Update_Drutt_Animation_NextEntity
45437 OR A Is referenced entity's entity type zero? If so, jump to Update_Drutt_Animation_NextEntity.
45438 JR Z,Update_Drutt_Animation_NextEntity
45440 BIT 7,A Is bit 7 of referenced entity's entity type set? If so, jump to Update_Drutt_Animation_NextEntity.
45442 JR NZ,Update_Drutt_Animation_NextEntity
45444 LD A,(IY+4) Load A with the referenced entity's room index.
45447 CP 3 Is referenced entity's room index equal to 3? If not, jump to Update_Drutt_Animation_NextEntity.
45449 JR NZ,Update_Drutt_Animation_NextEntity
45451 LD A,(IY+7) Load A with the referenced entity's x-coordinate.
45454 CP 171 Is referenced entity's x-coordinate less than 171? If so, jump to Update_Drutt_Animation_NextEntity.
45456 JR C,Update_Drutt_Animation_NextEntity
45458 LD A,177 Load A with 177.
45460 CP (IY+8) Is 177 less than the referenced entity's x-extent? If so, jump to Update_Drutt_Animation_NextEntity.
45463 JR C,Update_Drutt_Animation_NextEntity
45465 BIT 5,(IY+1) Is bit 5 of the referenced entity's flags byte 1 set? If so, jump to Update_Drutt_Animation_NextEntity.
45469 JR NZ,Update_Drutt_Animation_NextEntity
45471 CP 171 Compare 177 with 171.
45473 LD A,(IY+0) Load A with the referenced entity's entity type.
45476 RET Return.
Advance to the next entity and continue the Drutt catchability scan.
Update_Drutt_Animation_NextEntity 45477 ADD IY,DE Advance IY to the next entity record.
45479 JR Update_Drutt_Animation_CheckType Jump to Update_Drutt_Animation_CheckType to continue the Drutt animation scan.
Prev: 45108 Up: Map Next: 45481