Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
/****************************************************************************/
/*** ***/
/*** General Globals ***/
/*** ***/
/****************************************************************************/
class bitmap = 0x0100.0009;
class mesh = 0x0100.000b;
class material = 0x0100.0008;
class scene = 0x0100.000c
{
float3 scale = [1.0,1.0,1.0][*0.01];
float3 rotate = [0.0,0.0,0.0][*0.001];
float3 translate = [0.0,0.0,0.0][*0.01];
int count = 1 [ 1..256 ];
};
class matpass = 0x0100.000d
{
float aspect;
float size;
int renderpass;
int4 color;
float enlarge;
};
class fxchain = 0x0100.000e
{
int4 color = #ff808080["rgba"];
int2 zoom = [1.0,1.0][[0.001,0.001] .. [1000.0,1000.0] *0.01];
int rotate = 0.0 [-100.0 .. 100.0 *0.001];
float2 center = [0.5,0.5][[-100.0,-100.0] .. [100.0,100.0] *0.01];
float3 campos = [0.0,0.0,0.0][*0.01];
float3 camrot = [0.0,0.0,0.0][*0.001];
};
class matrix = 0x0100.000f
{
float3 scale = [1.0,1.0,1.0][*0.01];
float3 rotate = [0.0,0.0,0.0][*0.001];
float3 translate = [0.0,0.0,0.0][*0.01];
};
class spline = 0x0100.0010;
class player = 0x0100.0007;
class meshanim = 0x0100.0011
{
int3 scale = [1.0,1.0,1.0][*0.01];
int3 rotate = [0.0,0.0,0.0][*0.001];
int3 translate = [0.0,0.0,0.0][*0.01];
int3 vector = [0.0,0.0,0.0][*0.01];
int parameter = 0.0[*0.01];
};
class light = 0x0100.0012
{
int4 diffuse = #ff808080["rgba"];
int4 ambient = #ff404040["rgba"];
int4 specular = #ffffffff["rgba"];
float range = 1.0 [ 0.0 .. 256 ];
float rangecut = 0.25 [ 0.01 .. 1.00 ];
float amplify = 1.0 [ 0.0 .. 256 ];
float spotfalloff = 0.0 [ 0.0 .. 1.0 ];
float spotinner = 0.0 [ 0.0 .. 1.0 ];
float spotouter = 0.25 [ 0.0 .. 1.0 ];
};
class particles = 0x0100.0013;
/****************************************************************************/
void OnInit() = 1;
void OnFrame() = 2;
void OnSound() = 3;
void OnGenerate() = 4; // used by tool only
/****************************************************************************/
int SystemTime; // global #0
int SystemBeat; // global #1
int SystemTicks; // global #2
int SystemBPM; // global #3
int SystemBeatMax; // global #4
player SystemPlayer; // global #5
int SystemMouseX; // global #6
int SystemMouseY; // global #7
// global #8 is first operator-object!!
/****************************************************************************/
/*** ***/
/*** Mesh Generator ***/
/*** ***/
/****************************************************************************/
void Cube(
int x = 3 [ 1 .. 64 ] ,
int y = 3 [ 1 .. 64 ] ,
int z = 3 [ 1 .. 64 ] ,
int crease = 1 [ "cycle:smooth shading|hard shading" ],
) ( mesh -- mesh ) = -0x01,"mod rowa",'q';
void SelectAll(
int maskset = 0 [ "mask24:efv" ],
int maskclr = 0 [ "mask24:efv" ],
) ( mesh -- mesh ) = -0x02,"mod";
void SelectCube(
float3 center = [0.0,0.0,0.0][*0.001],
float3 size = [1.0,1.0,1.0][*0.01],
int flags = 0 [ "cycle:add|set" ],
int maskset = 0 [ "mask24:efv" ],
int maskclr = 0 [ "mask24:efv" ],
) ( mesh -- mesh ) = -0x03,"mod",'Q';
void Subdivide(
int mask = 0 [ "mask8:f" ],
float alpha = 1.0 [*0.01],
int count = 1 [ "cycle:off|1|2|3|4|5|6" ],
)( mesh -- mesh ) = -0x04,"mod rowc",'u';
void Extrude(
int inputmask = 0 [ "mask8:f" ],
int mode = 0 [ "cycle:normal|groups|faces|indface" ],
int outputmask = 0 [ "mask8:v" ],
) ( mesh -- mesh ) = -0x05,"mod rowc",'e';
void Transform(
int mask = 0 [ "mask8:v" ],
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01],
) ( mesh -- mesh ) = -0x06,"mod",'t';
void Cylinder(
int x = 3 [ 3 .. 64 ],
int y = 3 [ 3 .. 64 ],
) ( mesh -- mesh ) = -0x09,"mod rowa",'c';
void NewMesh(
int dummy0 = 0 [ 0 .. 3],
int dummy1 = 0 [ 0 .. 3],
// int colorSets = 0 [ "cycle:0|1" ],
// int uvSets = 0 [ "cycle:1|2|3|4 "]
) ( -- mesh ) = -0x0a,"mod",'n';
void MeshMaterial(
int id = 1 [ 1 .. 255 ],
int mask = 0 [ "mask8:f" ],
) ( mesh material -- mesh ) = -0x0b,"mod link2",'m';
void TransformEx(
int mask = 0 [ "mask8:v" ],
int sj = 0 [ "cycle:pos|norm|tangent|color0|color1|uv0|uv1|uv2|uv3" ],
int dj = 0 [ "cycle:pos|norm|tangent|color0|color1|uv0|uv1|uv2|uv3" ],
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01],
) ( mesh -- mesh ) = -0x0d,"mod",'T';
void Crease(
int mask = 0 [ "mask8:f" ],
int what = 2 [ "cycle:*1|norm:*2|tangent:*3|color0:*4|color1:\n*5|uv0:*6|uv1:*7|uv2:*8|uv3" ],
int selType = 0 [ "cycle:face|edge" ],
) ( mesh -- mesh ) = -0x0e,"mod";
void UnCrease(
int mask = 0 [ "mask8:f" ],
int what = 2 [ "cycle:*1|norm:*2|tangent:*3|color0:*4|color1:\n*5|uv0:*6|uv1:*7|uv2:*8|uv3" ],
int selType = 0 [ "cycle:face|edge" ],
) ( mesh -- mesh ) = -0x0f,"mod";
void CalcNormals(
int ignoreCreases = 0 [ "cycle:no|yes" ],
int mask = 0 [ "mask8:f" ],
int calcWhat = 1 [ "cycle:|normals:*1|tangents" ]
) ( mesh -- mesh ) = -0x10,"mod";
void Torus(
int x = 8 [ 3 .. 64 ],
int y = 4 [ 3 .. 64 ],
float radiusi = 0.333 [*0.001],
int phase = 0.0 [*0.01],
float arclen = 1.0 [ 0.0 .. 1.0 *0.001],
) ( mesh -- mesh ) = -0x11,"mod rowa",'o';
void Sphere(
int x = 12 [ 3 .. 64 ],
int y = 6 [ 3 .. 64 ],
) ( mesh -- mesh ) = -0x12,"mod rowa",'h';
void Triangulate(
int threshold = 5 [ 4 .. 64 ],
int mask = 0 [ "mask8:f" ],
int tesselation = 0 [ "cycle:quad->4tris|quad->2tris" ],
) ( mesh -- mesh ) = -0x13,"mod rowc";
void Cut(
float2 direction = [0.0,0.0][*0.01],
float offset = 0.0 [*0.01],
int mode = 1 [ "cycle:clip|cut" ],
) ( mesh -- mesh ) = -0x14,"mod rowc";
void ExtrudeNormal(
float distance = 0.125 [*0.005],
int mask = 0 [ "mask8:v" ],
) ( mesh -- mesh ) = -0x15,"mod";
void Displace(
float amplitude = 0.125 [*0.005],
int mask = 0 [ "mask8:v" ],
) ( mesh bitmap -- mesh ) = -0x16,"mod",'D';
void Bevel(
float elevation = 0.125 [*0.005],
float pullin = 0.125 [*0.005],
int inputmask = 0 [ "mask8:f" ],
int mode = 1 [ "cycle:normal|groups|faces|indface" ],
int outputmask = 0 [ "mask8:v" ],
) ( mesh -- mesh ) = -0x17,"mod rowc",'b';
void Perlin3D(
int mask = 0 [ "mask8:v" ],
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01],
float3 amplitude = [0.100,0.100,0.100][*0.001],
) ( mesh -- mesh ) = -0x18,"mod",'p';
void Add(
) ( mesh mesh -- mesh ) = -0x19,"mod copy2 multi",'a';
void DeleteFaces(
int mask = 0 [ "mask8:f" ],
) ( mesh -- mesh ) = -0x1a,"mod rowc",'d';
void Babe(
string file = 0 [ "string" ],
// int colorSets = 0 [ "cycle:0|1" ],
// int uvSets = 0 [ "cycle:1|2|3|4" ],
int dummy0 = 0 [ 0 .. 3],
int2 animrange = [0,16][*0.125],
int animphase = 0.0[*0.001],
int animation = 0 [ "cycle:on|off" ],
) ( -- mesh ) = -0x1b,"mod";
void BeginRecord(
) ( mesh -- mesh ) = -0x1c,"mod rowb";
void AnimLabel(
int label = 0 ["label"],
int flags = 0 [ "cycle:|double" ],
) ( mesh -- mesh ) = -0x1d,"mod rowb";
void SelectRandom(
int ratio = 128 [ 0 .. 255 ],
int seed = 123 [ 0 .. 255 ],
int maskset = 0 [ "mask24:efv" ],
int maskclr = 0 [ "mask24:efv" ],
) ( mesh -- mesh ) = -0x1f,"mod";
void MeshMultiply(
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01],
int count = 1 [ 1 .. 256 ],
) ( mesh -- mesh ) = -0x20,"copy";
void SelectAngle(
float angle = 0.8 [ 0.0 .. 1.0 *0.01],
int maskset = 0 [ "mask8:e" ],
int maskclr = 0 [ "mask8:e" ]
) ( mesh -- mesh ) = -0x21,"mod";
void ExtrudeWK(
int mask = 0 [ "mask8:f" ],
int mode = 0 [ "cycle:normal|groups|faces|indface" ],
int count = 1 [ 1 .. 256 ],
float distance = 1.0 [ *0.01 ],
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
int scalemode = 0 [ "cycle:local|global" ]
) ( mesh -- mesh ) = -0x22,"mod";
/****************************************************************************/
/*** ***/
/*** Misc ***/
/*** ***/
/****************************************************************************/
void PrintDez(int num) = -0x51;
void PrintHex(int num) = -0x52;
void Print(string str) = -0x53;
// void Show() ( object -- object ) = -0x54;
void Copy() ( object -- object ) = -0x55;
void LoadSong(player pl,string name,int mode=0["cycle:v2m|ogg|mp3"]) = -0x56;
void PlaySong(player pl,int songnr) = -0x57;
object FindLabel(string name) = -0x58;
int Pow(int a,int b) = -0x59;
/****************************************************************************/
void CamFrustrum(int near,int far) = -0x61;
void CamMat() ( matrix -- ) = -0x66;
void ObjMat() ( matrix -- ) = -0x67;
// obsolete....
void CamPos(int3 pos,int3 rot) = -0x62;
void CamSet() = -0x63;
void ObjPos(int3 scale,int3 rot,int3 trans) = -0x64;
void ObjSet() = -0x65;
/****************************************************************************/
void MatrixGenerate(float3 s,float3 r,float3 t,int mode) ( -- matrix )= -0x71;
void MatrixModify(float3 s,float3 r,float3 t,int mode) ( matrix -- matrix ) = -0x72;
void MatrixLabel(int label) = -0x73;
void SplineKey4(
int time = 0.0 [ 0 .. 1 *0.01 ],
int4 v = [0.0,0.0,0.0,1.0] [ *0.01 ]
) ( spline -- spline ) = -0x46,"mod" ;
void Spline(int count,int tension,int continuity) ( -- spline ) = -0x41;
void SplineSort() ( spline -- ) = -0x42;
void SplineKey1(int time,int v) ( spline -- spline ) = -0x43;
void SplineKey2(int time,int2 v) ( spline -- spline ) = -0x44;
void SplineKey3(int time,int3 v) ( spline -- spline ) = -0x45;
int SplineCalc1(int time) ( spline -- ) = -0x47;
int2 SplineCalc2(int time) ( spline -- ) = -0x48;
int3 SplineCalc3(int time) ( spline -- ) = -0x49;
int4 SplineCalc4(int time) ( spline -- ) = -0x4a;
/****************************************************************************/
/*** ***/
/*** Texture Generator ***/
/*** ***/
/****************************************************************************/
void SetSize(
int x = 8 [ "cycle:1|2|4|8|16|32|64|128|256|512|1024|2048" ],
int y = 8 [ "cycle:1|2|4|8|16|32|64|128|256|512|1024|2048" ]
) ( -- ) = -0x81;
void MakeTexture(
) ( bitmap -- bitmap ) = -0x82,"mod",'m';
void SetTexture(
int nr = 0 [ 0 .. 8 ]
) ( bitmap -- bitmap ) = -0x83;
void Flat(
int4 color = [0,0,0,0]["rgba"]
) ( -- bitmap ) = -0x84,"mod",'f';
void Merge(
int mode = 0 [ "cycle:add|sub|mul|diff|makealpha" ]
) ( bitmap bitmap -- bitmap ) = -0x85,"mod copy2",'a';
void Color(
int mode = 0 [ "cycle:mul|add|sub|gray|invert|scale" ],
int4 color = #ff808080["rgba"]
) ( bitmap -- bitmap ) = -0x86,"mod",'c';
void GlowRect(
float2 center = [0.5,0.5][*0.001],
float2 radius = [0.25,0.25][[0,0]*0.001],
float2 size = [0.0,0.0][[0,0]*0.001],
int4 color = #ffffffff["rgba"],
float alpha = 1.0 [0*0.001],
float power = 0.5 [0*0.001]
) ( bitmap -- bitmap ) = -0x87,"mod",'g';
void Dots(
int4 col0 = #ff000000["rgba"],
int4 col1 = #ffffffff["rgba"],
int count = 16 [ 0 .. 32767 ],
int seed = 0 [ 0 .. 32767 ]
) ( bitmap -- bitmap ) = -0x88,"mod";
void Blur(
int order = 1 ["cycle:off|box|triangle|gauss"],
int2 size = [0.1,0.1][[0,0]*0.001],
int amp = 1.0[0*0.01]
) ( bitmap -- bitmap ) = -0x89,"mod",'b';
void Mask(
) ( bitmap bitmap bitmap -- bitmap ) = -0x8a,"mod mod2";
void HSCB(
int h = 0.0 [*0.01],
int s = 1.0 [*0.01],
int c = 1.0 [0*0.01],
int b = 1.0 [*0.01]
) ( bitmap -- bitmap ) = -0x8b,"mod",'h';
void Rotate(
float angle = 0.0 [*0.001],
float2 zoom = [1.0,1.0][*0.001],
int2 center = [0.5,0.5][*0.001],
int border = 0 ["cycle:wrapu|clampu|mirroru:*2wrapv|clampv|mirrorv"]
) ( bitmap -- bitmap ) = -0x8c,"mod",'r';
void Distort(
int str = 0.1 [*0.01],
int border = 0 ["cycle:wrapu|clampu|mirroru:*2wrapv|clampv|mirrorv"]
) ( bitmap bitmap -- bitmap ) = -0x8d,"mod copy2",'d';
void Normals(
int str = 0.1 [*0.01],
int mode = 0 ["cycle:2d|3d:*1normal|tangent"]
) ( bitmap -- bitmap ) = -0x8e,"mod",'n';
void Light(
int mode = 0 [ "cycle:spot|point|directional" ],
float3 pos = [0.5,0.5,0.25][*0.001],
float2 dir = [0.0,0.25][*0.001],
int4 diffuse = #ffff0000["rgba"],
int4 ambient = #ff404040["rgba"],
float outer = 0.8 [0 .. 1*0.001],
float falloff = 1.0 [0 .. 16*0.01],
float amp = 1.0[*0.01]
) ( bitmap -- bitmap ) = -0x8f,"mod",'l';
void Bump(
int mode = 0 [ "cycle:spot|point|directional" ],
float3 pos = [0.5,0.5,0.25][*0.001],
float2 dir = [0.0,0.25][*0.001],
int4 diffuse = #ffff0000["rgba"],
int4 ambient = #ff404040["rgba"],
float outer = 0.8 [0 .. 1*0.001],
float falloff = 1.0 [0 .. 16*0.01],
float amp = 1.0[*0.01],
int4 specular = #ff000000["rgba"],
float spow = 16.0 [0*0.1],
int samp = 1.0[0..16*0.01]
) ( bitmap bitmap -- bitmap ) = -0x90,"mod copy2",'B';
void Text(
int2 pos = [0.1,0.1][*0.001],
int height = 0.1[*0.001],
int width = 0.0[*0.001],
int4 color = #ffffffff["rgba"],
string text = 0 ["string"]
) ( bitmap -- bitmap ) = -0x91,"mod",'t';
void Wavelet(
int mode = 0 ["cycle:encode|decode"],
int steps = 1 ["cycle:0|1|2|3|4|5|6|7|8"]
) ( bitmap -- bitmap ) = -0x94,"mod";
void Perlin(
int frequency = 2 [ 1 .. 12 ],
int octaves = 3 [ 1 .. 12 ],
float fadeoff = 0.5 [ 0*0.001],
int seed = 0 [ 0 .. 255 ],
int mode = 0 [ "cycle:normal|abs|sin|sin&abs" ],
float amp = 1.0 [ 0*0.001],
float gamma = 1.0 [ 0*0.001],
int4 c0 = #ff000000["rgba"],
int4 c1 = #ffffffff["rgba"]
) ( -- bitmap ) = -0x92,"mod",'p';
void Cell(
int4 c0 = #ffff0000["rgba"],
int4 c1 = #ffffffff["rgba"],
int4 cb = #ff000000["rgba"],
int count = 16 [ 1 .. 256 ],
int seed = 0 [ 0 .. 32767 ],
float amp = 1.0 [ *0.001],
float gamma = 0.5 [ 0*0.001],
int mode = 1 [ "cycle:out|in:*1range|color:*2normal|invert" ]
) ( -- bitmap ) = -0x93,"mod",'C';
void Gradient(
int4 c0 = #ff000000["rgba"],
int4 c1 = #ffffffff["rgba"],
int offset = 0.0 [*0.005],
float angle = 0.125 [*0.001],
float len = 1.414 [*0.003]
) ( -- bitmap ) = -0x95,"mod";
/****************************************************************************/
/*** ***/
/*** Material (and scene) ***/
/*** ***/
/****************************************************************************/
/*
void NewScene // obsolete
(
) ( -- scene ) = -0xc0;
*/
void Scene
(
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01]
) ( mesh -- scene ) = -0xc1,"link",'n';
void TransScene
(
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01]
) ( scene -- scene ) = -0xc2,"link",'t';
void Multiply
(
float3 s = [1.0,1.0,1.0][*0.01],
float3 r = [0.0,0.0,0.0][*0.001],
float3 t = [0.0,0.0,0.0][*0.01],
int count = 1 [ 1 .. 256 ]
) ( scene -- scene ) = -0xc3,"link",'m';
void AddScene
(
) ( scene scene -- scene ) = -0xc4,"link multi",'a';
void PaintScene
(
) ( scene -- scene ) = -0xc5;
void LabelScene
(
int label = 0 ["label"],
) ( scene -- scene ) = -0xc6,"mod",'l';
void LightScene
(
float3 scale = [1.0,1.0,1.0][*0.01],
float3 rotate = [0.0,0.0,0.0][*0.001],
float3 translate = [0.0,0.0,0.0][*0.01],
int mode = 0 ["cycle:point|spot|dir|ambient:*3world space|camera space"],
int mask = 0 [ 0 .. 23 ],
int label = 0 ["label"],
float range = 1.0 [ 0.0 .. 256 ],
float rangecut = 0.25 [ 0.01 .. 1.00 *0.01],
float amplify = 1.0 [ 0.0 .. 256 *0.01 ],
float spotfalloff = 1.0 [ 0.0 .. 16.0 *0.01],
float spotinner = 0.0 [ 0.0 .. 1.0 *0.01],
float spotouter = 0.25 [ 0.0 .. 1.0 *0.01],
int4 diffuse = #ff808080["rgba"],
int4 ambient = #ff404040["rgba"],
int4 specular = #ffffffff["rgba"]
) ( -- scene ) = -0xc7,"link",'L';
/*
void PaintSceneLater
(
) ( scene -- scene ) = -0xc8;
*/
void PartScene
(
) ( particles -- scene ) = -0xc9,"link",'p';
/****************************************************************************/
void NewMaterial
(
) ( -- material ) = -0xe0,"mod",'n';
void MatBase
(
int mpass = 0 [ 0 .. 15 ],
int flags = 0x0300 ["cycle:singlesided|doublesided:*1|renormalize:*2light off|light on:*3diffuse|tfactor:*8zoff|zwrite|zread|zon:*12blendoff|blendalpha|blendadd|blendmul|blendsmooth:*4counterclockwise|clockwise:*11draw|only z/stencil"],
int mode = 2 ["cycle:off|flat|tex|add|mul|addsmooth"],
int renderpass = 0 [ 0 .. 255 ],
int4 color = #ffff8080["rgba"]
) ( material -- material ) = -0xe1,"mod",'b';
void MatTexture
(
int mpass = 0 [ 0 .. 15 ],
int stage = 0 [ 0 .. 7 ],
int flags = 7 ["cycle:filter off|filter min|filter mag|filter on:*2mip off|mip on:*3tile|clamp:*8uv0|uv1|uv2|uv3|uv4|uv5|uv6|uv7|envi|specular|eye space|world space|model space"]
) ( material bitmap -- material ) = -0xe2,"mod link2",'t';
void MatFinalizer
(
int mpass = 0 [ 0 .. 15 ],
int program = 1 ["cycle:off|static|dynamic|sprites|trees|thicklines|outlines|shadow|spikes|finns" ],
float aspect = 1.0 [ 0.001 .. 16 *0.001],
float size = 0.01 [ 0.001 .. 16 *0.001],
float enlarge = 0.00 [ 0.000 .. 256 *0.001],
) ( material -- material ) = -0xe3,"mod",'f';
void MatLabel
(
int label = 0 ["label"],
int mpass = 0 [ 0 .. 15 ]
) ( material -- material ) = -0xe4,"mod";
void MatTexTrans
(
int label = 0 ["label"],
int mpass = 0 [ 0 .. 15 ],
int stage = 0 [ 0 .. 7 ],
float3 scale = [1.0,1.0,1.0][*0.01],
float3 rotate = [0.0,0.0,0.0][*0.001],
float3 translate = [0.0,0.0,0.0][*0.01]
) ( material -- material ) = -0xe5,"mod";
void MatDX7
(
int mpass = 0 [ 0 .. 15 ],
int color0 = 32 [ "cycle:diffuse|current|texture|tfactor:*2..|invert|alpha|invalpha:*8disable|selectarg1|selectarg2|modulate|modulate2x|modulate4x|add|addsigned|addsigned2x|subtract|addsmooth|blenddiffusealpha|blendtexturealpha|blendfactoralpha|blendtexturealphapm|blendcurrentalpha|---|modulatealph_addcolor|modulatecolor_addalpha|modulateinvalpha_addcolor|modulateinvcolor_addalpha|---|---|dotproduct3|---|---:*4diffuse|current|texture|tfactor|specular:*6..|invert|alpha|invalpha" ],
int color1 = 33 [ "cycle:diffuse|current|texture|tfactor:*2..|invert|alpha|invalpha:*8disable|selectarg1|selectarg2|modulate|modulate2x|modulate4x|add|addsigned|addsigned2x|subtract|addsmooth|blenddiffusealpha|blendtexturealpha|blendfactoralpha|blendtexturealphapm|blendcurrentalpha|---|modulatealph_addcolor|modulatecolor_addalpha|modulateinvalpha_addcolor|modulateinvcolor_addalpha|---|---|dotproduct3|---|---:*4diffuse|current|texture|tfactor|specular:*6..|invert|alpha|invalpha" ],
int alpha0 = 32 [ "cycle:diffuse|current|texture|tfactor:*2..|invert:*8disable|selectarg1|selectarg2|modulate|modulate2x|modulate4x|add|addsigned|addsigned2x|subtract|addsmooth:*4diffuse|current|texture|tfactor|specular:*6..|invert" ],
int alpha1 = 33 [ "cycle:diffuse|current|texture|tfactor:*2..|invert:*8disable|selectarg1|selectarg2|modulate|modulate2x|modulate4x|add|addsigned|addsigned2x|subtract|addsmooth:*4diffuse|current|texture|tfactor|specular:*6..|invert" ]
) ( material -- material ) = -0xe6,"mod";
void MatBlend
(
int mpass = 0 [ 0 .. 15 ],
int alphatest = 4 [ "cycle:never|less|equal|lessequal|greater|notequal|greaterequal|always" ],
int alpharef = 4 [ 0 .. 255 ],
int source = 1 [ "cycle:zero|one|srccolor|invsrccolor|srcalpha|invsrcalpha|destalpha|invdestalpha|destcolor|invdestcolor|srcaplhasat" ],
int op = 0 [ "cycle:off|add|subtract|revsubtract|min|max" ],
int dest = 1 [ "cycle:zero|one|srccolor|invsrccolor|srcalpha|invsrcalpha|destalpha|invdestalpha|destcolor|invdestcolor" ]
) ( material -- material ) = -0xe7,"mod";
void MatStencil
(
int mpass = 0 [ 0 .. 15 ],
int stenciltest = 7 [ "cycle:never|less|equal|lessequal|greater|notequal|greaterequal|always" ],
int stencilref = 0 [ 0 .. 255 ],
int stencilfail = 0 [ "cycle:keep|zero|replace|incrsat|decrsat|invert|incr|decr" ],
int zfail = 0 [ "cycle:keep|zero|replace|incrsat|decrsat|invert|incr|decr" ],
int pass = 0 [ "cycle:keep|zero|replace|incrsat|decrsat|invert|incr|decr" ]
) ( material -- material ) = -0xe8,"mod";
void MatLight
(
int mpass = 0 [ 0 .. 15 ],
int diffusesource = 0 [ "cycle:material|vertex" ],
int specularsource = 0 [ "cycle:material|vertex" ],
int ambientsource = 0 [ "cycle:material|vertex" ],
int emissivesource = 0 [ "cycle:material|vertex" ],
int4 diffuse = #ffffffff["rgba"],
int4 specular = #ffffffff["rgba"],
int4 ambient = #ffffffff["rgba"],
int4 emissive = #00000000["rgba"],
float specularity = 0.0 [0 .. 64 *0.02],
int specular = 0 ["cycle:off|on"],
int mask = 1 [ "mask24" ]
) ( material -- material ) = -0xe9,"mod";
/****************************************************************************/
void MeshMatBase
(
int mpass = 0 [ 0 .. 15 ],
int flags = 0x0300 ["cycle:singlesided|doublesided:*1|renormalize:*2light off|light on:*3diffuse|tfactor:*8zoff|zwrite|zread|zon:*12blendoff|blendalpha|blendadd|blendmul|blendsmooth:*4counterclockwise|clockwise:*11draw|only z/stencil"],
int mode = 2 ["cycle:off|flat|tex|add|mul|addsmooth"],
int renderpass = 0 [ 0 .. 255 ],
int4 color = #ffff8080["rgba"]
) ( mesh -- mesh ) = -0xf1,"mod rowb";
void MeshMatTexture
(
int mpass = 0 [ 0 .. 15 ],
int stage = 0 [ 0 .. 7 ],
int flags = 7 ["cycle:filter off|filter min|filter mag|filter on:*2mipmap off|mipmap on:*3tile|clamp:*8uv0|uv1|uv2|uv3|uv4|uv5|uv6|uv7|envi|specular|eye space|world space|model space"]
) ( mesh bitmap -- mesh ) = -0xf2,"mod rowb link2";
void MeshMatFinalizer
(
int mpass = 0 [ 0 .. 15 ],
int program = 1 ["cycle:off|static|dynamic|sprites|trees|thicklines|outlines|shadow|spikes|finns" ],
float aspect = 1.0 [ 0.001 .. 16 *0.001],
float size = 0.01 [ 0.001 .. 16 *0.001],
float enlarge = 0.00 [ 0.000 .. 256 *0.001],
) ( mesh -- mesh ) = -0xf3,"mod rowb";
void MeshMatLabel
(
int label = 0 ["label"],
int mpass = 0 [ 0 .. 15 ]
) ( mesh -- mesh ) = -0xf4,"mod rowb";
/****************************************************************************/
/*** ***/
/*** FX Chain and post-processing effects ***/
/*** ***/
/****************************************************************************/
void NewFXChain
(
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int4 color = #ff000000["rgba"]
) ( -- fxchain ) = -0x100,"mod fxalloc",'n';
void BeginViewport
(
int3 pos = [0.0,0.0,-5.0][*0.01],
int3 parm2 = [0.0,0.0,0.0][*0.01],
int aspect = 1.0 [ 0.0 .. 100.0 *0.01],
int mode = 0 [ "cycle:none|color|z|both:*2rotate|lookat" ],
int ocount = 0,
int4 color = #ff000000 ["rgba"],
int zoom = 1.0 [ 0.001 .. 1000.0 *0.01]
) ( fxchain -- fxchain ) = -0x101;//,"link",'v';
void RenderChain
(
) ( fxchain -- ) = -0x102;
void Layer2D
(
int4 color = #ffff0000["rgba"],
int4 screenrect = [0.5,0.5,1.0,1.0][*0.01],
int4 uvrect = [0.0,0.0,1.0,1.0][*0.01],
int z = 1.0 [ 0.0 .. 1.0 * 0.0005],
int clear = 0 [ "cycle:none|color|z|both" ],
int ocount = 0,
float2 zoom = [1.0,1.0][[0.0625,0.0625] .. [100.0,100.0] *0.01],
int rotate = 0.0 [ -100.0 .. 100.0 *0.01],
float2 center = [0.5,0.5][[-100.0,-100.0] .. [100.0,100.0] *0.01]
) ( fxchain material -- fxchain ) = -0x103,"link",'l';
void FXMerge
(
int mode = 0 [ "cycle:add|mul|blend|sub|addsmooth" ],
int param = 0.0 [ 0.0 .. 1.0 * 0.01],
float2 zoom = [1.0,1.0][[0.0625,0.0625] .. [100.0,100.0] *0.01],
int rotate = 0.0 [ -100.0 .. 100.0 *0.01],
float2 center = [0.5,0.5][[-100.0,-100.0] .. [100.0,100.0] *0.01],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0
) ( fxchain fxchain -- fxchain ) = -0x104,"link fxalloc",'a';
void FXColor
(
int mode = 0 [ "cycle:add|mul|blend|sub" ],
int4 color = #ff808080["rgba"],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
float2 zoom = [1.0,1.0][[0.0625,0.0625] .. [100.0,100.0] *0.01],
int rotate = 0.0 [ -100.0 .. 100.0 *0.01],
float2 center = [0.5,0.5][[-100.0,100.0] .. [100.0,100.0] *0.01],
int lighten = 0.0 [ -1.0 .. 3.0 * 0.01]
) ( fxchain -- fxchain ) = -0x105,"link fxalloc",'c';
void EndViewport
(
int ocount = 0
) ( fxchain -- fxchain ) = -0x106;//,"link",'e';
void FXPaintScene
(
int ocount = 0
) ( fxchain scene -- fxchain ) = -0x0107;//,"link",'p';
void Blend4x
(
float4 rect0 = [0.0,0.0,1.0,1.0][*0.01],
float4 rect1 = [0.0,0.0,1.0,1.0][*0.01],
float4 rect2 = [0.0,0.0,1.0,1.0][*0.01],
float4 rect3 = [0.0,0.0,1.0,1.0][*0.01],
int coords = 0 [ "cycle:absolute|relpix" ],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 4.0 *0.01]
) ( fxchain -- fxchain ) = -0x109,"link fxalloc";
void Viewport
(
int3 pos = [0.0,0.0,-5.0][*0.01],
int3 parm2 = [0.0,0.0,0.0][*0.01],
int aspect = 1.0 [ 0.0 .. 100.0 * 0.01],
int mode = 0 [ "cycle:none|color|z|both:*2rotate|lookat" ],
int ocount = 0,
int4 color = #ff000000 ["rgba"],
int zoom = 1.0 [ 0.001 .. 1000.0 *0.01]
) ( fxchain scene -- fxchain ) = -0x10a,"link",'v';
void FXResetAlloc
(
) = -0x10b;//,"link",'f';
void LabelChain
(
int label = 0 ["label"],
int ocount = 0
) ( fxchain -- fxchain ) = -0x10c,"link",'l';
/****************************************************************************/
/****************************************************************************/
void Particles
(
float rate = 25.0 [ 0 .. 1024 * 0.1 ],
float jitter = 0.0 [ 0 .. 1 * 0.01 ],
int max = 1000 [ 16 .. 16384 * 1 ],
float life = 2.0 [ 0 .. 1024 * 0.1 ],
float3 gravity = [0.0,0.0,0.0] [ *0.001 ],
) ( material -- particles ) = -0x120,"link",'n';
void PartEmitter
(
float3 scale = [1.0,1.0,1.0][*0.01],
float3 rotate = [0.0,0.0,0.0][*0.001],
float3 translate = [0.0,0.0,0.0][*0.01],
int flags = 0 [ "cycle:sphere|hemisphere" ],
float surface = 0.0 [ 0 .. 1 * 0.01 ],
float scatter = 0.0 [ -1 .. 1 * 0.01 ],
float speed = 0.0 [ *0.01 ],
float speedrand = 0.0 [ *0.001 ],
) ( particles -- particles ) = -0x121,"mod",'e';
void PartRotate
(
float RotStart = 0.0 [ 0 .. 1 *0.01 ],
float RotRand = 0.0 [ 0 .. 1 *0.01 ],
float RotSpeed = 0.0 [ 0 .. 1 *0.01 ],
) ( particles -- particles ) = -0x122,"mod",'r';
void PartLife
(
float2 Size = [ 0.1,0.1 ] [ [0,0] .. [16,16] * 0.01 ],
float2 SizeTime = [ 0.1,0.9 ] [ [0,0] .. [1,1] *0.01 ],
float Aspect = 1 [ 0.01 .. 100.0 *0.01 ],
int4 Color0=#ffffc0c0["rgba"],
int4 Color1=#ffc0ffc0["rgba"],
int4 Color2=#ffc0c0ff["rgba"],
float3 ColorTime = [0.125,0.5,0.875] [ [0,0,0] .. [1,1,1] * 0.01 ],
) ( particles -- particles ) = -0x123,"mod",'l';
void PartSpline
(
int mode = 0 ["cycle:off|move|follow"],
float force = 0.01 [ 0.000 .. 1.000 * 0.001 ],
) ( particles spline -- particles ) = -0x124,"mod";
/****************************************************************************/
/****************************************************************************/
// Material Base Flags
const int MBF_DOUBLESIDED = 0x0001;
const int MBF_RENORMALIZE = 0x0002;
const int MBF_LIGHT = 0x0004;
const int MBF_ZOFF = 0x0000;
const int MBF_ZWRITE = 0x0100;
const int MBF_ZREAD = 0x0200;
const int MBF_ZON = 0x0300;
const int MBF_BLENDOFF = 0x0000;
const int MBF_BLENDALPHA = 0x1000;
const int MBF_BLENDADD = 0x2000;
const int MBF_BLENDMUL = 0x3000;
/****************************************************************************/
// Material Base Mode
const int MBM_FLAT = 1;
const int MBM_TEX = 2;
const int MBM_ADD = 3;
const int MBM_MUL = 4;
/****************************************************************************/
// Material Texture Flags
const int MTF_FILTERMIN = 0x0001;
const int MTF_FILTERMAG = 0x0002;
const int MTF_FILTER = 0x0003;
const int MTF_MIPMAP = 0x0004;
const int MTF_CLAMP = 0x0008;
const int MTF_UV0 = 0x0000;
const int MTF_UV1 = 0x0100;
const int MTF_UV2 = 0x0200;
const int MTF_UV3 = 0x0300;
const int MTF_UV4 = 0x0400;
const int MTF_UV5 = 0x0500;
const int MTF_UV6 = 0x0600;
const int MTF_UV7 = 0x0700;
const int MTF_UVENVI = 0x0800;
const int MTF_UVSPEC = 0x0900;
const int MTF_UVPOS = 0x0a00;
/****************************************************************************/
/****************************************************************************/
/*
void ExtrudeSRT(
int mask = 0 [ "mask8:f" ],
int mode = 0 [ "cycle:normal|groups|faces|indface" ],
int3 s = [1.0,1.0,1.0][*0.01],
int3 r = [0.0,0.0,0.0][*0.001],
int3 t = [0.0,0.0,0.0][*0.01],
int count = 1 [ 1 .. 64 ],
) ( mesh -- mesh ),"mod rowc"
{
int i;
i=0;
while(i<count)
{
Extrude(mask,mode,1);
Transform(1,s,r,t);
i = i+1;
}
}
*/
void ExtrudeSRT() {}
void Flatshade(
int mask = 0 [ "mask8:f" ]
) ( mesh -- mesh ),"mod"
{
Crease(mask,2,2);
}
void Crashzoom(
int steps = 3 [ 1 .. 9 ],
int zoom = 1.5 [ 1.0 .. 20.0 *0.005],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 4.0 *0.01]
) ( fxchain -- fxchain ),"link fxalloc",'z'
{
int oc;
int z1;
int z2;
int z3;
int amp;
while(steps>0)
{
oc = 1;
amp = 1.0;
if(steps==1)
{
oc = ocount;
amp = amplify;
}
z1 = Pow(zoom,Pow(4.0,-steps));
z1 = z1;
z2 = z1*z1;
z3 = z2*z1;
steps = steps-1;
Blend4x([0,0,1,1],
[0.5-0.5/z1,0.5-0.5/z1,0.5+0.5/z1,0.5+0.5/z1],
[0.5-0.5/z2,0.5-0.5/z2,0.5+0.5/z2,0.5+0.5/z2],
[0.5-0.5/z3,0.5-0.5/z3,0.5+0.5/z3,0.5+0.5/z3],
0,size,oc,amp);
}
}
void FXWideBlur(
int radius = 12.0 [ 1.0 .. 128.0 ],
int minradius = 1.0 [ 1.0 .. 128.0 ],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 4.0 *0.01 ],
int shape = 1 [ "cycle:diamond|square "]
) ( fxchain -- fxchain ),"link fxalloc",'b'
{
int oc;
int amp;
int r;
r = radius;
while(r>=minradius)
r = r*0.5;
amplify = amplify / 2;
while(r<radius)
{
oc = 1;
amp = 1.0;
if(r*2>=radius)
{
oc = ocount;
amp = amplify;
}
if(shape==0)
Blend4x([-r,0,-r,0],[r,0,r,0],[0,-r,0,-r],[0,r,0,r],1,size,oc,amp);
else
Blend4x([-r,-r,-r,-r],[r,-r,r,-r],[-r,r,-r,r],[r,r,r,r],1,size,oc,amp);
r = r * 2;
}
}
void FXNop(
) ( fxchain -- fxchain ),"nop",'N'
{
}
void FXBlur8(
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 2.0 *0.01]
) ( fxchain -- fxchain ),"link fxalloc"
{
Blend4x([-2.5,0,-2.5,0],[-0.5,0,-0.5,0],[1.5,0,1.5,0],[3.5,0,3.5,0],1,size,1,1.0);
Blend4x([0,-2.5,0,-2.5],[0,-0.5,0,-0.5],[0,1.5,0,1.5],[0,3.5,0,3.5],1,size,ocount,amplify);
}
void Matrix() ( -- matrix )
{ MatrixGenerate([1,1,1],[0,0,0],[0,0,0],0); }
void MatrixSRT(int3 s,int3 r,int3 t) ( -- matrix )
{ MatrixGenerate(s,r,t,0); }
void MatrixOrbit(int3 s,int3 r,int3 t) ( -- matrix )
{ MatrixGenerate(s,r,t,1); }
void MatrixLockAt(int3 v) ( matrix -- matrix )
{ MatrixModify([1,1,1],[0,0,0],v,2); }
void MatrixMulSRT(int3 s,int3 r,int3 t) ( matrix -- matrix )
{ MatrixModify(s,r,t,3); }
void MatrixTranspose() ( matrix -- matrix )
{ MatrixModify([1,1,1],[0,0,0],[0,0,0],4); }
void SplineNew(
int tension = 0.0 [ 0 .. 1 *0.01 ],
int continuity = 0.0 [ 0 .. 1 *0.01 ]
) ( -- spline ),"mod"
{
Spline(4,tension,continuity);
}
void FXResample(
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0
) ( fxchain -- fxchain),"link fxalloc",'r'
{
FXColor(0,#00000000,size,ocount,[1.0,1.0],0.0,[0.5,0.5],0);
}
/*
void ExtrudeWKOld(
int mask = 0 [ "mask8:f" ],
int mode = 0 [ "cycle:normal|groups|faces|indface" ],
int count = 1 [ 1 .. 64 ],
int distance = 1.0 [ *0.01 ],
int3 s = [1.0,1.0,1.0][*0.01],
int3 r = [0.0,0.0,0.0][*0.001]
) ( mesh -- mesh ),"mod rowc"
{
int i;
i=0;
while(i<count)
{
Extrude(mask,mode,1);
ExtrudeNormal(distance,1);
Transform(1,s,r,[0,0,0]);
TransformEx(1,1,1,[1.0,1.0,1.0],r,[0.0,0.0,0.0]);
i = i+1;
}
}
*/
void ExtrudeWKOld() {}
void FXChaosBlur(
int radius = 12.0 [ 1.0 .. 128.0 ],
int stages = 1 [ 1 .. 8 ],
int size = 3 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 4.0 *0.01 ],
int shape = 1 [ "cycle:diamond|square "]
) ( fxchain -- fxchain ),"link fxalloc",0
{
int oc;
int i;
int r;
r = radius;
i = stages;
while(i>0)
{
r = r / 2;
i = i - 1;
}
while(stages>0)
{
oc = 1;
if(stages==1)
oc = ocount;
if(shape==0)
Blend4x([-r,0,-r,0],[r,0,r,0],[0,-r,0,-r],[0,r,0,r],1,size,oc,amplify);
else
Blend4x([-r,-r,-r,-r],[r,-r,r,-r],[-r,r,-r,r],[r,r,r,r],1,size,oc,amplify);
r = r * 2;
stages = stages -1;
}
}
/*
void FXChaosCrash(
int steps = 3 [ 1 .. 9 ],
int zoom = 1.5 [ 1.0 .. 20.0 *0.005],
int size = 0 [ "cycle:full|large|medium|small" ],
int ocount = 0,
int amplify = 1.0 [ 0.0 .. 4.0 *0.01],
int fadeoff = 1.0 [ 0.0 .. 2.0 *0.01]
) ( fxchain -- fxchain ),"link fxalloc",0
{
int oc;
int z1;
int z2;
int z3;
int amp;
amp = amplify;
while(steps>0)
{
oc = 1;
if(steps==1)
oc = ocount;
z1 = Pow(zoom,Pow(4.0,-steps));
z1 = z1;
z2 = z1*z1;
z3 = z2*z1;
steps = steps-1;
Blend4x([0,0,1,1],
[0.5-0.5/z1,0.5-0.5/z1,0.5+0.5/z1,0.5+0.5/z1],
[0.5-0.5/z2,0.5-0.5/z2,0.5+0.5/z2,0.5+0.5/z2],
[0.5-0.5/z3,0.5-0.5/z3,0.5+0.5/z3,0.5+0.5/z3],
0,size,oc,amp);
amp = amp * fadeoff;
}
}
*/