DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦86c85df94⟧ TextFile

    Length: 3077 (0xc05)
    Types: TextFile
    Names: »B«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦306851c02⟧ 
                └─⟦this⟧ 

TextFile

separate (Puz_Main)  
procedure Display_Log_Move_Space (First_X, First_Y, Last_X, Last_Y : S_Long;  
                                  Dir : Direction) is  
    Min_X   : S_Long;  
    Min_Y   : S_Long;  
    Max_X   : S_Long;  
    Max_Y   : S_Long;  
    X       : S_Long;  
    Y       : S_Long;  
    W       : S_Long;  
    H       : S_Long;  
    Dx      : S_Long;  
    Dy      : S_Long;  
    X2      : S_Long;  
    Y2      : S_Long;  
    Clear_X : S_Long;  
    Clear_Y : S_Long;  
begin

    Max_X := Max (First_X, Last_X);  
    Min_X := Min (First_X, Last_X);  
    Max_Y := Max (First_Y, Last_Y);  
    Min_Y := Min (First_Y, Last_Y);

    X := Ulx (Min_X, 0);  
    Y := Uly (0, Min_Y);  
    W := (Max_X - Min_X + 1) * Tile_Width;  
    H := (Max_Y - Min_Y + 1) * Tile_Height;

    Dx := X;  
    Dy := Y;

    X2 := X;  
    Y2 := Y;

    case Dir is  
        when Up =>  
            Clear_X := Llx (Max_X, 0);  
            Clear_Y := Lly (0, Max_Y) + 1;

            for I in 0 .. Move_Steps - 1 loop  
                Dy      := S_Long (Vert_Step_Size (I));  
                Y2      := Y - Dy;  
                Clear_Y := Clear_Y - Dy;

                Move_Area (Tile_Window, X, Y, X2, Y2, W, H);  
                Rect_Set (Tile_Window, Clear_X, Clear_Y,  
                          Tile_Width, Dy, Fg_Pixel);  
                Y := Y - Dy;  
            end loop;

        when Down =>  
            Clear_X := Llx (Max_X, 0);  
            Clear_Y := Uly (0, Min_Y);

            for I in 0 .. Move_Steps - 1 loop  
                Dy := S_Long (Vert_Step_Size (I));  
                Y2 := Y + Dy;

                Move_Area (Tile_Window, X, Y, X2, Y2, W, H);  
                Rect_Set (Tile_Window, Clear_X, Clear_Y,  
                          Tile_Width, Dy, Fg_Pixel);  
                Y       := Y + Dy;  
                Clear_Y := Clear_Y + Dy;  
            end loop;

        when Left =>  
            Clear_X := Urx (Max_X, 0) + 1;  
            Clear_Y := Ury (0, Max_Y);

            for I in 0 .. Move_Steps - 1 loop  
                Dx      := S_Long (Hori_Step_Size (I));  
                X2      := X - Dx;  
                Clear_X := Clear_X - Dx;

                Move_Area (Tile_Window, X, Y, X2, Y2, W, H);  
                Rect_Set (Tile_Window, Clear_X, Clear_Y,  
                          Dx, Tile_Height, Fg_Pixel);  
                X := X - Dx;  
            end loop;

        when Right =>  
            Clear_X := Ulx (Min_X, 0);  
            Clear_Y := Uly (0, Max_Y);

            for I in 0 .. Move_Steps - 1 loop  
                Dx := S_Long (Hori_Step_Size (I));  
                X2 := X + Dx;

                Move_Area (Tile_Window, X, Y, X2, Y2, W, H);  
                Rect_Set (Tile_Window, Clear_X, Clear_Y,  
                          Dx, Tile_Height, Fg_Pixel);  
                X       := X + Dx;  
                Clear_X := Clear_X + Dx;  
            end loop;

        when others =>  
            raise Program_Error;  
    end case;

    X_Flush (Dpy);  
end Display_Log_Move_Space;