I need to ask…
Why arrays are not generating in output file?
Am i doing something wrong?
Code: Select all
#Bitplanes = 5
#Colors = 32
#Width = 16
#Height = 16
Structure sPitch
PixelLine.b[#Width/8]
EndStructure
Structure sLine
Array PixelLine.sPitch(#Bitplanes-1)
EndStructure
Structure sBODY
tagBODY.l
length.l
Array Line.sLine(#Height-1)
EndStructure
Structure sRGB
R.b
G.b
B.b
EndStructure
Structure sCMAP
tagCMAP.l
length.l
Array RGB.sRGB(#Colors-1)
EndStructure
Structure sBMHD
tagBMHD.l
length.l
Width.w
Height.w
Xorg.w
Yorg.w
Planes.b
Mask.b
Compression.b
Pad.b
Transparency.w
Aspect.w
PageW.w
PageH.w
EndStructure
Structure sIFF
tagFORM.l
length.l
tagILBM.l
BMHD.sBMHD
CMAP.sCMAP
BODY.sBODY
EndStructure
Procedure FillStruc(*Stru.sIFF)
With *Stru
\tagFORM = 'F'+'O'<<8+'R'<<16+'M'<<24
\length = SizeOf(sIFF)-8
\tagILBM = 'I'+'L'<<8+'B'<<16+'M'<<24
\BMHD\tagBMHD = 'B'+'M'<<8+'H'<<16+'D'<<24
\BMHD\length = SizeOf(sBMHD)-8
\CMAP\tagCMAP = 'C'+'M'<<8+'A'<<16+'P'<<24
\CMAP\length = SizeOf(sCMAP)-8
\BODY\tagBODY = 'B'+'O'<<8+'D'<<16+'Y'<<24
\BODY\length = SizeOf(sBODY)-8
EndWith
EndProcedure
test.sIFF
FillStruc(test)
CreateFile(0, "r:\test")
WriteData(0, test, SizeOf(sIFF))