custom.c

来自「ANFY特效」· C语言 代码 · 共 655 行 · 第 1/2 页

C
655
字号
//// User preferences saving/loading// All settings are stored in ~/.anfyrc//#include <glib.h>#include <string.h>#include <stdio.h>static char *conv_table[][2] = {    { "Width", "width" },    { "Height", "height" },    { "NBlobs", "nblobs" },    { "BVal1", "bval1" },    { "BVal2", "bval2" },    { "BVal3", "bval3" },    { "Res", "res" },    { "Minspeed", "minspeed" },    { "Colorpal", "numpal" },    { "Sinemode", "sinemode" },    { "Starshape", "starshape" },    { "Negcolor", "negative" },    { "Textscroll", "textscroll" },    { "Textspeed", "speed" },    { "YOffset", "textoffset" },    { "TextSineAngle", "TextSineAngle" },    { "TextSineAmpl", "TextSineAmp" },    { "TextSineSpeed", "TextSineSpd" },    { "TextJumpAmpl", "TextJumpAmp" },    { "TextJumpSpeed", "TextJumpSpd" },    { "TextShadow", "textshadow" },    { "TextColRed", "TextColR" },    { "TextColGreen", "TextColG" },    { "TextColBlu", "TextColB" },    { "TextFont", "textfont" },    { "TextSize", "textsize" },    { "TextBold", "textbold" },    { "TextSColRed", "TextSColR" },    { "TextSColGreen", "TextSColG" },    { "TextSColBlu", "TextSColB" },    { "TextMode", "texttype" },    { "TextVSpace", "textvspace" },    { "TextItalic", "textitalic" },    { "TextSizeMax", "textmaxfont" },    { "TextSizeMin", "textminfont" },  //  { INI_STANDARD_FONT "TextStdFont", "" },    { "MemDelay", "memdelay" },    { "TaskPriority", "priority" },    { "MinSYNC", "MinSYNC" },    { "FixNetscape", "fixnetscape" },    { "ImgsValue", "imgs" },    { "FormatValue", "format" },    { "NumImages", "nimgs" },    { "PingPong", "pingpong" },    { "DoubleSize", "doublesize" },    { "Speed", "speed" },    { "PingPause", "pingpause" },    { "PongPause", "pongpause" },    { "AudioPing", "audioping" },    { "AudioPong", "audiopong" },    { "ImageFile", "picture" },    { "AltImageFile", "bump" },    { "BumpEight", "bump_height" },    { "AngleX", "angle_x" },    { "AngleY", "angle_y" },    { "LightSize", "lightsize" },    { "InterativeMode", "interactive" },    { "Image_", "image" },    { "Link_", "link" },    { "StatusMsg_", "statusmsg" },    { "FrameSpeed", "speed" },    { "Pause", "pause" },    { "RotX", "rotx" },    { "RotY", "roty" },    { "RotZ", "rotz" },    { "BackColorR", "backr" },    { "BackColorG", "backg" },    { "BackColorB", "backb" },    { "ClearBack", "clearback" },    { "BackImage", "backimage" },    { "Image", "image" },    { "DistValue", "distval" },    { "DistFactor", "dfact" },    { "DistSpeed", "dspeed" },    { "DistOffset", "doffset" },    { "Xv1", "xv1" },    { "Yv1", "yv1" },    { "Xv2", "xv2" },    { "Yv2", "yv2" },    { "FireWidth", "fwidth" },    { "FireHeight", "fheigth" },    { "XRes", "resx" },    { "YRes", "resy" },    { "FireCutStart", "fcut" },    { "FireCutValue", "fsub" },    { "DLight", "deflight" },    { "FireForm", "fmode" },    { "RandomRep", "rndrep" },    { "PalR", "paletteR" },    { "PalG", "paletteG" },    { "PalB", "paletteB" },    { "FlagRes", "res" },    { "FlagPattern", "pattern" },    { "WindSpeed", "speed" },    { "Wind", "wind" },    { "FlagNation", "nation" },    { "Curve", "curve" },    { "FlagLoad", "flagload" },    { "StatusMsg", "statusmsg" },  //  { INI_NOJAVAMSG  "NoJavaMsg", "" },    { "NFloz", "numfloz" },    { "Distance", "flozdistance" },    { "ToCenter", "tocenter" },    { "Accell", "acceleration" },    { "FlozSpeed", "speed" },    { "SideBouncing", "sidebouncing" },    { "Heads", "fheads" },    { "GoOver", "overtext" },    { "FlozR1", "flozR1" },    { "FlozG1", "flozG1" },    { "FlozB1", "flozB1" },    { "FlozR2", "flozR2" },    { "FlozG2", "flozG2" },    { "FlozB2", "flozB2" },    { "Autodisign", "autodesign" },    { "FluidDensity", "density" },    { "RSize", "rainsize" },    { "RFactor", "rainfactor" },    { "SRSize", "srainsize" },    { "SRFactor", "srainfactor" },    { "Volcano", "volcano" },    { "NFish", "fishnum" },    { "HueShift", "hueshift" },    { "Dim", "dimensions" },    { "Branch", "branches" },    { "MorphSpeed", "morph_speed" },    { "RotSpeed", "rot_speed" },    { "RotSpeed2", "rot_speed2" },    { "Decline", "decline" },    { "Length", "length" },    { "PenSize", "pensize" },    { "Progress", "progress" },    { "ProgInverse", "progrinverse" },    { "PenProgr", "progrstep" },    { "Iterskip", "iterskip" },    { "Ifs1R", "ifsR1" },    { "Ifs1G", "ifsG1" },    { "Ifs1B", "ifsB1" },    { "Ifs2R", "ifsR2" },    { "Ifs2G", "ifsG2" },    { "Ifs2B", "ifsB2" },    { "OverText", "overtext" },    { "WaveSpeed", "wavspeed" },    { "Perspective", "perspective" },    { "FarWaving", "farwaving" },    { "WindVarVal", "windvarval" },    { "WindVMin", "windvarmin" },    { "WindVMax", "windvarmax" },    { "LensWidth", "lenswidth" },    { "Distorsion", "distort" },    { "XYDist", "distoxy" },    { "DiagDist", "distdval" },    { "ZoomFactor", "zoomfactor" },    { "Interactive", "interactive" },    { "XSpeed", "spdx" },    { "YSpeed", "spdy" },    { "ResLife", "res" },    { "ForColorR", "foreR" },    { "ForColorG", "foreG" },    { "ForColorB", "foreB" },    { "LifeDensity", "ldensity" },    { "Res", "res" },    { "XStart", "xstart" },    { "YStart", "ystart" },    { "XMin", "xmin" },    { "XMax", "xmax" },    { "YMin", "ymin" },    { "YMax", "ymax" },    { "NumPal", "numpal" },    { "Res", "res" },    { "Gen1", "gen1" },    { "Gen2", "gen2" },    { "Gen3", "gen3" },    { "Speed", "speed" },    { "Red1", "red1" },    { "Red2", "red2" },    { "Red3", "red3" },    { "Green1", "green1" },    { "Green2", "green2" },    { "Green3", "green3" },    { "Blu1", "blue1" },    { "Blu2", "blue2" },    { "Blu3", "blue3" },    { "Res", "res" },    { "RotMode", "rotmode" },    { "RSpeed", "rspeed" },    { "ZoomMin", "zoommin" },    { "ZoomMax", "zoommax" },    { "ZoomSpeed", "zoomspd" },    { "Modix", "modix" },    { "Modiy", "modiy" },    { "Auto1", "auto1" },    { "Auto2", "auto2" },    { "LightSource", "lightsourced" },    { "LIntensity", "lightpower" },    { "LightMax", "lightmax" },    { "LightMin", "lightmin" },    { "Res", "res" },    { "ConeX", "conex" },    { "ConeY", "coney" },    { "ConeZ", "conez" },    { "Movement", "movement" },    { "Effect", "effect" },  //  { INI_IMG_WIDTH"ImageWidth", "" },  //  { INI_IMG_HEIGHT"ImageHeight", "" },    { "Radius", "tunnelradius" },    { "Rotation", "tunrot" },    { "Advancing", "tunadvance" },    { "LMin", "lightmin" },    { "LMax", "lightmax" },    { "LDec", "lightdec" },    { "NBends", "numbends" },    { "SizeBMin", "bendsizemin" },    { "SizeBMax", "bendsizemax" },    { "BOffeset", "bendoffset" },    { "BOffsetInc", "bendoffsetinc" },    { "BSizeInc", "bendsizeinc" },    { "RotX", "rot_x" },    { "RotY", "rot_y" },    { "RotZ", "rot_z" },    { "Bends", "bends" },    { "Reverse", "lightinv" },    { "Shading", "shade" },    { "Square", "squared" },    { "Interactive", "interactive" },    { "LPower", "lightpower" },    { "Shadow", "shadow" },    { "Roughness", "roughness" },    { "WarpMode", "warpmode" },    { "WStart1", "w1start" },    { "WAdd1", "wadd1" },    { "WMin1", "w1min" },    { "WMax1", "w2min" },    { "WStart2", "w2start" },    { "WAdd2", "wadd2" },    { "WMin2", "w2min" },    { "WMax2", "w2max" },    { "Cross", "cross" },    { "CrossFact", "crossfactor" },    { "Light", "light" },    { "XSpeed", "xspeed" },    { "YSpeed", "yspeed" },    { "Dot", "dotden" },    { "Negative", "negative" },    { "OverImage", "overimg" },    { "OverImgX", "overimgX" },    { "OverImgY", "overimgY" },    { "TileImage", "tile" },    { "DistValue", "distval" },    { "Horizon", "horizon" },    { "FixDropValue", "fixdrop" },    { "FixDropX", "fixdropX" },    { "FixDropY", "fixdropY" },    { "FixDropS", "fixdropS" },    { "FixDropF", "fixdropF" },    { "ProgFade", "progressivefade" },    { "Particles", "particles" },    { "Random", "random" },    { "Script", "script" },    { "GPalette", "gpalette" },    { "Persist", "persist" },    { "DinPersist", "dinamic_persist" },    { "DinPersistMin", "dinamic_min" },    { "DinPersistMax", "dinamic_max" },    { "Flip_", "flip" },    { "ExtraH", "extrah" },    { "FlipCurve", "flipcurve" },    { "Shading", "shading" },    { "TilesWidth", "tileswidth" },    { "TilesHeight", "tilesheight" },    { "TilesSteps", "tilesteps" },    { "RealWidth", "real_width" },    { "RealHeight", "real_height" },    { "Texture1", "texture1" },    { "Texture0", "texture0" },    { "Texture2", "texture2" },    { "PhongMap", "phongmap" },    { "GPhongMap", "gaussmap" },    { "Fog", "fog" },    { "FogNear", "fog_near" },    { "FogFar", "fog_far" },    { "Blur", "blur_motion" },    { "Backmode", "back_type" },    { "BackRender", "back_render" },    { "BackTexture", "back_texture" },    { "MainType", "main_type" },    { "MainRender", "main_render" },    { "MainTexture", "main_texture" },    { "SheetHeight", "sheet_x" },    { "SheetWidth", "sheet_y" },    { "SheetNumX", "sheet_numx" },    { "SheetNumY", "sheet_numy" },    { "SheetAdd", "sheet_add" },    { "SheetH", "sheet_h" },    { "SheetPeriod1", "sheet_period1" },    { "SheetPeriod2", "sheet_period2" },    { "SheetFunction", "sheet_function" },    { "ChildType", "child_type" },    { "ChildRender", "child_render" },    { "ChildTexture", "child_texture" },  //  { INI_AUTOAPPLY "AutoApply", "" },    { "Mirror", "mirror" },    { "LightBalls", "lightballs" },    { "AimLight", "animlight" },    { "PixDensity", "pixdensity" },    { "Pressure", "pressure" },    { "Fluidmode", "fluidmode" },    { "InitDistance", "initialdistance" },    { "MinDistance", "mindistance" },    { "ZoomSpeed", "zoomspeed" },    { "MaxDistance", "maxdistance" },    { "WS", "wavestrength" },    { "SPD1", "spd1" },    { "SPD2", "spd2" },    { "SPD3", "spd3" },    { "SPD4", "spd4" },    { "XMove", "xmove" },    { "YMove", "ymove" },

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?