Prev: AB71 Up: Map Next: AB95
AB76: Initialise Entity Defaults
Used by the routine at Update_Berk_State.
Initialise Entity Defaults walking the entity tables at StateData_SimpleEntities / StateData_Boney.
Initialise_Entity_Defaults AB76 LD IX,$8F75 Point IX at the plant-pot complex entity (StateData_Complex_10).
AB7A LD DE,$000E Each entity record is 000E bytes long, then load that length into DE.
AB7D LD HL,$A082 Point HL at Graphic Layout Data: Entity Type 0F (GraphicLayout_PlantPot).
AB80 LD B,$03 Load B with 03 as a loop counter.
Stamp default type/flags/layout onto each plant-pot entity slot and walk to the next.
Initialise_Entity_Defaults_WriteType AB82 LD (IX+$00),$12 Write 12 to the current entity's entity type.
AB86 LD (IX+$01),$1B Write 1B to the current entity's flags byte 1.
AB8A LD (IX+$0A),L Set the low byte of the current entity's graphic layout address from L.
AB8D LD (IX+$0B),H Set the high byte of the current entity's graphic layout address from H.
AB90 ADD IX,DE Advance IX to the next entity record.
AB92 DJNZ Initialise_Entity_Defaults_WriteType Decrease the loop counter in B and jump to Initialise_Entity_Defaults_WriteType if more iterations remain.
AB94 RET Return.
Prev: AB71 Up: Map Next: AB95