![]() |
Routines |
| Prev: B8DD | Up: Map | Next: B8F9 |
|
Used by the routines at BuildDrawList and PrepareEntityItem.
Converts the screen position in fields 0E and 0F of an entity, which is limited to 7F in the high byte, to an address in the screen buffer with GetBufferAddress, and stores the address in fields 18 and 19.
|
||||||||
| ConvertEntityPosition | B8E2 | LD H,(IX+$0F) | Fetch the row into H. | |||||
| B8E5 | LD L,(IX+$0E) | Fetch the column into L. | ||||||
| B8E8 | LD A,H | H moves into A. | ||||||
| B8E9 | CP $80 | Jump to B8EF if it is below 80. | ||||||
| B8EB | JR C,ConvertEntityPosition_Skip | |||||||
| B8ED | LD H,$7F | H is 7F. | ||||||
| ConvertEntityPosition_Skip | B8EF | CALL GetBufferAddress | Call GetBufferAddress. | |||||
| B8F2 | LD (IX+$18),L | Write L in field 18 of the entity. | ||||||
| B8F5 | LD (IX+$19),H | Write H in field 19 of the entity. | ||||||
| B8F8 | RET | Return. | ||||||
| Prev: B8DD | Up: Map | Next: B8F9 |