![]() |
Routines |
| Prev: C628 | Up: Map | Next: C74E |
|
Used by the routine at ProcessDisplayRecord.
Tests the low nibble of the record's value byte against the room graphics.
|
||||
|
Low nibble of the record's value byte is clear?
|
||||
| TestLowBitsOfGraphics | C6BE | LD A,(IY+$01) | Read the low nibble of the record's value byte and jump ahead to TestLowBitsOfGraphics_CodeFromFive when it is not zero. | |
| C6C1 | AND $0F | |||
| C6C3 | JR NZ,TestLowBitsOfGraphics_CodeFromFive | |||
| TestLowBitsOfGraphics_ReportMatch | C6C5 | OR %00000001 | Reset the zero flag. | |
| C6C7 | RET | Return. | ||
| C6C8 | JP ParseInputNumber_ReturnZero | Return zero through ParseInputNumber_ReturnZero. | ||
|
For a graphics code from 5 up to but not including 7, reads the room chosen for the graphics.
|
||||
| TestLowBitsOfGraphics_CodeFromFive | C6CB | CP $05 | Jump ahead to TestLowBitsOfGraphics_CodeBelowThree if the low nibble of the value byte is below 05. | |
| C6CD | JR C,TestLowBitsOfGraphics_CodeBelowThree | |||
| C6CF | CP $07 | Jump ahead to TestLowBitsOfGraphics_UseGraphics if the low nibble of the value byte is at least 07. | ||
| C6D1 | JR NC,TestLowBitsOfGraphics_UseGraphics | |||
| C6D3 | LD A,($A035) | Jump to TestLowBitsOfCharacter_ClearFlag if the room graphics parameter is not FE. | ||
| C6D6 | CP $FE | |||
| C6D8 | JP NZ,TestLowBitsOfCharacter_ClearFlag | |||
| C6DB | LD HL,($A031) | Read the display pointer. | ||
| C6DE | LD A,(IY+$01) | Jump to TestLowBitsOfGraphics_TestTopBit unless the low nibble of the value byte is 05. | ||
| C6E1 | AND $0F | |||
| C6E3 | CP $05 | |||
| C6E5 | JR NZ,TestLowBitsOfGraphics_TestTopBit | |||
| C6E7 | BIT 7,L | Jump back to TestLowBitsOfGraphics_ReportMatch if bit 7 is clear. | ||
| C6E9 | JR Z,TestLowBitsOfGraphics_ReportMatch | |||
| C6EB | JP TestLowBitsOfCharacter_ClearFlag | This picture does not match, so give up from TestLowBitsOfCharacter_ClearFlag. | ||
|
Bit 7 of the graphics pointer selects the next picture.
|
||||
| TestLowBitsOfGraphics_TestTopBit | C6EE | BIT 7,L | Jump back to TestLowBitsOfGraphics_ReportMatch while bit 7 is present. | |
| C6F0 | JR NZ,TestLowBitsOfGraphics_ReportMatch | |||
| C6F2 | JP TestLowBitsOfCharacter_ClearFlag | Bit 7 of the graphics pointer is clear, so give up from TestLowBitsOfCharacter_ClearFlag. | ||
|
For a graphics code below 3, looks the room up and accepts it when the top flag is set.
|
||||
| TestLowBitsOfGraphics_CodeBelowThree | C6F5 | CP $03 | Jump ahead to TestLowBitsOfGraphics_TestMarker if the low nibble of the value byte is at least 03. | |
| C6F7 | JR NC,TestLowBitsOfGraphics_TestMarker | |||
| C6F9 | LD A,($A035) | Read the room graphics parameter, then call FetchLocationDataPointer to look up this room. | ||
| C6FC | CALL FetchLocationDataPointer | |||
| C6FF | BIT 7,(IX+$00) | Jump to TestLowBitsOfCharacter_ClearFlag if a marker on the record's flag byte is clear. | ||
| C703 | JP Z,TestLowBitsOfCharacter_ClearFlag | |||
| TestLowBitsOfGraphics_TestMarker | C706 | BIT 0,(IY+$01) | Jump to TestLowBitsOfGraphics_ReportMatch if bit 0 of the value byte is clear. | |
| C70A | JR Z,TestLowBitsOfGraphics_ReportMatch | |||
| C70C | LD A,($A035) | Read the room graphics parameter and call FindObjectByFieldTwo to find an object by field two. | ||
| C70F | CALL FindObjectByFieldTwo | |||
| C712 | CP $FF | Jump back to TestLowBitsOfCharacter_ClearFlag if the entry is the end marker. | ||
| C714 | JP Z,TestLowBitsOfCharacter_ClearFlag | |||
| C717 | JR TestLowBitsOfGraphics_ReportMatch | The entry is not the end marker, so return non-zero from TestLowBitsOfGraphics_ReportMatch. | ||
|
Read the room graphics parameter and keep it for the picture.
|
||||
| TestLowBitsOfGraphics_UseGraphics | C719 | LD A,($A035) | Read the room graphics parameter, store it in the room parameter at CB7A and keep it in C. | |
| C71C | LD ($CB7A),A | |||
| C71F | LD C,A | |||
| C720 | LD A,(IY+$01) | Return if TestSeventhMarker returns zero. | ||
| C723 | CALL TestSeventhMarker | |||
| C726 | RET Z | |||
| C727 | BIT 4,(IY+$00) | Jump to TestLowBitsOfCharacter_ReportMatch if bit 4 of the record flags is clear. | ||
| C72B | JP Z,TestLowBitsOfCharacter_ReportMatch | |||
| C72E | LD A,(IY+$02) | Read record bytes 02 and 05. | ||
| C731 | LD L,(IY+$05) | |||
| C734 | LD H,(IY+$06) | Read record byte 06. | ||
| C737 | BIT 6,(IY+$00) | Jump to TestLowBitsOfGraphics_TestAttribute unless bit 6 of the record flags is set. | ||
| C73B | JR Z,TestLowBitsOfGraphics_TestAttribute | |||
| C73D | LD A,(IY+$04) | With a handler word present, read record bytes 04 and 07 instead. | ||
| C740 | LD L,(IY+$07) | |||
| C743 | LD H,(IY+$08) | Read record byte 08. | ||
| TestLowBitsOfGraphics_TestAttribute | C746 | LD B,A | Use that byte as the count and call ReadObjectAttribute_LooksObjectFolds to test the object attribute. | |
| C747 | CALL ReadObjectAttribute_LooksObjectFolds | |||
| C74A | RET NZ | Return if ReadObjectAttribute_LooksObjectFolds does not match the attribute. | ||
| C74B | JP TestLowBitsOfCharacter_MarkMatched | The attribute matched, so record it from TestLowBitsOfCharacter_MarkMatched. | ||
| Prev: C628 | Up: Map | Next: C74E |