03-29-2023, 01:58 PM
Alphabet in OpenGL example.
This program create and display standard US characters using Open GL:
Next program (is not OpenGL program, but it is QB64 program) explains how the characters that were displayed in the previous case are stored using binary notation in the DATA block in the previous program (understanding will help to be able to change the characters as you need)
If you rush into editing records in the DATA block, notice the way the bit position in the byte is written, what is shown on the left on the monitor is the first bit, i.e. the eighth from the left after the byte is broken down into bite and if we count from one. Also note that since the DATA block is for open GL, the line positions are read from end to begin, i.e. bottom to top. Ascii table with binary decomposition will come in handy for modification - next program.
This program will print out the hexadecimal and binary form of the values in an ascii table, so that a completely new character can be created by suitable composition.
For example - let's say I want to use a symbol that doesn't appear in the ascii table - I just want to draw a rectangle in the entire cell - that means set all the pixels on the edges to 1. The first one will be written 0xff - that's CHR 255, which is 11111111 in binary - so the entire bottom of the cell will be colored. Now I want to lighten the borders in the cell up to the penultimate row, so I'll choose 0x81, that's CHR 129, which is 10000001 in binary, so the left and right borders will be lit. I put that in there 14 times because the characters are 16 pixels tall. And in the last place, I insert the top line, again 0xff, to light up the entire row:
Do not forget that we read the data from the end, therefore only the last line in the DATA block was modified, therefore the rectangle appears immediately as the first character.
This program create and display standard US characters using Open GL:
Code: (Select All)
' ESC for end
Restore bfont
Block = 96 * 16 '16 records x 95 lines in DATA block, font size is as in Bios 8 x 16 pixels
Dim Shared fontbios(Block) As _Unsigned _Byte
For loadarray = 0 To Block - 1
Read bios$
b$ = "&H" + Right$(bios$, 2)
fontbios(loadarray) = Val(b$)
Next
r = Timer + 10 'time delay to start effect
bfont:
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00: 'DATA (points) in HEX for character CHR$(32) (" ")
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00: ' for character CHR$(33) ("!")
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x66,0x66,0x66,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00
Data 0x00,0x00,0x18,0x18,0x7c,0xc6,0x86,0x06,0x06,0x7c,0xc0,0xc2,0xc6,0x7c,0x18,0x18: 'by owerwriting this block you can create your own national
Data 0x00,0x00,0x00,0x00,0x86,0xc6,0x60,0x30,0x18,0x0c,0xc6,0xc2,0x00,0x00,0x00,0x00: 'character in OpenGL graphic. Its unlimited,it can be Japanese,
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xdc,0x76,0x38,0x6c,0x6c,0x38,0x00,0x00: 'or Chinese or Russian... How to create it demonstrate this
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x30,0x30,0x00: 'demo: http://www.glprogramming.com/red/chapter08.html
Data 0x00,0x00,0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x30,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xd6,0xd6,0xc6,0xc6,0x6c,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc0,0x60,0x30,0x18,0x0c,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0x3c,0x06,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1e,0x0c,0x0c,0x0c,0xfe,0xcc,0x6c,0x3c,0x1c,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0xfc,0xc0,0xc0,0xc0,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xfc,0xc0,0xc0,0x60,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x06,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0x0c,0x06,0x06,0x06,0x7e,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x0c,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc0,0xdc,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3a,0x66,0xc6,0xc6,0xde,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x0e,0x0c,0x7c,0xde,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0x06,0x0c,0x38,0x60,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x5a,0x7e,0x7e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xee,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0x6c,0x7c,0x38,0x38,0x7c,0x6c,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x3c,0x66,0x66,0x66,0x66,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc2,0x60,0x30,0x18,0x0c,0x86,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x02,0x06,0x0e,0x1c,0x38,0x70,0xe0,0xc0,0x80,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10
Data 0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x6c,0x78,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x6c,0x3c,0x0c,0x0c,0x1c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xfe,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0xf0,0x60,0x64,0x6c,0x38,0x00,0x00
Data 0x00,0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x18,0x18,0x00,0x00
Data 0x00,0x3c,0x66,0x66,0x06,0x06,0x06,0x06,0x06,0x06,0x0e,0x00,0x06,0x06,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x6c,0x78,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfe,0xec,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x1e,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x66,0x76,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x0c,0x38,0x60,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1c,0x36,0x30,0x30,0x30,0x30,0xfc,0x30,0x30,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x3c,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf8,0x0c,0x06,0x7e,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0xcc,0xfe,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x0e,0x18,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x0e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x70,0x18,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x70,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00,0x00,0x00
_FullScreen
Do While InKey$ <> Chr$(27)
_Limit 25
Loop
Sub _GL Static
Shared r, rr
_glClearColor 0.0F, 0.0F, 0.0F, 0.0F 'backround color
_glPixelStorei _GL_UNPACK_ALIGNMENT, 1
_glViewport 0, 0, _DesktopWidth, _DesktopHeight
_glMatrixMode _GL_PROJECTION
_glLoadIdentity
_glOrtho 0, _DesktopWidth, 0, _DesktopHeight, -1, 1 'coordinates maping (translate from -1....1 to 0....._DESKTOP....)
onDisplay
If Timer > r Then rr = rr + .1
End Sub
Sub drawString (red As _Float, green As _Float, blue As _Float, x As Integer, y As Integer, char As String)
Shared rr
_glColor3f red, green, blue ' set color for string.
_glRasterPos2i x, y ' set coordinates position for first character in string
For v = 1 To Len(char$) ' I read every character from string as one character and searching record with number as is ASC this character
cha$ = Left$(Mid$(char$, v), 1)
If Asc(cha$) >= 32 And Asc(cha$) <= 128 Then ' if ASC this character > 32 (DATA contains US characters ASC from 32 to 128)
For search = LBound(fontbios) To UBound(fontbios) Step 16 ' Every record contains info about 16 points for character, start for it is every 16 step
If Asc(cha$) - 32 = search / 16 Then ' in array is 16 record for every character. Its record for every point.
_glBitmap 8, 16, rr + 0.0F, 0.0 - rr, 9.0 - rr, rr + 0.0F, _Offset(fontbios(search)) 'erase rr or comment line 128 to delete effect in the end.
End If
Next search
End If
Next v
End Sub
Sub onDisplay
_glClear _GL_COLOR_BUFFER_BIT '
drawString 1.0F, 0.0F, 0.1F, 10, 10, "abcdefghijklmnopqrstuvwxyz"
drawString 0.7F, 0.0F, 0.4F, 10, 26, "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
drawString 0.4F, 0.0F, 0.7F, 10, 42, "0123456789-=`~_+,./?;':|\\"
drawString 0.1F, 0.0F, 1.0F, 10, 58, "!@#$%^&*()[]{}<>"
drawString 1.0F, 1.0F, 1.0F, 100, 100, "hello world"
drawString 1.0F, 0.3F, .34F, _DesktopWidth / 2 - (11 * 8), _DesktopHeight / 2 - 4, "For Q64 community Petr"
_glFlush
End Sub
Next program (is not OpenGL program, but it is QB64 program) explains how the characters that were displayed in the previous case are stored using binary notation in the DATA block in the previous program (understanding will help to be able to change the characters as you need)
Code: (Select All)
'about gluBITMAP without openGL (how it works)
ReDim x, y, cx, cy
array = 96 * 16 ' bytes in DATA, total DATA size
arraysize = array / 2 ' is readed by two bytes, we needed only half lopp and because in OpneGl is begin in left downer corner, is next FOR NEXT loop writed as you see
Type GLB
od As String * 8
do As String * 8
End Type
Dim Shared GLB(arraysize) As GLB
Screen _NewImage(1024, 768, 256)
For pole = 0 To arraysize - 1
Read hodnotaOD$, hodnotaDO$
valueOD = Val("&H" + Right$(hodnotaOD$, 2))
valueDO = Val("&H" + Right$(hodnotaDO$, 2))
GLB(pole).od = DECtoBIN$(valueOD): GLB(pole).do = DECtoBIN$(valueDO) 'this convert values from DATA block to QB64 usable form - from 0x00 to 00 - then DecToBin convert byte 0 to bites
Next pole ' GLB(pole).od contains odd rows, GLB(pole).do contains even rows, both saved as string
_FullScreen
Print "Text output: (it show you, how are chacters created in binary form. Press any key)" '
Sleep
For pole = arraysize To 0 Step -1 '
A$ = GLB(pole).do: B$ = GLB(pole).od '
For poda = 1 To 8 '
At$ = Left$(Mid$(A$, poda), 1)
Bt$ = Left$(Mid$(B$, poda), 1) '
' Two block FOR: First create upper image for character (1x8 pixels) [odd row]
If At$ = "1" Then Color 5: Print At$; Else Color 7: Print At$; ' Second crete downer image for character (1x8 pixels) [even row]
Color 9 ' characters image format in DATA is font width = 8 pixels, font height = 16 pixels.
Next poda
Print
For pod = 1 To 8
Bt$ = Left$(Mid$(B$, pod), 1)
If Bt$ = "1" Then Color 5: Print Bt$; Else Color 7: Print Bt$;
Color 9
Next pod
_Delay .05
Print
If pole Mod 8 = 0 Then
Print "--------": Locate , 1
Print "Press key...": Sleep
Print
End If
Next pole
Print
Print "Press key..."
Sleep
t:
Cls
Color 7
Print "Graphic output:"
y = 50
x = 50
For pole = arraysize To 0 Step -1
For pod = 1 To 8
A$ = Left$(Mid$(GLB(pole).do, pod), 1)
x = x + 1
If A$ = "1" Then PSet (x + cx, y + cy)
'x = x + 1
Next pod
y = y + 1
x = 0
For pod = 1 To 8
A$ = Left$(Mid$(GLB(pole).od, pod), 1)
x = x + 1
If A$ = "1" Then PSet (x + cx, y + cy)
'x = x + 1
Next pod
x = 0
y = y + 1
If pole Mod 8 = 0 Then cx = cx + 12: cy = cy - 16
If cx > _Width - 20 Then cx = 0: cy = cy + 16
Next pole
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00: 'DATA (points) in HEX for character CHR$(32) (" ")
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00: ' for character CHR$(33) ("!")
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x66,0x66,0x66,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00
Data 0x00,0x00,0x18,0x18,0x7c,0xc6,0x86,0x06,0x06,0x7c,0xc0,0xc2,0xc6,0x7c,0x18,0x18: 'by owerwriting this block you can create your own national
Data 0x00,0x00,0x00,0x00,0x86,0xc6,0x60,0x30,0x18,0x0c,0xc6,0xc2,0x00,0x00,0x00,0x00: 'character in OpenGL graphic. Its unlimited,it can be Japanese,
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xdc,0x76,0x38,0x6c,0x6c,0x38,0x00,0x00: 'or Chinese or Russian... How to create it demonstrate this
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x30,0x30,0x00: 'demo: http://www.glprogramming.com/red/chapter08.html
Data 0x00,0x00,0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x30,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xd6,0xd6,0xc6,0xc6,0x6c,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc0,0x60,0x30,0x18,0x0c,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0x3c,0x06,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1e,0x0c,0x0c,0x0c,0xfe,0xcc,0x6c,0x3c,0x1c,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0xfc,0xc0,0xc0,0xc0,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xfc,0xc0,0xc0,0x60,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x06,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0x0c,0x06,0x06,0x06,0x7e,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x0c,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc0,0xdc,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3a,0x66,0xc6,0xc6,0xde,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x0e,0x0c,0x7c,0xde,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0x06,0x0c,0x38,0x60,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x5a,0x7e,0x7e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xee,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0x6c,0x7c,0x38,0x38,0x7c,0x6c,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x3c,0x66,0x66,0x66,0x66,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc2,0x60,0x30,0x18,0x0c,0x86,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x02,0x06,0x0e,0x1c,0x38,0x70,0xe0,0xc0,0x80,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10
Data 0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x6c,0x78,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x6c,0x3c,0x0c,0x0c,0x1c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xfe,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0xf0,0x60,0x64,0x6c,0x38,0x00,0x00
Data 0x00,0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x18,0x18,0x00,0x00
Data 0x00,0x3c,0x66,0x66,0x06,0x06,0x06,0x06,0x06,0x06,0x0e,0x00,0x06,0x06,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x6c,0x78,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfe,0xec,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x1e,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x66,0x76,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x0c,0x38,0x60,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1c,0x36,0x30,0x30,0x30,0x30,0xfc,0x30,0x30,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x3c,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf8,0x0c,0x06,0x7e,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0xcc,0xfe,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x0e,0x18,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x0e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x70,0x18,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x70,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00,0x00,0x00
Function DECtoBIN$ (vstup) 'DEC to BIN ok vystup je string, vstup je integer decimal to binary number convertor - FROM QB64WIKI
Shared BINARY$
' BINARY$ = ""
For rj = 7 To 0 Step -1
If vstup And 2 ^ rj Then BINtoDE$ = BINtoDE$ + "1" Else BINtoDE$ = BINtoDE$ + "0"
Next rj
DECtoBIN$ = BINtoDE$
End Function
If you rush into editing records in the DATA block, notice the way the bit position in the byte is written, what is shown on the left on the monitor is the first bit, i.e. the eighth from the left after the byte is broken down into bite and if we count from one. Also note that since the DATA block is for open GL, the line positions are read from end to begin, i.e. bottom to top. Ascii table with binary decomposition will come in handy for modification - next program.
Code: (Select All)
Screen _NewImage(1980, 1050, 32)
X = 1
Y = 1
_ControlChr Off
For A = 0 To 255
Locate Y + 0, X: Print "----------------"
Locate Y + 1, X: Print "ASC:"; Str$(A); " CHR$:"; Chr$(A)
Locate Y + 2, X: Print "HEX$:"; Hex$(A); " OCT$:"; Oct$(A)
Locate Y + 3, X: Print "Binary: "; DECtoBIN$(A)
Locate Y + 4, X: Print "----------------"
Y = Y + 5
If Y = 61 Then
Y = 1
X = X + 18
End If
If A = 155 Then
Print "Press key..."
Sleep
Cls
X = 1
End If
Next
Function DECtoBIN$ (vstup) 'DEC to BIN ok vystup je string, vstup je integer decimal to binary number convertor - FROM QB64WIKI
Shared BINARY$
' BINARY$ = ""
For rj = 7 To 0 Step -1
If vstup And 2 ^ rj Then BINtoDE$ = BINtoDE$ + "1" Else BINtoDE$ = BINtoDE$ + "0"
Next rj
DECtoBIN$ = BINtoDE$
End Function
This program will print out the hexadecimal and binary form of the values in an ascii table, so that a completely new character can be created by suitable composition.
For example - let's say I want to use a symbol that doesn't appear in the ascii table - I just want to draw a rectangle in the entire cell - that means set all the pixels on the edges to 1. The first one will be written 0xff - that's CHR 255, which is 11111111 in binary - so the entire bottom of the cell will be colored. Now I want to lighten the borders in the cell up to the penultimate row, so I'll choose 0x81, that's CHR 129, which is 10000001 in binary, so the left and right borders will be lit. I put that in there 14 times because the characters are 16 pixels tall. And in the last place, I insert the top line, again 0xff, to light up the entire row:
Code: (Select All)
'about gluBITMAP without openGL (how it works)
ReDim x, y, cx, cy
array = 96 * 16 ' bytes in DATA, total DATA size
arraysize = array / 2 ' is readed by two bytes, we needed only half lopp and because in OpneGl is begin in left downer corner, is next FOR NEXT loop writed as you see
Type GLB
od As String * 8
do As String * 8
End Type
Dim Shared GLB(arraysize) As GLB
Screen _NewImage(1024, 768, 256)
For pole = 0 To arraysize - 1
Read hodnotaOD$, hodnotaDO$
valueOD = Val("&H" + Right$(hodnotaOD$, 2))
valueDO = Val("&H" + Right$(hodnotaDO$, 2))
GLB(pole).od = DECtoBIN$(valueOD): GLB(pole).do = DECtoBIN$(valueDO) 'this convert values from DATA block to QB64 usable form - from 0x00 to 00 - then DecToBin convert byte 0 to bites
Next pole ' GLB(pole).od contains odd rows, GLB(pole).do contains even rows, both saved as string
_FullScreen
Print "Text output: (it show you, how are chacters created in binary form. Press any key)" '
Sleep
For pole = arraysize To 0 Step -1 '
A$ = GLB(pole).do: B$ = GLB(pole).od '
For poda = 1 To 8 '
At$ = Left$(Mid$(A$, poda), 1)
Bt$ = Left$(Mid$(B$, poda), 1) '
' Two block FOR: First create upper image for character (1x8 pixels) [odd row]
If At$ = "1" Then Color 5: Print At$; Else Color 7: Print At$; ' Second crete downer image for character (1x8 pixels) [even row]
Color 9 ' characters image format in DATA is font width = 8 pixels, font height = 16 pixels.
Next poda
Print
For pod = 1 To 8
Bt$ = Left$(Mid$(B$, pod), 1)
If Bt$ = "1" Then Color 5: Print Bt$; Else Color 7: Print Bt$;
Color 9
Next pod
_Delay .05
Print
If pole Mod 8 = 0 Then
Print "--------"
Print "Press key...": Sleep
Print
End If
Next pole
Print
Print "Press key..."
Sleep
t:
Cls
Color 7
Print "Graphic output:"
y = 50
x = 50
For pole = arraysize To 0 Step -1
For pod = 1 To 8
A$ = Left$(Mid$(GLB(pole).do, pod), 1)
x = x + 1
If A$ = "1" Then PSet (x + cx, y + cy)
'x = x + 1
Next pod
y = y + 1
x = 0
For pod = 1 To 8
A$ = Left$(Mid$(GLB(pole).od, pod), 1)
x = x + 1
If A$ = "1" Then PSet (x + cx, y + cy)
'x = x + 1
Next pod
x = 0
y = y + 1
If pole Mod 8 = 0 Then cx = cx + 12: cy = cy - 16
If cx > _Width - 20 Then cx = 0: cy = cy + 16
Next pole
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00: 'DATA (points) in HEX for character CHR$(32) (" ")
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x3c,0x3c,0x3c,0x18,0x00,0x00: ' for character CHR$(33) ("!")
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x24,0x66,0x66,0x66,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0x6c,0xfe,0x6c,0x6c,0x6c,0xfe,0x6c,0x6c,0x00,0x00,0x00
Data 0x00,0x00,0x18,0x18,0x7c,0xc6,0x86,0x06,0x06,0x7c,0xc0,0xc2,0xc6,0x7c,0x18,0x18: 'by owerwriting this block you can create your own national
Data 0x00,0x00,0x00,0x00,0x86,0xc6,0x60,0x30,0x18,0x0c,0xc6,0xc2,0x00,0x00,0x00,0x00: 'character in OpenGL graphic. Its unlimited,it can be Japanese,
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xdc,0x76,0x38,0x6c,0x6c,0x38,0x00,0x00: 'or Chinese or Russian... How to create it demonstrate this
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x30,0x30,0x30,0x00: 'demo: http://www.glprogramming.com/red/chapter08.html
Data 0x00,0x00,0x00,0x00,0x0c,0x18,0x30,0x30,0x30,0x30,0x30,0x30,0x18,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x18,0x30,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x3c,0xff,0x3c,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x7e,0x18,0x18,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x30,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x80,0xc0,0x60,0x30,0x18,0x0c,0x06,0x02,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x38,0x6c,0xc6,0xc6,0xd6,0xd6,0xc6,0xc6,0x6c,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7e,0x18,0x18,0x18,0x18,0x18,0x18,0x78,0x38,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc0,0x60,0x30,0x18,0x0c,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0x3c,0x06,0x06,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1e,0x0c,0x0c,0x0c,0xfe,0xcc,0x6c,0x3c,0x1c,0x0c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x06,0x06,0x06,0xfc,0xc0,0xc0,0xc0,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xfc,0xc0,0xc0,0x60,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x18,0x0c,0x06,0x06,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0x7c,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0x0c,0x06,0x06,0x06,0x7e,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x30,0x18,0x18,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x06,0x0c,0x18,0x30,0x60,0x30,0x18,0x0c,0x06,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x00,0x00,0x7e,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x60,0x30,0x18,0x0c,0x06,0x0c,0x18,0x30,0x60,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x0c,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc0,0xdc,0xde,0xde,0xde,0xc6,0xc6,0x7c,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfc,0x66,0x66,0x66,0x66,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x66,0xc2,0xc0,0xc0,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf8,0x6c,0x66,0x66,0x66,0x66,0x66,0x66,0x6c,0xf8,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x68,0x78,0x68,0x62,0x66,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3a,0x66,0xc6,0xc6,0xde,0xc0,0xc0,0xc2,0x66,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xfe,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x78,0xcc,0xcc,0xcc,0x0c,0x0c,0x0c,0x0c,0x0c,0x1e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x6c,0x78,0x78,0x6c,0x66,0x66,0xe6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0x66,0x62,0x60,0x60,0x60,0x60,0x60,0x60,0xf0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xc6,0xd6,0xfe,0xfe,0xee,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0xc6,0xc6,0xce,0xde,0xfe,0xf6,0xe6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x0e,0x0c,0x7c,0xde,0xd6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x6c,0x7c,0x66,0x66,0x66,0xfc,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0x06,0x0c,0x38,0x60,0xc6,0xc6,0x7c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x5a,0x7e,0x7e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x10,0x38,0x6c,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xee,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xc6,0x6c,0x7c,0x38,0x38,0x7c,0x6c,0xc6,0xc6,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x3c,0x66,0x66,0x66,0x66,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0xc2,0x60,0x30,0x18,0x0c,0x86,0xc6,0xfe,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x02,0x06,0x0e,0x1c,0x38,0x70,0xe0,0xc0,0x80,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x0c,0x3c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x10
Data 0x00,0x00,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x30
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0x7c,0x0c,0x78,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0x66,0x66,0x66,0x66,0x6c,0x78,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xc0,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0x6c,0x3c,0x0c,0x0c,0x1c,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc0,0xc0,0xfe,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x60,0xf0,0x60,0x64,0x6c,0x38,0x00,0x00
Data 0x00,0x78,0xcc,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x66,0x66,0x66,0x76,0x6c,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x18,0x18,0x00,0x00
Data 0x00,0x3c,0x66,0x66,0x06,0x06,0x06,0x06,0x06,0x06,0x0e,0x00,0x06,0x06,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xe6,0x66,0x6c,0x78,0x78,0x6c,0x66,0x60,0x60,0xe0,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x3c,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0xd6,0xd6,0xd6,0xd6,0xfe,0xec,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0xc6,0xc6,0xc6,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf0,0x60,0x60,0x7c,0x66,0x66,0x66,0x66,0x66,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x1e,0x0c,0x0c,0x7c,0xcc,0xcc,0xcc,0xcc,0xcc,0x76,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xf0,0x60,0x60,0x60,0x66,0x76,0xdc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x7c,0xc6,0x0c,0x38,0x60,0xc6,0x7c,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x1c,0x36,0x30,0x30,0x30,0x30,0xfc,0x30,0x30,0x10,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x76,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x3c,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x6c,0xfe,0xd6,0xd6,0xd6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xc6,0x6c,0x38,0x38,0x38,0x6c,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0xf8,0x0c,0x06,0x7e,0xc6,0xc6,0xc6,0xc6,0xc6,0xc6,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0xfe,0xc6,0x60,0x30,0x18,0xcc,0xfe,0x00,0x00,0x00,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x0e,0x18,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x0e,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x70,0x18,0x18,0x18,0x18,0x0e,0x18,0x18,0x18,0x70,0x00,0x00
Data 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x76,0x00,0x00
'Data 0x00,0x00,0x00,0x00,0x00,0xfe,0xc6,0xc6,0xc6,0x6c,0x38,0x10,0x00,0x00,0x00,0x00
Data 0xff,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xff
Function DECtoBIN$ (vstup) 'DEC to BIN ok vystup je string, vstup je integer decimal to binary number convertor - FROM QB64WIKI
Shared BINARY$
' BINARY$ = ""
For rj = 7 To 0 Step -1
If vstup And 2 ^ rj Then BINtoDE$ = BINtoDE$ + "1" Else BINtoDE$ = BINtoDE$ + "0"
Next rj
DECtoBIN$ = BINtoDE$
End Function
Do not forget that we read the data from the end, therefore only the last line in the DATA block was modified, therefore the rectangle appears immediately as the first character.