Commit 7bdcd6bf authored by Ondrasek Timotej's avatar Ondrasek Timotej
Browse files

Changed some comments

parent 8d6b2cad
Loading
Loading
Loading
Loading
+320 −904

File changed.

Preview size limit exceeded, changes collapsed.

+11 −11
Original line number Diff line number Diff line
@@ -111,11 +111,11 @@
                    ["CALL_ANY", "lcl", 3, 19, 2, [38, 22]],
                    ["CALL", "pcll", 0, 20, 4, 2, [38, 5]],
                    ["CALL", "pcl", 0, 21, 2, [40, 5]],
                    ["CALL", "lcls", 1, 18, 2, 2, [42, 14]],
                    ["COPY_REF", "ll", 3, 2, [42, 5]],
                    ["CALL_ANY", "lcl", 3, 19, 2, [43, 24]],
                    ["CALL", "pcll", 1, 20, 4, 2, [43, 5]],
                    ["CALL", "pcl", 1, 21, 2, [44, 5]],
                    ["CALL", "lcls", 1, 18, 2, 2, [43, 14]],
                    ["COPY_REF", "ll", 3, 2, [43, 5]],
                    ["CALL_ANY", "lcl", 3, 19, 2, [44, 24]],
                    ["CALL", "pcll", 1, 20, 4, 2, [44, 5]],
                    ["CALL", "pcl", 1, 21, 2, [45, 5]],
                    ["RET", "", [31, 1]]
                ]
            ]
@@ -130,12 +130,12 @@
            ],
            "code": [
                [
                    ["CALL", "sclc", 0, 23, 0, 22, [50, 5]],
                    ["CALL", "sclc", 0, 23, 0, 24, [51, 5]],
                    ["CALL", "sclc", 0, 23, 0, 25, [52, 5]],
                    ["CALL", "sclc", 0, 23, 0, 26, [53, 5]],
                    ["CALL", "sclc", 0, 23, 0, 27, [54, 5]],
                    ["RET", "", [48, 1]]
                    ["CALL", "sclc", 0, 23, 0, 22, [51, 5]],
                    ["CALL", "sclc", 0, 23, 0, 24, [52, 5]],
                    ["CALL", "sclc", 0, 23, 0, 25, [53, 5]],
                    ["CALL", "sclc", 0, 23, 0, 26, [54, 5]],
                    ["CALL", "sclc", 0, 23, 0, 27, [55, 5]],
                    ["RET", "", [49, 1]]
                ]
            ]
        }
+69 −69
Original line number Diff line number Diff line
@@ -85,20 +85,20 @@
            ],
            "code": [
                [
                    ["GET_ITEM", "lc", 0, 0, [1, 11]],
                    ["COPY_REF", "sl", 0, 0, [1, 0]],
                    ["GET_ITEM", "lc", 1, 1, [2, 18]],
                    ["COPY_REF", "sl", 1, 1, [2, 1]],
                    ["GET_ITEM", "lc", 2, 2, [3, 21]],
                    ["COPY_REF", "sl", 2, 2, [3, 1]],
                    ["GET_ITEM", "lc", 3, 3, [4, 23]],
                    ["COPY_REF", "sl", 3, 3, [4, 1]],
                    ["GET_ITEM", "lc", 4, 4, [5, 25]],
                    ["COPY_REF", "sl", 4, 4, [5, 1]],
                    ["GET_ITEM", "lc", 5, 5, [6, 20]],
                    ["COPY_REF", "sl", 5, 5, [6, 1]],
                    ["GET_ITEM", "lc", 6, 6, [7, 16]],
                    ["COPY_REF", "sl", 6, 6, [7, 1]],
                    ["GET_ITEM", "lc", 0, 0, [2, 12]],
                    ["COPY_REF", "sl", 0, 0, [2, 1]],
                    ["GET_ITEM", "lc", 1, 1, [3, 18]],
                    ["COPY_REF", "sl", 1, 1, [3, 1]],
                    ["GET_ITEM", "lc", 2, 2, [4, 21]],
                    ["COPY_REF", "sl", 2, 2, [4, 1]],
                    ["GET_ITEM", "lc", 3, 3, [5, 23]],
                    ["COPY_REF", "sl", 3, 3, [5, 1]],
                    ["GET_ITEM", "lc", 4, 4, [6, 25]],
                    ["COPY_REF", "sl", 4, 4, [6, 1]],
                    ["GET_ITEM", "lc", 5, 5, [7, 20]],
                    ["COPY_REF", "sl", 5, 5, [7, 1]],
                    ["GET_ITEM", "lc", 6, 6, [8, 16]],
                    ["COPY_REF", "sl", 6, 6, [8, 1]],
                    ["RET", "", [0, 0]]
                ]
            ]
