|
|
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: 7168 (0x1c00)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Scene, seg_037b83, seg_037b9a, seg_038278
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
package body Scene is
package Int_Io is new Text_Io.Integer_Io (Num => Integer);
function Creer_Scene return P_Scene is
Result : P_Scene;
begin
Result := new Cell_Scene;
Result.En_Cours := False;
Result.La_Duree := 0;
Result.Nb_Acteurs := 0;
return Result;
end Creer_Scene;
function Scene_Est_Vide (S : in P_Scene) return Boolean is
begin
return Scene_Vide = S;
end Scene_Est_Vide;
procedure Inc_Nb_Acteurs_Scene (Une_Scene : in out P_Scene) is
begin
Une_Scene.Nb_Acteurs := Une_Scene.Nb_Acteurs + 1;
end Inc_Nb_Acteurs_Scene;
procedure Lire_Scene (S : in out P_Scene) is
Une_Scene : P_Scene;
Un_Acteur : Role.Acteur;
I : Integer := 0;
Continu : Boolean := True;
begin
if Scene_Est_Vide (S => S) then
Une_Scene := Creer_Scene;
else
Une_Scene := S;
end if;
while (not Intermediate_Code.End_Of_File) loop
Un_Acteur.Num_Station := Intermediate_Code.Get;
Un_Acteur.Num_Acteur := Intermediate_Code.Get;
while Continu loop
I := I + 1;
if Role.Role_Est_Vide (R => Une_Scene.Les_Roles (I)) then
Continu := False;
Inc_Nb_Acteurs_Scene (Une_Scene => Une_Scene);
else
if Une_Scene.Les_Roles (I).L_Acteur.Num_Station =
Un_Acteur.Num_Station and
Une_Scene.Les_Roles (I).L_Acteur.Num_Acteur =
Un_Acteur.Num_Acteur then
Continu := False;
end if;
end if;
end loop;
Une_Scene.Les_Roles (I) :=
Role.Lire_Un_Role (R => Une_Scene.Les_Roles (I), A => Un_Acteur);
if Une_Scene.La_Duree < Une_Scene.Les_Roles (I).La_Duree then
Une_Scene.La_Duree := Une_Scene.Les_Roles (I).La_Duree;
end if;
Une_Scene.Les_Roles (I).L_Acteur := Un_Acteur;
I := 0;
Continu := True;
end loop;
S := Une_Scene;
end Lire_Scene;
procedure Jouer_Scene (S : P_Scene) is
Scene_Chrono : Timer_Moteur.Objet;
begin
Timer_Moteur.Init_Temps (Scene_Chrono);
Timer_Moteur.Reset_Temps (Scene_Chrono);
Timer_Moteur.Start_Temps (Scene_Chrono);
for I in 1 .. S.Nb_Acteurs loop
Role.Demarrer_Role (R => S.Les_Roles (I));
end loop;
while S.La_Duree >= Timer_Moteur.Temps_Moteur (Scene_Chrono) loop
for I in 1 .. S.Nb_Acteurs loop
Role.Solliciter_Role (R => S.Les_Roles (I),
Chrono => Scene_Chrono);
end loop;
end loop;
Timer_Moteur.Stop_Temps (Scene_Chrono);
end Jouer_Scene;
procedure Affiche_Scene (S : in P_Scene) is
Continu : Boolean := True;
N : Integer;
begin
Text_Io.Put_Line ("affichage de la scene :");
for I in 1 .. S.Nb_Acteurs loop
Role.Affiche_Role (R => S.Les_Roles (I));
Text_Io.Put_Line ("");
Text_Io.Put ("la duree du role est : ");
Int_Io.Put (S.Les_Roles (I).La_Duree);
Text_Io.Put_Line ("");
end loop;
Text_Io.Put ("la duree de la scene est : ");
Int_Io.Put (S.La_Duree);
Text_Io.Put_Line ("");
end Affiche_Scene;
end Scene;
nblk1=6
nid=6
hdr6=8
[0x00] rec0=25 rec1=00 rec2=01 rec3=00c
[0x01] rec0=14 rec1=00 rec2=03 rec3=068
[0x02] rec0=1b rec1=00 rec2=05 rec3=048
[0x03] rec0=14 rec1=00 rec2=02 rec3=000
[0x04] rec0=16 rec1=00 rec2=06 rec3=000
[0x05] rec0=42 rec1=68 rec2=b6 rec3=732
tail 0x21530fe0284e56b1a5673 0x42a00088462060003
Free Block Chain:
0x6: 0000 00 04 00 04 80 01 3a 01 02 03 04 05 06 6f 70 3b ┆ : op;┆
0x4: 0000 00 00 00 4c 00 49 20 20 20 20 20 20 20 20 20 20 ┆ L I ┆