Colour pinstripe/Display: Difference between revisions
Content deleted Content added
Puppydrum64 (talk | contribs) |
Added solution for Action! |
||
Line 114: | Line 114: | ||
brk ;program end</lang> |
brk ;program end</lang> |
||
=={{header|Action!}}== |
|||
<lang Action!>PROC Main() |
|||
BYTE |
|||
i, |
|||
CH=$02FC, ;Internal hardware value for last key pressed |
|||
PALNTSC=$D014, ;To check if PAL or NTSC system is used |
|||
PCOLR0=$02C0,PCOLR1=$02C1, |
|||
PCOLR2=$02C2,PCOLR3=$02C3, |
|||
COLOR0=$02C4,COLOR1=$02C5, |
|||
COLOR2=$02C6,COLOR3=$02C7, |
|||
COLOR4=$02C8 |
|||
Graphics(10) |
|||
PCOLR0=$04 ;gray |
|||
PCOLR1=$00 ;black |
|||
IF PALNTSC=15 THEN |
|||
PCOLR2=$42 ;red for NTSC |
|||
PCOLR3=$C6 ;green for NTSC |
|||
COLOR0=$84 ;blue for NTSC |
|||
COLOR1=$66 ;magenta for NTSC |
|||
COLOR2=$A6 ;cyan for NTSC |
|||
COLOR3=$FC ;yellow for NTSC |
|||
ELSE |
|||
PCOLR2=$22 ;red for PAL |
|||
PCOLR3=$B6 ;green for PAL |
|||
COLOR0=$74 ;blue for PAL |
|||
COLOR1=$48 ;magenta for PAL |
|||
COLOR2=$96 ;cyan for PAL |
|||
COLOR3=$EC ;yellow for PAL |
|||
FI |
|||
COLOR4=$0F ;white |
|||
FOR i=0 TO 79 |
|||
DO |
|||
Color=i MOD 8+1 |
|||
Plot(i,0) DrawTo(i,47) |
|||
Color=i/2 MOD 8+1 |
|||
Plot(i,48) DrawTo(i,95) |
|||
Color=i/3 MOD 8+1 |
|||
Plot(i,96) DrawTo(i,143) |
|||
Color=i/4 MOD 8+1 |
|||
Plot(i,144) DrawTo(i,191) |
|||
OD |
|||
DO UNTIL CH#$FF OD |
|||
CH=$FF |
|||
RETURN</lang> |
|||
{{out}} |
|||
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Colour_pinstripe_display.png Screenshot from Atari 8-bit computer] |
|||
=={{header|ActionScript}}== |
=={{header|ActionScript}}== |