@@ -115,19 +115,19 @@
            ],
            "code": [
                [
                    ["SELF", "l", 0, [14, 18]],
                    ["NE_ITEM", "lpl", 1, 0, 0, [14, 8]],
                    ["BRANCH", "lbb", 1, 3, 2, [14, 5]]
                    ["SELF", "l", 0, [15, 18]],
                    ["NE_ITEM", "lpl", 1, 0, 0, [15, 8]],
                    ["BRANCH", "lbb", 1, 3, 2, [15, 5]]
                ],
                [
                    ["CALL", "ccc", 7, 8, 0, [19, 5]],
                    ["RET", "", [11, 1]]
                    ["CALL", "ccc", 7, 8, 0, [20, 5]],
                    ["RET", "", [12, 1]]
                ],
                [
                    ["RET", "", [16, 9]]
                    ["RET", "", [17, 9]]
                ],
                [
                    ["JUMP", "b", 1, [14, 5]]
                    ["JUMP", "b", 1, [15, 5]]
                ]
            ]
        },
@@ -141,8 +141,8 @@
            ],
            "code": [
                [
                    ["COPY_VAL_STRING", "pc", 0, 9, [24, 5]],
                    ["RET", "", [24, 5]]
                    ["COPY_VAL_STRING", "pc", 0, 9, [25, 5]],
                    ["RET", "", [25, 5]]
                ]
            ]
        },
