Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,49 +0,0 @@
|
|||
with SDL.Video.Windows.Makers;
|
||||
with SDL.Video.Renderers.Makers;
|
||||
with SDL.Video.Palettes;
|
||||
with SDL.Events.Events;
|
||||
with SDL.Events.Keyboards;
|
||||
|
||||
procedure Colour_Bars_Display is
|
||||
use type SDL.Events.Event_Types;
|
||||
use SDL.C;
|
||||
|
||||
Colours : constant array (0 .. 7) of SDL.Video.Palettes.Colour :=
|
||||
((0, 0, 0, 255), (255, 0, 0, 255),
|
||||
(0, 255, 0, 255), (0, 0, 255, 255),
|
||||
(255, 0, 255, 255), (0, 255, 255, 255),
|
||||
(255, 255, 0, 255), (255, 255, 255, 255));
|
||||
Window : SDL.Video.Windows.Window;
|
||||
Renderer : SDL.Video.Renderers.Renderer;
|
||||
Event : SDL.Events.Events.Events;
|
||||
Bar_Width : int;
|
||||
begin
|
||||
if not SDL.Initialise (Flags => SDL.Enable_Screen) then
|
||||
return;
|
||||
end if;
|
||||
|
||||
SDL.Video.Windows.Makers.Create (Win => Window,
|
||||
Title => "",
|
||||
Position => SDL.Natural_Coordinates'(0, 0),
|
||||
Size => SDL.Positive_Sizes'(0, 0),
|
||||
Flags => SDL.Video.Windows.Full_Screen_Desktop);
|
||||
SDL.Video.Renderers.Makers.Create (Renderer, Window.Get_Surface);
|
||||
|
||||
Bar_Width := Window.Get_Size.Width / 8;
|
||||
for A in Colours'Range loop
|
||||
Renderer.Set_Draw_Colour (Colour => Colours (A));
|
||||
Renderer.Fill (Rectangle => (X => SDL.C.int (A) * Bar_Width, Y => 0,
|
||||
Width => Bar_Width,
|
||||
Height => Window.Get_Size.Height));
|
||||
end loop;
|
||||
Window.Update_Surface;
|
||||
|
||||
Wait_Loop : loop
|
||||
while SDL.Events.Events.Poll (Event) loop
|
||||
exit Wait_Loop when Event.Common.Event_Type = SDL.Events.Keyboards.Key_Down;
|
||||
end loop;
|
||||
delay 0.050;
|
||||
end loop Wait_Loop;
|
||||
Window.Finalize;
|
||||
SDL.Finalise;
|
||||
end Colour_Bars_Display;
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. terminal-colour-bars.
|
||||
|
||||
DATA DIVISION.
|
||||
WORKING-STORAGE SECTION.
|
||||
01 width PIC 9(3).
|
||||
01 height PIC 9(3).
|
||||
|
||||
01 interval PIC 9(3).
|
||||
|
||||
01 colours-area.
|
||||
03 colour-values.
|
||||
05 FILLER PIC 9 VALUE 0. *> Black
|
||||
05 FILLER PIC 9 VALUE 4. *> Red
|
||||
05 FILLER PIC 9 VALUE 2. *> Green
|
||||
05 FILLER PIC 9 VALUE 1. *> Blue
|
||||
05 FILLER PIC 9 VALUE 5. *> Magneta
|
||||
05 FILLER PIC 9 VALUE 3. *> Cyan
|
||||
05 FILLER PIC 9 VALUE 6. *> Yellow
|
||||
05 FILLER PIC 9 VALUE 7. *> White
|
||||
|
||||
03 colour-table REDEFINES colour-values.
|
||||
05 colours PIC 9 OCCURS 8 TIMES INDEXED BY colour-index.
|
||||
|
||||
01 i PIC 9(3).
|
||||
01 j PIC 9(3).
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
ACCEPT width FROM COLUMNS
|
||||
ACCEPT height FROM LINES
|
||||
DIVIDE width BY 8 GIVING interval
|
||||
|
||||
PERFORM VARYING i FROM 1 BY 1 UNTIL height < i
|
||||
PERFORM VARYING j FROM 1 BY 1 UNTIL width < j
|
||||
COMPUTE colour-index = (j / interval) + 1
|
||||
|
||||
IF 8 < colour-index
|
||||
SET colour-index TO 8
|
||||
END-IF
|
||||
|
||||
*> Some colours come a bit darker than they
|
||||
*> should, with the yellow being orange and the white
|
||||
*> being light-grey.
|
||||
DISPLAY SPACE AT LINE i COLUMN j
|
||||
WITH BACKGROUND-COLOR colours (colour-index)
|
||||
END-PERFORM
|
||||
END-PERFORM
|
||||
|
||||
ACCEPT i *> Prevent ncurses returning to console immediately.
|
||||
|
||||
GOBACK
|
||||
.
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
[string[]]$colors = "Black" , "DarkBlue" , "DarkGreen" , "DarkCyan",
|
||||
"DarkRed" , "DarkMagenta", "DarkYellow", "Gray",
|
||||
"DarkGray", "Blue" , "Green" , "Cyan",
|
||||
"Red" , "Magenta" , "Yellow" , "White"
|
||||
|
||||
for ($i = 0; $i -lt 64; $i++)
|
||||
{
|
||||
for ($j = 0; $j -lt $colors.Count; $j++)
|
||||
{
|
||||
Write-Host (" " * 12) -BackgroundColor $colors[$j] -NoNewline
|
||||
}
|
||||
|
||||
Write-Host
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue