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. |
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
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.