![]() |
Routines |
| Prev: C613 | Up: Map | Next: C6BE |
|
Used by the routine at ProcessDisplayRecord.
Tests the low nibble of the record flags against the room and the object.
|
||||
|
Low nibble of the record flags is clear?
|
||||
| TestLowBitsOfCharacter | C628 | LD A,(IY+$00) | Read the low nibble of the record flags and jump ahead to TestLowBitsOfCharacter_CodeFromFive when it is not zero. | |
| C62B | AND $0F | |||
| C62D | JR NZ,TestLowBitsOfCharacter_CodeFromFive | |||
|
This entry point is used by the routines at TestLowBitsOfGraphics, ReadHighByteSource and TestSeventhMarker.
|
||||
| TestLowBitsOfCharacter_ReportMatch | C62F | OR %00000001 | Reset the zero flag. | |
| C631 | RET | Return. | ||
|
This entry point is used by the routine at TestSeventhMarker.
The character field did not match.
|
||||
| TestLowBitsOfCharacter_GiveUp | C632 | JP ParseInputNumber_ReturnZero | Return zero through ParseInputNumber_ReturnZero. | |
|
For a picture code from 5 up to but not including 7, reads the room chosen for the picture.
|
||||
| TestLowBitsOfCharacter_CodeFromFive | C635 | CP $05 | Jump ahead to TestLowBitsOfCharacter_CodeBelowThree if the low nibble of the record flags is below 05. | |
| C637 | JR C,TestLowBitsOfCharacter_CodeBelowThree | |||
| C639 | CP $07 | Jump ahead to TestLowBitsOfCharacter_UseRoom if the low nibble of the record flags is at least 07. | ||
| C63B | JR NC,TestLowBitsOfCharacter_UseRoom | |||
| C63D | LD A,($A034) | Jump to TestLowBitsOfCharacter_ClearFlag if the room display parameter is not FE. | ||
| C640 | CP $FE | |||
| C642 | JR NZ,TestLowBitsOfCharacter_ClearFlag | |||
| C644 | LD HL,($A02F) | Read the display pointer. | ||
| C647 | LD A,(IY+$00) | Jump to TestLowBitsOfCharacter_TestTopBit unless the low nibble of the record flags is 05. | ||
| C64A | AND $0F | |||
| C64C | CP $05 | |||
| C64E | JR NZ,TestLowBitsOfCharacter_TestTopBit | |||
| C650 | BIT 7,L | Jump back to TestLowBitsOfCharacter_ReportMatch if bit 7 is clear. | ||
| C652 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
|
This entry point is used by the routine at TestLowBitsOfGraphics.
|
||||
| TestLowBitsOfCharacter_ClearFlag | C654 | XOR A | Clear the byte at A021 and return zero through TestLowBitsOfCharacter_GiveUp. | |
| C655 | LD ($A021),A | |||
| C658 | JR TestLowBitsOfCharacter_GiveUp | |||
|
Bit 7 of the room pointer selects the next picture.
|
||||
| TestLowBitsOfCharacter_TestTopBit | C65A | BIT 7,L | Jump back to TestLowBitsOfCharacter_ReportMatch while bit 7 is present. | |
| C65C | JR NZ,TestLowBitsOfCharacter_ReportMatch | |||
| C65E | JR TestLowBitsOfCharacter_ClearFlag | Bit 7 of the room pointer is clear, so give up from TestLowBitsOfCharacter_ClearFlag. | ||
|
For a code below 3, looks the room up and accepts it when the top flag is set.
|
||||
| TestLowBitsOfCharacter_CodeBelowThree | C660 | CP $03 | Jump ahead to TestLowBitsOfCharacter_TestMarker if the low nibble of the record flags is at least 03. | |
| C662 | JR NC,TestLowBitsOfCharacter_TestMarker | |||
| C664 | LD A,($A034) | Read the room display parameter, then call FetchLocationDataPointer to look up this room. | ||
| C667 | CALL FetchLocationDataPointer | |||
| C66A | BIT 7,(IX+$00) | Jump to TestLowBitsOfCharacter_ClearFlag if a marker on the record's flag byte is clear. | ||
| C66E | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| TestLowBitsOfCharacter_TestMarker | C670 | BIT 0,(IY+$00) | Jump to TestLowBitsOfCharacter_ReportMatch if bit 0 of the record flags is clear. | |
| C674 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
| C676 | LD A,($A034) | Read the room display parameter and call FindObjectByFieldTwo to find an object by field two. | ||
| C679 | CALL FindObjectByFieldTwo | |||
| C67C | CP $FF | Jump back to TestLowBitsOfCharacter_ClearFlag if the entry is the end marker. | ||
| C67E | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| C680 | JR TestLowBitsOfCharacter_ReportMatch | The entry is not the end marker, so return non-zero from TestLowBitsOfCharacter_ReportMatch. | ||
|
Read the room display parameter, record it in the room parameter at CB7A and keep it in C.
|
||||
| TestLowBitsOfCharacter_UseRoom | C682 | LD A,($A034) | Read the room display parameter, store it in the room parameter at CB7A and keep it in C. | |
| C685 | LD ($CB7A),A | |||
| C688 | LD C,A | |||
| C689 | LD A,(IY+$00) | Test the record flags through TestSeventhMarker and go to TestLowBitsOfCharacter_ClearFlag if it returns zero. | ||
| C68C | CALL TestSeventhMarker | |||
| C68F | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| C691 | BIT 4,(IY+$00) | Jump to TestLowBitsOfCharacter_ReportMatch if bit 4 of the record flags is clear. | ||
| C695 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
| C697 | LD A,(IY+$02) | Read record bytes 02 and 03. | ||
| C69A | LD L,(IY+$03) | |||
| C69D | LD H,(IY+$04) | Read record byte 04 as the high byte. | ||
| C6A0 | BIT 6,(IY+$00) | Jump to TestLowBitsOfCharacter_ShiftNibble unless bit 6 of the record flags is set. | ||
| C6A4 | JR Z,TestLowBitsOfCharacter_ShiftNibble | |||
| C6A6 | LD A,(IY+$04) | With a handler word present, read record bytes 04-06 instead. | ||
| C6A9 | LD L,(IY+$05) | |||
| C6AC | LD H,(IY+$06) | Read record byte 06 as the high byte. | ||
| TestLowBitsOfCharacter_ShiftNibble | C6AF | RRCA | Shift the parameter down by four bits and call ReadObjectAttribute_LooksObjectFolds to test the object attribute. | |
| C6B0 | RRCA | |||
| C6B1 | RRCA | |||
| C6B2 | RRCA | |||
| C6B3 | LD B,A | |||
| C6B4 | CALL ReadObjectAttribute_LooksObjectFolds | |||
| C6B7 | RET NZ | Return if ReadObjectAttribute_LooksObjectFolds does not match the attribute. | ||
|
This entry point is used by the routine at TestLowBitsOfGraphics.
|
||||
| TestLowBitsOfCharacter_MarkMatched | C6B8 | LD A,$01 | Write 01 to the byte at A021. | |
| C6BA | LD ($A021),A | |||
| C6BD | RET | Return. | ||
| Prev: C613 | Up: Map | Next: C6BE |