@gamely/gly-engine-micro 0.0.21 → 0.1.1
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 +43 -53
- package/package.json +1 -1
package/dist/main.lua
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
|
|
2
|
-
local
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
13
|
-
local
|
|
14
|
-
local function
|
|
15
|
-
local version =
|
|
16
|
-
local engine_game =
|
|
17
|
-
local engine_key =
|
|
18
|
-
local engine_math =
|
|
19
|
-
local engine_array =
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local engine_raw_memory =
|
|
23
|
-
local color =
|
|
24
|
-
local std =
|
|
25
|
-
local util_lua =
|
|
2
|
+
local source_version_563143e76540 = nil
|
|
3
|
+
local source_engine_api_system_app_563143e39400 = nil
|
|
4
|
+
local source_engine_api_system_key_563143e61c40 = nil
|
|
5
|
+
local source_engine_api_system_math_563143e96320 = nil
|
|
6
|
+
local source_engine_api_data_array_563143e916b0 = nil
|
|
7
|
+
local source_engine_api_draw_text_563143e85750 = nil
|
|
8
|
+
local source_engine_api_draw_poly_563143e75a00 = nil
|
|
9
|
+
local source_engine_api_raw_memory_563143e9bc80 = nil
|
|
10
|
+
local source_engine_api_system_color_563143e770e0 = nil
|
|
11
|
+
local source_shared_var_object_std_563143ed4a30 = nil
|
|
12
|
+
local source_shared_string_parse_lua_563143ed5430 = nil
|
|
13
|
+
local source_shared_functional_decorator_563143e8a380 = nil
|
|
14
|
+
local function main_563143e62ad0()
|
|
15
|
+
local version = source_version_563143e76540()
|
|
16
|
+
local engine_game = source_engine_api_system_app_563143e39400()
|
|
17
|
+
local engine_key = source_engine_api_system_key_563143e61c40()
|
|
18
|
+
local engine_math = source_engine_api_system_math_563143e96320()
|
|
19
|
+
local engine_array = source_engine_api_data_array_563143e916b0()
|
|
20
|
+
local engine_api_draw_text = source_engine_api_draw_text_563143e85750()
|
|
21
|
+
local engine_api_draw_poly = source_engine_api_draw_poly_563143e75a00()
|
|
22
|
+
local engine_raw_memory = source_engine_api_raw_memory_563143e9bc80()
|
|
23
|
+
local color = source_engine_api_system_color_563143e770e0()
|
|
24
|
+
local std = source_shared_var_object_std_563143ed4a30()
|
|
25
|
+
local util_lua = source_shared_string_parse_lua_563143ed5430()
|
|
26
26
|
local f=function(a,b)end
|
|
27
27
|
local engine={keyboard=f}
|
|
28
28
|
local application={
|
|
@@ -114,8 +114,8 @@ engine_math.wave.install(std, engine)
|
|
|
114
114
|
engine_math.clib.install(std, engine)
|
|
115
115
|
engine_math.clib_random.install(std, engine)
|
|
116
116
|
engine_array.install(std, engine, nil, 'array')
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
engine_api_draw_text.install(std, engine, cfg_text)
|
|
118
|
+
engine_api_draw_poly.install(std, engine, cfg_poly)
|
|
119
119
|
color.install(std, engine)
|
|
120
120
|
std.app.title(application.meta.title..' - '..application.meta.version)
|
|
121
121
|
engine.current=application
|
|
@@ -131,12 +131,12 @@ version=version
|
|
|
131
131
|
}
|
|
132
132
|
return P
|
|
133
133
|
end
|
|
134
|
-
|
|
135
|
-
return '0.
|
|
134
|
+
source_version_563143e76540 = function()
|
|
135
|
+
return '0.1.1'
|
|
136
136
|
end
|
|
137
137
|
--
|
|
138
|
-
|
|
139
|
-
local util_decorator =
|
|
138
|
+
source_engine_api_system_app_563143e39400 = function()
|
|
139
|
+
local util_decorator = source_shared_functional_decorator_563143e8a380()
|
|
140
140
|
local function reset(std, engine)
|
|
141
141
|
if std.node then
|
|
142
142
|
std.bus.emit('exit')
|
|
@@ -176,7 +176,7 @@ install=install
|
|
|
176
176
|
return P
|
|
177
177
|
end
|
|
178
178
|
--
|
|
179
|
-
|
|
179
|
+
source_engine_api_system_key_563143e61c40 = function()
|
|
180
180
|
local function real_key(std, engine, rkey, rvalue)
|
|
181
181
|
local value = rvalue == 1 or rvalue == true
|
|
182
182
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -216,7 +216,7 @@ install = install
|
|
|
216
216
|
return P
|
|
217
217
|
end
|
|
218
218
|
--
|
|
219
|
-
|
|
219
|
+
source_engine_api_system_math_563143e96320 = function()
|
|
220
220
|
local function abs(value)
|
|
221
221
|
if value < 0 then
|
|
222
222
|
return -value
|
|
@@ -391,8 +391,8 @@ install = install_clib_random
|
|
|
391
391
|
return P;
|
|
392
392
|
end
|
|
393
393
|
--
|
|
394
|
-
|
|
395
|
-
local util_decorator =
|
|
394
|
+
source_engine_api_data_array_563143e916b0 = function()
|
|
395
|
+
local util_decorator = source_shared_functional_decorator_563143e8a380()
|
|
396
396
|
local function array_map(array, func)
|
|
397
397
|
local res = {}
|
|
398
398
|
local index = 1
|
|
@@ -553,8 +553,8 @@ install = install
|
|
|
553
553
|
return P
|
|
554
554
|
end
|
|
555
555
|
--
|
|
556
|
-
|
|
557
|
-
local util_decorator =
|
|
556
|
+
source_engine_api_draw_text_563143e85750 = function()
|
|
557
|
+
local util_decorator = source_shared_functional_decorator_563143e8a380()
|
|
558
558
|
local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
|
|
559
559
|
size = size or 2
|
|
560
560
|
local hem = engine.current.data.width / 80
|
|
@@ -581,7 +581,7 @@ install=install
|
|
|
581
581
|
return P
|
|
582
582
|
end
|
|
583
583
|
--
|
|
584
|
-
|
|
584
|
+
source_engine_api_draw_poly_563143e75a00 = function()
|
|
585
585
|
local function decorator_poo(object, func)
|
|
586
586
|
if not object or not func then return func end
|
|
587
587
|
return function(a, b, c, d)
|
|
@@ -688,7 +688,7 @@ install=install
|
|
|
688
688
|
return P
|
|
689
689
|
end
|
|
690
690
|
--
|
|
691
|
-
|
|
691
|
+
source_engine_api_raw_memory_563143e9bc80 = function()
|
|
692
692
|
local memory_dict_unload = {}
|
|
693
693
|
local memory_dict = {}
|
|
694
694
|
local memory_list = {}
|
|
@@ -743,7 +743,7 @@ install=install
|
|
|
743
743
|
return P
|
|
744
744
|
end
|
|
745
745
|
--
|
|
746
|
-
|
|
746
|
+
source_engine_api_system_color_563143e770e0 = function()
|
|
747
747
|
local function install(std)
|
|
748
748
|
std.color = std.color or {}
|
|
749
749
|
std.color.white = 0xFFFFFFFF
|
|
@@ -778,7 +778,7 @@ install = install
|
|
|
778
778
|
return P
|
|
779
779
|
end
|
|
780
780
|
--
|
|
781
|
-
|
|
781
|
+
source_shared_var_object_std_563143ed4a30 = function()
|
|
782
782
|
local P = {
|
|
783
783
|
milis = 0,
|
|
784
784
|
delta = 0,
|
|
@@ -844,16 +844,7 @@ any=false
|
|
|
844
844
|
return P;
|
|
845
845
|
end
|
|
846
846
|
--
|
|
847
|
-
|
|
848
|
-
local function has_support_utf8()
|
|
849
|
-
if jit then
|
|
850
|
-
return true
|
|
851
|
-
end
|
|
852
|
-
if tonumber(_VERSION:match('Lua 5.(%d+)')) >= 3 then
|
|
853
|
-
return true
|
|
854
|
-
end
|
|
855
|
-
return false
|
|
856
|
-
end
|
|
847
|
+
source_shared_string_parse_lua_563143ed5430 = function()
|
|
857
848
|
local function eval(script)
|
|
858
849
|
local loader = loadstring or load
|
|
859
850
|
if not loader then
|
|
@@ -870,12 +861,11 @@ return pcall(chunk)
|
|
|
870
861
|
end
|
|
871
862
|
local P = {
|
|
872
863
|
eval = eval,
|
|
873
|
-
has_support_utf8=has_support_utf8
|
|
874
864
|
}
|
|
875
865
|
return P
|
|
876
866
|
end
|
|
877
867
|
--
|
|
878
|
-
|
|
868
|
+
source_shared_functional_decorator_563143e8a380 = function()
|
|
879
869
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
880
870
|
return function (a, b, c, d, e, f)
|
|
881
871
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -933,4 +923,4 @@ prefix1_t = table_prefix1
|
|
|
933
923
|
return P
|
|
934
924
|
end
|
|
935
925
|
--
|
|
936
|
-
return
|
|
926
|
+
return main_563143e62ad0()
|