![]() |
Routines |
| Prev: 33096 | Up: Map | Next: 33205 |
|
Used by the routine at DrawingSetup.
Plots one line. Bit 0 of the direction chooses which coordinate steps first, and L is how many pixels are drawn.
|
||||
| Drawing_PlotTheSelectedPixel | 33105 | BIT 0,C | Jump to Drawing_PlotTheSelectedPixel_OtherDirection when bit 0 of the direction is set. | |
| 33107 | JR NZ,Drawing_PlotTheSelectedPixel_OtherDirection | |||
| 33109 | PUSH HL | |||
| 33110 | PUSH BC | |||
| Drawing_PlotTheSelectedPixel_AddressThePixel | 33111 | CALL Drawing_AddressThePixel | Call Drawing_AddressThePixel to address the pixel. | |
| 33114 | BIT 2,C | Jump to Drawing_PlotTheSelectedPixel_StepHigh if bit 2 of the direction is clear. | ||
| 33116 | JR Z,Drawing_PlotTheSelectedPixel_StepHigh | |||
| 33118 | CALL Drawing_RetreatTheHighCoordinate | Call Drawing_RetreatTheHighCoordinate to retreat the high coordinate. | ||
| 33121 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheFirstPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheFirstPass if Drawing_RetreatTheHighCoordinate wrapped the high coordinate. | ||
| 33123 | JR Drawing_PlotTheSelectedPixel_CountTheLength | Jump to Drawing_PlotTheSelectedPixel_CountTheLength to count this pixel. | ||
| Drawing_PlotTheSelectedPixel_StepHigh | 33125 | CALL Drawing_AdvanceTheHighCoordinate | Call Drawing_AdvanceTheHighCoordinate to advance the high coordinate. | |
| 33128 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheFirstPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheFirstPass if Drawing_AdvanceTheHighCoordinate wrapped the high coordinate. | ||
| Drawing_PlotTheSelectedPixel_CountTheLength | 33130 | DEC B | Drop one from the remaining length. | |
| 33131 | JR NZ,Drawing_PlotTheSelectedPixel_CountDownThePixels | Jump to Drawing_PlotTheSelectedPixel_CountDownThePixels if it is not zero. | ||
| 33133 | BIT 1,C | Jump to Drawing_PlotTheSelectedPixel_StepLow if bit 1 of the direction is clear. | ||
| 33135 | JR Z,Drawing_PlotTheSelectedPixel_StepLow | |||
| 33137 | CALL Drawing_RetreatTheLowCoordinate | Call Drawing_RetreatTheLowCoordinate to retreat the low coordinate. | ||
| 33140 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheFirstPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheFirstPass if Drawing_RetreatTheLowCoordinate wrapped the low coordinate. | ||
| 33142 | JR Drawing_PlotTheSelectedPixel_HoldThePixelCount | Jump to Drawing_PlotTheSelectedPixel_HoldThePixelCount to bring the count back. | ||
| Drawing_PlotTheSelectedPixel_StepLow | 33144 | CALL Drawing_AdvanceTheLowCoordinate | Call Drawing_AdvanceTheLowCoordinate to advance the low coordinate. | |
| 33147 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheFirstPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheFirstPass if Drawing_AdvanceTheLowCoordinate wrapped the low coordinate. | ||
| Drawing_PlotTheSelectedPixel_HoldThePixelCount | 33149 | POP BC | Copy the count, leaving it on the stack. | |
| 33150 | PUSH BC | |||
| Drawing_PlotTheSelectedPixel_CountDownThePixels | 33151 | DEC L | Loop back to Drawing_PlotTheSelectedPixel_AddressThePixel until the pixel count reaches zero. | |
| 33152 | JR NZ,Drawing_PlotTheSelectedPixel_AddressThePixel | |||
| Drawing_PlotTheSelectedPixel_FinishTheFirstPass | 33154 | POP BC | Restore BC and HL from the stack. | |
| 33155 | POP HL | |||
| 33156 | RET | Return. | ||
| Drawing_PlotTheSelectedPixel_OtherDirection | 33157 | PUSH HL | The other direction steps the low coordinate first. | |
| 33158 | PUSH BC | |||
| Drawing_PlotTheSelectedPixel_StepTheLowCoordinate | 33159 | CALL Drawing_AddressThePixel | ||
| 33162 | BIT 1,C | Jump to Drawing_PlotTheSelectedPixel_StepLowOtherWay if bit 1 of the direction is clear. | ||
| 33164 | JR Z,Drawing_PlotTheSelectedPixel_StepLowOtherWay | |||
| 33166 | CALL Drawing_RetreatTheLowCoordinate | Call Drawing_RetreatTheLowCoordinate to retreat the low coordinate. | ||
| 33169 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheOtherPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheOtherPass if Drawing_RetreatTheLowCoordinate wrapped the low coordinate. | ||
| 33171 | JR Drawing_PlotTheSelectedPixel_CountDownTheLength | Jump to Drawing_PlotTheSelectedPixel_CountDownTheLength to skip that picture step. | ||
| Drawing_PlotTheSelectedPixel_StepLowOtherWay | 33173 | CALL Drawing_AdvanceTheLowCoordinate | Call Drawing_AdvanceTheLowCoordinate to advance the low coordinate. | |
| 33176 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheOtherPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheOtherPass if Drawing_AdvanceTheLowCoordinate wrapped the low coordinate. | ||
| Drawing_PlotTheSelectedPixel_CountDownTheLength | 33178 | DEC B | Drop one from the remaining length, and jump to Drawing_PlotTheSelectedPixel_RepeatForEachPixel to skip the high-coordinate step unless it is zero. | |
| 33179 | JR NZ,Drawing_PlotTheSelectedPixel_RepeatForEachPixel | |||
| 33181 | BIT 2,C | Jump to Drawing_PlotTheSelectedPixel_StepHighOtherWay if bit 2 of the direction is clear. | ||
| 33183 | JR Z,Drawing_PlotTheSelectedPixel_StepHighOtherWay | |||
| 33185 | CALL Drawing_RetreatTheHighCoordinate | Call Drawing_RetreatTheHighCoordinate to retreat the high coordinate. | ||
| 33188 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheOtherPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheOtherPass if Drawing_RetreatTheHighCoordinate wrapped the high coordinate. | ||
| 33190 | JR Drawing_PlotTheSelectedPixel_RefreshThePixelCount | Jump to Drawing_PlotTheSelectedPixel_RefreshThePixelCount to bring the count back. | ||
| Drawing_PlotTheSelectedPixel_StepHighOtherWay | 33192 | CALL Drawing_AdvanceTheHighCoordinate | Call Drawing_AdvanceTheHighCoordinate to advance the high coordinate. | |
| 33195 | JR Z,Drawing_PlotTheSelectedPixel_FinishTheOtherPass | Jump to Drawing_PlotTheSelectedPixel_FinishTheOtherPass if Drawing_AdvanceTheHighCoordinate wrapped the high coordinate. | ||
| Drawing_PlotTheSelectedPixel_RefreshThePixelCount | 33197 | POP BC | Copy the count, leaving it on the stack. | |
| 33198 | PUSH BC | |||
| Drawing_PlotTheSelectedPixel_RepeatForEachPixel | 33199 | DEC L | Loop back to Drawing_PlotTheSelectedPixel_StepTheLowCoordinate until the pixel count reaches zero. | |
| 33200 | JR NZ,Drawing_PlotTheSelectedPixel_StepTheLowCoordinate | |||
| Drawing_PlotTheSelectedPixel_FinishTheOtherPass | 33202 | POP BC | Restore BC and HL from the stack. | |
| 33203 | POP HL | |||
| 33204 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 33096 | Up: Map | Next: 33205 |