-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONSOLE.LIB
47 lines (47 loc) · 874 Bytes
/
CONSOLE.LIB
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
static class Console
public int Color = 15, BackColor, Rotation, Hflip, Vflip
def private void setcolor ()
attr Vflip*8+Hflip*4+floor((Rotation mod 360)/90)
color Color, BackColor
end
def public void Println (string s)
setcolor
[SB]PRINT S$
end
def public void Print (string s)
setcolor
[SB]PRINT S$;
end
def public string Readln ()
setcolor
string s
[SB]LINPUT S$
return s
end
def public string ReadKey ()
string s
dowhile (s == "")
s = INKEY$()
end
Print s
return s
end
def public string GetKey ()
[SB]RETURN INKEY$()
end
def public void Clear ()
[SB]CLS
end
def public void Locate (int x, int y, int z)
[SB]LOCATE X%,Y%,Z%
end
def public void Scroll (int x, int y)
[SB]SCROLL X%,Y%
end
def public int GetChar (int x, int y)
[SB]RETURN CHKCHR(X%,Y%)
end
def public void Update ()
setcolor
end
end static