Browse Source

amunits: adapted library unit changes to example sources

git-svn-id: trunk@28650 -
marcus 11 years ago
parent
commit
be9e44a821

+ 2 - 2
packages/amunits/examples/asltest.pas

@@ -1,6 +1,6 @@
 PROGRAM AslTest;
 PROGRAM AslTest;
 
 
-uses Exec, Utility, Asl, msgbox, systemvartags;
+uses Exec, Utility, Asl, amsgbox, systemvartags;
 
 
 
 
 {
 {
@@ -32,7 +32,7 @@ BEGIN
                           TAG_DONE]);
                           TAG_DONE]);
 
 
     IF fr <> nil THEN BEGIN
     IF fr <> nil THEN BEGIN
-        dummy := AslRequest(fr,NIL);
+        dummy := AslRequest(fr,NIL) <> LFALSE;
         if dummy then begin
         if dummy then begin
            MessageBox('Test of Asl',
            MessageBox('Test of Asl',
                       ' The path is :' +
                       ' The path is :' +

+ 7 - 7
packages/amunits/examples/bezier.pas

@@ -35,7 +35,7 @@ Program Bezier;
    [email protected]
    [email protected]
 }
 }
 
 
-uses exec, intuition, graphics, utility,pastoc, systemvartags;
+uses exec, intuition, agraphics, utility,pastoc, systemvartags;
 
 
 type
 type
     PointRec = packed Record
     PointRec = packed Record
@@ -69,7 +69,7 @@ end;
 
 
 Procedure DrawLine;
 Procedure DrawLine;
 begin
 begin
-    Move(rp, Trunc(Points[PointCount].X), Trunc(Points[PointCount].Y));
+    GFXMove(rp, Trunc(Points[PointCount].X), Trunc(Points[PointCount].Y));
     Draw(rp, LastX, LastY);
     Draw(rp, LastX, LastY);
 end;
 end;
 
 
@@ -201,7 +201,7 @@ Procedure DrawCurve;
 var
 var
     i : Integer;
     i : Integer;
 begin
 begin
-    Move(rp, Trunc(Points[1].X), Trunc(Points[1].Y));
+    GfxMove(rp, Trunc(Points[1].X), Trunc(Points[1].Y));
     for i := 2 to PointCount do
     for i := 2 to PointCount do
     Draw(rp, Round(Points[i].X), Round(Points[i].Y));
     Draw(rp, Round(Points[i].X), Round(Points[i].Y));
 end;
 end;
@@ -248,10 +248,10 @@ begin
     IF w=NIL THEN CleanUpAndDie;
     IF w=NIL THEN CleanUpAndDie;
 
 
     rp := w^.RPort;
     rp := w^.RPort;
-    Move(rp, 252, 30);
-    GText(rp, pas2c('Enter points by pressing the left mouse button'), 46);
-    Move(rp, 252, 40);
-    GText(rp, pas2c('Double click on the last point to begin drawing'), 47);
+    GfxMove(rp, 252, 30);
+    GfxText(rp, pas2c('Enter points by pressing the left mouse button'), 46);
+    GfxMove(rp, 252, 40);
+    GfxText(rp, pas2c('Double click on the last point to begin drawing'), 47);
     repeat
     repeat
         GetPoints;  { Both these routines will quit if }
         GetPoints;  { Both these routines will quit if }
         DrawBezier; { the window is closed. }
         DrawBezier; { the window is closed. }

+ 7 - 7
packages/amunits/examples/bezier2.pas

@@ -26,7 +26,7 @@ Program Bezier;
    [email protected]
    [email protected]
 }
 }
 
 
-uses exec, intuition, graphics, utility, pastoc, systemvartags;
+uses exec, intuition, agraphics, utility, pastoc, systemvartags;
 
 
 type
 type
     PointRec = Record
     PointRec = Record
@@ -72,7 +72,7 @@ end;
 
 
 Procedure DrawLine;
 Procedure DrawLine;
 begin
 begin
