Browse Source

* some debug stuff changed

pierre 24 years ago
parent
commit
2313cc3ada
3 changed files with 47 additions and 5 deletions
  1. 11 2
      fv/gfvgraph.pas
  2. 11 2
      fvision/gfvgraph.pas
  3. 25 1
      fvision/testapp.pas

+ 11 - 2
fv/gfvgraph.pas

@@ -219,6 +219,11 @@ CONST
    SysScreenWidth : Integer = 640;                    { Default screen width }
    SysScreenHeight: Integer = 480;                    { Default screen height}
 
+{$ifdef DEBUG}
+const
+  WriteDebugInfo : boolean = false;
+{$endif DEBUG}
+
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
                                IMPLEMENTATION
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
@@ -313,7 +318,8 @@ BEGIN
      ViewPort.Y2 := Y2;                               { Set Y2 port value }
      ViewPort.Clip := Clip;                           { Set port clip value }
 {$ifdef DEBUG}
-     Writeln(stderr,'New ViewPort(',X1,',',Y1,',',X2,',',Y2,')');
+     If WriteDebugInfo then
+       Writeln(stderr,'New ViewPort(',X1,',',Y1,',',X2,',',Y2,')');
 {$endif DEBUG}
      Cxp := X1;                                       { Set current x pos }
      Cyp := Y1;                                       { Set current y pos }
@@ -401,7 +407,10 @@ END;
 END.
 {
  $Log$
- Revision 1.8  2001-05-10 16:46:28  pierre
+ Revision 1.9  2001-05-31 21:40:10  pierre
+  * some debug stuff changed
+
+ Revision 1.8  2001/05/10 16:46:28  pierre
   + some improovements made
 
  Revision 1.7  2001/05/07 23:36:35  pierre

+ 11 - 2
fvision/gfvgraph.pas

@@ -219,6 +219,11 @@ CONST
    SysScreenWidth : Integer = 640;                    { Default screen width }
    SysScreenHeight: Integer = 480;                    { Default screen height}
 
+{$ifdef DEBUG}
+const
+  WriteDebugInfo : boolean = false;
+{$endif DEBUG}
+
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
                                IMPLEMENTATION
 {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>}
@@ -313,7 +318,8 @@ BEGIN
      ViewPort.Y2 := Y2;                               { Set Y2 port value }
      ViewPort.Clip := Clip;                           { Set port clip value }
 {$ifdef DEBUG}
-     Writeln(stderr,'New ViewPort(',X1,',',Y1,',',X2,',',Y2,')');
+     If WriteDebugInfo then
+       Writeln(stderr,'New ViewPort(',X1,',',Y1,',',X2,',',Y2,')');
 {$endif DEBUG}
      Cxp := X1;                                       { Set current x pos }
      Cyp := Y1;                                       { Set current y pos }
@@ -401,7 +407,10 @@ END;
 END.
 {
  $Log$
- Revision 1.8  2001-05-10 16:46:28  pierre
+ Revision 1.9  2001-05-31 21:40:10  pierre
+  * some debug stuff changed
+
+ Revision 1.8  2001/05/10 16:46:28  pierre
   + some improovements made
 
  Revision 1.7  2001/05/07 23:36:35  pierre

+ 25 - 1
fvision/testapp.pas

@@ -39,6 +39,9 @@ PROGRAM TestApp;
      {$ifdef TEST}
      AsciiTab,
      {$endif TEST}
+     {$ifdef DEBUG}
+     Gfvgraph,
+     {$endif DEBUG}
      Gadgets;
 
 
@@ -105,10 +108,28 @@ begin
     (P^.State and sfVisible <> 0);
 end;
 
+{$ifdef DEBUG}
+Var
+   WasSet : boolean;
+{$endif DEBUG}
 begin
   inherited Idle;
+{$ifdef DEBUG}
+   if WriteDebugInfo then
+     begin
+      WasSet:=true;
+      WriteDebugInfo:=false;
+     end
+   else
+      WasSet:=false;
+{$endif DEBUG}
+   if WriteDebugInfo then
   Clock^.Update;
   Heap^.Update;
+{$ifdef DEBUG}
+   if WasSet then
+     WriteDebugInfo:=true;
+{$endif DEBUG}
   if Desktop^.FirstThat(@IsTileable) <> nil then
     EnableCommands([cmTile, cmCascade])
   else
@@ -332,7 +353,10 @@ END.
 
 {
  $Log$
- Revision 1.5  2001-05-04 15:43:46  pierre
+ Revision 1.6  2001-05-31 21:40:10  pierre
+  * some debug stuff changed
+
+ Revision 1.5  2001/05/04 15:43:46  pierre
   * several more fixes
 
  Revision 1.4  2001/05/04 10:46:02  pierre