![]() |
Routines |
| Prev: 40260 | Up: Map | Next: 40343 |
|
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 | 40272 | LD A,(46824) | Read the current object. | |
|
This entry point is used by the routines at Turn_ThePlayerHasDied, Event_TheBarrel and Event_DayDawnsOnTheTrolls.
|
||||
| Condition_WhereTheObjectIs_0 | 40275 | PUSH IY | Call LocateObject to locate the object. | |
| 40277 | PUSH IX | |||
| 40279 | PUSH HL | |||
| 40280 | CALL LocateObject | |||
| 40283 | LD B,(IX+1) | Read where this object is. | ||
| 40286 | LD IX,49248 | Point IX at the slot before the object table. | ||
| Condition_WhereTheObjectIs_Loop | 40290 | CALL Table_FindTheRecord | Call Table_FindTheRecord to find the record. | |
| 40293 | JR Z,Condition_WhereTheObjectIs_RestoreAndReturn | Jump to Condition_WhereTheObjectIs_RestoreAndReturn if Table_FindTheRecord reached the end of the index. | ||
| 40295 | CP (IY+1) | Jump back to Condition_WhereTheObjectIs_Loop if where this object is is not the id in A. | ||
| 40298 | JR NZ,Condition_WhereTheObjectIs_Loop | |||
| 40300 | BIT 1,(IY+7) | Jump to Condition_WhereTheObjectIs_UpdateWhereThisObject if the object is not a fluid. | ||
| 40304 | JR Z,Condition_WhereTheObjectIs_UpdateWhereThisObject | |||
| 40306 | PUSH AF | Clear the object's location. | ||
| 40307 | LD (IY+16),0 | |||
| 40311 | LD (IY+1),255 | Mark where this object is as unset. | ||
| 40315 | RES 7,(IY+7) | Mark the object not visible. | ||
| 40319 | CALL MessageNameAnObject | Call MessageNameAnObject to print the object's name. | ||
| 40322 | LD HL,45379 | Point at the message "evaporate(s|d|ing|es)[0x15]" (45378). | ||
| 40325 | CALL PrintMessage | Call PrintMessage to print message. | ||
| 40328 | POP AF | Jump back to Condition_WhereTheObjectIs_Loop to find the record. | ||
| 40329 | JR Condition_WhereTheObjectIs_Loop | |||
| Condition_WhereTheObjectIs_UpdateWhereThisObject | 40331 | LD (IY+1),B | Update where this object is. | |
| 40334 | JP Condition_WhereTheObjectIs_Loop | Jump back to Condition_WhereTheObjectIs_Loop to find the record. | ||
| Condition_WhereTheObjectIs_RestoreAndReturn | 40337 | POP HL | Restore HL, IX and IY from the stack. | |
| 40338 | POP IX | |||
| 40340 | POP IY | |||
| 40342 | RET | Return. | ||
| Prev: 40260 | Up: Map | Next: 40343 |