Skip to content

Commit 16adda5

Browse files
Implementado um aforma unificada de converter um caractere de fonte. [Preciso fazer um buffer para placa de Video, pois o acesso direto a memoria de video eh muito lento, para isso vou amadurecer a System.Memory do projeto HUSIX, e migrar pra este projeto]
1 parent a5e63b8 commit 16adda5

File tree

33 files changed

+1080
-772
lines changed

33 files changed

+1080
-772
lines changed
2 Bytes
Binary file not shown.

Distro/Linux64/Plataformas/8086/System.Drawing.hcb

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,35 @@ Module GenericVideo
280280
End
281281
End
282282

283-
Sub DrawEllipse(mode as VideoMode, x1 as UInt16, y1 as UInt16, x2 as UInt16, y2 as UInt16, borderColor as UInt16, backgroundColor as UInt16)
284-
Throw NotImplementedError
283+
Sub DrawCircle(mode as VideoMode, xm as UInt16, ym as UInt16, r as UInt16, borderColor as UInt16, backgroundColor as UInt16)
284+
Dim x as UInt16
285+
Dim y as UInt16
286+
Dim err as UInt16
287+
x = -r
288+
y = 0
289+
err = 2-(r shl 1)
290+
Goto drawCircleStart
291+
While (x < 0)
292+
drawCircleStart:
293+
If backgroundColor <> 0xffff Then
294+
DrawLine xm-x, xm+y, xm+x, xm+y, backgroundColor
295+
DrawLine xm-x, xm-y, xm+x, xm-y, backgroundColor
296+
End
297+
DrawPixel xm-x, ym+y, borderColor
298+
DrawPixel xm-x, ym-y, borderColor
299+
DrawPixel xm+x, ym+y, borderColor
300+
DrawPixel xm+x, ym-y, borderColor
301+
r = err
302+
If r <= y Then
303+
y++
304+
err = err + (y shl 1) + 1
305+
End
306+
If (r > x) OrElse (err > y) Then
307+
x++
308+
err = err + (x shl 1) + 1
309+
End
310+
End
311+
285312
End
286313
End
287314

Distro/Linux64/Plataformas/Font.asm

Lines changed: 61 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,66 @@ dw autor
88
dw desconhecido
99
dw espaco
1010
dw n0 ' 2
11-
dw n1
12-
dw n2
13-
dw n3
14-
dw n4
15-
dw n5
16-
dw n6
17-
dw n7
18-
dw n8
19-
dw n9
11+
dw n1 ' 3
12+
dw n2 ' 4
13+
dw n3 ' 5
14+
dw n4 ' 6
15+
dw n5 ' 7
16+
dw n6 ' 8
17+
dw n7 ' 9
18+
dw n8 ' 10
19+
dw n9 ' 11
2020
dw amai ' 12
21-
dw bmai
22-
dw cmai
23-
dw dmai
24-
dw emai
25-
dw fmai
26-
dw gmai
27-
dw hmai
28-
dw imai
29-
dw jmai
30-
dw kmai
31-
dw lmai
32-
dw mmai
33-
dw nmai
34-
dw omai
35-
dw pmai
36-
dw qmai
37-
dw rmai
38-
dw smai
39-
dw tmai
40-
dw umai
41-
dw vmai
42-
dw wmai
43-
dw xmai
44-
dw ymai
21+
dw bmai ' 13
22+
dw cmai ' 14
23+
dw dmai ' 15
24+
dw emai ' 16
25+
dw fmai ' 17
26+
dw gmai ' 18
27+
dw hmai ' 19
28+
dw imai ' 20
29+
dw jmai ' 21
30+
dw kmai ' 22
31+
dw lmai ' 23
32+
dw mmai ' 24
33+
dw nmai ' 25
34+
dw omai ' 26
35+
dw pmai ' 27
36+
dw qmai ' 28
37+
dw rmai ' 29
38+
dw smai ' 30
39+
dw tmai ' 31
40+
dw umai ' 32
41+
dw vmai ' 33
42+
dw wmai ' 34
43+
dw xmai ' 35
44+
dw ymai ' 36
4545
dw zmai ' 37
4646
dw amai ' 38
47-
dw bmai
48-
dw cmai
49-
dw dmai
50-
dw emai
51-
dw fmai
52-
dw gmai
53-
dw hmai
54-
dw imai
55-
dw jmai
56-
dw kmai
57-
dw lmai
58-
dw mmai
59-
dw nmai
60-
dw omai
61-
dw pmai
62-
dw qmai
63-
dw rmai
64-
dw smai
65-
dw tmai
66-
dw umai
67-
dw vmai
68-
dw wmai
69-
dw xmai
70-
dw ymai
47+
dw bmai ' 39
48+
dw cmai ' 40
49+
dw dmai ' 41
50+
dw emai ' 42
51+
dw fmai ' 43
52+
dw gmai ' 44
53+
dw hmai ' 45
54+
dw imai ' 46
55+
dw jmai ' 47
56+
dw kmai ' 48
57+
dw lmai ' 49
58+
dw mmai ' 50
59+
dw nmai ' 51
60+
dw omai ' 52
61+
dw pmai ' 53
62+
dw qmai ' 54
63+
dw rmai ' 55
64+
dw smai ' 56
65+
dw tmai ' 57
66+
dw umai ' 58
67+
dw vmai ' 59
68+
dw wmai ' 60
69+
dw xmai ' 61
70+
dw ymai ' 62
7171
dw zmai ' 63
7272
dw agudo ' 64
7373
dw grave ' 65
@@ -79,9 +79,10 @@ dw macron ' 70
7979
dw braquia ' 71
8080
dw braquia_invertida ' 72
8181
dw caron ' 73
82-
dw anel ' 74
83-
dw cedilha ' 75
84-
dw gancho_polaco ' 76
82+
dw trema ' 74
83+
dw anel ' 75
84+
dw cedilha ' 76
85+
dw gancho_polaco ' 77
8586

