\SCRE 0,0,19\READ /P11/FONT19/081119PW.FON \READ /P11/HUES/P11_TEXT.HUE\CLEAR SCREEN \MOVE ' ' TO #6 \MOVE ' ' TO #7 \MOVE 0 TO #345 ;FRAME COUNTER \MOVE 0 TO #40 ;FIRST COLOR REGISTER \ON KEY F10 JUMP MAINMENU \ON KEY F1 JUMP INTRO \X INTRO \LOC 0,0\WID 320 DOTS\HEIGH 199\OVER 1,A,216 This program lets you convert a picture file from 256 color mode to a lower mode. \" It will ask you what file you want to convert, then display the first frame of the file. \" It will then scan the first image and as you to specify a color for each color it encounters. It can handle about thirty colors. \WAIT RET -1\LOC 0,0 It will save an auxbox under the name of the picture file (NNNNNNNN.AUX) that contains the picture file name and the color selections. \" This auxfile can be modified manually if you like, or just reused. \" After getting all the information it needs it will cycle through the frames and create a new frame for each frame. When it is finished, it will beep. At that point, save the file which is in RAM. It will have deleted the original pictures but NOT changed the picname! \WAIT RET -1\LOC 0,0\OVER 1,A,217 \X MAINMENU \LOC 0,0\WID 320 DOTS CENTERED\OVER 1,A,219\HEIGH 199\CLEAR SCREEN MAIN MENU (PRESS F10 TO GET HERE) \LOC 20,20\WID 280 DOTS\OVER 1,A,218 1) NAME A PICTURE 2) SPECIFY SIZE 3) SET COLORS 4) READ AUX COLOR CHOICE FILE 5) SAVE COLOR CHOICE FILE 6) LET PROGRAM CREATE NEW COLORS 7) END, SO YOU CAN SAVE THE FILE. \CLEAR ON KEYS \CURSOR 22,22\QUEST #2,0 \IF #2>7 OR #2<1\BEEP\JUMP MAINMENU\ENDIF \IF #2<>1\JUMP NOT1\ENDIF \X READ_AGAIN \CLEAR PICS \LOC 0,0\WID 320 DOTS CENTERED\OVER 0,A,229\HEIGH 199 \" Enter the name of the file you wish to read: \" \" \" \LINE 0,30,320,200,0,BF \LENGTH #6 \IF A=2 OR A>12\MOVE 'SAMPLE.PIC' TO #6\JUMP NEWNAME\ELSE \IF A=0\MOVE 'SAMPLE.PIC' TO #6\JUMP NEWNAME\ENDIF \MOVE 2 TO H \X CLEARNAMELOOP \MOVE #6[H,1] TO #4 \IF #4='.' \MOVE #6[1,H-1] TO #6\BUILD #6=#6,'.PIC' \ELSE \IF H2\JUMP NOT2\ENDIF \CLEAR SCREEN \SHOW 0,0,1 \LOC 100,100\WID 100 DOTS\OVER 0,A,225\HEIGH 99 Is this the correct file? (If not, press F10 to go to the main menu.) \LOC 0,180\WID 320 DOTS\HEI 11 \OVER 0,A,228 F2-next frame. F3-previous. \MOVE 1 TO W \ON KEY F2 JUMP NEXTFRAME\ON KEY F3 JUMP LASTFRAME\JUMP SHOWIT \X LASTFRAME\IF W>1\SUBTRACT 1 FROM W\ELSE\MOVE #345 TO W\ENDIF\JUMP SHOWIT \X NEXTFRAME\IF W<#345 \ADD 1 TO W\ELSE\MOVE 1 TO W\ENDIF \X SHOWIT\SHOW 0,0,W \WAIT NOW -1\ON KEY F2\ON KEY F3 \LOC 100,100\WID 100 DOTS\OVER 1,A,222\HEIGH 99 Move the mouse to the upper left corner of the frame and click... \MOUSE\MOVE D TO #11\MOVE E TO #12 \X WAITMOUSE\IF F<>0\JUMP WAITMOUSE\ENDIF \LOC 100,100\WID 100 DOTS\OVER 1,A,220\HEIGH 99 Now move mouse to the lower right corner and click... \MOUSE F=99,0\MOVE D TO #13\MOVE E TO #14\+ \IF D<#11\MOVE #11 TO #13\MOVE D TO #11\ENDIF \IF E<#12\MOVE #12 TO #14\MOVE E TO #12\ENDIF \CLEAR MOUSE\ON KEY F3\ON KEY F2 \JUMP MAINMENU \X NOT2 \IF #2<>4\JUMP NOTROX\ENDIF \X READ_AUXAGAIN \LOC 0,0\WID 320 DOTS CENTERED\OVER 0,A,229\HEIGH 199 \" Enter the name of the color choice file you wish to read: \" \" \" \LINE 0,32,320,200,0,BF \LENGTH #7 \IF A=2\ELIMINATE #7\JUMP NEWROXNAME\ELSE \IF A=0\JUMP NEWROXNAME\ENDIF \MOVE 2 TO H \X CLEAROXNAMELOOP \MOVE #7[H,1] TO #4 \IF #4='.' \MOVE #7[1,H-1] TO #7\BUILD #7=#7,'.AUX' \ELSE \IF H5\JUMP NOT3\ENDIF \X WRITE_AUXAGAIN \LOC 0,0\WID 320 DOTS CENTERED\OVER 0,A,229\HEIGH 199 \" Enter the name of the file you wish to save: \" \" \" \LINE 0,45,320,200,0,BF \LENGTH #7 \IF A=2\ELIMINATE #7\JUMP NEWAUXNAME\ELSE \IF A=0\JUMP NEWAUXNAME\ENDIF \MOVE 2 TO H \X CLEARAUXNAMELOOP \MOVE #17[H,1] TO #4 \IF #4='.' \MOVE #17[1,H-1] TO #17\BUILD #17=#17,'.AUX' \ELSE \IF H3\JUMP NOT4\ENDIF \CLEAR SCREEN\SAVE SCREEN\SHOW 0,0,1 \MOVE 0 TO W\MOVE 40 TO G \X COLORBARS \LINE 300,W*8,305,W*8+8,W,BF \ADD 1 TO W \IF W<16\JUMP COLORBARS\ENDIF \LOC 100,100\WID 100 DOTS\OVER 0,A,227\HEIGH 99 Click on each color. Press F6 to set next color. Press F5 when finished. \LOC 0,180\WID 320 DOTS\HEI 11 \OVER 0,A,228 F2-next frame. F3-previous. \MOVE 1 TO W\MOVE 0 TO #9 \ON KEY F2 JUMP NXTFRM\ON KEY F3 JUMP LSTFRM\JUMP SHWIT \X LSTFRM\IF W>1\SUBTRACT 1 FROM W\ELSE\MOVE #345 TO W\ENDIF\JUMP SHWIT \X NXTFRM\IF W<#345 \ADD 1 TO W\ELSE\MOVE 1 TO W\ENDIF\JUMP SHWIT \X NEXTREDUCEDCOLOR \ADD 1 TO #9\IF #9>15\MOVE 0 TO #9\ENDIF \X SHWIT\SHOW 0,0,W\LINE 300,185,305,199,#9,BF \CURSOR 30,22\DISPLAY #9\CALL SHOWDOTS \X MOUSE_COLORS\ON KEY F5 JUMP COLRDONE \ON KEY F6 JUMP NEXTREDUCEDCOLOR \MOUSE L=X,Y\DOT D,E,?\MOVE A TO #G\MOVE G+30 TO U\MOVE #9 TO #U\+ \BEEP\MOVE D TO X\MOVE E TO Y\DOT X,Y,#9 \LINE 306,(G-40)*4,310,(G-40)*4+4,A,BF \X CLEARMOUSE\IF F<>0\JUMP CLEARMOUSE\ENDIF \ADD 1 TO G \IF G<70\JUMP MOUSE_COLORS\ENDIF \X COLRDONE\ON KEY F5 \MOVE G TO #10 \JUMP MAINMENU \X NOT4 \IF #2<>6\JUMP NOT5\ENDIF \FRAME ? \MOVE A TO W\MOVE 1 TO #8 \X FRAME_LOOP \CLEAR SCREEN \SHOW 0,0,#8 \MOVE #11 TO X\MOVE #12 TO Y \X COLOOP1\DOT X,Y,? \MOVE 40 TO G \X COLOOP2\IF A=#G\MOVE G+30 TO U\MOVE #U TO H \DOT X,Y,H\ELSE\ADD 1 TO G\IF G<#10\JUMP COLOOP2\ENDIF \ADD 1 TO X\IF X<=#13+1\JUMP COLOOP1\ENDIF \ADD 1 TO Y\IF Y<=#14+1\MOVE #11 TO X\JUMP COLOOP1\ENDIF \SHOW 0,0,#8,#8,S \ADD 1 TO #8 \IF #8<=W\JUMP FRAME_LOOP\ENDIF \JUMP MAINMENU \X NOT5 \IF #2<>7\JUMP NOT6\ENDIF \LOC 0,0\WID 320 DOTS\HEIG 199\OVER 0,A,224 Now you should save the file you have created. It has the same number of frames as the original but the colors are changed. Suggestion: Save with a different name! \" Press F10 to return to the main menu. \WAIT RET -1 \END \JUMP MAINMENU \X NOT6 \BEEP \JUMP MAINMENU \X SHOWDOTS \RETURN \END