SD_RECOL/IOW_RCLR
This trap recolours a window.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $26 | D0.L | Error code. |
D1.L | Unused. | D1.L | Corrupted. |
D3.W | Timeout. | D3.L | Preserved. |
A0.L | Channel ID. | A0.L | Preserved. |
A1.L | Pointer to colour list. | A1.L | Corrupted. |
Errors
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- The colour list to which A1.L points is eight bytes long containing the new colours. For mode 4 only bytes 0, 2, 4 and 6 need be specified.
- The contents of the window are left unaltered. Only the colours are changed.
- This trap does not work with GD2 colours.
Example
The example below shows the use of this trap call to alter colours. It is assumed that the mode is 8 and that the ID of the window's channel is in A0. This will change black to green, blue to yellow and so on.
color moveq #$26,d0 ; SD_RECOL lea newcol,a1 ; Colour list moveq #-1,d3 ; Timeout trap #3 ; Alter the colours ... newcol dc.b 4,6,1,7,0,3,5,2 ; New mode 8 colours for black, blue, ; red etc.