|
|
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: 5120 (0x1400)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Move_Action_Rule, seg_04bdc4, separate Fruit_Rule_Bundle_4
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
separate (Fruit_Rule_Bundle_4)
package body Move_Action_Rule is
function Premiss return Fact_Queries is
use Fact_Base;
use Fruit_Frames_4;
The_Marker_Name : constant Alias.Name := Alias.M;
begin
return (Requests.Exist
((Request_Name => Is_Equal (Move_Request_Name),
Marker_Name => Predicate.Define_As (The_Marker_Name),
Argument1 => Is_Any,
Argument2 => Is_Any)),
Visual_Markers.Exist
((Marker_Name => Is_Equal (The_Marker_Name),
Position_X => Is_Any,
Position_Y => Is_Any)));
end Premiss;
procedure Action (Objects : Fact_Collection) is
use Fruit_Frames_4;
use Slot;
use Slot.Operators;
The_Request_Fact : Fact_Name renames Objects (1);
The_Marker_Fact : Fact_Name renames Objects (2);
The_Dist : Slot.Object := Requests.Get (The_Request_Fact, Argument2);
The_Direction : Slot.Object :=
Requests.Get (The_Request_Fact, Argument1);
Old_Pos_X : Slot.Object := Visual_Markers.Get
(The_Marker_Fact, Position_X);
Old_Pos_Y : Slot.Object := Visual_Markers.Get
(The_Marker_Fact, Position_Y);
New_Pos_X : Slot.Object := Value (0);
New_Pos_Y : Slot.Object := Value (0);
begin
if The_Direction = Right_Direction then
New_Pos_X := Old_Pos_X + The_Dist;
if New_Pos_X > Max_X then
New_Pos_X := Max_X;
end if;
Visual_Markers.Change (The_Marker_Fact, Position_X, New_Pos_X);
elsif The_Direction = Left_Direction then
New_Pos_X := Old_Pos_X - The_Dist;
if New_Pos_X < Min_X then
New_Pos_X := Min_X;
end if;
Visual_Markers.Change (The_Marker_Fact, Position_X, New_Pos_X);
elsif The_Direction = Up_Direction then
New_Pos_Y := Old_Pos_Y + The_Dist;
if New_Pos_Y > Max_Y then
New_Pos_Y := Max_Y;
end if;
Visual_Markers.Change (The_Marker_Fact, Position_Y, New_Pos_Y);
elsif The_Direction = Down_Direction then
New_Pos_Y := Old_Pos_Y - The_Dist;
if New_Pos_Y < Min_Y then
New_Pos_Y := Min_Y;
end if;
Visual_Markers.Change (The_Marker_Fact, Position_Y, New_Pos_Y);
end if;
Requests.Delete (The_Request_Fact);
end Action;
end Move_Action_Rule;
nblk1=4
nid=2
hdr6=6
[0x00] rec0=1e rec1=00 rec2=01 rec3=010
[0x01] rec0=16 rec1=00 rec2=04 rec3=004
[0x02] rec0=13 rec1=00 rec2=03 rec3=000
[0x03] rec0=0f rec1=00 rec2=02 rec3=000
tail 0x2175132b6868f6a933f55 0x42a00088462063c03
Free Block Chain:
0x2: 0000 00 00 02 05 80 20 20 20 20 20 20 20 20 69 66 20 ┆ if ┆