Prev: 40822 Up: Map Next: 40852
40834: Get Object First Location
Used by the routines at 38579, 39629 and Action_None.
Input
A Object ID
Output
A Either $FF if the object appears once, or the location ID of the first time the object appears.
ObjectFirstLocation 40834 CP 255 Return if this is the terminator character ($FF).
40836 RET Z
40837 CALL LocateObject Call LocateObject to set IX to the object data address.
40840 LD A,1 Does the object appear in the game once?
40842 CP (IX+0)
40845 LD A,255 A=$FF (termination character).
40847 RET NZ Return if not.
40848 LD A,(IX+16) A=the first location the object appears in.
40851 RET Return.
Prev: 40822 Up: Map Next: 40852