|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 16384 (0x4000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Reset, seg_00539e, separate Puz_Main
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
separate (Puz_Main)
procedure Reset is
Width : S_Long;
Height : S_Long;
Box_X : S_Long;
Box_Y : S_Long;
Tile_Bg_Pixel : X_Pixel;
begin
----Tile_Window is that portion of Puzzle_Root that contains
-- the sliding pieces;
Tile_Bg_Pixel := X_White_Pixel (Dpy, Screen);
if Server_Bug then
-- seems I need to do this, or the next title window will be obscured
-- by the old title window! This must be a server bug, right?
--
if "/=" (Title_Window, None_X_Window) then
X_Unmap_Window (Dpy, Title_Window);
end if;
-- if (Title_Window) XDestroyWindow(dpy,Title_Window); */
end if;
X_Destroy_Subwindows (Dpy, Puzzle_Root);
-- fix the dimensions of Puzzle_Root so the height and width
-- of the Tile_Window will work out to be multiples of Puzzle_Size;
Tile_Height := (Puzzle_Win_Info.Height -
Title_Win_Height - Boundary_Height) / Puzzle_Height;
-- Puzzle_Win_Info.height := Tile_Height*Puzzle_Height+Title_Win_Height+Boundary_Height;
Tile_Width := Puzzle_Win_Info.Width / Puzzle_Width;
-- Puzzle_Win_Info.width := Tile_Width * Puzzle_Width;
-- /** fixup the size of Puzzle_Root **/
-- XResizeWindow(dpy,Puzzle_Root,Puzzle_Win_Info.width,Puzzle_Win_Info.height);
Old_Width := Puzzle_Win_Info.Width;
Old_Height := Puzzle_Win_Info.Height;
Tile_Win_Height := Puzzle_Win_Info.Height - Title_Win_Height;
if not Geb_Server_Bug then
Title_Window := X_Create_Simple_Window
(Dpy, Puzzle_Root, 0, 0,
U_Short (Puzzle_Win_Info.Width),
U_Short (Title_Win_Height), 0, 0, Bg_Pixel);
Tile_Window := X_Create_Simple_Window
(Dpy, Puzzle_Root, 0,
S_Short (Title_Win_Height + Boundary_Height),
U_Short (Puzzle_Win_Info.Width),
U_Short (Tile_Win_Height),
0, 0, Tile_Bg_Pixel);
else
declare
Xswa : X_Set_Window_Attributes;
begin
Xswa.Background_Pixel := 0;
Xswa.Border_Pixel := Bg_Pixel;
Xswa.Event_Mask :=
X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True,
others => False);
Title_Window :=
X_Create_Window
(Dpy,
Puzzle_Root,
0, 0,
U_Short (Puzzle_Win_Info.Width),
U_Short (Title_Win_Height),
0, 0,
Copy_From_Parent,
Copy_From_Parent_Visual,
(Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True,
others => False),
Xswa);
Xswa.Background_Pixel := 0;
Xswa.Border_Pixel := Tile_Bg_Pixel;
Xswa.Event_Mask :=
X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True,
others => False);
Tile_Window :=
X_Create_Window
(Dpy,
Puzzle_Root,
0, S_Short (Title_Win_Height + Boundary_Height),
U_Short (Puzzle_Win_Info.Width),
U_Short (Tile_Win_Height),
0, 0,
Copy_From_Parent,
Copy_From_Parent_Visual,
(Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True,
others => False),
Xswa);
end;
end if;
Rect_Gc := X_Create_Gc (Dpy, Tile_Window.Drawable,
None_X_Gc_Components, None_X_Gc_Values);
X_Copy_Gc (Dpy, Gc, All_Gc_Components, Rect_Gc);
X_Map_Window (Dpy, Title_Window);
X_Map_Window (Dpy, Tile_Window);
X_Sync (Dpy, False);
Repaint_Bar;
Repaint_Title (Title_Text);
-- /** locate the two check boxes **/
Box_X := Text_X_Start / 2 - Box_Width / 2;
Box_Y := Title_Win_Height / 2 - Box_Height / 2;
if not Geb_Server_Bug then
Scramble_Window := X_Create_Simple_Window
(Dpy, Title_Window, S_Short (Box_X),
S_Short (Box_Y), U_Short (Box_Width),
U_Short (Box_Height), 1, Fg_Pixel, Bg_Pixel);
else
declare
Xswa : X_Set_Window_Attributes;
begin
Xswa.Background_Pixel := Fg_Pixel;
Xswa.Border_Pixel := Bg_Pixel;
Xswa.Event_Mask :=
X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True,
others => False);
Scramble_Window :=
X_Create_Window
(Dpy,
Title_Window,
S_Short (Box_X),
S_Short (Box_Y),
U_Short (Box_Width),
U_Short (Box_Height),
1,
0,
Copy_From_Parent,
Copy_From_Parent_Visual,
(Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True,
others => False),
Xswa);
end;
end if;
Box_X := Puzzle_Win_Info.Width - Box_X - Box_Width;
if not Geb_Server_Bug then
Solve_Window := X_Create_Simple_Window
(Dpy, Title_Window, S_Short (Box_X),
S_Short (Box_Y), U_Short (Box_Width),
U_Short (Box_Height), 1, Fg_Pixel, Bg_Pixel);
else
declare
Xswa : X_Set_Window_Attributes;
begin
Xswa.Background_Pixel := Fg_Pixel;
Xswa.Border_Pixel := Bg_Pixel;
Xswa.Event_Mask :=
X_Event_Mask'(Button_Press_Mask | Exposure_Mask => True,
others => False);
Solve_Window :=
X_Create_Window
(Dpy,
Title_Window,
S_Short (Box_X),
S_Short (Box_Y),
U_Short (Box_Width),
U_Short (Box_Height),
1,
0,
Copy_From_Parent,
Copy_From_Parent_Visual,
(Cw_Back_Pixel | Cw_Border_Pixel | Cw_Event_Mask => True,
others => False),
Xswa);
end; end if;
X_Map_Window (Dpy, Scramble_Window);
X_Map_Window (Dpy, Solve_Window);
X_Sync (Dpy, False);
if not Geb_Server_Bug then
X_Select_Input (Dpy, Title_Window,
(Button_Press_Mask | Exposure_Mask => True,
others => False));
X_Select_Input (Dpy, Tile_Window, (Button_Press_Mask | Exposure_Mask |
Visibility_Change_Mask => True,
others => False));
X_Select_Input (Dpy, Scramble_Window,
(Button_Press_Mask | Exposure_Mask => True,
others => False));
X_Select_Input (Dpy, Solve_Window,
(Button_Press_Mask | Exposure_Mask => True,
others => False));
end if;
Repaint_Tiles;
Repaint_Title (Title_Animated);
Calculate_Speed;
Calculate_Stepsize;
X_Sync (Dpy, False);
end Reset;
nblk1=f
nid=0
hdr6=1e
[0x00] rec0=1f rec1=00 rec2=01 rec3=046
[0x01] rec0=00 rec1=00 rec2=0f rec3=03e
[0x02] rec0=17 rec1=00 rec2=02 rec3=032
[0x03] rec0=17 rec1=00 rec2=0b rec3=03c
[0x04] rec0=01 rec1=00 rec2=03 rec3=010
[0x05] rec0=17 rec1=00 rec2=04 rec3=05a
[0x06] rec0=00 rec1=00 rec2=0e rec3=028
[0x07] rec0=1b rec1=00 rec2=05 rec3=08a
[0x08] rec0=01 rec1=00 rec2=0d rec3=006
[0x09] rec0=19 rec1=00 rec2=06 rec3=05c
[0x0a] rec0=00 rec1=00 rec2=0c rec3=00c
[0x0b] rec0=1a rec1=00 rec2=07 rec3=002
[0x0c] rec0=02 rec1=00 rec2=0a rec3=006
[0x0d] rec0=16 rec1=00 rec2=08 rec3=01e
[0x0e] rec0=04 rec1=00 rec2=09 rec3=000
tail 0x21700894c8197895abbd0 0x42a00088462063203