![]() |
Routines |
| Prev: 31252 | Up: Map | Next: 31393 |
|
Used by the routine at Inglish_ScoreTheCurrentAction.
Searches the previous parser slot for an object in the same place as the player whose id matches the current object, and sets that object when bit 6 of the clause byte is set.
|
||||
| Inglish_SearchThePreviousSlot | 31347 | PUSH IY | Step back one 24-byte parser record. | |
| 31349 | PUSH DE | |||
| 31350 | PUSH HL | |||
| Inglish_SearchThePreviousSlot_StepBackOneRecord | 31351 | LD DE,65512 | ||
| 31354 | ADD IY,DE | Jump to Inglish_SearchThePreviousSlot_RestoreAndReturn if bit 6 of the clause byte at offset 1 is clear. | ||
| 31356 | BIT 6,(IY+1) | |||
| 31360 | JR Z,Inglish_SearchThePreviousSlot_RestoreAndReturn | |||
| 31362 | LD IX,49248 | Start the object search one slot before ObjectTable. | ||
| Inglish_SearchThePreviousSlot_TestTheNextObject | 31366 | PUSH IY | Use the parser workspace from here on. | |
| 31368 | POP HL | |||
| 31369 | LD DE,8 | Step the pointer on by 8 bytes. | ||
| 31372 | ADD HL,DE | |||
| 31373 | CALL ConditionSamePlaceAsThePlayer | Call ConditionSamePlaceAsThePlayer to test whether the object is in the same place as the player. | ||
| 31376 | CP 255 | Jump back to Inglish_SearchThePreviousSlot_StepBackOneRecord if ConditionSamePlaceAsThePlayer returned 255. | ||
| 31378 | JR Z,Inglish_SearchThePreviousSlot_StepBackOneRecord | |||
| 31380 | LD HL,46824 | Jump back to Inglish_SearchThePreviousSlot_TestTheNextObject unless the object ConditionSamePlaceAsThePlayer found is the current object. | ||
| 31383 | CP (HL) | |||
| 31384 | JR NZ,Inglish_SearchThePreviousSlot_TestTheNextObject | |||
| 31386 | OR 1 | Clear the zero flag. | ||
| Inglish_SearchThePreviousSlot_RestoreAndReturn | 31388 | POP HL | Restore HL, DE and IY from the stack. | |
| 31389 | POP DE | |||
| 31390 | POP IY | |||
| 31392 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 31252 | Up: Map | Next: 31393 |