![]() |
Routines |
| Prev: 58619 | Up: Map | Next: 58720 |
|
The opening bytes are data. The instructions that follow store the display pointer. A non-zero return means the script step succeeded. Reached from the script record at 58632.
|
||||
| StoreResultHighByte | 58640 | DEFB 87,112,227,253,252,15,229 | Refresh the room from the text at 58224, using the low byte of the location, the high byte of the location and otherwise continue at 58639. | |
| 58647 | DEFB 11 | Run the nested character script. | ||
| 58648 | DEFB 109,13,252,228 | Display record read by ProcessDisplayRecord: flags 109 value 13 handler 58620. | ||
|
Run by 51812 after the display record at 58648.
|
||||
| 58652 | LD A,254 | Take 254 for the location value. | ||
| 58654 | LD (40919),A | Store it at LocationValue. | ||
| 58657 | LD L,(IX+9) | Read the text pointer at offsets 9 and 10. | ||
| 58660 | LD H,(IX+10) | |||
| 58663 | SET 7,L | Set bit 7 of the pointer's low byte. | ||
| 58665 | LD (41007),HL | Record the display pointer. | ||
| 58668 | OR %00000001 | Reset the zero flag. | ||
| 58670 | RET | Return. | ||
| 58671 | DEFB 7,7 | Display record read by ProcessDisplayRecord: flags 7 value 7. | ||
| 58673 | LD A,2 | Take 2 as the number of bytes to allocate. | ||
| 58675 | CALL AllocateMemory | Call AllocateMemory to build the pointer the clock update stores. | ||
| 58678 | LD HL,(40933) | Read the clock at 40933 into HL and store IX in its place. | ||
| 58681 | LD (40933),IX | |||
| 58685 | LD (IX-2),L | Store the low byte of the pointer in the previous record. | ||
| 58688 | LD (IX-1),H | Store the high byte of the pointer in the previous record. | ||
| 58691 | LD A,(41014) | |||
| 58694 | LD (IX+0),A | Store the record's flag byte. | ||
| 58697 | LD A,(41013) | Jump to StoreResultHighByte_MovedMarker if the room graphics parameter is 255. | ||
| 58700 | LD B,0 | |||
| 58702 | CP 255 | |||
| 58704 | JR Z,StoreResultHighByte_MovedMarker | |||
|
Get character attribute with sign.
|
||||
| 58706 | CALL GetRandomNumber | Call GetRandomNumber to read the signed character attribute. | ||
| 58709 | LD B,A | Use the get character attribute with sign result as the count. | ||
| StoreResultHighByte_MovedMarker | 58710 | LD A,(41012) | Add the count to the room display parameter and store it as the moved marker. | |
| 58713 | ADD A,B | |||
| 58714 | LD (IX+1),A | |||
| 58717 | OR %00000001 | Reset the zero flag. | ||
| 58719 | RET | Return. | ||
| Prev: 58619 | Up: Map | Next: 58720 |