Sourse:
`%ProjectTitle%
`======================
`©%Author%
`======================
`Main Source File
#CONSTANT BLEND_HIDDEN 0
#CONSTANT BLEND_FASTNORMAL 1
#CONSTANT BLEND_NORMAL 2
#CONSTANT BLEND_DISSOLVE 3
#CONSTANT BLEND_MULTIPLY 4
#CONSTANT BLEND_DIVIDE 5
#CONSTANT BLEND_SCREEN 6
#CONSTANT BLEND_OVERLAY 7
#CONSTANT BLEND_DODGE 8
#CONSTANT BLEND_BURN 9
#CONSTANT BLEND_HARDLIGHT 10
#CONSTANT BLEND_SOFTLIGHT 11
#CONSTANT BLEND_GRAINEXTRACT 12
#CONSTANT BLEND_GRAINMERGE 13
#CONSTANT BLEND_DIFFERENCE 14
#CONSTANT BLEND_ADDITION 15
#CONSTANT BLEND_SUBTRACT 16
#CONSTANT BLEND_DARKENONLY 17
#CONSTANT BLEND_LIGHTENONLY 18
#CONSTANT BLEND_FORCE 19
#CONSTANT BLEND_FORCENOALPHA 20
#CONSTANT BLUR_AVERAGE 1
#CONSTANT BLUR_GAUSSIANIIR 2
#CONSTANT BLUR_GAUSSIANFIR 3
#CONSTANT RESIZE_NEAREST 0
#CONSTANT DESATURATE_LIGHTNESS 1
#CONSTANT DESATURATE_LUMINOSITY 2
#CONSTANT DESATURATE_AVERAGE 3
#CONSTANT CHANNEL_ALPHA 0xFF000000
#CONSTANT CHANNEL_RED 0x00FF0000
#CONSTANT CHANNEL_GREEN 0x0000FF00
#CONSTANT CHANNEL_BLUE 0x000000FF
set display mode display width(),display height(),32
sync on
sync rate 0
set camera range 0.01,1000
global sw
global sh
sw=screen width()
sh=screen height()
STARTBLUE "",""
a$=extract filepath$(APPNAME$())
set dir a$
global mainbb as integer
mainbb=createGadgetFromWindow( mainWindow() )
setGadgetText mainbb,"DarkBRICK"
positionGadget mainbb , 0 , 0
global imgSize
global brickCOLOR1
global brickCOLOR2
global brickCOLOR3
global stichColor1
global stichColor2
global stichColor3
global brickNoiseCOLOR1
global brickNoiseCOLOR2
global brickNoiseCOLOR3
global BRwidth
global BRheight
global STwidth
global STheight
global ImageSize
global BRslice
global BRspec
global STspec
global BRbump
global STbump
BRwidth=32
BRheight=10
STwidth=2
STheight=2
ImageSize=512
BRslice=16
BRspec=50
STspec=0
BRbump =200
STbump =60
Global DchanelIMG
global SchanelIMG
global NchanelIMG
global tempIMG
DchanelIMG=1
SchanelIMG=2
NchanelIMG=3
tempIMG =4
global tb1 as string
global tb1n as string
global tb2 as string
global tb2n as string
global tb3 as string
global tb3n as string
blueG()
createUI()
colorizeGUI()
setgadgettext Gadget2 ,str$( BRwidth )
setgadgettext Gadget3 ,str$( BRheight )
setgadgettext Gadget4 ,str$( STwidth )
setgadgettext Gadget5 ,str$( STheight )
setgadgettext Gadget6 ,str$( ImageSize )
setgadgettext Gadget12 ,str$( BRslice )
setgadgettext Gadget13 ,str$( BRspec )
setgadgettext Gadget14 ,str$( STspec )
setgadgettext Gadget37 ,str$( BRbump )
setgadgettext Gadget38 ,str$( STbump )
make object plane 1,10,10
make object plane 2,10,10
make object plane 3,10,10
make object plane 4,10,10
move object left 2,10.1
move object right 3,10.1
move object up 4,10.1
Global posx
Global posy
Global modebrickRENDER
modebrickRENDER=0
global mx
global my
global mmx
global mmy
global mmz
global mcli
global oldmcli
`__________________________________________________________________________________________________________________________________________________________________________________________________________
sync
do
rend:
oldmcli =mcli
mx =mousex()
my =mousey()
mmx =mousemovex()
mmy =mousemovey()
mmz =mousemovez()
mcli =mouseclick()
//_____________- camera move
if mcli=4
CamX# = CamX# + mmy / 10.0 : CamY# = CamY# + mmx / 10.0 : rotate camera CamX#, CamY#, 0.0
if keystate(17) =1 then move camera 0.1
if keystate(31) =1 then move camera -0.1
if keystate(30) =1 then move camera left 0.1
if keystate(32) =1 then move camera right 0.1
endif
//_____________- Event get
GETEVENT
EVT = EVENTTYPE()
sou = EVENTSOURCE()
dat = EVENTDATAEX()
undmou = GADGETUNDERMOUSE()
//_____________- Info print
text 20,20,"FPS: "+str$(screen fps())
text 20,40,"mmz: "+str$(mmz)
//_____________- Event in work
if evt= MOUSE_CLICK
//Gadget18 brickCOLOR1
//Gadget19 brickCOLOR2
//Gadget20 brickCOLOR3
if getChecked(Gadget30)=0
if sou=Gadget18
a=colorbox2("oqiwueoqiwu")
brickCOLOR1=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget18,brickCOLOR1,rgb(0,0,0,0)
endif
if sou=Gadget19
a=colorbox2("oqiwueoqiwu")
brickCOLOR2=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget19,brickCOLOR2,rgb(0,0,0,0)
endif
if sou=Gadget20
a=colorbox2("oqiwueoqiwu")
brickCOLOR3=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget20,brickCOLOR3,rgb(0,0,0,0)
endif
else
if sou=Gadget18
a$=opendialog("Load IMAGE","Open IMAGE (*.dds, *..png, *...bmp, *....jpg)|*.dds;*.png;*.bmp;*.jpg|Load All (*.*)|*.*",0,"")
tb1=a$
load image a$,1000
ik resize image 1000,ImageSize,ImageSize,0
load image a$,1100
ik resize image 1100,48,48,0
setpanelimage Gadget18,1100
// aN$=left$(a$,len(a$)-4)+"_n.dds"
// if file exist(aN$)=1
// tb1n=aN$
// load image aN$,1200
// ik resize image 1200,ImageSize,ImageSize,0
// else
// make normal map 1200,1000,0
// endif
endif
if sou=Gadget19
a$=opendialog("Load IMAGE","Open IMAGE (*.dds, *..png, *...bmp, *....jpg)|*.dds;*.png;*.bmp;*.jpg|Load All (*.*)|*.*",0,"")
tb2=a$
load image a$,1001
ik resize image 1001,ImageSize,ImageSize,0
load image a$,1101
ik resize image 1101,48,48,0
setpanelimage Gadget19,1101
// aN$=left$(a$,len(a$)-4)+"_n.dds"
// if file exist(aN$)=1
// tb2n=aN$
// load image aN$,1201
// ik resize image 1201,ImageSize,ImageSize,0
// else
// make normal map 1201,1001,0
// endif
endif
if sou=Gadget20
a$=opendialog("Load IMAGE","Open IMAGE (*.dds, *..png, *...bmp, *....jpg)|*.dds;*.png;*.bmp;*.jpg|Load All (*.*)|*.*",0,"")
tb3=a$
load image a$,1002
ik resize image 1002,ImageSize,ImageSize,0
load image a$,1102
ik resize image 1102,48,48,0
setpanelimage Gadget20,1102
// aN$=left$(a$,len(a$)-4)+"_n.dds"
// if file exist(aN$)=1
// tb3n=aN$
// load image aN$,1202
// ik resize image 1202,ImageSize,ImageSize,0
// else
// make normal map 1202,1002,0
// endif
endif
endif
//Gadget22 brickNoiseCOLOR1
//Gadget23 brickNoiseCOLOR2
//Gadget24 brickNoiseCOLOR3
if sou=Gadget22
a=colorbox2("oqiwueoqiwu")
brickNoiseCOLOR1=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget22,brickNoiseCOLOR1,rgb(0,0,0,0)
endif
if sou=Gadget23
a=colorbox2("oqiwueoqiwu")
brickNoiseCOLOR2=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget23,brickNoiseCOLOR2,rgb(0,0,0,0)
endif
if sou=Gadget24
a=colorbox2("oqiwueoqiwu")
brickNoiseCOLOR3=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget24,brickNoiseCOLOR3,rgb(0,0,0,0)
endif
//Gadget26 stichColor1
//Gadget27 stichColor2
//Gadget28 stichColor3
if sou=Gadget26
a=colorbox2("oqiwueoqiwu")
stichColor1=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget26,stichColor1,rgb(0,0,0,0)
endif
if sou=Gadget27
a=colorbox2("oqiwueoqiwu")
stichColor2=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget27,stichColor2,rgb(0,0,0,0)
endif
if sou=Gadget28
a=colorbox2("oqiwueoqiwu")
stichColor3=rgb(255,GETRED(),GETGREEN(),GETBLUE())
setgadgetcolor Gadget28,stichColor3,rgb(0,0,0,0)
endif
//// Gadget2 "brick width" BRwidth
//// Gadget3 "brick height" BRheight
//// Gadget4 "stich width" STwidth
//// Gadget5 "stich height" STheight
//// Gadget6 "image size" ImageSize
//// Gadget12 "brick slice" BRslice
//// Gadget13 "brick spec." BRspec
//// Gadget14 "stich spec." STspec
if sou=Gadget30
if getChecked(Gadget30)
setgadgettext Gadget21," brick texture 1,2,3"
if image exist(1100)=1
setpanelimage Gadget18,1100
endif
if image exist(1101)=1
setpanelimage Gadget19,1101
endif
if image exist(1102)=1
setpanelimage Gadget20,1102
endif
else
setgadgettext Gadget21," brick color 1,2,3"
DELETEGADGET Gadget18
Gadget18=createPanel(5,282,50,50,Gadget1)
setPanelBorderStyle Gadget18,1
setgadgetcolor Gadget18,brickCOLOR1,rgb(0,0,0,0)
DELETEGADGET Gadget19
Gadget19=createPanel(57,282,50,50,Gadget1)
setPanelBorderStyle Gadget19,1
setgadgetcolor Gadget19,brickCOLOR2,rgb(0,0,0,0)
DELETEGADGET Gadget20
Gadget20=createPanel(109,282,50,50,Gadget1)
setPanelBorderStyle Gadget20,1
setgadgetcolor Gadget20,brickCOLOR3,rgb(0,0,0,0)
endif
endif
if sou=Gadget36
reSTARTrender()
endif
endif
if modebrickRENDER=1
arnd=rnd(2)
if arnd=0 then TMPimg=1000:color=brickCOLOR1
if arnd=1 then TMPimg=1001:color=brickCOLOR2
if arnd=2 then TMPimg=1002:color=brickCOLOR3
if getChecked(Gadget30)=0
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
ik dot DchanelIMG,xx1,yy1,color
ik dot tempIMG,xx1,yy1,rgb(255,BRbump,BRbump,BRbump)
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
else
brick(arnd,color)
endif
posx=posx+STwidth+BRwidth
if posx>ImageSize then posx=STwidth:posy=posy+(STheight*2)+(BRheight*2)
if posy>ImageSize then modebrickRENDER=2:posx=STwidth-BRslice : posy= (STheight*2)+BRheight
endif
if modebrickRENDER=2
arnd=rnd(2)
if arnd=0 then TMPimg=1000:color=brickCOLOR1
if arnd=1 then TMPimg=1001:color=brickCOLOR2
if arnd=2 then TMPimg=1002:color=brickCOLOR3
if getChecked(Gadget30)=0
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
ik dot DchanelIMG,xx1,yy1,color
ik dot tempIMG,xx1,yy1,rgb(255,BRbump,BRbump,BRbump)
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
else
brick(arnd,color)
endif
posx=posx+STwidth+BRwidth
if posx>ImageSize then posx=STwidth-BRslice :posy=posy+(STheight*2)+(BRheight*2)
if posy>ImageSize
modebrickRENDER=3
make normal map tempIMG,NchanelIMG,0
texture object 4, tempIMG
endif
endif
if modebrickRENDER<>3 then goto rend
if inkey$()="="
save image "brick.dds",DchanelIMG
IK Paste Image Channel NchanelIMG, SchanelIMG, CHANNEL_RED
save image "brick_n.dds",NchanelIMG
save image "brick_s.dds",SchanelIMG
endif
sync
loop
function reSTARTrender()
a1$= getgadgettext(Gadget2)
a2$= getgadgettext(Gadget3)
a3$= getgadgettext(Gadget4)
a4$= getgadgettext(Gadget5)
a5$= getgadgettext(Gadget6)
a6$= getgadgettext(Gadget12)
a7$= getgadgettext(Gadget13)
a8$= getgadgettext(Gadget14)
a9$= getgadgettext(Gadget37)
a10$=getgadgettext(Gadget38)
modebrickRENDER=1
BRwidth=val( a1$ )
BRheight=val( a2$ )
STwidth=val( a3$ )
STheight=val( a4$ )
ImageSize=val( a5$ )
BRslice=val( a6$ )
BRspec=val( a7$ )
STspec=val( a8$ )
BRbump=val( a9$ )
STbump=val( a10$ )
posx=STwidth
posy=STheight
if image exist(DchanelIMG)=1 then delete image DchanelIMG
if image exist(SchanelIMG)=1 then delete image SchanelIMG
if image exist(NchanelIMG)=1 then delete image NchanelIMG
if image exist(tempIMG )=1 then delete image tempIMG
ik create image DchanelIMG , ImageSize , ImageSize ,rgb(255,255,255,255)
ik create image SchanelIMG , ImageSize , ImageSize ,rgb(255,STspec,STspec,STspec)
ik create image NchanelIMG , ImageSize , ImageSize ,rgb(255,255,255,255)
ik create image tempIMG , ImageSize , ImageSize ,rgb(STbump,STbump,STbump,STbump)
sync
texture object 1, DchanelIMG
texture object 2, SchanelIMG
texture object 3, NchanelIMG
texture object 4, tempIMG
sync
if image exist(1000)=1
if file exist(tb1)=1
load image tb1,1000
ik resize image 1000,ImageSize , ImageSize ,0
endif
// if file exist(tb1n)=1
// load image tb1n,1200
// ik resize image 1200,ImageSize , ImageSize ,0
// else
// make normal map 1200,1000,0
// endif
endif
if image exist(1001)=1
if file exist(tb2)=1
load image tb2,1001
ik resize image 1001,ImageSize , ImageSize ,0
endif
// if file exist(tb2n)=1
// load image tb2n,1201
// ik resize image 1201,ImageSize , ImageSize ,0
// else
// make normal map 1201,1001,0
// endif
endif
if image exist(1002)=1
if file exist(tb3)=1
load image tb3,1002
ik resize image 1002,ImageSize , ImageSize ,0
endif
// if file exist(tb3n)=1
// load image tb3n,1202
// ik resize image 1202,ImageSize , ImageSize ,0
// else
// make normal map 1202,1002,0
// endif
endif
endfunction
`__________________________________________________________________________________________________________________________________________________________________________________________________________
function blueG()
global EVT
global sou
global dat
global undmou
global GUI_CONSTANTS as integer
global COMMANDa as integer
global MOUSE_CLICK as integer
global LEFTBUTTONUP as integer
global RIGHTMOUSECLICK as integer
global RIGHTBUTTONUP as integer
global MOUSEMOVE as integer
global GADGETTIMER as integer
global TOOLBARCLICK as integer
global HOTKEY as integer
global LEFTBUTTONDOWN as integer
global RIGHTBUTTONDOWN as integer
global KEYDOWN as integer
global KEYUP as integer
global LOSEFOCUS as integer
global GADGETSIZING as integer
global GADGETSIZE as integer
global WINDOWCLOSE as integer
global LEFTBUTTONDOUBLECLICK as integer
global MENUCLICK as integer
global COMBOBOXCHANGE as integer
global TREEVIEWCHANGE as integer
global BORDERNONE as integer
global BORDERFLAT as integer
global BORDER3D as integer
global BORDERSUNKEN as integer
global ALIGNNONE as integer
global ALIGNALL as integer
global ALIGNTOP as integer
global ALIGNLEFT as integer
global ALIGNRIGHT as integer
global ALIGNBOTTOM as integer
global TOOLBARCUT as integer
global TOOLBARCOPY as integer
global TOOLBARPASTE as integer
global TOOLBARUNDO as integer
global TOOLBARREDO as integer
global TOOLBARDELETE as integer
global TOOLBARNEW as integer
global TOOLBAROPEN as integer
global TOOLBARSAVE as integer
global TOOLBARPRINTPREVIEW as integer
global TOOLBARPROPERTIES as integer
global TOOLBARHELP as integer
global TOOLBARFIND as integer
global TOOLBARREPLACE as integer
global TOOLBARPRINT as integer
global WINDOWTITLEBAR as integer
global WINDOWCLOSEBUTTON as integer
global WINDOWMAXBUTTON as integer
global WINDOWMINBUTTON as integer
global WINDOWRESIZEABLE as integer
global WINDOWNOBORDER as integer
global WINDOWTOOLWINDOW as integer
global WINDOWNORMAL as integer
global WINDOWFIXED as integer
global WINDOWOVR as integer
global LISTVIEWICON as integer
global LISTVIEWREPORT as integer
global LISTVIEWLIST as integer
GUI_CONSTANTS=1
COMMANDa=0x111
MOUSE_CLICK=0x202
LEFTBUTTONUP=514
RIGHTMOUSECLICK=0x205
RIGHTBUTTONUP=0x205
MOUSEMOVE=0x200
GADGETTIMER=0x113
TOOLBARCLICK=0x111
HOTKEY=0x312
LEFTBUTTONDOWN=513
RIGHTBUTTONDOWN=0x204
KEYDOWN=0x100
KEYUP=0x101
LOSEFOCUS=0x8
GADGETSIZING=0x214
GADGETSIZE=0x5
WINDOWCLOSE=0x10
LEFTBUTTONDOUBLECLICK=0x203
MENUCLICK=0x0400+1
COMBOBOXCHANGE=0x0400+3
TREEVIEWCHANGE=0x0400+4
BORDERNONE=0
BORDERFLAT=1
BORDER3D=2
BORDERSUNKEN=3
ALIGNNONE=0
ALIGNALL=1
ALIGNTOP=2
ALIGNLEFT=3
ALIGNRIGHT=4
ALIGNBOTTOM=5
TOOLBARCUT=0
TOOLBARCOPY=1
TOOLBARPASTE=2
TOOLBARUNDO=3
TOOLBARREDO=4
TOOLBARDELETE=5
TOOLBARNEW=6
TOOLBAROPEN=7
TOOLBARSAVE=8
TOOLBARPRINTPREVIEW=9
TOOLBARPROPERTIES=10
TOOLBARHELP=11
TOOLBARFIND=12
TOOLBARREPLACE=13
TOOLBARPRINT=14
WINDOWTITLEBAR=12582912
WINDOWCLOSEBUTTON=524288
WINDOWMAXBUTTON=65536
WINDOWMINBUTTON=131072
WINDOWRESIZEABLE=262144
WINDOWNOBORDER=-2147483648
WINDOWTOOLWINDOW=128
WINDOWNORMAL=13565952
WINDOWFIXED=13107200
WINDOWOVR=0
LISTVIEWICON=0
LISTVIEWREPORT=1
LISTVIEWLIST=3
global Gadget1
global Gadget2
global Gadget3
global Gadget4
global Gadget5
global Gadget6
global Gadget7
global Gadget8
global Gadget9
global Gadget10
global Gadget11
global Gadget12
global Gadget13
global Gadget14
global Gadget15
global Gadget16
global Gadget17
global Gadget18
global Gadget19
global Gadget20
global Gadget21
global Gadget22
global Gadget23
global Gadget24
global Gadget25
global Gadget26
global Gadget27
global Gadget28
global Gadget29
global Gadget30
global Gadget31
global Gadget32
global Gadget33
global Gadget34
global Gadget35
global Gadget36
global Gadget37
global Gadget38
global Gadget39
global Gadget40
endfunction
function colorizeGUI()
setgadgetcolor Gadget18 , brickCOLOR1 ,rgb(0,0,0,0)
setgadgetcolor Gadget19 , brickCOLOR2 ,rgb(0,0,0,0)
setgadgetcolor Gadget20 , brickCOLOR3 ,rgb(0,0,0,0)
setgadgetcolor Gadget22 , brickNoiseCOLOR1 ,rgb(0,0,0,0)
setgadgetcolor Gadget23 , brickNoiseCOLOR2 ,rgb(0,0,0,0)
setgadgetcolor Gadget24 , brickNoiseCOLOR3 ,rgb(0,0,0,0)
setgadgetcolor Gadget26 , stichColor1 ,rgb(0,0,0,0)
setgadgetcolor Gadget27 , stichColor2 ,rgb(0,0,0,0)
setgadgetcolor Gadget28 , stichColor3 ,rgb(0,0,0,0)
endfunction
function createUI()
Gadget1=createWindow(sw-172,0,172,684,"preferences:",WINDOWNORMAL,WINDOWTOOLWINDOW,0,mainbb)
Gadget2=createEdit(5,5,75,20,0,Gadget1)
Gadget3=createEdit(5,30,75,20,0,Gadget1)
Gadget4=createEdit(5,55,75,20,0,Gadget1)
Gadget5=createEdit(5,80,75,20,0,Gadget1)
Gadget6=createEdit(5,105,75,20,0,Gadget1)
Gadget7=createButton(85,3,75,25,"brick width",0,Gadget1)
Gadget8=createButton(85,28,75,25,"brick height",0,Gadget1)
Gadget9=createButton(85,53,75,25,"stich width",0,Gadget1)
Gadget10=createButton(85,78,75,25,"stich height",0,Gadget1)
Gadget11=createButton(85,103,75,25,"image size",0,Gadget1)
Gadget12=createEdit(5,130,75,20,0,Gadget1)
Gadget13=createEdit(5,155,75,20,0,Gadget1)
Gadget14=createEdit(5,180,75,20,0,Gadget1)
Gadget15=createButton(85,128,75,25,"brick slice",0,Gadget1)
Gadget16=createButton(85,153,75,25,"brick spec.",0,Gadget1)
Gadget17=createButton(85,178,75,25,"stich spec.",0,Gadget1)
Gadget18=createPanel(5,282,50,50,Gadget1)
setPanelBorderStyle Gadget18,1
Gadget19=createPanel(57,282,50,50,Gadget1)
setPanelBorderStyle Gadget19,1
Gadget20=createPanel(109,282,50,50,Gadget1)
setPanelBorderStyle Gadget20,1
Gadget21=createLabel(5,265,155,15," brick colors 1,2,3",Gadget1)
Gadget22=createPanel(5,360,50,50,Gadget1)
setPanelBorderStyle Gadget22,1
Gadget23=createPanel(57,360,50,50,Gadget1)
setPanelBorderStyle Gadget23,1
Gadget24=createPanel(109,360,50,50,Gadget1)
setPanelBorderStyle Gadget24,1
Gadget25=createLabel(5,341,155,18," brick noise colors 1,2,3",Gadget1)
Gadget26=createPanel(5,441,50,50,Gadget1)
setPanelBorderStyle Gadget26,1
Gadget27=createPanel(57,441,50,50,Gadget1)
setPanelBorderStyle Gadget27,1
Gadget28=createPanel(110,441,50,50,Gadget1)
setPanelBorderStyle Gadget28,1
Gadget29=createLabel(5,421,155,19," stich colors 1,2,3",Gadget1)
Gadget30=createCheckBox(5,502,150,20,"use brick texture",Gadget1)
Gadget31=createCheckBox(5,520,75,20,"Check",Gadget1)
Gadget32=createCheckBox(5,538,75,20,"Check",Gadget1)
Gadget33=createCheckBox(5,556,75,20,"Check",Gadget1)
Gadget34=createCheckBox(5,574,75,20,"Check",Gadget1)
Gadget35=createCheckBox(5,592,75,20,"Check",Gadget1)
Gadget36=createButton(4,621,155,25,"RENDER NOW",0,Gadget1)
Gadget37=createEdit(5,205,75,20,0,Gadget1)
Gadget38=createEdit(5,230,75,20,0,Gadget1)
Gadget39=createButton(85,203,75,25,"brick bump",0,Gadget1)
Gadget40=createButton(85,228,75,25,"stich bump",0,Gadget1)
endfunction
function DeleteGadgets()
DELETEGADGET Gadget40
DELETEGADGET Gadget39
DELETEGADGET Gadget38
DELETEGADGET Gadget37
DELETEGADGET Gadget36
DELETEGADGET Gadget35
DELETEGADGET Gadget34
DELETEGADGET Gadget33
DELETEGADGET Gadget32
DELETEGADGET Gadget31
DELETEGADGET Gadget30
DELETEGADGET Gadget29
DELETEGADGET Gadget28
DELETEGADGET Gadget27
DELETEGADGET Gadget26
DELETEGADGET Gadget25
DELETEGADGET Gadget24
DELETEGADGET Gadget23
DELETEGADGET Gadget22
DELETEGADGET Gadget21
DELETEGADGET Gadget20
DELETEGADGET Gadget19
DELETEGADGET Gadget18
DELETEGADGET Gadget17
DELETEGADGET Gadget16
DELETEGADGET Gadget15
DELETEGADGET Gadget14
DELETEGADGET Gadget13
DELETEGADGET Gadget12
DELETEGADGET Gadget11
DELETEGADGET Gadget10
DELETEGADGET Gadget9
DELETEGADGET Gadget8
DELETEGADGET Gadget7
DELETEGADGET Gadget6
DELETEGADGET Gadget5
DELETEGADGET Gadget4
DELETEGADGET Gadget3
DELETEGADGET Gadget2
DELETEGADGET Gadget1
endfunction
function brick(arnd,color)
if arnd=0
if image exist(1000)=1
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
col=ik point(1000,xx1,yy1)
ik dot DchanelIMG,xx1,yy1,col
ik dot tempIMG,xx1,yy1,col
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
else
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
ik dot DchanelIMG,xx1,yy1,color
ik dot tempIMG,xx1,yy1,rgb(255,BRbump,BRbump,BRbump)
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
endif
endif
if arnd=1
if image exist(1001)=1
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
col=ik point(1001,xx1,yy1)
ik dot DchanelIMG,xx1,yy1,col
ik dot tempIMG,xx1,yy1,col
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
else
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
ik dot DchanelIMG,xx1,yy1,color
ik dot tempIMG,xx1,yy1,rgb(255,BRbump,BRbump,BRbump)
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
endif
endif
if arnd=2
if image exist(1002)=1
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
col=ik point(1002,xx1,yy1)
ik dot DchanelIMG,xx1,yy1,col
ik dot tempIMG,xx1,yy1,col
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
else
for xx1=posx to posx+BRwidth
for yy1=posy to posy+BRheight
ik dot DchanelIMG,xx1,yy1,color
ik dot tempIMG,xx1,yy1,rgb(255,BRbump,BRbump,BRbump)
ik dot SchanelIMG,xx1,yy1,rgb(BRspec,BRspec,BRspec,BRspec)
next yy1
next xx1
endif
endif
endfunction
.....already beside.....