@gamely/gly-engine-lite 0.3.6 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.lua +71 -75
- package/package.json +1 -1
package/dist/main.lua
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
local
|
|
2
|
-
local
|
|
1
|
+
local b25ba = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
|
2
|
+
local r25ba = function(i, f)
|
|
3
3
|
return function()
|
|
4
4
|
local c = f()
|
|
5
|
-
|
|
5
|
+
b25ba[i] = function() return c end
|
|
6
6
|
return c
|
|
7
7
|
end
|
|
8
8
|
end
|
|
9
9
|
local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
|
|
10
|
-
local function
|
|
11
|
-
local version =
|
|
12
|
-
local loadcore =
|
|
13
|
-
local loadgame =
|
|
14
|
-
local engine_encoder =
|
|
15
|
-
local engine_game =
|
|
16
|
-
local engine_hash =
|
|
17
|
-
local engine_http =
|
|
18
|
-
local engine_i18n =
|
|
19
|
-
local engine_key =
|
|
20
|
-
local engine_env =
|
|
21
|
-
local engine_log =
|
|
22
|
-
local engine_math =
|
|
23
|
-
local engine_math_clib =
|
|
24
|
-
local engine_math_random =
|
|
25
|
-
local engine_array =
|
|
26
|
-
local engine_media =
|
|
27
|
-
local engine_api_draw_fps =
|
|
28
|
-
local engine_api_draw_text =
|
|
29
|
-
local engine_api_draw_poly =
|
|
30
|
-
local engine_raw_memory =
|
|
31
|
-
local callback_http =
|
|
32
|
-
local application_default =
|
|
33
|
-
local color =
|
|
34
|
-
local std =
|
|
10
|
+
local function m25ba()
|
|
11
|
+
local version = b25ba[1]('source_version')
|
|
12
|
+
local loadcore = b25ba[2]('source_shared_engine_loadcore')
|
|
13
|
+
local loadgame = b25ba[3]('source_shared_engine_loadgame')
|
|
14
|
+
local engine_encoder = b25ba[4]('source_engine_api_data_encoder')
|
|
15
|
+
local engine_game = b25ba[5]('source_engine_api_system_app')
|
|
16
|
+
local engine_hash = b25ba[6]('source_engine_api_data_hash')
|
|
17
|
+
local engine_http = b25ba[7]('source_engine_api_io_http')
|
|
18
|
+
local engine_i18n = b25ba[8]('source_engine_api_data_i18n')
|
|
19
|
+
local engine_key = b25ba[9]('source_engine_api_system_key')
|
|
20
|
+
local engine_env = b25ba[10]('source_engine_api_system_getenv')
|
|
21
|
+
local engine_log = b25ba[11]('source_engine_api_debug_log')
|
|
22
|
+
local engine_math = b25ba[12]('source_engine_api_math_basic')
|
|
23
|
+
local engine_math_clib = b25ba[13]('source_engine_api_math_clib')
|
|
24
|
+
local engine_math_random = b25ba[14]('source_engine_api_math_random')
|
|
25
|
+
local engine_array = b25ba[15]('source_engine_api_data_array')
|
|
26
|
+
local engine_media = b25ba[16]('source_engine_api_io_media')
|
|
27
|
+
local engine_api_draw_fps = b25ba[17]('source_engine_api_draw_fps')
|
|
28
|
+
local engine_api_draw_text = b25ba[18]('source_engine_api_draw_text')
|
|
29
|
+
local engine_api_draw_poly = b25ba[19]('source_engine_api_draw_poly')
|
|
30
|
+
local engine_raw_memory = b25ba[20]('source_engine_api_raw_memory')
|
|
31
|
+
local callback_http = b25ba[21]('source_engine_protocol_http_callback')
|
|
32
|
+
local application_default = b25ba[22]('source_shared_var_object_root')
|
|
33
|
+
local color = b25ba[23]('source_engine_api_system_color')
|
|
34
|
+
local std = b25ba[24]('source_shared_var_object_std')
|
|
35
35
|
local application = application_default
|
|
36
36
|
local engine = {
|
|
37
37
|
keyboard = function(a, b, c, d) end,
|
|
@@ -193,12 +193,12 @@ version=version
|
|
|
193
193
|
}
|
|
194
194
|
return P
|
|
195
195
|
end
|
|
196
|
-
|
|
197
|
-
return '0.3.
|
|
196
|
+
b25ba[1] = r25ba(1, function()
|
|
197
|
+
return '0.3.7'
|
|
198
198
|
end)
|
|
199
|
-
|
|
200
|
-
local zeebo_pipeline =
|
|
201
|
-
local requires =
|
|
199
|
+
b25ba[2] = r25ba(2, function()
|
|
200
|
+
local zeebo_pipeline = b25ba[25]('source_shared_functional_pipeline')
|
|
201
|
+
local requires = b25ba[26]('source_shared_string_dsl_requires')
|
|
202
202
|
local function step_install_libsys(self, lib_name, library, custom, is_system)
|
|
203
203
|
if not is_system then return end
|
|
204
204
|
local ok, msg = pcall(function()
|
|
@@ -279,9 +279,9 @@ setup = setup
|
|
|
279
279
|
}
|
|
280
280
|
return P
|
|
281
281
|
end)
|
|
282
|
-
|
|
283
|
-
local eval_file =
|
|
284
|
-
local eval_code =
|
|
282
|
+
b25ba[3] = r25ba(3, function()
|
|
283
|
+
local eval_file = b25ba[27]('source_shared_string_eval_file')
|
|
284
|
+
local eval_code = b25ba[28]('source_shared_string_eval_code')
|
|
285
285
|
local has_io_open = io and io.open
|
|
286
286
|
local function normalize(app, base)
|
|
287
287
|
if not app then return nil end
|
|
@@ -355,7 +355,7 @@ script = script
|
|
|
355
355
|
}
|
|
356
356
|
return P
|
|
357
357
|
end)
|
|
358
|
-
|
|
358
|
+
b25ba[4] = r25ba(4, function()
|
|
359
359
|
local function install(std, engine, library, name)
|
|
360
360
|
std = std or {}
|
|
361
361
|
std[name] = {
|
|
@@ -369,7 +369,7 @@ install=install
|
|
|
369
369
|
}
|
|
370
370
|
return P
|
|
371
371
|
end)
|
|
372
|
-
|
|
372
|
+
b25ba[5] = r25ba(5, function()
|
|
373
373
|
local function reset(std, engine)
|
|
374
374
|
if std.node then
|
|
375
375
|
return function()
|
|
@@ -404,11 +404,7 @@ local function install(std, engine, config)
|
|
|
404
404
|
std = std or {}
|
|
405
405
|
config = config or {}
|
|
406
406
|
std.app = std.app or {}
|
|
407
|
-
std.bus.listen('post_quit', function()
|
|
408
|
-
if config.quit then
|
|
409
|
-
config.quit()
|
|
410
|
-
end
|
|
411
|
-
end)
|
|
407
|
+
std.bus.listen('post_quit', config.quit or config.exit or function() end)
|
|
412
408
|
std.app.title = title(config.set_title)
|
|
413
409
|
std.app.exit = exit(std)
|
|
414
410
|
std.app.reset = reset(std, engine)
|
|
@@ -422,7 +418,7 @@ install=install
|
|
|
422
418
|
}
|
|
423
419
|
return P
|
|
424
420
|
end)
|
|
425
|
-
|
|
421
|
+
b25ba[6] = r25ba(6, function()
|
|
426
422
|
local function djb2(digest)
|
|
427
423
|
local index = 1
|
|
428
424
|
local hash = 5381
|
|
@@ -445,8 +441,8 @@ install = install
|
|
|
445
441
|
}
|
|
446
442
|
return P
|
|
447
443
|
end)
|
|
448
|
-
|
|
449
|
-
local zeebo_pipeline =
|
|
444
|
+
b25ba[7] = r25ba(7, function()
|
|
445
|
+
local zeebo_pipeline = b25ba[25]('source_shared_functional_pipeline')
|
|
450
446
|
local function json(self)
|
|
451
447
|
self.options['json'] = true
|
|
452
448
|
return self
|
|
@@ -612,7 +608,7 @@ install=install
|
|
|
612
608
|
}
|
|
613
609
|
return P
|
|
614
610
|
end)
|
|
615
|
-
|
|
611
|
+
b25ba[8] = r25ba(8, function()
|
|
616
612
|
local language = 'en-US'
|
|
617
613
|
local language_default = 'en-US'
|
|
618
614
|
local language_list = {}
|
|
@@ -703,7 +699,7 @@ install=install
|
|
|
703
699
|
}
|
|
704
700
|
return P
|
|
705
701
|
end)
|
|
706
|
-
|
|
702
|
+
b25ba[9] = r25ba(9, function()
|
|
707
703
|
local function real_key(std, engine, rkey, rvalue)
|
|
708
704
|
local value = (rvalue == 1 or rvalue == true) or false
|
|
709
705
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -752,7 +748,7 @@ return {
|
|
|
752
748
|
install = install
|
|
753
749
|
}
|
|
754
750
|
end)
|
|
755
|
-
|
|
751
|
+
b25ba[10] = r25ba(10, function()
|
|
756
752
|
local function setenv(engine)
|
|
757
753
|
return function(varname, value)
|
|
758
754
|
if engine.root ~= engine.current then
|
|
@@ -795,8 +791,8 @@ install = install
|
|
|
795
791
|
}
|
|
796
792
|
return P
|
|
797
793
|
end)
|
|
798
|
-
|
|
799
|
-
local util_decorator =
|
|
794
|
+
b25ba[11] = r25ba(11, function()
|
|
795
|
+
local util_decorator = b25ba[29]('source_shared_functional_decorator')
|
|
800
796
|
local logging_types = {
|
|
801
797
|
'none', 'fatal', 'error', 'warn', 'debug', 'info'
|
|
802
798
|
}
|
|
@@ -841,7 +837,7 @@ install = install
|
|
|
841
837
|
}
|
|
842
838
|
return P
|
|
843
839
|
end)
|
|
844
|
-
|
|
840
|
+
b25ba[12] = r25ba(12, function()
|
|
845
841
|
local function abs(value)
|
|
846
842
|
if value < 0 then
|
|
847
843
|
return -value
|
|
@@ -939,7 +935,7 @@ install = install
|
|
|
939
935
|
}
|
|
940
936
|
return P
|
|
941
937
|
end)
|
|
942
|
-
|
|
938
|
+
b25ba[13] = r25ba(13, function()
|
|
943
939
|
local function install(std)
|
|
944
940
|
assert(math and (1/2 ~= 0))
|
|
945
941
|
std.math = std.math or {}
|
|
@@ -974,7 +970,7 @@ install = install
|
|
|
974
970
|
}
|
|
975
971
|
return P
|
|
976
972
|
end)
|
|
977
|
-
|
|
973
|
+
b25ba[14] = r25ba(14, function()
|
|
978
974
|
local function install(std)
|
|
979
975
|
assert(math and (1/2 ~= 0))
|
|
980
976
|
std.math = std.math or {}
|
|
@@ -990,8 +986,8 @@ install = install
|
|
|
990
986
|
}
|
|
991
987
|
return P
|
|
992
988
|
end)
|
|
993
|
-
|
|
994
|
-
local util_decorator =
|
|
989
|
+
b25ba[15] = r25ba(15, function()
|
|
990
|
+
local util_decorator = b25ba[29]('source_shared_functional_decorator')
|
|
995
991
|
local function array_map(array, func)
|
|
996
992
|
local res = {}
|
|
997
993
|
local index = 1
|
|
@@ -1151,7 +1147,7 @@ install = install
|
|
|
1151
1147
|
}
|
|
1152
1148
|
return P
|
|
1153
1149
|
end)
|
|
1154
|
-
|
|
1150
|
+
b25ba[16] = r25ba(16, function()
|
|
1155
1151
|
local function media_create(node, channels, handler)
|
|
1156
1152
|
local decorator = function(func)
|
|
1157
1153
|
func = func or function() end
|
|
@@ -1197,7 +1193,7 @@ install=install
|
|
|
1197
1193
|
}
|
|
1198
1194
|
return P
|
|
1199
1195
|
end)
|
|
1200
|
-
|
|
1196
|
+
b25ba[17] = r25ba(17, function()
|
|
1201
1197
|
local function draw_fps(std, engine, show, pos_x, pos_y)
|
|
1202
1198
|
if show < 1 then return end
|
|
1203
1199
|
local x = engine.current.config.offset_x + pos_x
|
|
@@ -1245,7 +1241,7 @@ install=install
|
|
|
1245
1241
|
}
|
|
1246
1242
|
return P
|
|
1247
1243
|
end)
|
|
1248
|
-
|
|
1244
|
+
b25ba[18] = r25ba(18, function()
|
|
1249
1245
|
local function text_put(std, engine, font_previous)
|
|
1250
1246
|
return function(pos_x, pos_y, text, size)
|
|
1251
1247
|
size = size or 2
|
|
@@ -1277,7 +1273,7 @@ install=install
|
|
|
1277
1273
|
}
|
|
1278
1274
|
return P
|
|
1279
1275
|
end)
|
|
1280
|
-
|
|
1276
|
+
b25ba[19] = r25ba(19, function()
|
|
1281
1277
|
local function decorator_poo(object, func)
|
|
1282
1278
|
if not object or not func then return func end
|
|
1283
1279
|
return function(a, b, c, d)
|
|
@@ -1383,7 +1379,7 @@ install=install
|
|
|
1383
1379
|
}
|
|
1384
1380
|
return P
|
|
1385
1381
|
end)
|
|
1386
|
-
|
|
1382
|
+
b25ba[20] = r25ba(20, function()
|
|
1387
1383
|
local memory_dict_unload = {}
|
|
1388
1384
|
local memory_dict = {}
|
|
1389
1385
|
local memory_list = {}
|
|
@@ -1437,9 +1433,9 @@ install=install
|
|
|
1437
1433
|
}
|
|
1438
1434
|
return P
|
|
1439
1435
|
end)
|
|
1440
|
-
|
|
1441
|
-
local str_http =
|
|
1442
|
-
local str_url =
|
|
1436
|
+
b25ba[21] = r25ba(21, function()
|
|
1437
|
+
local str_http = b25ba[31]('source_shared_string_encode_http')
|
|
1438
|
+
local str_url = b25ba[32]('source_shared_string_encode_url')
|
|
1443
1439
|
local callbacks = {
|
|
1444
1440
|
['async-promise'] = function(self)
|
|
1445
1441
|
return self:promise()
|
|
@@ -1508,7 +1504,7 @@ func = native_http_callback
|
|
|
1508
1504
|
}
|
|
1509
1505
|
return P
|
|
1510
1506
|
end)
|
|
1511
|
-
|
|
1507
|
+
b25ba[22] = r25ba(22, function()
|
|
1512
1508
|
local P = {
|
|
1513
1509
|
data={
|
|
1514
1510
|
width=1280,
|
|
@@ -1537,7 +1533,7 @@ callbacks={
|
|
|
1537
1533
|
}
|
|
1538
1534
|
return P;
|
|
1539
1535
|
end)
|
|
1540
|
-
|
|
1536
|
+
b25ba[23] = r25ba(23, function()
|
|
1541
1537
|
local function install(std)
|
|
1542
1538
|
std.color = std.color or {}
|
|
1543
1539
|
std.color.white = 0xFFFFFFFF
|
|
@@ -1571,7 +1567,7 @@ install = install
|
|
|
1571
1567
|
}
|
|
1572
1568
|
return P
|
|
1573
1569
|
end)
|
|
1574
|
-
|
|
1570
|
+
b25ba[24] = r25ba(24, function()
|
|
1575
1571
|
local P = {
|
|
1576
1572
|
milis = 0,
|
|
1577
1573
|
delta = 0,
|
|
@@ -1638,7 +1634,7 @@ any=false
|
|
|
1638
1634
|
}
|
|
1639
1635
|
return P;
|
|
1640
1636
|
end)
|
|
1641
|
-
|
|
1637
|
+
b25ba[25] = r25ba(25, function()
|
|
1642
1638
|
local function pipe(self)
|
|
1643
1639
|
return function()
|
|
1644
1640
|
self:run()
|
|
@@ -1687,7 +1683,7 @@ run=run
|
|
|
1687
1683
|
}
|
|
1688
1684
|
return P
|
|
1689
1685
|
end)
|
|
1690
|
-
|
|
1686
|
+
b25ba[26] = r25ba(26, function()
|
|
1691
1687
|
local function encode(dsl_string)
|
|
1692
1688
|
local spec = {
|
|
1693
1689
|
list = {},
|
|
@@ -1735,7 +1731,7 @@ should_import = should_import
|
|
|
1735
1731
|
}
|
|
1736
1732
|
return P
|
|
1737
1733
|
end)
|
|
1738
|
-
|
|
1734
|
+
b25ba[27] = r25ba(27, function()
|
|
1739
1735
|
local function script(src)
|
|
1740
1736
|
local ok, app = false, nil
|
|
1741
1737
|
if require then
|
|
@@ -1760,7 +1756,7 @@ script = script,
|
|
|
1760
1756
|
}
|
|
1761
1757
|
return P
|
|
1762
1758
|
end)
|
|
1763
|
-
|
|
1759
|
+
b25ba[28] = r25ba(28, function()
|
|
1764
1760
|
local function script(src)
|
|
1765
1761
|
local loader = loadstring or load
|
|
1766
1762
|
if not loader then
|
|
@@ -1780,7 +1776,7 @@ script = script,
|
|
|
1780
1776
|
}
|
|
1781
1777
|
return P
|
|
1782
1778
|
end)
|
|
1783
|
-
|
|
1779
|
+
b25ba[29] = r25ba(29, function()
|
|
1784
1780
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
1785
1781
|
return function (a, b, c, d, e, f)
|
|
1786
1782
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -1837,7 +1833,7 @@ prefix1_t = table_prefix1
|
|
|
1837
1833
|
}
|
|
1838
1834
|
return P
|
|
1839
1835
|
end)
|
|
1840
|
-
|
|
1836
|
+
b25ba[31] = r25ba(31, function()
|
|
1841
1837
|
local function is_ok(status)
|
|
1842
1838
|
return (status and 200 <= status and status < 300) or false
|
|
1843
1839
|
end
|
|
@@ -1983,7 +1979,7 @@ get_user_agent=get_user_agent,
|
|
|
1983
1979
|
create_request=create_request
|
|
1984
1980
|
}
|
|
1985
1981
|
end)
|
|
1986
|
-
|
|
1982
|
+
b25ba[32] = r25ba(32, function()
|
|
1987
1983
|
local function search_param(param_list, param_dict)
|
|
1988
1984
|
local index, params = 1, ''
|
|
1989
1985
|
while param_list and param_dict and index <= #param_list do
|
|
@@ -2004,4 +2000,4 @@ search_param = search_param
|
|
|
2004
2000
|
}
|
|
2005
2001
|
return P
|
|
2006
2002
|
end)
|
|
2007
|
-
return
|
|
2003
|
+
return m25ba()
|