-    Move(rp, Points[PointCount].X, Points[PointCount].Y);
+    GfxMove(rp, Points[PointCount].X, Points[PointCount].Y);
     Draw(rp, LastX, LastY);
     Draw(rp, LastX, LastY);
 end;
 end;
 
 
@@ -133,10 +133,10 @@ var
     end;
     end;
 
 
 begin
 begin
-    Move(rp, 252, 30);
-    GText(rp, 'Enter points by pressing the left mouse button', 46);
-    Move(rp, 252, 40);
-    GText(rp, 'Double click on the last point to begin drawing', 47);
+    GfxMove(rp, 252, 30);
+    GfxText(rp, 'Enter points by pressing the left mouse button', 46);
+    GfxMove(rp, 252, 40);
+    GfxText(rp, 'Double click on the last point to begin drawing', 47);
     ModifyIDCMP(w, IDCMP_CLOSEWINDOW or IDCMP_MOUSEBUTTONS or IDCMP_MOUSEMOVE);
     ModifyIDCMP(w, IDCMP_CLOSEWINDOW or IDCMP_MOUSEBUTTONS or IDCMP_MOUSEMOVE);
     SetDrMd(rp, COMPLEMENT);
     SetDrMd(rp, COMPLEMENT);
     PointCount := 0;
     PointCount := 0;
@@ -223,7 +223,7 @@ begin
     increment := 0.01; { This could be a function of PointCount }
     increment := 0.01; { This could be a function of PointCount }
     t := 0.0;
     t := 0.0;
     tprime := 1.0;
     tprime := 1.0;
-    Move(rp, Trunc(BezierX(Pred(PointCount), 1)),
+    GfxMove(rp, Trunc(BezierX(Pred(PointCount), 1)),
              Trunc(BezierY(Pred(PointCount), 1)));
              Trunc(BezierY(Pred(PointCount), 1)));
     t := t + increment;
     t := t + increment;
     tprime := 1.0 - t;
     tprime := 1.0 - t;

+ 1 - 1
packages/amunits/examples/easygadtools.pas

@@ -15,7 +15,7 @@ PROGRAM EasyGadtools;
 
 
 }
 }
 
 
-USES Intuition, Exec, Graphics, GadTools, Utility, pastoc,systemvartags;
+USES Intuition, Exec, AGraphics, GadTools, Utility, pastoc,systemvartags;
 
 
 CONST
 CONST
 
 

+ 1 - 1
packages/amunits/examples/getfontasl.pas

@@ -1,6 +1,6 @@
 PROGRAM GetFontAsltest;
 PROGRAM GetFontAsltest;
 
 
-uses easyasl,msgbox,amigautils;
+uses easyasl,amsgbox,amigautils;
 
 
 {
 {
    An example to get a font with easyasl.
    An example to get a font with easyasl.

+ 3 - 2
packages/amunits/examples/imagegadget.pas

@@ -21,7 +21,7 @@ PROGRAM ImageGadget;
    [email protected]
    [email protected]
 }
 }
 
 
-USES Intuition, Exec, Graphics, GadTools, Utility, systemvartags,pastoc;
+USES Intuition, Exec, AGraphics, GadTools, Utility, systemvartags,pastoc;
 
 
 
 
 CONST
 CONST
@@ -289,6 +289,7 @@ end;
 FUNCTION EasyReq(wp : pWindow; title,body,gad : PChar) : Longint;
 FUNCTION EasyReq(wp : pWindow; title,body,gad : PChar) : Longint;
 VAR
 VAR
   es : tEasyStruct;
   es : tEasyStruct;
+  Res: LongWord;
 BEGIN
 BEGIN
   es.es_StructSize:=SizeOf(tEasyStruct);
   es.es_StructSize:=SizeOf(tEasyStruct);
   es.es_Flags:=0;
   es.es_Flags:=0;
@@ -296,7 +297,7 @@ BEGIN
   es.es_TextFormat:=body;
   es.es_TextFormat:=body;
   es.es_GadgetFormat:=gad;
   es.es_GadgetFormat:=gad;
 
 
