DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

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

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦e96fb2e7e⟧ Ada Source

    Length: 6144 (0x1800)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Blocs_Du_Scenario, seg_0499f3, seg_049e49

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



with Nos_Arbres;
with Interface_Structure;
with Variables;
with Nos_Chaines;
with Text_Io;

package body Blocs_Du_Scenario is
    type P_Bloc is access T_Bloc;
    function Difference (T1 : T_Bloc; T2 : T_Bloc) return Integer;

    package Tree_Of_Bloc is new Nos_Arbres (T_Bloc);
    The_Tree : Tree_Of_Bloc.Object := Tree_Of_Bloc.Create_Tree;
    New_Bloc : P_Bloc;
    Initial : Boolean := True;

    Initiales : Nos_Chaines.String_Text :=
       Nos_Chaines.Infinite_String.Value ("initiales");
    Generales : Nos_Chaines.String_Text :=
       Nos_Chaines.Infinite_String.Value ("generales");
    Locales : Nos_Chaines.String_Text;
    Position_Courante : Nos_Chaines.String_Text :=
       Nos_Chaines.Infinite_String.Value ("positioncourante");


    function Difference (T1 : T_Bloc; T2 : T_Bloc) return Integer is
    begin
        return Nos_Chaines.Difference (T1.Name, T2.Name);
    end Difference;


    procedure Make_New_Bloc (Nom : Nos_Chaines.String_Text) is
    begin
        New_Bloc := new T_Bloc;
        Nos_Chaines.Copy (New_Bloc.Name, Nom);
        Text_Io.Put ("new bloc started ...");
        Nos_Chaines.Print_Line (New_Bloc.Name);
        Traduction_Scenario.Start_Bloc;
    end Make_New_Bloc;

    procedure End_Of_Bloc is
    begin
        Traduction_Scenario.Break_End_Of_Bloc (New_Bloc.Contenu);
        Text_Io.Put ("ajout ");
        Nos_Chaines.Print_Line (New_Bloc.Name);
        Tree_Of_Bloc.Add (An_Element => New_Bloc.all, A_Tree => The_Tree);
    end End_Of_Bloc;

    procedure Do_The_Bloc (Nom : Nos_Chaines.String_Text) is
        Bloc : T_Bloc;
        Trouve : Boolean;
    begin
        Bloc.Name := Nom;
        Tree_Of_Bloc.Find
           (An_Element => Bloc, Found => Trouve, A_Tree => The_Tree);
        if Trouve then
            Traduction_Scenario.Do_The (Bloc.Contenu);
        end if;

    end Do_The_Bloc;

    procedure Do_The_Scenario is

    begin
        Nos_Chaines.Copy (Variables.Var_Sortie, "");
        Variables.Deplacement_Is_Done := False;
        if Initial then
            Do_The_Bloc (Initiales);
            Initial := False;
        else
            Nos_Chaines.Copy (Variables.Var_Position_Courante,
                              Interface_Structure.Get_Position
                                 (Variables.Var_Joueur));

            Do_The_Bloc (Generales);
            Do_The_Bloc (Variables.Get_Value (Variables.Var_Position_Courante));
        end if;
    end Do_The_Scenario;
end Blocs_Du_Scenario;


E3 Meta Data

    nblk1=5
    nid=4
    hdr6=6
        [0x00] rec0=20 rec1=00 rec2=01 rec3=054
        [0x01] rec0=20 rec1=00 rec2=05 rec3=012
        [0x02] rec0=11 rec1=00 rec2=03 rec3=000
        [0x03] rec0=11 rec1=00 rec2=04 rec3=000
        [0x04] rec0=c0 rec1=00 rec2=00 rec3=100
    tail 0x21547109e8660613aabbe 0x42a00088462060003
Free Block Chain:
  0x4: 0000  00 02 00 12 80 09 53 63 65 6e 61 72 69 6f 3b 09  ┆      Scenario; ┆
  0x2: 0000  00 00 02 97 80 20 20 20 20 20 20 20 20 20 28 56  ┆              (V┆