Prev: 41653 Up: Map Next: 41771
41760: Find Sector Energy
Used by the routines at ReduceSectorEnergy and InstallProgram.
Finds the entry for the sector that an entity is in, in the table of sector energies.
Input
IX Entity
Output
DE Sector number
HL Address of the energy of the sector
FindSectorEnergy 41760 CALL FindSector Find the sector using FindSector.
41763 LD E,A Put the sector number in E...
41764 LD D,0 ...and clear D.
41766 LD HL,41825 Point HL at SectorEnergy.
41769 ADD HL,DE Add the sector number.
41770 RET Return.
Prev: 41653 Up: Map Next: 41771