Author |
Topic: Magnified editor with code generator (white scale) (Read 488 times) |
|
michael
New Member
member is offline
Posts: 28
|
|
Magnified editor with code generator (white scale)
« Thread started on: Feb 27th, 2016, 9:58pm » |
|
KEEP IN MIND .. A code image will NEVER be any bigger than what you will see in any generated program NO MATTER HOW COMPLEX the image is. And THAT IS GOOD.
This program should have all the information built in for you to understand how it works.
( Actual image size is 45 x 45 - Larger area is 460 x 460-magnified assist)
Please read the instructions carefully
1) Basically, you have a WHITE color depth of 0-255
2) You can change the color of your part ( say you don't like white) with modifications to your R G B numbers in the GENERATED FILE as long as you set upper and lower limits
3) keeping to one color allows this to remain manageable for code size. (1 color per pixel) reduces code size considerably)
4) This program allows you to make BMP with Mask of your work
5) This program allows you to just save the BMP image
6) This program will allow you to GENERATE a fully functional program with your image to share as code or to implement into your project with just code
7) Hold the LEFT OR RIGHT MOUSE BUTTON DOWN AND MOVE around drawing area to modify your color depth (makes ultra fast color management)
(next improvement: I will add the ability to reverse mirror your draws so your work takes less effort )
**** I made a space ship on the next post.. Let me know if there is any problems . ***** Code: dim info$(10,10)
dim li(45,45)
dim fileline$(45)
global corr
global updown$
global lx
global ly
global mousx
global mousy
global r
global g
global b
r=0
g=0
b=0
call screen 800,600' Generic screen with graphics box to fit ( I may redesign)
'*******************************place graphics bellow here use #h.1 for draw device
updown$="down"
mousx=22
mousy=22
lx=mousx*10
ly=mousy*10
plx=lx:ply=ly
#h.2 "place ";lx;" ";ly;";down;color green;size 1;circle 6"
[refresh]
#h.1 "size 20;color ";r;" ";g;" ";b;";set ";130;" ";80
#h.1 "size 1;place 100 10;down;backcolor black;color white;\ location ";mousx;" ";mousy;" RGB ";r;" ";g;" ";b;" Press ( w s a d ) to move draw *****"
#h.1 "color green;backcolor black;place 100 30;down;\ pen is ";updown$;"**Press 1-UP 2-DOWN** ( P-save L-load C-Compile M-MaskBmp N-SaveBmp)"
#h.1 "color red;backcolor black;place 100 45;down;\ Any color bellow 30 is white part of mask. Make sure you save your project often"
#h.1 "color green;place 100 60;\ Mouse-- Left+down+movement=more white Right+down+movement=less white"
#h.1 "place 140 75;color yellow;\ SaveBmp- A BMP.bmp (rename your files after you are done immediately so you dont overwrite)"
#h.1 "color pink;place 140 90;\ Mask- A NEW MASK.bmp * Save/Load File- A Notbasic.bas * Compile file- A Basicdatafile.bas"
#h.1 "color blue;line 46 0 46 46;line 0 46 46 46"
#h.1 "when rightButtonMove lesscolor"
#h.1 "when leftButtonMove morecolor"
#h.2 "when rightButtonMove lesscolor"
#h.2 "when leftButtonMove morecolor"
#h.2 "setfocus;place 10 20"
#h.2 "when characterInput [inp]"
#h.1 "setfocus;place 10 20"
#h.1 "when characterInput [inp]"
[back]
'^^^^^^^^^^^^^^^^^^^^^^Put graphics and game stuff above^^^^^^^^^^^^^^^^
wait
[quit]
close #h
end
[savebmp]
print #h.1, "flush"
print #h.1, "getbmp ABMP 0 0 45 45"
bmpsave "ABMP", "A Bmp.bmp"
goto [back]
[mask]
#h.2 "backcolor black;fill black;cls"
bottom=0
poz=0' temporary variable for increment for array
while bottom< 46
r=li(poz,bottom)
g=li(poz,bottom)
b=li(poz,bottom)
if r<30 then #h.2 "color white;set ";poz;" ";bottom
if r>29 then #h.2 "color black;set ";poz;" ";bottom
#h.2 "color ";r;" ";g;" ";b;";set ";poz;" ";bottom+46
poz=poz+1
if poz> 45 then poz= 0:bottom=bottom+1
wend
print #h.2, "flush"
print #h.2, "getbmp ABMP 0 0 90 90"
bmpsave "ABMP", "A NEW MASK.bmp"
goto [back]
[loadit]
#h.1 "backcolor black;fill black;cls"
#h.2 "backcolor black;fill black;cls"
gfile$="A Notbasic.bas"
bottom=0
poz=0'temporary variable for increment for array
if fileExists(DefaultDir$, "A Notbasic.bas") then
open gfile$ for input as #fil
'while eof(#fil) > -1'refrence in case need
while bottom< 46
input #fil, thestring
li(poz,bottom)=thestring
lx=poz*10
ly=bottom*10
nr=thestring
ng=thestring
nb=thestring
#h.2 "place ";lx;" ";ly;";";updown$;";color ";nr;" ";ng;" ";nb;";size 10;set ";lx;" ";ly
#h.1 "";updown$;";size 1;color ";nr;" ";ng;" ";nb;";set ";poz;" ";bottom
poz=poz+1
if poz> 45 then poz= 0:bottom=bottom+1
wend
close #fil
else
fexists$=""
end if
goto [refresh]
end
function fileExists(path$, filename$)
'dimension the array info$( at the beginning of your program
files path$, filename$, info$()
fileExists = val(info$(0, 0)) 'non zero is true
end function
[saveit]
gfile$="A Notbasic.bas"
bottom=0
poz=0' temporary variable for increment for array
open gfile$ for output as #fil
while bottom< 46
thestring= li(poz,bottom)
print #fil, thestring
poz=poz+1
if poz> 45 then poz= 0:bottom=bottom+1
wend
close #fil
goto [back]
end
[compileit]
gfile$="A basicdatafile.bas"
bottom=0
poz=0' temporary variable for increment for array
open gfile$ for output as #fil
'***********************************GENERATED PROGRAM******************WHAT I DO BEST**************************************
print#fil, "nomainwin"
print#fil, "WindowWidth=100"
print#fil, "WindowHeight=100"
print#fil, "UpperLeftX=200"
print#fil, "UpperLeftY=100"
print#fil, "graphicbox #h.1, 0,0,800,100"
print#fil, "open ";chr$(34);"YOUR SUPER DUPER HIGH COLOR DEPTH CODE IMAGE !!!!";chr$(34);" for window_nf as #h"
print#fil, "print #h, ";chr$(34);"trapclose [quit]";chr$(34)
print#fil, "#h.1 ";chr$(34);"backcolor black;fill black;cls";chr$(34)
print#fil, " while bottom< 46"
print#fil, "read c"
print#fil, "r=c:g=c:b=c"
print#fil, "#h.1 ";chr$(34);"down;size 1;color ";chr$(34);";r;";chr$(34);" ";chr$(34);";g;";chr$(34);" ";chr$(34);";b;";chr$(34);";set ";chr$(34);";poz;";chr$(34);" ";chr$(34);";bottom"
print#fil, "poz=poz+1"
print#fil, "if poz> 45 then poz= 0:bottom=bottom+1"
print#fil, "wend"
print#fil, "wait"
print#fil, "[quit]"
print#fil, "close #h"
print#fil, "end"
'*****************************************************DATA COMPILES*********************************************************
print#fil,"data ";
while bottom< 46
thestring$= str$(li(poz,bottom))+","
thestring2$= str$(li(poz,bottom))
if poz<45 then print #fil, thestring$;
if poz>44 then print #fil, thestring2$:print #fil, "data ";
poz=poz+1
if poz> 45 then poz= 0:bottom=bottom+1
wend
close #fil
goto [back]
end
' Generic screen
sub screen x,y
nomainwin
WindowWidth=x
WindowHeight=y
UpperLeftX=1
UpperLeftY=1
graphicbox #h.1, 0,0,800,100
graphicbox #h.2, 100,100,460,460
open "SUPER SHADE...THE DEPTH PROJECT" for window_nf as #h
print #h, "trapclose [quit]"
#h.1 "backcolor black;fill black;cls"
#h.1 "color white"' default color if no color has been chosen
#h.2 "backcolor black;fill black;cls"
#h.2 "color white"'
end sub
sub getmouseloc handle$, x,y' NOT BEING USED IN THIS PROJECT ( generic mouse locator )mousx and mousy would need global at start
mousx= x
mousy= y
lx=mousx*10
ly=mousy*10
ly=y*10
#h.1 "size 1;place 100 10;down;backcolor black;color white;\ location ";mousx;" ";mousy;" RGB ";r;" ";g;" ";b;" Press w s a d to move draw*****"
#h.2 "place ";lx;" ";ly;";down;color ";r;" ";g;" ";b;";size 10;set ";lx;" ";ly
end sub
sub lesscolor handle$, x,y
r=r-1
g=g-1
b=b-1
if r<0 then r=0
if g<0 then g=0
if b<0 then b=0
#h.1 "size 20;color ";r;" ";g;" ";b;";set ";130;" ";80
#h.1 "place 100 10;down;backcolor black;color white;\ location ";mousx;" ";mousy;" RGB ";r;" ";g;" ";b;"****"
#h.2 "place ";lx;" ";ly;";";updown$;";color ";r;" ";g;" ";b;";size 10;set ";lx;" ";ly
if corr=0 and updown$="down" then li(mousx,mousy)=r
end sub
sub morecolor handle$, x,y
r=r+1
g=g+1
b=b+1
if r>254 then r=254
if g>254 then g=254
if b>254 then b=254
#h.1 "down;size 20;color ";r;" ";g;" ";b;";set ";130;" ";80
#h.1 "place 100 10;down;backcolor black;color white;\ location ";mousx;" ";mousy;" RGB ";r;" ";g;" ";b;"****"
#h.2 "place ";lx;" ";ly;";";updown$;";color ";r;" ";g;" ";b;";size 10;set ";lx;" ";ly
if corr=0 and updown$="down" then li(mousx,mousy)=r
end sub
[inp]
ch$ = Inkey$
if ch$="w" then mousy=mousy-1
if ch$="s" then mousy=mousy+1
if ch$="d" then mousx=mousx+1
if ch$="a" then mousx=mousx-1
if ch$="1" then updown$="up"
if ch$="2" then updown$="down"
if ch$="p" then [saveit]
if ch$="l" then [loadit]
if ch$="c" then [compileit]
if ch$="m" then [mask]
if ch$="n" then [savebmp]
if mousx<0 then mousx=0:corr=1
if mousy<0 then mousy=0:corr=1
if mousx>45 then mousx=45:corr=1
if mousy>45 then mousy=45:corr=1
lx=mousx*10
ly=mousy*10
#h.2 "place ";lx;" ";ly;";";updown$;";color ";r;" ";g;" ";b;";size 10;set ";lx;" ";ly
#h.2 "place ";plx;" ";ply;";down;color black;size 1;circle 6"
#h.2 "place ";lx;" ";ly;";down;color green;size 1;circle 6":plx=lx:ply=ly
if updown$="down" then #h.1 "";updown$;";size 1;color ";r;" ";g;" ";b;";set ";mousx;" ";mousy
#h.1 "size 1;place 100 10;down;backcolor black;color white;\ location ";mousx;" ";mousy;" RGB ";r;" ";g;" ";b;"****"
#h.1 "color white;backcolor black;place 100 30;down;\ pen is ";updown$;"**Press 1-UP 2-DOWN****"
if corr=0 and updown$="down" then li(mousx,mousy)=r
corr=0
goto [back]
|
« Last Edit: Mar 1st, 2016, 12:58am by michael » |
Logged
|
I make program generators and some utilities. Its my hobby
|
|
|
michael
New Member
member is offline
Posts: 28
|
|
Re: Magnified editor with code generator (white sc
« Reply #1 on: Feb 27th, 2016, 9:59pm » |
|
If I put the entire R G B color data in here it would be a MINIMAL of 3 times bigger.. If all the RGB values were maxxed and that was all saved it would be 23276 characters, just for the data in the compiled program (NOT INCLUDING the main program LOL) And here is the ENTIRE generated program ( SPACE SHIP ).. It is all created using the above tool I didn't spend much time doing this.. This was pretty easy to make.
You can make impressive parts if you work hard. Code:
nomainwin
WindowWidth=100
WindowHeight=100
UpperLeftX=200
UpperLeftY=100
graphicbox #h.1, 0,0,800,100
open "YOUR SUPER DUPER HIGH COLOR DEPTH CODE IMAGE !!!!" for window_nf as #h
print #h, "trapclose [quit]"
#h.1 "backcolor black;fill black;cls"
while bottom< 46
read c
r=c:g=c:b=c
#h.1 "down;size 1;color ";r;" ";g;" ";b;";set ";poz;" ";bottom
poz=poz+1
if poz> 45 then poz= 0:bottom=bottom+1
wend
wait
[quit]
close #h
end
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,254,254,224,224,224,254,254,254,254,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,181,181,0,0,0,0,0,254,102,102,102,102,89,102,102,102,102,102,102,211,0,0,0,0,0,181,181,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,109,181,0,0,0,0,0,254,132,102,196,196,196,196,196,196,196,102,102,254,11,0,0,0,0,181,132,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,109,181,0,0,0,0,254,132,132,196,132,132,132,132,132,132,132,196,102,102,254,0,0,0,0,181,132,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,181,0,0,0,0,88,88,88,88,88,88,88,88,88,88,88,88,88,88,88,0,0,0,0,181,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,129,0,0,0,0,33,152,152,152,152,152,152,152,152,152,152,152,152,152,41,0,0,0,0,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,129,0,0,0,0,0,33,33,152,152,152,58,58,58,152,152,152,41,41,0,0,0,0,0,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,129,0,0,0,0,0,0,33,58,58,58,172,172,172,58,58,58,41,0,0,0,0,0,0,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,129,0,0,0,0,0,0,0,0,0,172,123,132,123,172,0,0,0,0,0,0,0,0,0,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,129,129,0,0,0,0,0,0,0,172,123,123,132,123,123,172,0,0,0,0,0,0,0,132,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,109,129,0,0,0,0,0,0,0,150,123,123,132,123,123,150,0,0,0,0,0,0,0,132,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,129,0,0,0,0,0,0,150,150,123,123,132,123,123,150,123,0,0,0,0,0,0,132,188,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,129,0,0,0,0,172,150,150,150,123,123,132,123,123,150,150,150,172,0,0,0,0,132,188,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,129,0,0,0,172,123,123,123,123,123,123,132,123,123,123,123,123,123,172,0,0,0,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,109,0,185,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,185,0,132,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,129,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,185,132,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,109,109,109,109,132,132,132,132,132,132,185,132,132,132,132,132,132,132,132,132,132,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,0,0,0,0,0,49,49,49,49,49,185,49,49,49,49,49,0,0,0,0,0,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,0,0,0,0,0,0,0,0,0,0,185,0,0,0,0,0,0,0,0,0,0,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,182,109,0,0,0,0,0,0,0,0,0,0,185,0,0,0,0,0,0,0,0,0,0,132,187,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,80,109,109,109,0,0,0,0,0,0,0,128,132,132,185,128,128,128,0,0,0,0,0,0,0,132,132,132,84,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,90,90,90,90,90,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,90,0,0,0,0,0,90,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,90,132,0,0,0,0,0,132,90,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
data
|
« Last Edit: Feb 27th, 2016, 10:09pm by michael » |
Logged
|
I make program generators and some utilities. Its my hobby
|
|
|
joker
Global Moderator
member is offline
Gender:
Posts: 157
|
|
Re: Magnified editor with code generator (white sc
« Reply #2 on: Feb 29th, 2016, 02:21am » |
|
Perhaps you could explain what this code is for?
|
|
Logged
|
|
|
|
michael
New Member
member is offline
Posts: 28
|
|
Re: Magnified editor with code generator (white sc
« Reply #3 on: Feb 29th, 2016, 11:10pm » |
|
The program is now an older version of the much improved version which uses ASCII glyphs to hold the value in a STRING in Data.
BUT it doesn't just serve code.. It also allows you to make BMP MASK images and BMPs with your creation.. SO its not just a code image tool.
AND it allows you to do Magnified work on your image.
I do plan to make a full RGB range version of this once the compression is perfected. Once it is done, a person could put a couple images like in this program that I made using my program named BMPTOCODE.
BMPTOCODE (which is technically a superior code image creator) uses APIs and once I was done I abandoned it for reasons explained. BUT BMPTOCODE had 1 weakness.. ( if the colored image was HUGE and it was super detailed it would be unusable as a code image due to size) When this is perfected (AGAIN) a person can efficiently include a image within their program and NO ONE will say:
" you should use the included BMP files in the BMP folder" I can now make my own custom buttons and images and export them as text on a forum IN MY PROGRAM that only allows 10000 lines.. BUT I do not want to have HUGE data when I do it.. SOOO that's why am doing this project. Look at the data statements in the following program Here is an idea of how it would work: THIS IS NOT FROM MY CURRENT TOOL.. IT IS FROM BMPTOCODE tool Code:
nomainwin
global h
global v
open "Compressed BMP Data to Image project " for graphics_nsb_fs as #1
u=0
#1 "trapclose [quit]"
#1 "down;fill black"
restore [starhalf] :h=200:v=100 :gosub [drawit] ' draw the half star first
restore [starfull] :h=100:v=50:gosub [drawit]' draw the full star last
wait
[quit]
close #1
end
' ****************** I MADE IT INTO REUSABLE COMMANDS!! **************
[drawit]
nst$=""
#1 "down"
ost$=""
read x,y
while nst$<>"100000"
read nst$,t
if nst$="0" then r=0:g=0:b=0 'black 0 0 0
if nst$="3" then r=128:g=128:b=128' dark grey 128 128 128
if nst$="b" then r=224:g=32:b=64'light red 224 32 64
if nst$="h" then r=255:g=255:b=255'white 255 255 255
if nst$="i" then r=255:g=255:b=0'yellow 255 255 0
#1 "color ";r;" ";g;" ";b
for u=0 to t
a=a+1: print #1, "set ";c+h;" ";a+v :if a>x then c=c+1:a=0
next u
wend
return
wait
[starfull]
data 16,16
data 0,5,b,0,0,15,b,1,0,14,b,0,h,0,b,0,0,13,b,0,i,0,b,0,0,4,b,1,0,6,b,0,i,1,b,0,0,0,b,3,0
data 7,b,0,i,2,b,0,h,0,i,1,b,0,0,7,b,0,i,5,b,0,0,5,b,2,i,5,h,0,b,0,0,3,b,1,h,1,i,6,b,0
data 0,6,b,2,h,0,i,5,b,0,0,8,b,0,i,2,h,1,i,0,b,0,0,8,b,0,i,1,h,0,b,0,h,2,b,0,0,7,b,0,i
data 0,h,0,b,0,0,0,b,3,0,7,b,0,h,0,b,0,0,4,b,1,0,6,b,0,h,0,b,0,0,13,b,1,100000,0
[starhalf]
data 16,16
data 0,5,b,0,0,15,b,1,0,14,b,0,h,0,b,0,0,13,b,0,i,0,b,0,0,4,b,1,0,6,b,0,i,1,b,0,0,0,b,3,0
data 7,b,0,i,2,b,0,h,0,i,1,b,0,0,7,b,0,i,5,b,0,0,5,b,2,i,5,h,0,b,0,0,3,b,1,h,1,i,6,b,0
data 100000,0
|
« Last Edit: Mar 1st, 2016, 01:04am by michael » |
Logged
|
I make program generators and some utilities. Its my hobby
|
|
|
|