![]() |
Routines |
| Prev: DD0E | Up: Map | Next: DE48 |
|
Used by the routine at ReadScheduleEntryFromCurrentCharacter.
Returns zero when A is zero, or when a bit of 28 is set in the object's attribute and its location is not below IY+02. Any other object returns non-zero.
|
||||
| DescribeObjectIfPresent | DD35 | AND A | Return if the object is zero. | |
| DD36 | RET Z | |||
| DD37 | PUSH IX | Call FetchObjectDataPointer to look up that object. | ||
| DD39 | CALL FetchObjectDataPointer | |||
| DD3C | LD A,(IX+$05) | Read the object attribute. | ||
|
None of the bits 28 are set in the object attribute?
|
||||
| DD3F | AND $28 | Jump to DescribeObjectIfPresent_Next if none of the bits 28 are set in the object attribute. | ||
| DD41 | LD A,(IX+$02) | |||
| DD44 | POP IX | |||
| DD46 | JR Z,DescribeObjectIfPresent_Next | |||
| DD48 | CP (IY+$02) | Go to DescribeObjectIfPresent_Next if the object's location is below the byte at IY+02. | ||
| DD4B | JR C,DescribeObjectIfPresent_Next | |||
| DD4D | XOR A | Clear A. | ||
| DD4E | RET | Return. | ||
| DescribeObjectIfPresent_Next | DD4F | OR %00000001 | Reset the zero flag. | |
| DD51 | RET | Return. | ||
| DD52 | DEFB $A4,$00 | Display record read by ProcessDisplayRecord: flags A4 value 00. | ||
| DD54 | DEFB $17,$61,$DD,$FD,$FF,$60,$DD | Refresh the room from the text at DD61, using the low byte of the location, FF and otherwise continue at DD60. | ||
| DD5B | DEFB $11,$FD,$60,$DD | Perform the simple action for the low byte of the location and otherwise continue at DD60. | ||
| DD5F | DEFB $0B | Run the nested character script. | ||
| DD60 | DEFB $0A | Run the nested character script. | ||
| DD61 | DEFB $64,$00,$6E,$DD | Display record read by ProcessDisplayRecord: flags 64 value 00 handler DD6E. | ||
| DD65 | LD A,(IX+$00) | Read the object's first byte and store it as the location value. | ||
| DD68 | LD ($9FD7),A | |||
| DD6B | OR %00000001 | Reset the zero flag. | ||
| DD6D | RET | Return. | ||
|
Reached through the display record at DD61, dispatched by DispatchLookedUpHandlerThird.
|
||||
| DD6E | LD A,($A034) | Read the room display parameter and call FindObjectByFieldTwo to find an object by field two. | ||
| DD71 | CALL FindObjectByFieldTwo | |||
| DD74 | CP $FF | Go to ParseInputNumber_ReturnZero if it is FF. | ||
| DD76 | JP Z,ParseInputNumber_ReturnZero | |||
| DD79 | LD A,(IX+$00) | Return zero through ParseInputNumber_ReturnZero if the record's flag byte is at least 0B. | ||
| DD7C | CP $0B | |||
| DD7E | JP NC,ParseInputNumber_ReturnZero | |||
| DD81 | OR %00000001 | Reset the zero flag. | ||
| DD83 | RET | Return. | ||
| DD84 | DEFB $6D,$00,$91,$DD | Display record read by ProcessDisplayRecord: flags 6D value 00 handler DD91. | ||
| DD88 | LD A,(IX+$01) | Record the current room. | ||
| DD8B | LD ($9FD6),A | |||
| DD8E | OR %00000001 | Reset the zero flag. | ||
| DD90 | RET | Return. | ||
| DD91 | LD IX,($A013) | Read the current object. | ||
| DD95 | LD A,(IX+$01) | Go to ParseInputNumber_ReturnZero if the moved marker is FF. | ||
| DD98 | AND A | |||
| DD99 | INC A | |||
| DD9A | JP Z,ParseInputNumber_ReturnZero | |||
| DD9D | RET | Return. | ||
| DD9E | DEFB $0D,$10 | Display record read by ProcessDisplayRecord: flags 0D value 10. | ||
| DDA0 | LD A,($A034) | Read the room display parameter. | ||
| DDA3 | CALL FindCharacter | Call FindCharacter to find the character. | ||
|
Was this character FF?
|
||||
| DDA6 | CP $FF | Use zero and go to DescribeObjectIfPresent_0 if this character is FF. | ||
| DDA8 | LD A,$00 | |||
| DDAA | JR Z,DescribeObjectIfPresent_0 | |||
| DDAC | LD A,$01 | Take 01. | ||
| DescribeObjectIfPresent_0 | DDAE | CALL FollowLinkPointer | Call FollowLinkPointer. | |
| DDB1 | OR $01 | |||
| DDB3 | RET | Return. | ||
| DDB4 | DEFB $40,$50,$B8,$DD | Display record read by ProcessDisplayRecord: flags 40 value 50 handler DDB8. | ||
|
Reached through the display record at CopySavedCharacterIdentifier, DDB4 and DDD0, dispatched by DispatchLookedUpHandlerThird.
|
||||
| DDB8 | CALL CheckFlagAndJumpToNewline | Call CheckFlagAndJumpToNewline. | ||
| DDBB | OR $01 | |||
| DDBD | RET | Return. | ||
| DDBE | DEFB $40,$00,$B8,$DD | Display record read by ProcessDisplayRecord: flags 40 value 00 handler DDB8. | ||
| DDC2 | LD A,($A034) | Store the room display parameter in the character script cycle. | ||
| DDC5 | LD ($A01F),A | |||
| DDC8 | OR %00000001 | Reset the zero flag. | ||
| DDCA | RET | Return. | ||
| DDCB | DEFW $0000 | The location text pointer, read by DescribeObjectIfPresent and MeasureGapBetweenTwoPointers_Next. | ||
| DDCD | DEFW $0000 | The object's description pointer, read by DescribeObjectIfPresent and MeasureGapBetweenTwoPointers_Next. | ||
| DDCF | DEFB $00 | Data bytes 00 read by DescribeObjectIfPresent. | ||
| DDD0 | DEFB $45,$00,$B8,$DD | Display record read by ProcessDisplayRecord: flags 45 value 00 handler DDB8. | ||
| DDD4 | LD HL,($A02F) | Read the display pointer. | ||
| DDD7 | RES 7,H | Clear the marker. | ||
| DDD9 | PUSH HL | |||
| DDDA | LD A,H | |||
| DescribeObjectIfPresent_MaskName | DDDB | AND $3F | Keep the low six bits of the name, then call ScaleHighByteBySixty to scale the high byte by sixty. | |
| DDDD | LD H,A | |||
| DDDE | LD A,L | |||
| DDDF | AND $3F | |||
| DDE1 | LD L,A | |||
| DDE2 | CALL ScaleHighByteBySixty | |||
| DDE5 | LD ($DDCD),HL | Remember the object's description. | ||
| DDE8 | LD HL,($9FDF) | Scale the word at CurrentTime_Minutes by sixty. | ||
| DDEB | CALL ScaleHighByteBySixty | |||
| DDEE | LD ($DDCB),HL | Remember the location text. | ||
| DDF1 | POP HL | |||
| DDF2 | LD A,$61 | |||
| DDF4 | LD ($DDCF),A | Store it in the workspace byte at DDCF. | ||
| DDF7 | BIT 6,H | Jump ahead to DescribeObjectIfPresent_ObjectDescriptionLocation if bit 6 is present. | ||
| DDF9 | JR NZ,DescribeObjectIfPresent_ObjectDescriptionLocation | |||
| DDFB | LD A,$70 | Write the letter p into the description marker. | ||
| DDFD | LD ($DDCF),A | |||
| DE00 | BIT 6,L | Jump ahead to DescribeObjectIfPresent_ObjectDescriptionLocation if bit 6 is present. | ||
| DE02 | JR NZ,DescribeObjectIfPresent_ObjectDescriptionLocation | |||
| DE04 | CALL MeasureGapBetweenTwoPointers_Next | Call MeasureGapBetweenTwoPointers_Next, read the AM/PM letter at Messaging_AM_PM and go to DescribeObjectIfPresent_Letter if the description pointer is below the location text. | ||
| DE07 | LD A,($9FE2) | |||
| DE0A | JR C,DescribeObjectIfPresent_Letter | |||
| DE0C | JR NZ,DescribeObjectIfPresent_WorkspaceByte | Go to DescribeObjectIfPresent_WorkspaceByte if the description is past the location text. | ||
|
Is the marker the letter a?
|
||||
| DescribeObjectIfPresent_Letter | DE0E | CP $61 | Use the letter p when the marker is the letter a. | |
| DE10 | LD A,$70 | |||
| DE12 | JR Z,DescribeObjectIfPresent_WorkspaceByte | |||
| DE14 | LD A,$61 | Take the letter a. | ||
| DescribeObjectIfPresent_WorkspaceByte | DE16 | LD ($DDCF),A | Store it in the workspace byte at DDCF. | |
| DescribeObjectIfPresent_ObjectDescriptionLocation | DE19 | LD HL,($DDCD) | Read the object's description and the location text. | |
| DE1C | LD DE,($DDCB) | |||
| DE20 | AND A | Subtract the value at DDCB from the one at DDCD and take 02D0, the half-day step added at DE39. | ||
| DE21 | SBC HL,DE | |||
| DE23 | LD DE,$02D0 | |||
| DE26 | LD A,($9FE2) | Read the AM/PM marker into C and the description marker at DDCF into B. | ||
| DE29 | LD C,A | |||
| DE2A | LD A,($DDCF) | |||
| DE2D | LD B,A | |||
| DE2E | CALL MeasureGapBetweenTwoPointers_Next | Jump to DescribeObjectIfPresent_AdvancePointerSource if the object's description pointer is below the location text pointer. | ||
| DE31 | JR C,DescribeObjectIfPresent_AdvancePointerSource | |||
| DE33 | JR Z,DescribeObjectIfPresent_AdvancePointerSource | Go to DescribeObjectIfPresent_AdvancePointerSource if the object's description pointer equals the location text pointer. | ||
| DE35 | LD A,B | Go to DescribeObjectIfPresent_RecordCharacterScript if the description marker matches AM/PM. | ||
| DE36 | CP C | |||
| DE37 | JR Z,DescribeObjectIfPresent_RecordCharacterScript | |||
| DE39 | ADD HL,DE | The hours differ, so add one step and store the total from DescribeObjectIfPresent_RecordCharacterScript. | ||
| DE3A | JR DescribeObjectIfPresent_RecordCharacterScript | |||
|
Add one step, and a second step when the description marker matches.
|
||||
| DescribeObjectIfPresent_AdvancePointerSource | DE3C | ADD HL,DE | Add one step, and go to DescribeObjectIfPresent_RecordCharacterScript if the description marker does not match AM/PM. | |
| DE3D | LD A,B | |||
| DE3E | CP C | |||
| DE3F | JR NZ,DescribeObjectIfPresent_RecordCharacterScript | |||
| DE41 | ADD HL,DE | Add one more step to the cycle count. | ||
| DescribeObjectIfPresent_RecordCharacterScript | DE42 | LD ($A01F),HL | Record the character script cycle. | |
| DE45 | OR %00000001 | Reset the zero flag. | ||
| DE47 | RET | Return. | ||
| Prev: DD0E | Up: Map | Next: DE48 |