mirror of
https://github.com/peterdell/wudsn-ide.git
synced 2024-12-30 15:32:03 +00:00
63 lines
3.7 KiB
Plaintext
63 lines
3.7 KiB
Plaintext
#WUDSN IDE Converter Parameters
|
|
#Wed Jul 18 23:07:54 CEST 2018
|
|
converterDirection=IMAGE_TO_FILES
|
|
filesConverterParameters.converterId=com.wudsn.ide.gfx.converter.apple2.HiresGraphicsConverter
|
|
filesConverterParameters.imageAspect.factorX=1
|
|
filesConverterParameters.imageAspect.factorY=1
|
|
filesConverterParameters.displayAspect.factorX=1
|
|
filesConverterParameters.displayAspect.factorY=1
|
|
filesConverterParameters.displayShrinkToFit=false
|
|
filesConverterParameters.displayZoomToFit=true
|
|
filesConverterParameters.sourceFiles=1
|
|
filesConverterParameters.sourceFiles.0.path=
|
|
filesConverterParameters.sourceFiles.0.offset=0
|
|
filesConverterParameters.imageFilePath=
|
|
filesConverterParameters.columns=40
|
|
filesConverterParameters.rows=24
|
|
filesConverterParameters.spacingColor.red=0
|
|
filesConverterParameters.spacingColor.green=0
|
|
filesConverterParameters.spacingColor.blue=128
|
|
filesConverterParameters.spacingWidth=0
|
|
filesConverterParameters.palette=HIRES_1
|
|
filesConverterParameters.paletteType=ATARI_DEFAULT
|
|
filesConverterParameters.paletteRGBs=6
|
|
filesConverterParameters.paletteRGBs.0.red=0
|
|
filesConverterParameters.paletteRGBs.0.green=0
|
|
filesConverterParameters.paletteRGBs.0.blue=0
|
|
filesConverterParameters.paletteRGBs.1.red=51
|
|
filesConverterParameters.paletteRGBs.1.green=51
|
|
filesConverterParameters.paletteRGBs.1.blue=51
|
|
filesConverterParameters.paletteRGBs.2.red=102
|
|
filesConverterParameters.paletteRGBs.2.green=102
|
|
filesConverterParameters.paletteRGBs.2.blue=102
|
|
filesConverterParameters.paletteRGBs.3.red=153
|
|
filesConverterParameters.paletteRGBs.3.green=153
|
|
filesConverterParameters.paletteRGBs.3.blue=153
|
|
filesConverterParameters.paletteRGBs.4.red=204
|
|
filesConverterParameters.paletteRGBs.4.green=204
|
|
filesConverterParameters.paletteRGBs.4.blue=204
|
|
filesConverterParameters.paletteRGBs.5.red=255
|
|
filesConverterParameters.paletteRGBs.5.green=255
|
|
filesConverterParameters.paletteRGBs.5.blue=255
|
|
imageConverterParameters.converterId=com.wudsn.ide.gfx.converter.apple2.HiresGraphicsConverter
|
|
imageConverterParameters.imageAspect.factorX=1
|
|
imageConverterParameters.imageAspect.factorY=1
|
|
imageConverterParameters.displayAspect.factorX=1
|
|
imageConverterParameters.displayAspect.factorY=1
|
|
imageConverterParameters.displayShrinkToFit=false
|
|
imageConverterParameters.displayZoomToFit=true
|
|
imageConverterParameters.imageFilePath=Image-280x192.png
|
|
imageConverterParameters.targetFiles=10
|
|
imageConverterParameters.targetFiles.0.path=Image-280x192.hgr
|
|
imageConverterParameters.targetFiles.1.path=
|
|
imageConverterParameters.targetFiles.2.path=
|
|
imageConverterParameters.targetFiles.3.path=
|
|
imageConverterParameters.targetFiles.4.path=
|
|
imageConverterParameters.targetFiles.5.path=
|
|
imageConverterParameters.targetFiles.6.path=
|
|
imageConverterParameters.targetFiles.7.path=
|
|
imageConverterParameters.targetFiles.8.path=
|
|
imageConverterParameters.targetFiles.9.path=
|
|
imageConverterParameters.useDefaultScript=false
|
|
imageConverterParameters.script=function convertToFileData(data) {\r\n\tvar bytes \= [];\r\n\tvar offset \= 0;\r\n\tvar page \= 0;\r\n\tvar block \= 0;\r\n\tvar leaf \= 0;\r\n\t\r\n\tif ( data.getImageDataWidth() \!\=288\r\n\t || data.getImageDataHeight()\!\=192 ){\r\n//\t return;\r\n\t}\r\n\t\r\n\tfor (var y \= 0; y < data.getImageDataHeight(); y++) {\r\n\t\tpage \= y & 0x7;\r\n\t\tblock \= ((y >> 3) & 0x7);\r\n\t\tleaf \= y >> 6; \r\n\t\toffset \= (page*1024) + (block*128) + (leaf*40);\r\n\r\n\t\tfor (var x \= 0; x < data.getImageDataWidth(); x \= x + 7) {\r\n\t\t\tvar b \= 0;\r\n\t\t\tfor (var i \= 0; i < 7; i++) {\r\n\t\t\t\tvar color;\r\n\t\t\t\tcolor \= data.getPixel(x + i, y);\r\n\t\t\t\tif (color \!\= 0) {\r\n\t\t\t\t\tb \= b | 1 << i;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tbytes[offset++] \= b;\r\n\t\t}\r\n\t}\r\n\tdata.setTargetFileObject(0, bytes);\r\n}
|