-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample06.py
42 lines (36 loc) · 1.08 KB
/
sample06.py
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
# -*- coding: shift_jis -*-
# xbasip sample programs
# nozwas <https://github.com/nozwas>
r"""sample06.py
tgraphモジュールの使用例
"""
from xbasip.console import *
from xbasip.tgraph import *
from xbasip.graph import rgb
width(64)
console(0, 32, 0)
cursor_off()
pal = ((0, 0, 0), (0, 31, 31), (31,31, 0), (31, 31, 31),
(0, 0, 0), (0, 0, 31), (31, 0, 0), (31, 0, 31),
(0, 0, 0), (0, 31, 0), (31, 12, 12), (27, 27, 17),
(0, 0, 0), (8, 12, 31), (27, 8, 21), (21, 21, 21))
for i, c in enumerate(pal):
t_palet(i, rgb(c[0], c[1], c[2]))
for j in range(4):
locate(0, j * 8 + 1)
print(f"テキストプレーン: 0b{j:02b}00", end="")
for k in range(4):
t_fill(256, j * 128 + k * 32,
511, j * 128 + k * 32 + 31, j * 4 + k)
t_fill(0, j * 128 + 1 * 32,
255, j * 128 + 3 * 32 + 31, j * 4)
if k > 0:
color(k)
print("")
print(f" COLOR({k})")
print(" 父のパソコンを超えろ。X68000", end="")
keyflush()
inkey()
t_cls()
width(96)
end()