Routines |
Prev: 54019 | Up: Map | Next: 54144 |
If either the graphic index, or the graphic set index for the current entry in the primary display buffer is zero, then only the attribute from that entry is rendered; the currently displayed bitmap data (from the previous frame) is preserved.
Used by the routine at 34438.
|
||||
54034 | LD IX,22528 | Load IX with start address of attribute file | ||
Here we check the display-buffer-2-is-primary flag to determine which of the two display buffers is the primary. We load HL with the start address of this primary buffer, and DE with the start address of the secondary.
|
||||
54038 | LD HL,61312 | Load HL with start address of primary display buffer, and DE with start address of secondary display buffer | ||
54041 | LD DE,63424 | |||
54044 | LD A,(34271) | |||
54047 | OR A | |||
54048 | JP Z,54052 | |||
54051 | EX DE,HL | |||
54052 | PUSH DE | Load IY with start address of secondary display buffer | ||
54053 | POP IY | |||
54055 | LD A,(HL) | Load A with graphic set index from primary display buffer and advance to graphic index | ||
54056 | INC HL | |||
54057 | OR A | If graphic set index is zero then skip ahead to 54130 | ||
54058 | JP Z,54130 | |||
54061 | CP 255 | If graphic set index is 255 (character block outside room's dimensions) then skip ahead to 54140 | ||
54063 | JP Z,54140 | |||
54066 | LD B,A | Load B with graphic set index | ||
54067 | LD E,0 | Load E with zero | ||
54069 | CP (IY+0) | If graphic set index in the primary buffer is different to that in the secondary buffer then skip ahead to 54076 | ||
54072 | JP NZ,54076 | |||
54075 | INC E | Increase E | ||
54076 | LD A,(HL) | Load A with graphic index from primary display buffer, and if this is zero then skip ahead to 54130 | ||
54077 | OR A | |||
54078 | JP Z,54130 | |||
54081 | LD C,A | Load C with graphic index | ||
54082 | CP (IY+1) | If graphic index in the primary buffer is different to that in the secondary buffer then skip ahead to 54089 | ||
54085 | JP NZ,54089 | |||
54088 | INC E | Increase E | ||
54089 | INC HL | Advance to attribute | ||
54090 | LD A,(HL) | Load A with attribute from primary display buffer, and if this is different to that from the secondary buffer then skip ahead to 54102 | ||
54091 | CP (IY+2) | |||
54094 | JP NZ,54102 | |||
54097 | BIT 1,E | If E is 2 (i.e. both graphic set index and graphic index are the same in both buffers) then skip ahead to 54107 | ||
54099 | JP NZ,54107 | |||
At least one of graphic index and graphic set index differs between the two buffers
|
||||
54102 | PUSH HL | Draw a graphic character block to display | ||
54103 | CALL 54144 | |||
54106 | POP HL | |||
54107 | INC HL | Advance primary display buffer and attribute file addresses for next entry | ||
54108 | INC IX | |||
Here we check whether we have reached the start of the second-last row of the attribute file. If we have, then we exit this routine, as only the timer figures appear in the last two rows.
|
||||
54110 | PUSH IX | If attribute file address is 23232 then return | ||
54112 | POP DE | |||
54113 | LD A,E | |||
54114 | CP 192 | |||
54116 | JR NZ,54122 | |||
54118 | LD A,D | |||
54119 | CP 90 | |||
54121 | RET Z | |||
54122 | LD DE,3 | Advance position in secondary buffer to next entry | ||
54125 | ADD IY,DE | |||
54127 | JP 54055 | Loop back to 54055 | ||
Graphic index or graphic set index was zero
|
||||
54130 | INC HL | Advance HL to attribute | ||
54131 | LD A,(HL) | Load A with attribute value, set BRIGHT flag and apply to current attribute file address | ||
54132 | SET 6,A | |||
54134 | LD (IX+0),A | |||
54137 | JP 54107 | Loop back to 54107 to process next entry | ||
Graphic set index is 255
|
||||
54140 | INC HL | Advance HL to attribute | ||
54141 | JP 54107 | Loop back to 54107 to process next entry |
Prev: 54019 | Up: Map | Next: 54144 |