-  EasyReq := EasyRequestArgs(wp,@es,0,NIL);
+  EasyReq := EasyRequestArgs(wp,@es,@Res,NIL);
 END;
 END;
 
 
 PROCEDURE CleanUp(why : PChar; rc : BYTE);
 PROCEDURE CleanUp(why : PChar; rc : BYTE);

+ 3 - 3
packages/amunits/examples/moire.pas

@@ -21,7 +21,7 @@ Program Moire;
       [email protected]
       [email protected]
 }
 }
 
 
-uses Exec, Intuition, Graphics, Utility, systemvartags;
+uses Exec, Intuition, AGraphics, Utility, systemvartags;
 
 
 
 
 const
 const
@@ -47,7 +47,7 @@ begin
         while x < Pred(Width - BorderRight - BorderLeft) do begin
         while x < Pred(Width - BorderRight - BorderLeft) do begin
         Stop := Pred(Width - BorderRight);
         Stop := Pred(Width - BorderRight);
         SetAPen(RP, Pen);
         SetAPen(RP, Pen);
-        Move(RP, Succ(x + BorderLeft), BorderTop);
+        GfxMove(RP, Succ(x + BorderLeft), BorderTop);
         Draw(RP, Stop - x, Pred(Height - BorderBottom));
         Draw(RP, Stop - x, Pred(Height - BorderBottom));
         Pen := (Pen + 1) mod 4;
         Pen := (Pen + 1) mod 4;
         Inc(x);
         Inc(x);
@@ -59,7 +59,7 @@ begin
         while x < Pred(Height - BorderBottom - BorderTop) do begin
         while x < Pred(Height - BorderBottom - BorderTop) do begin
         Stop := Pred(Height - BorderBottom);
         Stop := Pred(Height - BorderBottom);
         SetAPen(RP, Pen);
         SetAPen(RP, Pen);
-        Move(RP, Pred(Width - BorderRight), Succ(x + BorderTop));
+        GfxMove(RP, Pred(Width - BorderRight), Succ(x + BorderTop));
         Draw(RP, Succ(BorderLeft), Stop - x);
         Draw(RP, Succ(BorderLeft), Stop - x);
         Pen := (Pen + 1) mod 4;
         Pen := (Pen + 1) mod 4;
         Inc(x);
         Inc(x);

+ 1 - 1
packages/amunits/examples/otherlibs/bestmodeid.pas

@@ -17,7 +17,7 @@ PROGRAM BestModeID;
     [email protected]
     [email protected]
 }
 }
 
 
-uses exec, amigados, graphics, picasso96api, utility;
+uses exec, amigados, agraphics, picasso96api, utility;
 
 
 Const
 Const
 
 

+ 1 - 1
packages/amunits/examples/otherlibs/gadgetdemo.pas

@@ -125,7 +125,7 @@ ProjectStart;
                    SetTRTag(TRAT_Value,5);
                    SetTRTag(TRAT_Value,5);
                    SetTRTag(TRAT_ID,ScrollGadID);
                    SetTRTag(TRAT_ID,ScrollGadID);
                    Space;
                    Space;
-                   ClippedTextBoxMW('5',ScrollGadTextID,2);
+                   ClippedTextBoxMW(PChar('5'),ScrollGadTextID,2);
                 EndLine;
                 EndLine;
                 Space;
                 Space;
                 BeginLine;
                 BeginLine;

+ 1 - 1
packages/amunits/examples/otherlibs/gttest.pas

@@ -18,7 +18,7 @@ program gttest;
 
 
 }
 }
 
 
-uses intuition, exec, gadtools, utility, gtlayout, msgbox;
+uses intuition, exec, gadtools, utility, gtlayout, amsgbox;
 
 
 const
 const
     ltrue : longint = 1;
     ltrue : longint = 1;

+ 1 - 1
packages/amunits/examples/otherlibs/openpip.pas

@@ -17,7 +17,7 @@ Program OpenPIP;
     [email protected]
     [email protected]
 }
 }
 
 