@@ -169,41 +169,41 @@
            ],
            "code": [
                [
                    ["CALL", "sclcc", 1, 12, 0, 10, 11, [29, 5]],
                    ["CALL", "ccl", 7, 14, 1, [29, 76]],
                    ["ADD_STRING", "llc", 1, 1, 15, [29, 76]],
                    ["SELF", "l", 2, [29, 99]],
                    ["NEW_ARRAY", "lll", 3, 1, 2, [29, 75]],
                    ["CALL_ANY", "lclcl", 0, 16, 4, 13, 3, [29, 5]],
                    ["GET_ITEM", "lc", 2, 19, [34, 62]],
                    ["CALL", "lcl", 2, 20, 4, [34, 62]],
                    ["CALL", "sclclc", 3, 22, 5, 18, 4, 21, [34, 13]],
                    ["CALL", "scl", 4, 23, 6, [35, 13]],
                    ["CALL", "sclcll", 2, 24, 7, 17, 5, 6, [32, 9]],
                    ["GET_ITEM", "lc", 8, 25, [37, 9]],
                    ["CALL", "sclllc", 2, 27, 9, 7, 8, 26, [31, 5]],
                    ["CALL", "sclccc", 3, 31, 4, 29, 21, 30, [45, 13]],
                    ["CALL", "sclccc", 4, 34, 5, 32, 33, 21, [46, 13]],
                    ["CALL", "sclcll", 2, 24, 6, 28, 4, 5, [43, 20]],
                    ["COPY_REF", "ll", 10, 6, [43, 5]],
                    ["CALL", "sclcc", 0, 16, 4, 10, 35, [50, 9]],
                    ["CALL_ANY", "lclcc", 4, 16, 5, 36, 37, [50, 9]],
                    ["CALL", "sclllc", 2, 27, 6, 10, 5, 26, [48, 5]],
                    ["CALL", "scll", 2, 38, 5, 10, [53, 5]],
                    ["CALL_ANY", "lclcc", 5, 16, 6, 39, 40, [53, 5]],
                    ["CALL", "sclcc", 0, 16, 6, 10, 41, [56, 18]],
                    ["CALL_ANY", "lclcc", 6, 16, 7, 36, 37, [56, 18]],
                    ["COPY_REF", "ll", 11, 7, [56, 5]],
                    ["CALL_ANY", "lclc", 11, 43, 7, 42, [57, 5]],
                    ["CALL", "sclllc", 2, 27, 7, 10, 11, 26, [58, 5]],
                    ["CALL", "sclcc", 0, 16, 7, 10, 44, [64, 23]],
                    ["CALL_ANY", "lclcc", 7, 16, 9, 36, 37, [64, 23]],
                    ["COPY_REF", "ll", 12, 9, [64, 5]],
                    ["CALL", "sclcclc", 5, 48, 9, 45, 46, 12, 47, [65, 21]],
                    ["COPY_REF", "ll", 13, 9, [65, 5]],
                    ["CALL", "sclll", 2, 48, 9, 10, 13, [74, 5]],
                    ["CALL", "sclll", 5, 49, 9, 13, 10, [75, 5]],
                    ["RET", "", [27, 1]]
                    ["CALL", "sclcc", 1, 12, 0, 10, 11, [31, 5]],
                    ["CALL", "ccl", 7, 14, 1, [31, 76]],
                    ["ADD_STRING", "llc", 1, 1, 15, [31, 76]],
                    ["SELF", "l", 2, [31, 99]],
                    ["NEW_ARRAY", "lll", 3, 1, 2, [31, 75]],
                    ["CALL_ANY", "lclcl", 0, 16, 4, 13, 3, [31, 5]],
                    ["GET_ITEM", "lc", 2, 19, [36, 62]],
                    ["CALL", "lcl", 2, 20, 4, [36, 62]],
                    ["CALL", "sclclc", 3, 22, 5, 18, 4, 21, [36, 13]],
                    ["CALL", "scl", 4, 23, 6, [37, 13]],
                    ["CALL", "sclcll", 2, 24, 7, 17, 5, 6, [34, 9]],
                    ["GET_ITEM", "lc", 8, 25, [39, 9]],
                    ["CALL", "sclllc", 2, 27, 9, 7, 8, 26, [33, 5]],
                    ["CALL", "sclccc", 3, 31, 4, 29, 21, 30, [47, 13]],
                    ["CALL", "sclccc", 4, 34, 5, 32, 33, 21, [48, 13]],
                    ["CALL", "sclcll", 2, 24, 6, 28, 4, 5, [45, 20]],
                    ["COPY_REF", "ll", 10, 6, [45, 5]],
                    ["CALL", "sclcc", 0, 16, 4, 10, 35, [52, 9]],
                    ["CALL_ANY", "lclcc", 4, 16, 5, 36, 37, [52, 9]],
                    ["CALL", "sclllc", 2, 27, 6, 10, 5, 26, [50, 5]],
                    ["CALL", "scll", 2, 38, 5, 10, [55, 5]],
                    ["CALL_ANY", "lclcc", 5, 16, 6, 39, 40, [55, 5]],
                    ["CALL", "sclcc", 0, 16, 6, 10, 41, [58, 18]],
                    ["CALL_ANY", "lclcc", 6, 16, 7, 36, 37, [58, 18]],
                    ["COPY_REF", "ll", 11, 7, [58, 5]],
                    ["CALL_ANY", "lclc", 11, 43, 7, 42, [59, 5]],
                    ["CALL", "sclllc", 2, 27, 7, 10, 11, 26, [60, 5]],
                    ["CALL", "sclcc", 0, 16, 7, 10, 44, [66, 23]],
                    ["CALL_ANY", "lclcc", 7, 16, 9, 36, 37, [66, 23]],
                    ["COPY_REF", "ll", 12, 9, [66, 5]],
                    ["CALL", "sclcclc", 5, 48, 9, 45, 46, 12, 47, [67, 21]],
                    ["COPY_REF", "ll", 13, 9, [67, 5]],
                    ["CALL", "sclll", 2, 48, 9, 10, 13, [76, 5]],
                    ["CALL", "sclll", 5, 49, 9, 13, 10, [77, 5]],
                    ["RET", "", [28, 1]]
                ]
            ]
        },
