![]() |
Routines |
| Prev: 9D44 | Up: Map | Next: 9D97 |
|
Used by the routines at Action_UseTheOtherObject and Action_Examine.
Works out where the object is. A fluid that is no longer contained evaporates, and "evaporate(s|d|ing|es)" is printed.
|
||||
| Condition_WhereTheObjectIs | 9D50 | LD A,($B6E8) | Read the current object. | |
|
This entry point is used by the routines at Turn_ThePlayerHasDied, Event_TheBarrel and Event_DayDawnsOnTheTrolls.
|
||||
| Condition_WhereTheObjectIs_0 | 9D53 | PUSH IY | Call LocateObject to locate the object. | |
| 9D55 | PUSH IX | |||
| 9D57 | PUSH HL | |||
| 9D58 | CALL LocateObject | |||
| 9D5B | LD B,(IX+$01) | Read where this object is. | ||
| 9D5E | LD IX,$C060 | Point IX at the slot before the object table. | ||
| Condition_WhereTheObjectIs_Loop | 9D62 | CALL Table_FindTheRecord | Call Table_FindTheRecord to find the record. | |
| 9D65 | JR Z,Condition_WhereTheObjectIs_RestoreAndReturn | Jump to Condition_WhereTheObjectIs_RestoreAndReturn if Table_FindTheRecord reached the end of the index. | ||
| 9D67 | CP (IY+$01) | Jump back to Condition_WhereTheObjectIs_Loop if where this object is is not the id in A. | ||
| 9D6A | JR NZ,Condition_WhereTheObjectIs_Loop | |||
| 9D6C | BIT 1,(IY+$07) | Jump to Condition_WhereTheObjectIs_UpdateWhereThisObject if the object is not a fluid. | ||
| 9D70 | JR Z,Condition_WhereTheObjectIs_UpdateWhereThisObject | |||
| 9D72 | PUSH AF | Clear the object's location. | ||
| 9D73 | LD (IY+$10),$00 | |||
| 9D77 | LD (IY+$01),$FF | Mark where this object is as unset. | ||
| 9D7B | RES 7,(IY+$07) | Mark the object not visible. | ||
| 9D7F | CALL MessageNameAnObject | Call MessageNameAnObject to print the object's name. | ||
| 9D82 | LD HL,$B143 | Point at the message "evaporate(s|d|ing|es)[0x15]" (B142). | ||
| 9D85 | CALL PrintMessage | Call PrintMessage to print message. | ||
| 9D88 | POP AF | Jump back to Condition_WhereTheObjectIs_Loop to find the record. | ||
| 9D89 | JR Condition_WhereTheObjectIs_Loop | |||
| Condition_WhereTheObjectIs_UpdateWhereThisObject | 9D8B | LD (IY+$01),B | Update where this object is. | |
| 9D8E | JP Condition_WhereTheObjectIs_Loop | Jump back to Condition_WhereTheObjectIs_Loop to find the record. | ||
| Condition_WhereTheObjectIs_RestoreAndReturn | 9D91 | POP HL | Restore HL, IX and IY from the stack. | |
| 9D92 | POP IX | |||
| 9D94 | POP IY | |||
| 9D96 | RET | Return. | ||
| Prev: 9D44 | Up: Map | Next: 9D97 |