8687
nome:
8788
db .fim - $
2 Bytes
Binary file not shown.

Distro/LinuxARM32/Plataformas/8086/System.Drawing.hcb

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,35 @@ Module GenericVideo
280280
End
281281
End
282282

283-
Sub DrawEllipse(mode as VideoMode, x1 as UInt16, y1 as UInt16, x2 as UInt16, y2 as UInt16, borderColor as UInt16, backgroundColor as UInt16)
284-
Throw NotImplementedError
283+
Sub DrawCircle(mode as VideoMode, xm as UInt16, ym as UInt16, r as UInt16, borderColor as UInt16, backgroundColor as UInt16)
284+
Dim x as UInt16
285+
Dim y as UInt16
286+
Dim err as UInt16
287+
x = -r
288+
y = 0
289+
err = 2-(r shl 1)
290+
Goto drawCircleStart
291+
While (x < 0)
292+
drawCircleStart:
293+
If backgroundColor <> 0xffff Then
294+
DrawLine xm-x, xm+y, xm+x, xm+y, backgroundColor
295+
DrawLine xm-x, xm-y, xm+x, xm-y, backgroundColor
296+
End
297+
DrawPixel xm-x, ym+y, borderColor
298+
DrawPixel xm-x, ym-y, borderColor
299+
DrawPixel xm+x, ym+y, borderColor
300+
DrawPixel xm+x, ym-y, borderColor
301+
r = err
302+
If r <= y Then
303+
y++
304+
err = err + (y shl 1) + 1
305+
End
306+
If (r > x) OrElse (err > y) Then
307+
x++
308+
err = err + (x shl 1) + 1
309+
End
310+
End
311+
285312
End
286313
End
287314

Distro/LinuxARM32/Plataformas/Font.asm

