Rev 180 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 180 | Rev 474 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | error 'font: not monochrome bitmap' |
20 | error 'font: not monochrome bitmap' |
21 | end if |
21 | end if |
22 | end virtual |
22 | end virtual |
Line 23... | Line 23... | ||
23 | 23 | ||
- | 24 | font: |
|
- | 25 | macro set_name_test a,b |
|
- | 26 | { |
|
- | 27 | if %=a |
|
- | 28 | font_data_#a = b |
|
- | 29 | end if |
|
- | 30 | } |
|
- | 31 | macro set_name b |
|
- | 32 | { |
|
- | 33 | set_name_test 1,b |
|
- | 34 | set_name_test 2,b |
|
- | 35 | set_name_test 3,b |
|
- | 36 | set_name_test 4,b |
|
- | 37 | set_name_test 5,b |
|
- | 38 | set_name_test 6,b |
|
- | 39 | set_name_test 7,b |
|
- | 40 | set_name_test 8,b |
|
- | 41 | set_name_test 9,b |
|
- | 42 | set_name_test 10,b |
|
- | 43 | set_name_test 11,b |
|
- | 44 | set_name_test 12,b |
|
- | 45 | set_name_test 13,b |
|
- | 46 | set_name_test 14,b |
|
- | 47 | set_name_test 15,b |
|
- | 48 | set_name_test 16,b |
|
- | 49 | } |
|
- | 50 | macro db_name_test a |
|
- | 51 | { |
|
- | 52 | if %=a |
|
- | 53 | db font_data_#a |
|
- | 54 | end if |
|
- | 55 | } |
|
- | 56 | macro db_name |
|
- | 57 | { |
|
- | 58 | db_name_test 1 |
|
- | 59 | db_name_test 2 |
|
- | 60 | db_name_test 3 |
|
- | 61 | db_name_test 4 |
|
- | 62 | db_name_test 5 |
|
- | 63 | db_name_test 6 |
|
- | 64 | db_name_test 7 |
|
- | 65 | db_name_test 8 |
|
- | 66 | db_name_test 9 |
|
- | 67 | db_name_test 10 |
|
- | 68 | db_name_test 11 |
|
- | 69 | db_name_test 12 |
|
- | 70 | db_name_test 13 |
|
- | 71 | db_name_test 14 |
|
- | 72 | db_name_test 15 |
|
- | 73 | db_name_test 16 |
|
- | 74 | } |
|
- | 75 | macro dw_name_test a |
|
- | 76 | { |
|
- | 77 | if %=a |
|
- | 78 | dw font_data_#a |
|
- | 79 | end if |
|
- | 80 | } |
|
- | 81 | macro dw_name |
|
- | 82 | { |
|
- | 83 | dw_name_test 1 |
|
- | 84 | dw_name_test 2 |
|
- | 85 | dw_name_test 3 |
|
- | 86 | dw_name_test 4 |
|
- | 87 | dw_name_test 5 |
|
- | 88 | dw_name_test 6 |
|
- | 89 | dw_name_test 7 |
|
- | 90 | dw_name_test 8 |
|
- | 91 | dw_name_test 9 |
|
- | 92 | dw_name_test 10 |
|
- | 93 | dw_name_test 11 |
|
- | 94 | dw_name_test 12 |
|
- | 95 | dw_name_test 13 |
|
- | 96 | dw_name_test 14 |
|
- | 97 | dw_name_test 15 |
|
- | 98 | dw_name_test 16 |
|
24 | font: |
99 | } |
25 | repeat font_height |
100 | repeat font_height |
26 | cur_scan = % |
101 | cur_scan = % |
27 | repeat 256 |
102 | repeat 16 |
28 | virtual at 0 |
- | |
29 | a2 = (font_width+14) shr 3 |
- | |
30 | if cur_scan=1 & %=0x10 |
- | |
31 | a2 = (font_width+7) shr 3 |
- | |
32 | end if |
103 | virtual at 0 |
33 | file fontname:3Eh + font_bmp_scanline*(font_height*(16-((%-1) shr 4))-cur_scan) + ((((%-1) and 0xF)*font_width) shr 3), a2 |
104 | file fontname:3Eh + font_bmp_scanline*(font_height*(17-%)-cur_scan), font_width*2 |
34 | dd 0 |
105 | dd 0 |
- | 106 | repeat 16 |
|
35 | load a1 dword from 0 |
107 | load a1 dword from ((%-1)*font_width) shr 3 |
36 | a1 = ((a1 and 0x55555555) shl 1) or ((a1 and 0xAAAAAAAA) shr 1) |
108 | a1 = ((a1 and 0x55555555) shl 1) or ((a1 and 0xAAAAAAAA) shr 1) |
37 | a1 = ((a1 and 0x33333333) shl 2) or ((a1 and 0xCCCCCCCC) shr 2) |
109 | a1 = ((a1 and 0x33333333) shl 2) or ((a1 and 0xCCCCCCCC) shr 2) |
38 | a1 = ((a1 and 0x0F0F0F0F) shl 4) or ((a1 and 0xF0F0F0F0) shr 4) |
- | |
39 | end virtual |
110 | a1 = ((a1 and 0x0F0F0F0F) shl 4) or ((a1 and 0xF0F0F0F0) shr 4) |
40 | a1 = (a1 shr (((%-1)*font_width) and 7)) and ((1 shl font_width) - 1) |
111 | a1 = (a1 shr (((%-1)*font_width) and 7)) and ((1 shl font_width) - 1) |
- | 112 | a1 = a1 xor ((1 shl font_width) - 1) |
|
- | 113 | set_name a1 |
|
- | 114 | end repeat |
|
41 | a1 = a1 xor ((1 shl font_width) - 1) |
115 | end virtual |
- | 116 | if font_width > 8 |
|
- | 117 | repeat 16 |
|
42 | if font_width > 8 |
118 | dw_name |
43 | dw a1 |
119 | end repeat |
- | 120 | else |
|
- | 121 | repeat 16 |
|
44 | else |
122 | db_name |
45 | db a1 |
123 | end repeat |
46 | end if |
124 | end if |
47 | end repeat |
125 | end repeat |
- | 126 | end repeat |
|
- | 127 | purge set_name_test |
|
- | 128 | purge db_name_test |
|
- | 129 | purge dw_name_test |
|
- | 130 | purge set_name |
|
- | 131 | purge db_name |