Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function onPoof(temp.on)
{
    lit#5 = 26;
    lit#6 = "bow_walk.gani";
    // RegionId(0)
    // RegionId(1)
    if (player.attr[lit#5] != lit#6) 
    {
        lit#8 = 1;
        player.alpha = lit#8;
    }
    lit#10 = 20000;
    temp.ind = lit#10;
    // RegionId(2)
    // RegionId(3)
    if (temp.on) 
    {
        lit#11 = "dc_magic_lightdoor.wav";
    }
    // RegionId(4)
    else
    {
        lit#12 = "dc_magic_lightdoor2.wav";
    }
    fn_call#14 = phi_fn_call({play#13, ...phi<idx=0, regions=()>});
    lit#17 = null;
    // RegionId(5)
    // RegionId(6)
    if (this.cloudpoof == lit#17) 
    {
        lit#18 = "ce_smokecloud2.png";
    }
    // RegionId(7)
    else
    {
    }
    phi<idx=1, regions=()> = phi<idx=0, regions=()>;
    fn_call#21 = getimgwidth#20(temp.img);
    lit#22 = 0;
    // RegionId(8)
    // RegionId(9)
    if (fn_call#21 <= lit#22) 
    {
        lit#23 = 80;
    }
    // RegionId(10)
    else
    {
        fn_call#24 = getimgwidth#20(temp.img);
    }
    phi<idx=1, regions=()> = phi<idx=0, regions=()>;
    fn_call#27 = getimgheight#26(temp.img);
    lit#28 = 0;
    // RegionId(11)
    // RegionId(12)
    if (fn_call#27 <= lit#28) 
    {
        lit#29 = 80;
    }
    // RegionId(13)
    else
    {
        fn_call#30 = getimgheight#26(temp.img);
    }
    phi<idx=1, regions=()> = phi<idx=0, regions=()>;
    lit#32 = 16;
    lit#33 = 4;
    temp.ox = (temp.imgw / lit#32) / lit#33;
    lit#35 = 16;
    lit#36 = 4;
    temp.oy = (temp.imgh / lit#35) / lit#36;
    lit#37 = 1;
    // RegionId(14)
    // RegionId(15)
    if (temp.ox <= lit#37) 
    {
        lit#38 = 0.5;
        temp.ox = temp.ox - lit#38;
    }
    lit#39 = 1;
    // RegionId(16)
    // RegionId(17)
    if (temp.oy <= lit#39) 
    {
        lit#40 = 0.5;
        temp.oy = temp.oy - lit#40;
    }
    lit#42 = 80;
    lit#43 = 0.65;
    lit#44 = 80;
    lit#45 = 0.35;
    temp.z = {(lit#44 / temp.imgw) * lit#45, (lit#42 / temp.imgw) * lit#43};
    fn_call#47 = hideimg#46(temp.ind);
    fn_call#49 = findimg#48(temp.ind);
    // RegionId(18)
    // RegionId(19)
    with (fn_call#49) 
    {
        // RegionId(19)
        // RegionId(20)
        with (emitter#50) 
        {
            lit#53 = 0.05;
            delaymax#54 = lit#53;
            delaymin#55 = delaymax#52;
            lit#57 = 25;
            nrofparticles#58 = lit#57;
            lit#60 = false;
            emitautomatically#61 = lit#60;
            lit#63 = false;
            autorotation#64 = lit#63;
            lit#66 = true;
            firstinfront#67 = lit#66;
            lit#69 = 0;
            emissionoffset#70 = {-temp.ox, -temp.oy, lit#69};
            lit#72 = false;
            attachposition#73 = lit#72;
            lit#75 = false;
            checkbelowterrain#76 = lit#75;
            lit#78 = true;
            continueafterdestroy#79 = lit#78;
            lit#81 = 50;
            maxparticles#82 = lit#81;
            // RegionId(20)
            // RegionId(21)
            with (particle#83) 
            {
                image#85 = temp.img;
                lit#89 = 1;
                blue#90 = lit#89;
                green#91 = blue#88;
                red#92 = green#87;
                lit#94 = 1;
                mode#95 = lit#94;
                lit#97 = 1;
                lifetime#98 = lit#97;
                lit#100 = 6;
                speed#101 = lit#100;
                lit#103 = 2;
                layer#104 = lit#103;
                lit#105 = 0.65;
                alpha#106 = lit#105;
                lit#108 = 0.35;
                zoom#109 = lit#108;
            }
            lit#110 = 0.5;
            lit#111 = -0.5;
            lit#112 = "add";
            lit#113 = "x";
            lit#114 = 0;
            lit#115 = 0;
            lit#116 = "once";
            fn_call#118 = addlocalmodifier#117(lit#116, lit#115, lit#114, lit#113, lit#112, lit#111, lit#110);
            lit#119 = 0.5;
            lit#120 = -0.5;
            lit#121 = "add";
            lit#122 = "y";
            lit#123 = 0;
            lit#124 = 0;
            lit#125 = "once";
            fn_call#126 = addlocalmodifier#117(lit#125, lit#124, lit#123, lit#122, lit#121, lit#120, lit#119);
            lit#127 = 6.283185307;
            lit#128 = 0;
            lit#129 = "replace";
            lit#130 = "angle";
            lit#131 = 0;
            lit#132 = 0;
            lit#133 = "once";
            fn_call#134 = addlocalmodifier#117(lit#133, lit#132, lit#131, lit#130, lit#129, lit#128, lit#127);
            lit#135 = 1;
            lit#136 = 0;
            lit#137 = "replace";
            lit#138 = "zoom";
            lit#139 = 0;
            lit#140 = 0;
            lit#141 = "once";
            fn_call#142 = addlocalmodifier#117(lit#141, lit#140, lit#139, lit#138, lit#137, temp.z[lit#136], temp.z[lit#135]);
            lit#143 = 6.283185307;
            lit#144 = 0;
            lit#145 = "replace";
            lit#146 = "rotation";
            lit#147 = 0;
            lit#148 = 0;
            lit#149 = "once";
            fn_call#150 = addlocalmodifier#117(lit#149, lit#148, lit#147, lit#146, lit#145, lit#144, lit#143);
            lit#151 = 6.283185307;
            lit#152 = -6.283185307;
            lit#153 = "replace";
            lit#154 = "spin";
            lit#155 = 0;
            lit#156 = 0;
            lit#157 = "once";
            fn_call#158 = addlocalmodifier#117(lit#157, lit#156, lit#155, lit#154, lit#153, lit#152, lit#151);
            lit#159 = 0;
            lit#160 = 6;
            lit#161 = "replace";
            lit#162 = "speed";
            lit#163 = 1;
            lit#164 = 0.35;
            lit#165 = "range";
            fn_call#166 = addlocalmodifier#117(lit#165, lit#164, lit#163, lit#162, lit#161, lit#160, lit#159);
            lit#167 = 0;
            lit#168 = 0.65;
            lit#169 = "replace";
            lit#170 = "alpha";
            lit#171 = 1;
            lit#172 = 0.75;
            lit#173 = "range";
            fn_call#174 = addlocalmodifier#117(lit#173, lit#172, lit#171, lit#170, lit#169, lit#168, lit#167);
            lit#175 = -0.75;
            lit#176 = -0.75;
            lit#177 = "add";
            lit#178 = "zoom";
            lit#179 = 1;
            lit#180 = 0.5;
            lit#181 = "range";
            fn_call#182 = addlocalmodifier#117(lit#181, lit#180, lit#179, lit#178, lit#177, lit#176, lit#175);
            fn_call#184 = emit#183();
        }
    }
    lit#185 = "HidePoof";
    fn_call#187 = cancelEvents#186(lit#185);
    lit#188 = "HidePoof";
    lit#189 = 1;
    fn_call#191 = scheduleEvent#190(lit#189, lit#188, temp.ind);
    lit#192 = 0;
    return lit#192;
}