@@ -220,13 +220,13 @@
            ],
            "code": [
                [
                    ["CALL", "sclc", 1, 51, 0, 50, [80, 5]],
                    ["CALL", "ccl", 7, 14, 1, [80, 35]],
                    ["ADD_STRING", "llc", 1, 1, 15, [80, 35]],
                    ["CALL_ANY", "lcll", 0, 52, 2, 1, [80, 5]],
                    ["GET_ITEM", "lc", 3, 0, [82, 5]],
                    ["CALL", "lclc", 3, 52, 2, 33, [82, 5]],
                    ["RET", "", [78, 1]]
                    ["CALL", "sclc", 1, 51, 0, 50, [82, 5]],
                    ["CALL", "ccl", 7, 14, 1, [82, 35]],
                    ["ADD_STRING", "llc", 1, 1, 15, [82, 35]],
                    ["CALL_ANY", "lcll", 0, 52, 2, 1, [82, 5]],
                    ["GET_ITEM", "lc", 3, 0, [84, 5]],
                    ["CALL", "lclc", 3, 52, 2, 33, [84, 5]],
                    ["RET", "", [80, 1]]
                ]
            ]
        },
@@ -241,10 +241,10 @@
            ],
            "code": [
                [
                    ["CALL", "sclc", 6, 54, 0, 53, [87, 5]],
                    ["CALL", "scl", 2, 55, 0, [88, 33]],
                    ["CALL", "scllc", 6, 57, 1, 0, 56, [88, 5]],
                    ["RET", "", [85, 1]]
                    ["CALL", "sclc", 6, 54, 0, 53, [91, 5]],
                    ["CALL", "scl", 2, 55, 0, [93, 33]],
                    ["CALL", "scllc", 6, 57, 1, 0, 56, [93, 5]],
                    ["RET", "", [88, 1]]
                ]
            ]
        }
+157 −157

File changed.

Preview size limit exceeded, changes collapsed.

+5 −4
Original line number Diff line number Diff line
# Static variables availiable for all functions.
let root_mak = i"/game"; 
let updater_bytecode = p"game/scripts/bytecode/updater.json";
let root_mak = i"/game"; #item definition i"<path>"
let updater_bytecode = p"game/scripts/bytecode/updater.json"; #path defonotion p"<path>"
let presenter_bytecode = p"game/scripts/bytecode/presenter.json";

# Runs at script initialization. Only when script File is created not on script reload().
@@ -22,7 +22,7 @@ fn initialize()
    # local function call
    load_scripts(updater, presenter);

    # Unregisters events
    # Unregisters events (This must be done before script destructor)
    updater.unregister_on_content_changed(updater);
    presenter.unregister_on_content_changed(presenter);
}
@@ -39,12 +39,13 @@ fn load_scripts(updater: item, presenter: item) -> none
    # reloads script and invokes on_content_changed event
    updater.reload();

    # loads bytecode into presenter
    handle = loader.load_now(presenter_bytecode);
    presenter.set_json(handle.data());
    presenter.reload();
}

# Runs when script is released/erased from the Folder
# Runs when script is released or erased from the Folder
fn release()
{
    root_mak.erase("presenter");
Loading