![]() |
Routines |
| Prev: 45980 | Up: Map | Next: 46085 |
|
Used by the routine at InitialiseDisplayBuffer.
Stores the result in the display, then clears the mark on this character.
|
||||
| ProcessDisplayPointer | 45981 | PUSH IY | Read the word at IY+0-1 into HL, keeping IY. | |
| 45983 | LD L,(IY+0) | |||
| 45986 | LD H,(IY+1) | |||
| 45989 | LD A,H | Read the high byte of the pointer. | ||
| 45990 | AND 128 | Keep bit 7. | ||
| 45992 | LD (45980),A | Record the result in the display flag at 45980. | ||
| 45995 | RES 7,H | Clear the top bit of the pointer. | ||
| 45997 | LD (45446),HL | Store the pointer at 45445+1 and read the low byte at IY+2. | ||
| 46000 | LD L,(IY+2) | |||
| 46003 | LD H,(IY+3) | Read the high byte at IY+3. | ||
| 46006 | LD (45452),HL | Store that word at 45452 and push the pointer at 45448. | ||
| 46009 | LD HL,45448 | |||
| 46012 | PUSH HL | |||
| 46013 | LD B,4 | Take 4 bytes for ClearBuffer to clear. | ||
| 46015 | CALL ClearBuffer | Call ClearBuffer to clear buffer. | ||
| 46018 | POP HL | |||
| 46019 | LD B,2 | Take 2 bytes and call CopyCharacterDisplay to copy the character into the display. | ||
| 46021 | LD E,4 | |||
| 46023 | CALL CopyCharacterDisplay | |||
| 46026 | LD E,14 | Take 14 and call CopyCharacterDisplay to copy the character into the display. | ||
| 46028 | CALL CopyCharacterDisplay | |||
| 46031 | LD E,6 | Take 6 and call CopyCharacterDisplay to copy the character into the display. | ||
| 46033 | CALL CopyCharacterDisplay | |||
| 46036 | LD E,16 | Take 16 and call CopyCharacterDisplay to copy the character into the display. | ||
| 46038 | CALL CopyCharacterDisplay | |||
| 46041 | XOR A | Clear the byte at LocationMatchFlag and point HL at ObjectTablePointer+8. | ||
| 46042 | LD (41006),A | |||
| 46045 | LD HL,45446 | |||
| 46048 | LD DE,8 | Take a length of 8 entries. | ||
| 46051 | LD IX,33369 | Use the object runtime table (33369). | ||
| ProcessDisplayPointer_Loop | 46055 | PUSH IX | Use the character record as the schedule entry. | |
| 46057 | POP IY | |||
| 46059 | CALL CompareLocationData | Call CompareLocationData to compare location data. | ||
| 46062 | JR Z,ProcessDisplayPointer_Next | Go to ProcessDisplayPointer_Next if the room fields match. | ||
| 46064 | ADD IX,DE | Step to the next display entry. | ||
| 46066 | LD A,(IX+1) | Go back to ProcessDisplayPointer_Loop if this object word is not zero. | ||
| 46069 | OR (IX+0) | |||
| 46072 | JR NZ,ProcessDisplayPointer_Loop | |||
| 46074 | POP IY | Restore the saved schedule entry from the stack. | ||
| 46076 | RET | Return. | ||
|
Restores the character, swaps the display pointers, and leaves a non-zero result.
|
||||
| ProcessDisplayPointer_Next | 46077 | POP IY | Restore the saved schedule entry from the stack. | |
| 46079 | CALL SwapObjectDisplayPointers | Call SwapObjectDisplayPointers. | ||
| 46082 | OR %00000001 | Reset the zero flag. | ||
| 46084 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 45980 | Up: Map | Next: 46085 |