Welcome to the GBF Test Portal

This was built to track decompiler and CFG progress.

Decompiler Output

function onUpdateHearts()
{
    lit#6 = true;
    // RegionId(1)
    if (player.disabledhud == lit#6) 
    {
        lit#7 = null;
        lit#8 = "UpdateHearts";
        lit#9 = 0.1;
        fn_call#11 = scheduleEvent#10(lit#9, lit#8, lit#7);
        lit#12 = 0;
        return lit#12;
    }
    // RegionId(2)
    else
    {
        lit#13 = "ControlsContainer";
        fn_call#15 = isObject#14(lit#13);
        // RegionId(2)
        // RegionId(3)
        if (!fn_call#15) 
        {
            lit#16 = "Sys_Hearts_Control";
            fn_call#17 = isObject#14(lit#16);
        }
        // RegionId(5)
        if (phi<idx=0, regions=()>) 
        {
            fn_call#19 = createHearts#18();
            lit#20 = 0;
            return lit#20;
        }
        // RegionId(6)
        else
        {
            lit#24 = null;
            // RegionId(6)
            // RegionId(7)
            if (client.timedifference == lit#24) 
            {
                lit#25 = 0;
            }
            // RegionId(8)
            else
            {
            }
            phi<idx=1, regions=()> = phi<idx=0, regions=()>;
            fn_call#28 = onWalkSounds#27();
            lit#30 = "Sys_Hearts_SubControl";
            fn_call#32 = findObject#31(lit#30);
            temp.gui = fn_call#32;
            fn_call#34 = temp.gui.clearcontrols();
            lit#35 = 3;
            lit#37 = 0.5;
            builtin_fn_call#38 = int(player.hearts + lit#37);
            builtin_fn_call#39 = min(lit#35, builtin_fn_call#38);
            temp.heartCount = builtin_fn_call#39;
            lit#41 = 35;
            temp.heartspacing = lit#41;
            lit#42 = 0;
            temp.i = lit#42;
            while (temp.i < temp.heartCount) 
            {
                builtin_fn_call#43 = int(player.hearts);
                // RegionId(11)
                // RegionId(12)
                if (player.hearts != builtin_fn_call#43) 
                {
                    lit#44 = 1;
                }
                phi<idx=1, regions=()> = phi<idx=0, regions=()>;
                // RegionId(14)
                // RegionId(15)
                with (temp.gui) 
                {
                    this.heartspacing = temp.heartspacing;
                    lit#46 = "Sys_Hearts_";
                    gbf_new_obj#47 = lit#46 @ temp.i;
                    lit#48 = "GuiShowImgCtrl";
                    new_node#49 = new lit#48(gbf_new_obj#47);
                    gbf_new_obj#50 = new_node#49;
                    // RegionId(15)
                    // RegionId(16)
                    with (gbf_new_obj#47) 
                    {
                        lit#52 = true;
                        useownprofile#53 = lit#52;
                        lit#56 = false;
                        profile.modal = lit#56;
                        image#59 = statusimage#58;
                        // RegionId(16)
                        // RegionId(17)
                        if (temp.halfHeart) 
                        {
                            lit#61 = 111;
                        }
                        // RegionId(18)
                        else
                        {
                            lit#62 = 80;
                        }
                        phi<idx=1, regions=()> = phi<idx=0, regions=()>;
                        lit#64 = 0;
                        party#65 = lit#64;
                        lit#67 = 31;
                        partw#68 = lit#67;
                        lit#70 = 33;
                        parth#71 = lit#70;
                        // RegionId(19)
                        // RegionId(20)
                        if (temp.gui.rightalign) 
                        {
                            lit#74 = -1;
                            stretchx#75 = lit#74;
                            temp.heartx = (temp.gui.clientwidth - temp.heartspacing) - (temp.i * temp.heartspacing);
                        }
                        // RegionId(21)
                        else
                        {
                            lit#78 = 1;
                            temp.heartx = ((temp.gui.clientwidth - partw#68) - (temp.heartspacing * (temp.heartCount - lit#78))) + (temp.i * temp.heartspacing);
                        }
                        lit#79 = 0;
                        fn_call#81 = resize#80(temp.heartx, lit#79, partw#68, parth#71);
                        lit#83 = "left";
                        horizSizing#84 = lit#83;
                        lit#86 = "top";
                        vertSizing#87 = lit#86;
                    }
                    fn_call#89 = addcontrol#88(phi<idx=0, regions=()>);
                }
                temp.i++;
            }
            fn_call#91 = updateGralats#90();
            lit#94 = "olddeadwood_inside_labyrinth";
            builtin_fn_call#95 = player.level.name.starts(lit#94);
            // RegionId(25)
            // RegionId(26)
            if (builtin_fn_call#95) 
            {
                lit#96 = "event_ffa";
                builtin_fn_call#97 = player.level.name.starts(lit#96);
            }
            // RegionId(27)
            // RegionId(28)
            if (phi<idx=0, regions=()>) 
            {
                lit#99 = false;
                temp.gui.visible = lit#99;
            }
            // RegionId(29)
            else
            {
                lit#100 = true;
                temp.gui.visible = lit#100;
            }
            this.localPlayerPos = {player.x, player.y};
            this.localPlayerGani = player.ani.name;
            lit#106 = null;
            lit#107 = "UpdateHearts";
            lit#108 = 0.05;
            fn_call#109 = scheduleEvent#10(lit#108, lit#107, lit#106);
            lit#110 = 0;
            return lit#110;
        }
    }
}