/* plugin par iri - http://www.irizone.net date : may 2005 name : iriparticles - part EDITOR name : dynparticles - part EDITOR date : february 2007 auteur : iri pour I-Maginer (http://www.i-maginer.fr) */ typeof plugin = S;; typeof class = S;; typeof Init = ObjCheck;; typeof initColor1 = ObjText;; typeof initColor2 = ObjText;; typeof initColor3 = ObjText;; typeof initColor4 = ObjText;; typeof initSize0 = ObjText;; typeof initSize1 = ObjText;; typeof initSize2 = ObjText;; typeof initSize3 = ObjText;; typeof initSize4 = ObjText;; typeof initSize5 = ObjText;; typeof initSize6 = ObjText;; typeof initSize7 = ObjText;; typeof initSize8 = ObjText;; typeof initSize9 = ObjText;; typeof initSize10 = ObjText;; typeof maxSize = ObjText;; typeof cycleColor = ObjCheck;; typeof cycleSize = ObjCheck;; typeof typeFX = ObjBox;; typeof vectorA1 = ObjText;; typeof vectorA2 = ObjText;; typeof vectorA3 = ObjText;; typeof vectorB1 = ObjText;; typeof vectorB2 = ObjText;; typeof vectorB3 = ObjText;; typeof vectorC1 = ObjText;; typeof vectorC2 = ObjText;; typeof vectorC3 = ObjText;; typeof typeVolEmitter = ObjBox;; typeof typeMaskEmitter = ObjBox;; typeof typeParticle = ObjBox;; proto save=fun [ [Inst r1] ] [[S r1] [S r1] [[S r1]r1] [[S r1]r1]];; fun addCombo(combo, l, sel)= if l == nil then if sel == nil then _SELcombo combo 0 else _SSELcombo combo sel else (_ADDcombo combo 0 hd l; addCombo combo tl l sel);; fun openedit(win, param) = let strextr param -> l in let _GETwindowSizePosition win -> [w h x y] in let atoi getInfo l "initColor" -> tmp in let get_rgba if tmp == nil then 0 else tmp -> [r g b a] in let strextr getInfo l "initSizes" -> sizes in let if sizes == nil then ("1"::"4"::"8"::"12"::"12"::"10"::"8"::"4"::"2"::"1"::"0"::nil)::nil else sizes -> sizes in let strextr getInfo l "vectorA" -> vectorA in let if vectorA == nil then ("160"::"20"::"10"::nil)::nil else vectorA -> vectorA in let strextr getInfo l "vectorB" -> vectorB in let if vectorB == nil then ("100"::"20"::"10"::nil)::nil else vectorB -> vectorB in let strextr getInfo l "vectorC" -> vectorC in let if vectorC == nil then ("0"::"0"::"0"::nil)::nil else vectorC -> vectorC in { set Init = _SETcheck _CRcheck _channel win 5 5 70 20 0 "Init on" if !strcmpi getInfo l "init" "on" then 1 else 0; _CRtext _channel win 5 30 50 20 0 "RGBA :"; set initColor1 = _CReditLine _channel win 60 30 50 20 ET_DOWN|ET_NUMBER itoa r; set initColor2 = _CReditLine _channel win 115 30 50 20 ET_DOWN|ET_NUMBER itoa g; set initColor3 = _CReditLine _channel win 170 30 50 20 ET_DOWN|ET_NUMBER itoa b; set initColor4 = _CReditLine _channel win 225 30 50 20 ET_DOWN|ET_NUMBER itoa a; _CRtext _channel win 5 55 50 20 0 "Sizes :"; _CRtext _channel win 60 55 20 20 0 "0:"; set initSize0 = _CReditLine _channel win 85 55 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 0; _CRtext _channel win 120 55 20 20 0 "10:"; set initSize1 = _CReditLine _channel win 145 55 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 1; _CRtext _channel win 180 55 20 20 0 "20:"; set initSize2 = _CReditLine _channel win 205 55 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 2; _CRtext _channel win 240 55 20 20 0 "30:"; set initSize3 = _CReditLine _channel win 265 55 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 3; _CRtext _channel win 300 55 20 20 0 "40:"; set initSize4 = _CReditLine _channel win 325 55 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 4; _CRtext _channel win 60 80 20 20 0 "50:"; set initSize5 = _CReditLine _channel win 85 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 5; _CRtext _channel win 120 80 20 20 0 "60:"; set initSize6 = _CReditLine _channel win 145 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 6; _CRtext _channel win 180 80 20 20 0 "70:"; set initSize7 = _CReditLine _channel win 205 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 7; _CRtext _channel win 240 80 20 20 0 "80:"; set initSize8 = _CReditLine _channel win 265 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 8; _CRtext _channel win 300 80 20 20 0 "90:"; set initSize9 = _CReditLine _channel win 325 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 9; _CRtext _channel win 360 80 30 20 0 "100:"; set initSize10 = _CReditLine _channel win 395 80 30 20 ET_DOWN|ET_NUMBER nth_list hd sizes 10; _CRtext _channel win 5 105 70 20 0 "Size max :"; set maxSize = _CReditLine _channel win 80 105 50 20 ET_DOWN|ET_NUMBER getInfo l "maxSize"; set cycleColor = _SETcheck _CRcheck _channel win 5 130 90 20 0 "Color cycle" if !strcmpi getInfo l "colorCycle" "on" then 1 else 0; set cycleSize = _SETcheck _CRcheck _channel win 100 130 90 20 0 "Size cycle" if !strcmpi getInfo l "sizeCycle" "on" then 1 else 0; _CRtext _channel win 5 155 90 20 0 "Type EFFECT :"; set typeFX = _CRcombo _channel win 100 155 150 130 CB_NOEDIT|CB_DOWN nil; addCombo typeFX "EFFECT_CONSTANT"::"EFFECT_ELECTRIC"::"EFFECT_MAGNETIC"::"EFFECT_CHAOTIC0"::"EFFECT_CHAOTIC1"::"EFFECT_HELICOID"::nil getInfo l "typeFX"; _CRtext _channel win 5 180 70 20 0 "Vector \"A\" :"; set vectorA1 = _CReditLine _channel win 100 180 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorA 0; set vectorA2 = _CReditLine _channel win 145 180 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorA 1; set vectorA3 = _CReditLine _channel win 190 180 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorA 2; _CRtext _channel win 5 205 70 20 0 "Vector \"B\" :"; set vectorB1 = _CReditLine _channel win 100 205 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorB 0; set vectorB2 = _CReditLine _channel win 145 205 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorB 1; set vectorB3 = _CReditLine _channel win 190 205 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorB 2; _CRtext _channel win 5 230 70 20 0 "Vector \"C\" :"; set vectorC1 = _CReditLine _channel win 100 230 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorC 0; set vectorC2 = _CReditLine _channel win 145 230 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorC 1; set vectorC3 = _CReditLine _channel win 190 230 40 20 ET_DOWN|ET_NUMBER|ET_AHSCROLL nth_list hd vectorC 2; set typeVolEmitter = _CRcombo _channel win 5 255 150 100 CB_NOEDIT|CB_DOWN nil; addCombo typeVolEmitter "PCL_INFINIT"::"NOONE"::nil getInfo l "typeVolEmitter"; set typeMaskEmitter = _CRcombo _channel win 160 255 150 100 CB_NOEDIT|CB_DOWN nil; addCombo typeMaskEmitter "VOLUME_SPHERE"::"VOLUME_CONE"::"VOLUME_PLAN"::"VOLUME_LINE"::nil getInfo l "typeMaskEmitter"; set typeParticle = _CRcombo _channel win 315 255 150 100 CB_NOEDIT|CB_DOWN nil; addCombo typeParticle "PCL_BILLBOARD"::"PCL_RAINBOW"::"NOONE"::nil getInfo l "typeParticle"; // _CRtext _channel }; 0;; fun closeedit() = let make_rgba atoi _GETtext initColor1 atoi _GETtext initColor2 atoi _GETtext initColor3 atoi _GETtext initColor4 -> c in let _GETcombo typeFX -> [_ fx] in let _GETcombo typeVolEmitter -> [_ mask] in let _GETcombo typeMaskEmitter -> [_ vol] in let _GETcombo typeParticle -> [_ part] in strbuild ("init"::(let _GETcheck Init -> x in if x then "on" else "off")::nil):: ("initColor"::(itoa c)::nil):: ("initSizes"::(strbuild ( (_GETtext initSize0):: (_GETtext initSize1):: (_GETtext initSize2):: (_GETtext initSize3):: (_GETtext initSize4):: (_GETtext initSize5):: (_GETtext initSize6):: (_GETtext initSize7):: (_GETtext initSize8):: (_GETtext initSize9):: (_GETtext initSize10):: nil):: nil)::nil):: ("maxSize"::(_GETtext maxSize)::nil):: ("colorCycle"::(let _GETcheck cycleColor -> x in if x then "on" else "off")::nil):: ("sizeCycle"::(let _GETcheck cycleSize -> x in if x then "on" else "off")::nil):: ("typeFX"::fx::nil):: ("typeVolEmitter"::vol::nil):: ("typeMaskEmitter"::mask::nil):: ("typeParticle"::part::nil):: ("vectorA"::(strbuild ( (_GETtext vectorA1):: (_GETtext vectorA2):: (_GETtext vectorA3):: nil):: nil)::nil):: ("vectorB"::(strbuild ( (_GETtext vectorB1):: (_GETtext vectorB2):: (_GETtext vectorB3):: nil):: nil)::nil):: ("vectorC"::(strbuild ( (_GETtext vectorC1):: (_GETtext vectorC2):: (_GETtext vectorC3):: nil):: nil)::nil):: nil ;; fun savesuppdmi(l) = if l==nil then nil else let l->[a n] in // ("actionC"::(strcat a.nameInst ".start")::nil):: ("actionC"::(strcat a.nameInst ".stop")::nil):: ("actionC"::(strcat a.nameInst ".edit")::nil):: ("actionC"::(strcat a.nameInst ".register")::nil):: ("actionC"::(strcat a.nameInst ".unregister")::nil):: ("eventC"::(strcat a.nameInst ".started")::nil):: ("eventC"::(strcat a.nameInst ".stopped")::nil):: // ("action"::(strcat a.nameInst ".startS")::nil):: // ("action"::(strcat a.nameInst ".stopS")::nil):: savesuppdmi n ;; fun save(l)= [ nil /* registerF */ nil /* register */ ("plugin"::plugin::nil)::nil /* supplemental Dat */ savesuppdmi l /* supplemental Dmi */ ];; fun IniPlug(file) = set plugin=file; set class=getInfo strextr _getpack _checkpack file "name"; PlugRegister class @save nil @openedit @closeedit;;