Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function updateGralats()
{
    temp.inshop = ClassicFocus_Button.visible;
    // RegionId(0)
    // RegionId(1)
    if (player.gralats == this.lastgralats) 
    {
        // RegionId(2)
        if (!temp.inshop) 
        {
            lit#13 = 0;
            return lit#13;
        }
    }
    temp.val = player.gralats;
    lit#16 = "Sys_Hearts_Control";
    fn_call#18 = findObject#17(lit#16);
    temp.gui = fn_call#18;
    lit#20 = "0123456789";
    temp.nums = lit#20;
    lit#21 = 12;
    lit#22 = 2;
    lit#23 = 12;
    lit#24 = 3;
    lit#25 = 12;
    lit#26 = 3;
    lit#27 = 14;
    lit#28 = 2;
    lit#29 = 12;
    lit#30 = 3;
    lit#31 = 14;
    lit#32 = 2;
    lit#33 = 12;
    lit#34 = 3;
    lit#35 = 12;
    lit#36 = 3;
    lit#37 = 11;
    lit#38 = 4;
    lit#39 = 13;
    lit#40 = 2;
    temp.kerning = {{lit#40, lit#39}, {lit#38, lit#37}, {lit#36, lit#35}, {lit#34, lit#33}, {lit#32, lit#31}, {lit#30, lit#29}, {lit#28, lit#27}, {lit#26, lit#25}, {lit#24, lit#23}, {lit#22, lit#21}};
    lit#42 = 35;
    temp.posy = lit#42;
    lit#43 = 0;
    temp.numw = lit#43;
    lit#44 = 0;
    temp.i = lit#44;
    builtin_fn_call#45 = temp.val.length();
    while (temp.i < builtin_fn_call#45) 
    {
        builtin_fn_call#46 = temp.val.charat(temp.i);
        temp.char = builtin_fn_call#46;
        builtin_fn_call#47 = temp.nums.pos(temp.char);
        temp.pos = builtin_fn_call#47;
        lit#48 = 1;
        lit#49 = 0;
        lit#50 = 1;
        temp.numw = temp.numw + ((temp.kerning[temp.pos][lit#48] - temp.kerning[temp.pos][lit#49]) + lit#50);
        temp.i++;
    }
    // RegionId(6)
    // RegionId(7)
    with (temp.gui) 
    {
        lit#53 = 24;
        temp.gx = temp.gui.clientwidth - lit#53;
        lit#54 = "Sys_Gralats_GralatIcon";
        gbf_new_obj#55 = lit#54;
        lit#56 = "GuiBitmapCtrl";
        new_node#57 = new lit#56(gbf_new_obj#55);
        gbf_new_obj#58 = new_node#57;
        // RegionId(7)
        // RegionId(8)
        with (gbf_new_obj#55) 
        {
            lit#60 = true;
            useownprofile#61 = lit#60;
            lit#64 = false;
            profile.modal = lit#64;
            lit#65 = 24;
            lit#66 = 23;
            fn_call#68 = resize#67(temp.gx, temp.posy, lit#66, lit#65);
            lit#70 = "dc_painteritem-gralat0.png";
            bitmap#71 = lit#70;
            lit#73 = 24;
            lit#74 = 23;
            lit#75 = 0;
            lit#76 = 0;
            bitmaprectangle#77 = {lit#76, lit#75, lit#74, lit#73};
            lit#79 = false;
            clipchildren#80 = lit#79;
            lit#82 = false;
            cliptobounds#83 = lit#82;
            lit#84 = true;
            visible#85 = lit#84;
        }
        fn_call#87 = addcontrol#86(phi<idx=0, regions=()>);
        // RegionId(9)
        // RegionId(10)
        with (Sys_Gralats_GralatIcon#88) 
        {
            lit#90 = 2;
            temp.posx = (-temp.numw) - lit#90;
            lit#91 = 0;
            temp.i = lit#91;
            builtin_fn_call#92 = temp.val.length();
            while (temp.i < builtin_fn_call#92) 
            {
                builtin_fn_call#93 = temp.val.charat(temp.i);
                temp.char = builtin_fn_call#93;
                builtin_fn_call#94 = temp.nums.pos(temp.char);
                temp.pos = builtin_fn_call#94;
                lit#95 = "Sys_Gralats_Num_";
                gbf_new_obj#96 = lit#95 @ temp.i;
                lit#97 = "GuiBitmapCtrl";
                new_node#98 = new lit#97(gbf_new_obj#96);
                gbf_new_obj#99 = new_node#98;
                // RegionId(12)
                // RegionId(13)
                with (gbf_new_obj#96) 
                {
                    lit#100 = true;
                    useownprofile#101 = lit#100;
                    lit#102 = false;
                    profile.modal = lit#102;
                    lit#103 = 20;
                    lit#104 = 1;
                    lit#105 = 3;
                    fn_call#106 = resize#67(temp.posx, lit#105, temp.kerning[temp.pos][lit#104], lit#103);
                    lit#107 = "classic_numbers_shop.png";
                    bitmap#108 = lit#107;
                    lit#109 = 20;
                    lit#110 = 1;
                    lit#111 = 0;
                    lit#112 = 16;
                    lit#113 = 0;
                    bitmaprectangle#114 = {(temp.pos * lit#112) + temp.kerning[temp.pos][lit#113], lit#111, temp.kerning[temp.pos][lit#110], lit#109};
                    lit#115 = false;
                    clipchildren#116 = lit#115;
                    lit#117 = false;
                    cliptobounds#118 = lit#117;
                    temp.lastnum = this#11;
                }
                fn_call#120 = addcontrol#86(phi<idx=0, regions=()>);
                lit#121 = 1;
                lit#122 = 0;
                lit#123 = 1;
                temp.posx = temp.posx + ((temp.kerning[temp.pos][lit#121] - temp.kerning[temp.pos][lit#122]) + lit#123);
                temp.i++;
            }
        }
    }
    // RegionId(17)
    // RegionId(18)
    if (!temp.inshop) 
    {
        fn_call#125 = Sys_Gralats_GralatIcon.stopanimations();
        lit#126 = "FadeGralats";
        fn_call#128 = cancelEvents#127(lit#126);
        lit#129 = null;
        lit#130 = "FadeGralats";
        lit#131 = 5;
        fn_call#133 = scheduleEvent#132(lit#131, lit#130, lit#129);
        this.lastgralats = player.gralats;
    }
    // RegionId(19)
    else
    {
        lit#134 = 0;
        this.lastgralats = lit#134;
    }
    lit#135 = 0;
    return lit#135;
}