![]() |
Routines |
| Prev: 50707 | Up: Map | Next: 50878 |
|
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 | 50728 | LD A,(IY+0) | Read the low nibble of the record flags and jump ahead to TestLowBitsOfCharacter_CodeFromFive when it is not zero. | |
| 50731 | AND 15 | |||
| 50733 | JR NZ,TestLowBitsOfCharacter_CodeFromFive | |||
|
This entry point is used by the routines at TestLowBitsOfGraphics, ReadHighByteSource and TestSeventhMarker.
|
||||
| TestLowBitsOfCharacter_ReportMatch | 50735 | OR %00000001 | Reset the zero flag. | |
| 50737 | RET | Return. | ||
|
This entry point is used by the routine at TestSeventhMarker.
The character field did not match.
|
||||
| TestLowBitsOfCharacter_GiveUp | 50738 | 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 | 50741 | CP 5 | Jump ahead to TestLowBitsOfCharacter_CodeBelowThree if the low nibble of the record flags is below 5. | |
| 50743 | JR C,TestLowBitsOfCharacter_CodeBelowThree | |||
| 50745 | CP 7 | Jump ahead to TestLowBitsOfCharacter_UseRoom if the low nibble of the record flags is at least 7. | ||
| 50747 | JR NC,TestLowBitsOfCharacter_UseRoom | |||
| 50749 | LD A,(41012) | Jump to TestLowBitsOfCharacter_ClearFlag if the room display parameter is not 254. | ||
| 50752 | CP 254 | |||
| 50754 | JR NZ,TestLowBitsOfCharacter_ClearFlag | |||
| 50756 | LD HL,(41007) | Read the display pointer. | ||
| 50759 | LD A,(IY+0) | Jump to TestLowBitsOfCharacter_TestTopBit unless the low nibble of the record flags is 5. | ||
| 50762 | AND 15 | |||
| 50764 | CP 5 | |||
| 50766 | JR NZ,TestLowBitsOfCharacter_TestTopBit | |||
| 50768 | BIT 7,L | Jump back to TestLowBitsOfCharacter_ReportMatch if bit 7 is clear. | ||
| 50770 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
|
This entry point is used by the routine at TestLowBitsOfGraphics.
|
||||
| TestLowBitsOfCharacter_ClearFlag | 50772 | XOR A | Clear the byte at 40993 and return zero through TestLowBitsOfCharacter_GiveUp. | |
| 50773 | LD (40993),A | |||
| 50776 | JR TestLowBitsOfCharacter_GiveUp | |||
|
Bit 7 of the room pointer selects the next picture.
|
||||
| TestLowBitsOfCharacter_TestTopBit | 50778 | BIT 7,L | Jump back to TestLowBitsOfCharacter_ReportMatch while bit 7 is present. | |
| 50780 | JR NZ,TestLowBitsOfCharacter_ReportMatch | |||
| 50782 | 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 | 50784 | CP 3 | Jump ahead to TestLowBitsOfCharacter_TestMarker if the low nibble of the record flags is at least 3. | |
| 50786 | JR NC,TestLowBitsOfCharacter_TestMarker | |||
| 50788 | LD A,(41012) | Read the room display parameter, then call FetchLocationDataPointer to look up this room. | ||
| 50791 | CALL FetchLocationDataPointer | |||
| 50794 | BIT 7,(IX+0) | Jump to TestLowBitsOfCharacter_ClearFlag if a marker on the record's flag byte is clear. | ||
| 50798 | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| TestLowBitsOfCharacter_TestMarker | 50800 | BIT 0,(IY+0) | Jump to TestLowBitsOfCharacter_ReportMatch if bit 0 of the record flags is clear. | |
| 50804 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
| 50806 | LD A,(41012) | Read the room display parameter and call FindObjectByFieldTwo to find an object by field two. | ||
| 50809 | CALL FindObjectByFieldTwo | |||
| 50812 | CP 255 | Jump back to TestLowBitsOfCharacter_ClearFlag if the entry is the end marker. | ||
| 50814 | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| 50816 | 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 52090 and keep it in C.
|
||||
| TestLowBitsOfCharacter_UseRoom | 50818 | LD A,(41012) | Read the room display parameter, store it in the room parameter at 52090 and keep it in C. | |
| 50821 | LD (52090),A | |||
| 50824 | LD C,A | |||
| 50825 | LD A,(IY+0) | Test the record flags through TestSeventhMarker and go to TestLowBitsOfCharacter_ClearFlag if it returns zero. | ||
| 50828 | CALL TestSeventhMarker | |||
| 50831 | JR Z,TestLowBitsOfCharacter_ClearFlag | |||
| 50833 | BIT 4,(IY+0) | Jump to TestLowBitsOfCharacter_ReportMatch if bit 4 of the record flags is clear. | ||
| 50837 | JR Z,TestLowBitsOfCharacter_ReportMatch | |||
| 50839 | LD A,(IY+2) | Read record bytes 2 and 3. | ||
| 50842 | LD L,(IY+3) | |||
| 50845 | LD H,(IY+4) | Read record byte 4 as the high byte. | ||
| 50848 | BIT 6,(IY+0) | Jump to TestLowBitsOfCharacter_ShiftNibble unless bit 6 of the record flags is set. | ||
| 50852 | JR Z,TestLowBitsOfCharacter_ShiftNibble | |||
| 50854 | LD A,(IY+4) | With a handler word present, read record bytes 4-6 instead. | ||
| 50857 | LD L,(IY+5) | |||
| 50860 | LD H,(IY+6) | Read record byte 6 as the high byte. | ||
| TestLowBitsOfCharacter_ShiftNibble | 50863 | RRCA | Shift the parameter down by four bits and call ReadObjectAttribute_LooksObjectFolds to test the object attribute. | |
| 50864 | RRCA | |||
| 50865 | RRCA | |||
| 50866 | RRCA | |||
| 50867 | LD B,A | |||
| 50868 | CALL ReadObjectAttribute_LooksObjectFolds | |||
| 50871 | RET NZ | Return if ReadObjectAttribute_LooksObjectFolds does not match the attribute. | ||
|
This entry point is used by the routine at TestLowBitsOfGraphics.
|
||||
| TestLowBitsOfCharacter_MarkMatched | 50872 | LD A,1 | Write 1 to the byte at 40993. | |
| 50874 | LD (40993),A | |||
| 50877 | RET | Return. | ||
| Prev: 50707 | Up: Map | Next: 50878 |