@gamely/gly-engine-micro 0.3.4 → 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 +35 -39
- package/package.json +1 -1
package/dist/main.lua
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
local
|
|
2
|
-
local
|
|
1
|
+
local b14c3 = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
|
|
2
|
+
local r14c3 = function(i, f)
|
|
3
3
|
return function()
|
|
4
4
|
local c = f()
|
|
5
|
-
|
|
5
|
+
b14c3[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 engine_game =
|
|
13
|
-
local engine_key =
|
|
14
|
-
local engine_math =
|
|
15
|
-
local engine_math_clib =
|
|
16
|
-
local engine_math_random =
|
|
17
|
-
local engine_array =
|
|
18
|
-
local engine_api_draw_text =
|
|
19
|
-
local engine_api_draw_poly =
|
|
20
|
-
local engine_raw_memory =
|
|
21
|
-
local color =
|
|
22
|
-
local std =
|
|
23
|
-
local eval_code =
|
|
10
|
+
local function m14c3()
|
|
11
|
+
local version = b14c3[1]('source_version')
|
|
12
|
+
local engine_game = b14c3[2]('source_engine_api_system_app')
|
|
13
|
+
local engine_key = b14c3[3]('source_engine_api_system_key')
|
|
14
|
+
local engine_math = b14c3[4]('source_engine_api_math_basic')
|
|
15
|
+
local engine_math_clib = b14c3[5]('source_engine_api_math_clib')
|
|
16
|
+
local engine_math_random = b14c3[6]('source_engine_api_math_random')
|
|
17
|
+
local engine_array = b14c3[7]('source_engine_api_data_array')
|
|
18
|
+
local engine_api_draw_text = b14c3[8]('source_engine_api_draw_text')
|
|
19
|
+
local engine_api_draw_poly = b14c3[9]('source_engine_api_draw_poly')
|
|
20
|
+
local engine_raw_memory = b14c3[10]('source_engine_api_raw_memory')
|
|
21
|
+
local color = b14c3[11]('source_engine_api_system_color')
|
|
22
|
+
local std = b14c3[12]('source_shared_var_object_std')
|
|
23
|
+
local eval_code = b14c3[13]('source_shared_string_eval_code')
|
|
24
24
|
local f=function(a,b)end
|
|
25
25
|
local engine={keyboard=f}
|
|
26
26
|
local application={
|
|
@@ -135,10 +135,10 @@ version=version
|
|
|
135
135
|
}
|
|
136
136
|
return P
|
|
137
137
|
end
|
|
138
|
-
|
|
139
|
-
return '0.3.
|
|
138
|
+
b14c3[1] = r14c3(1, function()
|
|
139
|
+
return '0.3.7'
|
|
140
140
|
end)
|
|
141
|
-
|
|
141
|
+
b14c3[2] = r14c3(2, function()
|
|
142
142
|
local function reset(std, engine)
|
|
143
143
|
if std.node then
|
|
144
144
|
return function()
|
|
@@ -173,11 +173,7 @@ local function install(std, engine, config)
|
|
|
173
173
|
std = std or {}
|
|
174
174
|
config = config or {}
|
|
175
175
|
std.app = std.app or {}
|
|
176
|
-
std.bus.listen('post_quit', function()
|
|
177
|
-
if config.quit then
|
|
178
|
-
config.quit()
|
|
179
|
-
end
|
|
180
|
-
end)
|
|
176
|
+
std.bus.listen('post_quit', config.quit or config.exit or function() end)
|
|
181
177
|
std.app.title = title(config.set_title)
|
|
182
178
|
std.app.exit = exit(std)
|
|
183
179
|
std.app.reset = reset(std, engine)
|
|
@@ -191,7 +187,7 @@ install=install
|
|
|
191
187
|
}
|
|
192
188
|
return P
|
|
193
189
|
end)
|
|
194
|
-
|
|
190
|
+
b14c3[3] = r14c3(3, function()
|
|
195
191
|
local function real_key(std, engine, rkey, rvalue)
|
|
196
192
|
local value = (rvalue == 1 or rvalue == true) or false
|
|
197
193
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -240,7 +236,7 @@ return {
|
|
|
240
236
|
install = install
|
|
241
237
|
}
|
|
242
238
|
end)
|
|
243
|
-
|
|
239
|
+
b14c3[4] = r14c3(4, function()
|
|
244
240
|
local function abs(value)
|
|
245
241
|
if value < 0 then
|
|
246
242
|
return -value
|
|
@@ -338,7 +334,7 @@ install = install
|
|
|
338
334
|
}
|
|
339
335
|
return P
|
|
340
336
|
end)
|
|
341
|
-
|
|
337
|
+
b14c3[5] = r14c3(5, function()
|
|
342
338
|
local function install(std)
|
|
343
339
|
assert(math and (1/2 ~= 0))
|
|
344
340
|
std.math = std.math or {}
|
|
@@ -373,7 +369,7 @@ install = install
|
|
|
373
369
|
}
|
|
374
370
|
return P
|
|
375
371
|
end)
|
|
376
|
-
|
|
372
|
+
b14c3[6] = r14c3(6, function()
|
|
377
373
|
local function install(std)
|
|
378
374
|
assert(math and (1/2 ~= 0))
|
|
379
375
|
std.math = std.math or {}
|
|
@@ -389,8 +385,8 @@ install = install
|
|
|
389
385
|
}
|
|
390
386
|
return P
|
|
391
387
|
end)
|
|
392
|
-
|
|
393
|
-
local util_decorator =
|
|
388
|
+
b14c3[7] = r14c3(7, function()
|
|
389
|
+
local util_decorator = b14c3[15]('source_shared_functional_decorator')
|
|
394
390
|
local function array_map(array, func)
|
|
395
391
|
local res = {}
|
|
396
392
|
local index = 1
|
|
@@ -550,7 +546,7 @@ install = install
|
|
|
550
546
|
}
|
|
551
547
|
return P
|
|
552
548
|
end)
|
|
553
|
-
|
|
549
|
+
b14c3[8] = r14c3(8, function()
|
|
554
550
|
local function text_put(std, engine, font_previous)
|
|
555
551
|
return function(pos_x, pos_y, text, size)
|
|
556
552
|
size = size or 2
|
|
@@ -582,7 +578,7 @@ install=install
|
|
|
582
578
|
}
|
|
583
579
|
return P
|
|
584
580
|
end)
|
|
585
|
-
|
|
581
|
+
b14c3[9] = r14c3(9, function()
|
|
586
582
|
local function decorator_poo(object, func)
|
|
587
583
|
if not object or not func then return func end
|
|
588
584
|
return function(a, b, c, d)
|
|
@@ -688,7 +684,7 @@ install=install
|
|
|
688
684
|
}
|
|
689
685
|
return P
|
|
690
686
|
end)
|
|
691
|
-
|
|
687
|
+
b14c3[10] = r14c3(10, function()
|
|
692
688
|
local memory_dict_unload = {}
|
|
693
689
|
local memory_dict = {}
|
|
694
690
|
local memory_list = {}
|
|
@@ -742,7 +738,7 @@ install=install
|
|
|
742
738
|
}
|
|
743
739
|
return P
|
|
744
740
|
end)
|
|
745
|
-
|
|
741
|
+
b14c3[11] = r14c3(11, function()
|
|
746
742
|
local function install(std)
|
|
747
743
|
std.color = std.color or {}
|
|
748
744
|
std.color.white = 0xFFFFFFFF
|
|
@@ -776,7 +772,7 @@ install = install
|
|
|
776
772
|
}
|
|
777
773
|
return P
|
|
778
774
|
end)
|
|
779
|
-
|
|
775
|
+
b14c3[12] = r14c3(12, function()
|
|
780
776
|
local P = {
|
|
781
777
|
milis = 0,
|
|
782
778
|
delta = 0,
|
|
@@ -843,7 +839,7 @@ any=false
|
|
|
843
839
|
}
|
|
844
840
|
return P;
|
|
845
841
|
end)
|
|
846
|
-
|
|
842
|
+
b14c3[13] = r14c3(13, function()
|
|
847
843
|
local function script(src)
|
|
848
844
|
local loader = loadstring or load
|
|
849
845
|
if not loader then
|
|
@@ -863,7 +859,7 @@ script = script,
|
|
|
863
859
|
}
|
|
864
860
|
return P
|
|
865
861
|
end)
|
|
866
|
-
|
|
862
|
+
b14c3[15] = r14c3(15, function()
|
|
867
863
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
868
864
|
return function (a, b, c, d, e, f)
|
|
869
865
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -920,4 +916,4 @@ prefix1_t = table_prefix1
|
|
|
920
916
|
}
|
|
921
917
|
return P
|
|
922
918
|
end)
|
|
923
|
-
return
|
|
919
|
+
return m14c3()
|