Prev: 47325 Up: Map Next: 47353
47330: Convert Entity Position
Used by the routines at BuildDrawList and PrepareEntityItem.
Converts the screen position in fields 14 and 15 of an entity, which is limited to 127 in the high byte, to an address in the screen buffer with GetBufferAddress, and stores the address in fields 24 and 25.
Input
IX The entity
ConvertEntityPosition 47330 LD H,(IX+15) Fetch the row into H.
47333 LD L,(IX+14) Fetch the column into L.
47336 LD A,H H moves into A.
47337 CP 128 Jump to 47343 if it is below 128.
47339 JR C,ConvertEntityPosition_Skip
47341 LD H,127 H is 127.
ConvertEntityPosition_Skip 47343 CALL GetBufferAddress Call GetBufferAddress.
47346 LD (IX+24),L Write L in field 24 of the entity.
47349 LD (IX+25),H Write H in field 25 of the entity.
47352 RET Return.
Prev: 47325 Up: Map Next: 47353