Advertisement
Jousway

StringToLuaCommand.Lua

May 16th, 2013
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.85 KB | None | 0 0
  1. --this is the worst code in the history of stepmania, just because there is no toboolean, nor cmd("") with string support or Command("","");
  2. function StringToCmd(self, CallFunction, t1, t2)
  3.     for c in string.gmatch(CallFunction(t1,t2), "(.-);*") do
  4.         if not string.find(c, "#") then
  5.             b = string.match(c, "(w-),");
  6.             b2 = string.match(c, "w-,(w-)");
  7.             b3 = string.match(c, "w-,w-,(w-)");
  8.             b4 = string.match(c, "w-,w-,w-,(w-)");
  9.             b5 = string.match(c, "w-,w-,w-,w-,(w-)");
  10.            
  11.             if b == "accelerate" then --accelerate
  12.                 self:accelerate(b2);
  13.             elseif b == "addrotationx" then --addrotationx
  14.                 self:addrotationx(b2);
  15.             elseif b == "addrotationy" then  --addrotationy
  16.                 self:addrotationy(b2);
  17.             elseif b == "addrotationz" then --addrotationz
  18.                 self:addrotationz(b2);
  19.             elseif b == "addx" then  --addx
  20.                 self:addx(b2);
  21.             elseif b == "addy" then --addy
  22.                 self:addy(b2);
  23.             elseif b == "addz" then --addz
  24.                 self:addz(b2);
  25.             elseif b == "align" then --align
  26.                 self:align(b2,b3);
  27.             elseif b == "animate" then --animate
  28.                 self:animate(b2);
  29.             elseif b == "aux" then --aux
  30.                 self:aux(b2);
  31.             elseif b == "backfacecull" then --backfacecull
  32.                 self:backfacecull(b2);
  33.             elseif b == "basealpha" then  --basealpha
  34.                 self:basealpha(b2);
  35.             elseif b == "baserotationx" then --baserotationx
  36.                 self:baserotationx(b2);
  37.             elseif b == "baserotationy" then --baserotationy
  38.                 self:baserotationy(b2);
  39.             elseif b == "baserotationz" then --baserotationz
  40.                 self:baserotationz(b2);
  41.             elseif b == "basezoom" then --basezoom
  42.                 self:basezoom(b2);
  43.             elseif b == "basezoomx" then --basezoomx
  44.                 self:basezoomx(b2);
  45.             elseif b == "basezoomy" then --basezoomy
  46.                 self:basezoomy(b2);
  47.             elseif b == "basezoomz" then --basezoomz
  48.                 self:basezoomz(b2);
  49.             elseif b == "bezier" then --bezier
  50.                 self:bezier();
  51.             elseif b == "blend" then --blend
  52.                 self:blend( BlendMode mode )
  53.             elseif b == "bob" then --bob
  54.                 self:bob();
  55.             elseif b == "bounce" then --bounce
  56.                 self:bounce();
  57.             elseif b == "bouncebegin" then --bouncebegin
  58.                 self:bouncebegin(b2);
  59.             elseif b == "bounceend" then --bounceend
  60.                 self:bounceend(b2);
  61.             elseif b == "Center" then --Center
  62.                 self:Center();
  63.             elseif b == "CenterX" then --CenterX
  64.                 self:CenterX();
  65.             elseif b == "CenterY" then --CenterY
  66.                 self:CenterY();
  67.             elseif b == "clearzbuffer" then --clearzbuffer
  68.                 self:clearzbuffer(b2);
  69.             elseif b == "compound" then --compound
  70.                 b3 = string.match(c, "w-,w-,(.+)");
  71.                 self:compound(b2,b3);
  72.             elseif b == "cropbottom" then --cropbottom
  73.                 self:cropbottom(b2);
  74.             elseif b == "cropleft" then --cropleft
  75.                 self:cropleft(b2);
  76.             elseif b == "cropright" then --cropright
  77.                 self:cropright(b2);
  78.             elseif b == "croptop" then --croptop
  79.                 self:croptop(b2);
  80.             elseif b == "cullmode" then --cullmode
  81.                 self:cullmode(b2);
  82.             elseif b == "decelerate" then --decelerate
  83.                 self:decelerate(b2);
  84.             elseif b == "delseiffuse" then --delseiffuse
  85.                 self:delseiffuse(b2);
  86.             elseif b == "delseiffusealpha" then --delseiffusealpha
  87.                 self:delseiffusealpha(b2);
  88.             elseif b == "delseiffuseblink" then --delseiffuseblink
  89.                 self:delseiffuseblink(b2);
  90.             elseif b == "delseiffusebottomedge" then --delseiffusebottomedge
  91.                 self:delseiffusebottomedge(b2);
  92.             elseif b == "delseiffusecolor" then --delseiffusecolor
  93.                 self:delseiffusecolor(b2);
  94.             elseif b == "delseiffuseleftedge" then --delseiffuseleftedge
  95.                 self:delseiffuseleftedge(b2);
  96.             elseif b == "delseiffuselowerleft" then --delseiffuselowerleft
  97.                 self:delseiffuselowerleft(b2);
  98.             elseif b == "delseiffuselowerright" then --delseiffuselowerright
  99.                 self:delseiffuselowerright(b2);
  100.             elseif b == "delseiffuseramp" then --delseiffuseramp
  101.                 self:delseiffuseramp();
  102.             elseif b == "delseiffuserightedge" then --delseiffuserightedge
  103.                 self:delseiffuserightedge(b2);
  104.             elseif b == "delseiffuseshelseift" then --delseiffuseshelseift
  105.                 self:delseiffuseshelseift();
  106.             elseif b == "delseiffusetopedge" then --delseiffusetopedge
  107.                 self:delseiffusetopedge(b2);
  108.             elseif b == "delseiffuseupperleft" then --delseiffuseupperleft
  109.                 self:delseiffuseupperleft(b2);
  110.             elseif b == "delseiffuseupperright" then --delseiffuseupperright
  111.                 self:delseiffuseupperright(b2);
  112.             elseif b == "Draw" then --Draw
  113.                 self:Draw();
  114.             elseif b == "draworder" then --draworder
  115.                 self:draworder(b2);
  116.             elseif b == "drop" then --drop
  117.                 self:drop(b2);
  118.             elseif b == "ease" then --ease
  119.                 self:ease(b2,b3);
  120.             elseif b == "effectclock" then --effectclock
  121.                 self:effectclock(b2);
  122.             elseif b == "effectcolor1" then --effectcolor1
  123.                 self:effectcolor1(b2);
  124.             elseif b == "effectcolor2" then --effectcolor2
  125.                 self:effectcolor2(b2);
  126.             elseif b == "effectmagnitude" then --effectmagnitude
  127.                 self:effectmagnitude(b2,b3,b4);
  128.             elseif b == "effectoffset" then --effectoffset
  129.                 self:effectoffset(b2);
  130.             elseif b == "effectperiod" then --effectperiod
  131.                 self:effectperiod(b2);
  132.             elseif b == "effecttiming" then --effecttiming
  133.                 self:effecttiming(b2,b3,b4,b5)
  134.             elseif b == "fadebottom" then --fadebottom
  135.                 self:fadebottom(b2);
  136.             elseif b == "fadeleft" then --fadeleft
  137.                 self:fadeleft(b2);
  138.             elseif b == "faderight" then --faderight
  139.                 self:faderight(b2);
  140.             elseif b == "fadetop" then --fadetop
  141.                 self:fadetop(b2);
  142.             elseif b == "finishtweening" then --finishtweening
  143.                 self:finishtweening();
  144.             elseif b == "FullScreen" then --FullScreen
  145.                 self:FullScreen();
  146.             elseif b == "glow" then --glow
  147.                 self:glow(b2);
  148.             elseif b == "glowblink" then --glowblink
  149.                 self:glowblink();
  150.             elseif b == "glowramp" then --glowramp
  151.                 self:glowramp();
  152.             elseif b == "glowshelseift" then --glowshelseift
  153.                 self:glowshelseift();
  154.             elseif b == "halign" then --halign
  155.                 self:halign(b2);
  156.             elseif b == "heartbeat" then --heartbeat
  157.                 self:heartbeat(b2);
  158.             elseif b == "hibernate" then --hibernate
  159.                 self:hibernate(b2);
  160.             elseif b == "hide_if" then --hide_if
  161.                 self:hide_if(b2);
  162.             elseif b == "horizalign" then --horizalign
  163.                 self:horizalign(b2);
  164.             elseif b == "hurrytweening" then --hurrytweening
  165.                 self:hurrytweening(b2);
  166.             elseif b == "linear" then --linear
  167.                 self:linear(b2);
  168.             elseif b == "MaskDest" then --MaskDest
  169.                 self:MaskDest();
  170.             elseif b == "MaskSource" then --MaskSource
  171.                 self:MaskSource();
  172.             elseif b == "pause" then --pause
  173.                 self:pause();
  174.             elseif b == "play" then --play
  175.                 self:play();
  176.             elseif b == "player" then --player
  177.                 self:player(b2);
  178.             elseif b == "pulse" then --pulse
  179.                 self:pulse();
  180.             elseif b == "rainbow" then --rainbow
  181.                 self:rainbow();
  182.             elseif b == "Real" then --Real
  183.                 self:Real(b2);
  184.             elseif b == "RealInverse" then --RealInverse
  185.                 self:RealInverse(b2);
  186.             elseif b == "rotationx" then --rotationx
  187.                 self:rotationx(b2);
  188.             elseif b == "rotationy" then --rotationy
  189.                 self:rotationy(b2);
  190.             elseif b == "rotationz" then --rotationz
  191.                 self:rotationz(b2);
  192.             elseif b == "scale_or_crop_background" then --scale_or_crop_background
  193.                 self:scale_or_crop_background();
  194.             elseif b == "scaletocover" then --scaletocover
  195.                 self:scaletocover(b2,b3,b4,b5);
  196.             elseif b == "scaletofit" then --scaletofit
  197.                 self:scaletofit(b2,b3,b4,b5);
  198.             elseif b == "SetHeight" then --SetHeight
  199.                 self:SetHeight(b2);
  200.             elseif b == "SetSize" then --SetSize
  201.                 self:SetSize(b2,b3);
  202.             elseif b == "setsize" then --setsize
  203.                 self:setsize(b2,b3);
  204.             elseif b == "setstate" then --setstate
  205.                 self:setstate(b2);
  206.             elseif b == "SetTextureFiltering" then --SetTextureFiltering
  207.                 self:SetTextureFiltering(b2);
  208.             elseif b == "SetWidth" then --SetWidth
  209.                 self:SetWidth(b2);
  210.             elseif b == "shadowcolor" then --shadowcolor
  211.                 self:shadowcolor(b2);
  212.             elseif b == "shadowlength" then --shadowlength
  213.                 self:shadowlength(b2);
  214.             elseif b == "shadowlengthx" then --shadowlengthx
  215.                 self:shadowlengthx(b2);
  216.             elseif b == "shadowlengthy" then --shadowlengthy
  217.                 self:shadowlengthy(b2);
  218.             elseif b == "skewx" then --skewx
  219.                 self:skewx(b2);
  220.             elseif b == "skewy" then --skewy
  221.                 self:skewy(b2);
  222.             elseif b == "sleep" then --sleep
  223.                 self:sleep(b2);
  224.             elseif b == "smooth" then --smooth
  225.                 self:smooth(b2);
  226.             elseif b == "spin" then --spin
  227.                 self:spin();
  228.             elseif b == "stopeffect" then --stopeffect
  229.                 self:stopeffect();
  230.             elseif b == "stoptweening" then --stoptweening
  231.                 self:stoptweening();
  232.             elseif b == "stretchto" then --stretchto
  233.                 self:stretchto(b2,b3,b4,b5);
  234.             elseif b == "texturewrapping" then --texturewrapping
  235.                 self:texturewrapping(b2);
  236.             elseif b == "thump" then --thump
  237.                 self:thump(b2);
  238.             elseif b == "valign" then --valign
  239.                 self:valign(b2);
  240.             elseif b == "vertalign" then --vertalign
  241.                 self:vertalign(b2);
  242.             elseif b == "vibrate" then --vibrate
  243.                 self:vibrate();
  244.             elseif b == "visible" then --visible
  245.                 self:visible(b2);
  246.             elseif b == "wag" then --wag
  247.                 self:wag();
  248.             elseif b == "x" then --x
  249.                 self:x(b2);
  250.             elseif b == "xy" then --xy
  251.                 self:xy(b2);
  252.             elseif b == "y" then --y
  253.                 self:y(b2);
  254.             elseif b == "z" then --z
  255.                 self:z(b2);
  256.             elseif b == "zbias" then --zbias
  257.                 self:zbias(b2);
  258.             elseif b == "zbuffer" then --zbuffer
  259.                 self:zbuffer(b2);
  260.             elseif b == "zoom" then --zoom
  261.                 self:zoom(b2);
  262.             elseif b == "zoomto" then --zoomto
  263.                 self:zoomto(b2,b3);
  264.             elseif b == "zoomtoheight" then -- zoomtoheight
  265.                 self:zoomtoheight(b2);
  266.             elseif b == "zoomtowidth" then --zoomtowidth
  267.                 self:zoomtowidth(b2);
  268.             elseif b == "zoomx" then --zoomx
  269.                 self:zoomx(b2);
  270.             elseif b == "zoomy" then --zoomy
  271.                 self:zoomy(b2);
  272.             elseif b == "zoomz" then --zoomz
  273.                 self:zoomz(b2);
  274.             elseif b == "ztest" then --ztest
  275.                 self:ztest(b2);
  276.             elseif b == "ztestmode" then --ztestmode
  277.                 self:ztestmode(b2);
  278.             elseif b == "zwrite" then --zwrite
  279.                 self:zwrite(b2);
  280.             end;
  281.         end;
  282.     end;
  283. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement