
too many glithc... but not a editor

so, it have image in array:
Code: Select all
Enumeration
#File
EndEnumeration
Structure colorarraystr
Array Y.u(0)
EndStructure
markx = 16
marky = 16
Global Dim X.colorarraystr(markx)
For i = 0 To markx
ReDim X(i)\Y(marky)
Next
; write data
X(0)\Y(0) = 1
X(10)\Y(0) = 1
X(0)\Y(10) = 1
If CreateFile(#File, "D:\test")
x = 0
y = 0
xlim = 8
Repeat
; make variable for write
first = X(x)\Y(y)
x = x + 1
second = X(x)\Y(y)
x = x + 1
Number = first << 4
Number + second
WriteAsciiCharacter(#File, Number)
; catch end of file
If x = markx And y = marky-1
Break
EndIf
; write file from up to down blocks 8х8
If x = xlim
x = xlim - 8
y = y + 1
If y = marky
y = 0
x = xlim
xlim = xlim + 8
EndIf
EndIf
ForEver
CloseFile(#File)
EndIf

for this 3 cases it will be 96 bytes file, 96 bytes, 64 bytes. becouse Sega Mega Drive have a small quantity of tyles. every image must be optimized.