-uses exec, amigados, graphics, intuition, picasso96api, utility,strings;
+uses exec, amigados, agraphics, intuition, picasso96api, utility,strings;
 
 
 
 
 Const
 Const

+ 1 - 1
packages/amunits/examples/otherlibs/openscreen.pas

@@ -20,7 +20,7 @@ PROGRAM OpenScreen;
 }
 }
 
 
 
 
-uses exec, amigados, graphics, intuition, picasso96api, utility,systemvartags;
+uses exec, amigados, agraphics, intuition, picasso96api, utility,systemvartags;
 
 
 Const
 Const
 
 

+ 1 - 1
packages/amunits/examples/otherlibs/p96checkboards.pas

@@ -17,7 +17,7 @@ Program P96CheckBoards;
 }
 }
 
 
 
 
-uses exec, amigados, graphics, picasso96api,utility,amigalib;
+uses exec, amigados, agraphics, picasso96api,utility,amigalib;
 
 
 var
 var
    NumBoards : Longint;
    NumBoards : Longint;

+ 1 - 1
packages/amunits/examples/otherlibs/requestmodeid.pas

@@ -17,7 +17,7 @@ Program RequestModeID;
     [email protected]
     [email protected]
 }
 }
 
 
-uses exec, amigados, graphics, intuition, picasso96api, utility;
+uses exec, amigados, agraphics, intuition, picasso96api, utility;
 
 
 Const
 Const
     template    :   pchar = 'Width=W/N,Height=H/N,Depth=D/N';
     template    :   pchar = 'Width=W/N,Height=H/N,Depth=D/N';

+ 4 - 4
packages/amunits/examples/otherlibs/rtdemo.pas

@@ -41,7 +41,7 @@ VAR
     filename        : PChar;
     filename        : PChar;
     dummy           : PChar;
     dummy           : PChar;
     dummy2          : PChar;
     dummy2          : PChar;
-    longnum         : Longint;
+    longnum         : Longword;
     ret             : Longint;
     ret             : Longint;
     color           : Longint;
     color           : Longint;
     undertag        : Array [0..1] of tTagItem;
     undertag        : Array [0..1] of tTagItem;
@@ -204,9 +204,9 @@ BEGIN
     rtEZRequestA(dummy,'_Great|_Fantastic|_Swell|Oh _Boy',NIL,NIL,@undertag);
     rtEZRequestA(dummy,'_Great|_Fantastic|_Swell|Oh _Boy',NIL,NIL,@undertag);
 
 
     rtEZRequestA('You may also use C-style formatting codes in the body text.' + #10 +
     rtEZRequestA('You may also use C-style formatting codes in the body text.' + #10 +
-                        'Like this:' + #10 +  + #10 +
-                        'The number %%ld is written %%s. will give:' + #10 +  + #10 +
-                        'The number %ld is written %s.' + #10 +  + #10 +
+                        'Like this:' + #10 +  #10 +
+                        'The number %%ld is written %%s. will give:' + #10 +  #10 +
+                        'The number %ld is written %s.' + #10 +  #10 +
                         'if you also pass ''5'' and ''five'' to rtEZRequestA().',
                         'if you also pass ''5'' and ''five'' to rtEZRequestA().',
                         '_Proceed',NIL,readinlongs([5,'five']),@undertag);
                         '_Proceed',NIL,readinlongs([5,'five']),@undertag);
 
 

+ 1 - 1
packages/amunits/examples/otherlibs/writetruecolordata.pas

@@ -17,7 +17,7 @@ Program WriteTrueColorData;
     [email protected]
     [email protected]
 }
 }
 
 
-uses exec, amigados, intuition, graphics, picasso96api, utility,systemvartags;
+uses exec, amigados, intuition, agraphics, picasso96api, utility,systemvartags;
 
 
 
 
 Const
 Const

+ 7 - 7
packages/amunits/examples/penshare.pas

@@ -32,7 +32,7 @@ Program PenShare;
   [email protected]
   [email protected]
 }
 }
 
 