Lines changed: 76 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -7,81 +7,82 @@ dw autor
77
; Dados
88
dw desconhecido
99
dw espaco
10-
dw n0 ' 2
11-
dw n1
12-
dw n2
13-
dw n3
14-
dw n4
15-
dw n5
16-
dw n6
17-
dw n7
18-
dw n8
19-
dw n9
20-
dw amai ' 12
21-
dw bmai
22-
dw cmai
23-
dw dmai
24-
dw emai
25-
dw fmai
26-
dw gmai
27-
dw hmai
28-
dw imai
29-
dw jmai
30-
dw kmai
31-
dw lmai
32-
dw mmai
33-
dw nmai
34-
dw omai
35-
dw pmai
36-
dw qmai
37-
dw rmai
38-
dw smai
39-
dw tmai
40-
dw umai
41-
dw vmai
42-
dw wmai
43-
dw xmai
44-
dw ymai
45-
dw zmai ' 37
46-
dw amai ' 38
47-
dw bmai
48-
dw cmai
49-
dw dmai
50-
dw emai
51-
dw fmai
52-
dw gmai
53-
dw hmai
54-
dw imai
55-
dw jmai
56-
dw kmai
57-
dw lmai
58-
dw mmai
59-
dw nmai
60-
dw omai
61-
dw pmai
62-
dw qmai
63-
dw rmai
64-
dw smai
65-
dw tmai
66-
dw umai
67-
dw vmai
68-
dw wmai
69-
dw xmai
70-
dw ymai
71-
dw zmai ' 63
72-
dw agudo ' 64
73-
dw grave ' 65
74-
dw agudo_duplo ' 66
75-
dw grave_duplo ' 67
76-
dw til ' 68
77-
dw circunflexo ' 69
78-
dw macron ' 70
79-
dw braquia ' 71
80-
dw braquia_invertida ' 72
81-
dw caron ' 73
82-
dw anel ' 74
83-
dw cedilha ' 75
84-
dw gancho_polaco ' 76
10+
dw n0 ; 2
11+
dw n1 ; 3
12+
dw n2 ; 4
13+
dw n3 ; 5
14+
dw n4 ; 6
15+
dw n5 ; 7
16+
dw n6 ; 8
17+
dw n7 ; 9
18+
dw n8 ; 10
19+
dw n9 ; 11
20+
dw amai ; 12
21+
dw bmai ; 13
22+
dw cmai ; 14
23+
dw dmai ; 15
24+
dw emai ; 16
25+
dw fmai ; 17
26+
dw gmai ; 18
27+
dw hmai ; 19
28+
dw imai ; 20
29+
dw jmai ; 21
30+
dw kmai ; 22
31+
dw lmai ; 23
32+
dw mmai ; 24
33+
dw nmai ; 25
34+
dw omai ; 26
35+
dw pmai ; 27
36+
dw qmai ; 28
37+
dw rmai ; 29
38+
dw smai ; 30
39+
dw tmai ; 31
40+
dw umai ; 32
41+
dw vmai ; 33
42+
dw wmai ; 34
43+
dw xmai ; 35
44+
dw ymai ; 36
45+
dw zmai ; 37
46+
dw amai ; 38
47+
dw bmai ; 39
48+
dw cmai ; 40
49+
dw dmai ; 41
50+
dw emai ; 42
51+
dw fmai ; 43
52+
dw gmai ; 44
53+
dw hmai ; 45
54+
dw imai ; 46
55+
dw jmai ; 47
56+
dw kmai ; 48
57+
dw lmai ; 49
58+
dw mmai ; 50
59+
dw nmai ; 51
60+
dw omai ; 52
61+
dw pmai ; 53
62+
dw qmai ; 54
63+
dw rmai ; 55
64+
dw smai ; 56
65+
dw tmai ; 57
66+
dw umai ; 58
67+
dw vmai ; 59
68+
dw wmai ; 60
69+
dw xmai ; 61
70+
dw ymai ; 62
71+
dw zmai ; 63
72+
dw agudo ; 64
73+
dw grave ; 65
74+
dw agudo_duplo ; 66
75+
dw grave_duplo ; 67
76+
dw til ; 68
77+
dw circunflexo ; 69
78+
dw macron ; 70
79+
dw braquia ; 71
80+
dw braquia_invertida ; 72
81+
dw caron ; 73
82+
dw trema ; 74
83+
dw anel ; 75
84+
dw cedilha ; 76
85+
dw gancho_polaco ; 77
8586

8687
nome:
8788
db .fim - $
2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)