summaryrefslogtreecommitdiff
path: root/app/mpg/2.2/src/VIDEOSTAR 3-6.GCONF
blob: 9accb3f354d11fbd046172f2b7eb2c8752fb339f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
INCLUDE "std primitives"; 
 
PLOTTER "VIDEOSTAR",3,6,640,480,27.0,19.5; 
 
COLORS "000999";
 
TEXT PROC koordinaten (INT CONST x,y):
  code(32+((y DIV 32) AND 31)) + code(96+(y MOD 32)) +
  code(32+((x DIV 32) AND 31)) + code(64+(x MOD 32))
END PROC koordinaten; 
 
PROC clear: 
   out (""29""27""140""27"/0d");
   moveto(0,0)
END PROC clear; 
 
PROC prepare:
    break(quiet);
    REP 
       disable stop;
       continue (channel(plotter)); 
       clear error;
       enable stop; 
       IF NOT online 
          THEN pause (300)
       FI
    UNTIL online PER
END PROC prepare;

PROC initplot: 
END PROC initplot;
 
PROC endplot: 
   pause;
   out(""24"")
END PROC endplot; 

PROC home: 
   moveto (0,0)
END PROC home;

PROC moveto (INT CONST x,y): 
   out (""29""29"");
   out (koordinaten (x,y)) 
END PROC moveto; 
 
PROC drawto (INT CONST x,y): 
   out (koordinaten(x,y)) 
END PROC drawto; 
 
PROC setpixel (INT CONST x,y): 
   out (""28""); 
   out (koordinaten (x,y)) 
END PROC setpixel;

PROC foreground (INT VAR type): 
   IF   type = 0 THEN out (""27"/1d")            (* loeschend *) 
   ELIF type < 0 THEN out (""27"/2d");type := -1 (* XOR *) 
                 ELSE out (""27"/0");type  := 1  (* normal *) 
   FI 
END PROC foreground;

PROC background (INT VAR type):
   type := 0 
END PROC background; 
        
PROC setpalette: 
END PROC setpalette;
 
PROC circle (INT CONST x,y,rad,from,to): 
   IF full circle inside screen 
      THEN out (""29"" + koordinaten(x, y) + ""27"C" + 
           subtext (koordinaten(0,rad),1,3) + ""28""); 
      ELSE std circle (x,y,rad,from,to) 
   FI. 
  
   full circle inside screen:
      (from = 0 AND to = 360) AND
      (x + rad) < 640 AND (x - rad >= 0) AND 
      (y + rad) < 480 AND (y - rad >= 0)
END PROC circle; 
 
PROC box (INT CONST x1,y1,x2,y2,pattern): 
   std box (x1, y1, x2, y2, pattern) 
END PROC box;

PROC fill (INT CONST x,y,pattern): 
   moveto (x,y);
   out (""27"F");
END PROC fill;