-uses exec, graphics, intuition, utility,systemvartags;
+uses exec, agraphics, intuition, utility,systemvartags;
 
 
 VAR RP : pRastPort;
 VAR RP : pRastPort;
     Win : pWindow;
     Win : pWindow;
@@ -87,16 +87,16 @@ Begin
   CleanExit('Please set more colors for Workbench.',10);
   CleanExit('Please set more colors for Workbench.',10);
 
 
  SetAPen(RP,Colors[0]);
  SetAPen(RP,Colors[0]);
- Move(RP,40,40);
- GText(RP,'Red',3);
+ GfxMove(RP,40,40);
+ GfxText(RP,'Red',3);
 
 
  SetAPen(RP,Colors[1]);
  SetAPen(RP,Colors[1]);
- Move(RP,40,60);
- GText(RP,'Green',5);
+ GfxMove(RP,40,60);
+ GfxText(RP,'Green',5);
 
 
  SetAPen(RP,Colors[2]);
  SetAPen(RP,Colors[2]);
- Move(RP,40,80);
- GText(RP,'Blue',4);
+ GfxMove(RP,40,80);
+ GfxText(RP,'Blue',4);
 
 
  Msg:=WaitPort(Win^.UserPort);
  Msg:=WaitPort(Win^.UserPort);
  Msg:=GetMsg(Win^.UserPort);
  Msg:=GetMsg(Win^.UserPort);

+ 2 - 2
packages/amunits/examples/snow.pas

@@ -23,7 +23,7 @@ takes a long time, and frankly doesn't look as good as level 5.  }
 }
 }
 
 
 
 
-uses exec,intuition,graphics,utility,systemvartags;
+uses exec,intuition,agraphics,utility,systemvartags;
 
 
 
 
 
 
@@ -145,7 +145,7 @@ begin
         for n := 0 to nc do
         for n := 0 to nc do
             sn[n] := 0;
             sn[n] := 0;
 
 
-        Move(rp, trunc(x), trunc(y));
+        GfxMove(rp, trunc(x), trunc(y));
 
 
         repeat
         repeat
             d := 0;
             d := 0;

+ 2 - 2
packages/amunits/examples/sortdemo.pas

@@ -38,7 +38,7 @@ PROGRAM SortDemo;
     so you have to wait until it's finished.
     so you have to wait until it's finished.
 }
 }
 
 
-uses Exec, Intuition, Graphics, Utility, GadTools, msgbox,systemvartags;
+uses Exec, Intuition, AGraphics, Utility, GadTools, amsgbox,systemvartags;
 
 
 
 
 CONST
 CONST
@@ -550,7 +550,7 @@ VAR
     MenuNumber  : Integer;
     MenuNumber  : Integer;
     ItemNumber  : Integer;
     ItemNumber  : Integer;
     SubItemNumber   : Integer;
     SubItemNumber   : Integer;
-    t0,t1,l         : Longint;
+    t0,t1,l         : Longword;
 
 
     begin
     begin
     if IMessage.Code = MENUNULL then
     if IMessage.Code = MENUNULL then

+ 1 - 1
packages/amunits/examples/stars.pas

@@ -1,7 +1,7 @@
 PROGRAM Sterne;
 PROGRAM Sterne;
 
 
 
 
-uses Exec, Graphics, Intuition, Utility, systemvartags;
+uses Exec, AGraphics, Intuition, Utility, systemvartags;
 
 
 
 
 
 

+ 1 - 1
packages/amunits/examples/talk2boopsi.pas

@@ -28,7 +28,7 @@ make them  }
 
 
 }
 }
 
 
-uses Exec, Intuition, Utility,msgbox, systemvartags;
+uses Exec, Intuition, Utility,amsgbox, systemvartags;
 
 
 
 
 
 

+ 1 - 1
packages/amunits/examples/wbtest.pas

@@ -14,7 +14,7 @@ program wbtest;
      [email protected]
      [email protected]
 }
 }
 
 
-uses wbargs, msgbox;
+uses wbargs, amsgbox;
 
 
 var
 var
    i : integer;
    i : integer;