@gamely/gly-engine-nano 0.2.3 → 0.2.5
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 +31 -28
- package/package.json +1 -1
package/dist/main.lua
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
local
|
|
2
|
-
local
|
|
3
|
-
local
|
|
4
|
-
local
|
|
5
|
-
local
|
|
6
|
-
local
|
|
7
|
-
local
|
|
8
|
-
local
|
|
9
|
-
local function
|
|
10
|
-
local version =
|
|
11
|
-
local engine_key =
|
|
12
|
-
local engine_api_draw_text =
|
|
13
|
-
local engine_api_draw_poly =
|
|
14
|
-
local color =
|
|
15
|
-
local std =
|
|
16
|
-
local eval_code =
|
|
1
|
+
local source_version_c1f = nil
|
|
2
|
+
local source_engine_api_system_key_c31 = nil
|
|
3
|
+
local source_engine_api_draw_text_c3c = nil
|
|
4
|
+
local source_engine_api_draw_poly_c47 = nil
|
|
5
|
+
local source_engine_api_system_color_c59 = nil
|
|
6
|
+
local source_shared_var_object_std_c64 = nil
|
|
7
|
+
local source_shared_string_eval_code_c76 = nil
|
|
8
|
+
local source_shared_functional_decorator_10c4 = nil
|
|
9
|
+
local function main_c16()
|
|
10
|
+
local version = source_version_c1f()
|
|
11
|
+
local engine_key = source_engine_api_system_key_c31()
|
|
12
|
+
local engine_api_draw_text = source_engine_api_draw_text_c3c()
|
|
13
|
+
local engine_api_draw_poly = source_engine_api_draw_poly_c47()
|
|
14
|
+
local color = source_engine_api_system_color_c59()
|
|
15
|
+
local std = source_shared_var_object_std_c64()
|
|
16
|
+
local eval_code = source_shared_string_eval_code_c76()
|
|
17
17
|
local f=function(a,b)end
|
|
18
18
|
local engine={keyboard=f}
|
|
19
19
|
local application={
|
|
@@ -64,7 +64,10 @@ if type(script) == 'string' then
|
|
|
64
64
|
ok, script=eval_code.script(script)
|
|
65
65
|
end
|
|
66
66
|
if not script then
|
|
67
|
-
ok, script=pcall(loadfile, 'game.lua')
|
|
67
|
+
ok, script = pcall(loadfile, 'game.lua')
|
|
68
|
+
end
|
|
69
|
+
if type(script) == 'function' then
|
|
70
|
+
ok, script = pcall(script)
|
|
68
71
|
end
|
|
69
72
|
if not ok or not script then
|
|
70
73
|
error(script, 0)
|
|
@@ -112,11 +115,11 @@ version=version
|
|
|
112
115
|
}
|
|
113
116
|
return P
|
|
114
117
|
end
|
|
115
|
-
|
|
116
|
-
return '0.2.
|
|
118
|
+
source_version_c1f = function()
|
|
119
|
+
return '0.2.5'
|
|
117
120
|
end
|
|
118
121
|
--
|
|
119
|
-
|
|
122
|
+
source_engine_api_system_key_c31 = function()
|
|
120
123
|
local function real_key(std, engine, rkey, rvalue)
|
|
121
124
|
local value = rvalue == 1 or rvalue == true
|
|
122
125
|
local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
|
|
@@ -153,8 +156,8 @@ install = install
|
|
|
153
156
|
return P
|
|
154
157
|
end
|
|
155
158
|
--
|
|
156
|
-
|
|
157
|
-
local util_decorator =
|
|
159
|
+
source_engine_api_draw_text_c3c = function()
|
|
160
|
+
local util_decorator = source_shared_functional_decorator_10c4()
|
|
158
161
|
local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
|
|
159
162
|
size = size or 2
|
|
160
163
|
local hem = engine.current.data.width / 80
|
|
@@ -183,7 +186,7 @@ install=install
|
|
|
183
186
|
return P
|
|
184
187
|
end
|
|
185
188
|
--
|
|
186
|
-
|
|
189
|
+
source_engine_api_draw_poly_c47 = function()
|
|
187
190
|
local function decorator_poo(object, func)
|
|
188
191
|
if not object or not func then return func end
|
|
189
192
|
return function(a, b, c, d)
|
|
@@ -290,7 +293,7 @@ install=install
|
|
|
290
293
|
return P
|
|
291
294
|
end
|
|
292
295
|
--
|
|
293
|
-
|
|
296
|
+
source_engine_api_system_color_c59 = function()
|
|
294
297
|
local function install(std)
|
|
295
298
|
std.color = std.color or {}
|
|
296
299
|
std.color.white = 0xFFFFFFFF
|
|
@@ -325,7 +328,7 @@ install = install
|
|
|
325
328
|
return P
|
|
326
329
|
end
|
|
327
330
|
--
|
|
328
|
-
|
|
331
|
+
source_shared_var_object_std_c64 = function()
|
|
329
332
|
local P = {
|
|
330
333
|
milis = 0,
|
|
331
334
|
delta = 0,
|
|
@@ -393,7 +396,7 @@ any=false
|
|
|
393
396
|
return P;
|
|
394
397
|
end
|
|
395
398
|
--
|
|
396
|
-
|
|
399
|
+
source_shared_string_eval_code_c76 = function()
|
|
397
400
|
local function script(src)
|
|
398
401
|
local loader = loadstring or load
|
|
399
402
|
if not loader then
|
|
@@ -414,7 +417,7 @@ script = script,
|
|
|
414
417
|
return P
|
|
415
418
|
end
|
|
416
419
|
--
|
|
417
|
-
|
|
420
|
+
source_shared_functional_decorator_10c4 = function()
|
|
418
421
|
local function decorator_prefix3(zig, zag, zom, func)
|
|
419
422
|
return function (a, b, c, d, e, f)
|
|
420
423
|
return func(zig, zag, zom, a, b, c, d, e, f)
|
|
@@ -472,4 +475,4 @@ prefix1_t = table_prefix1
|
|
|
472
475
|
return P
|
|
473
476
|
end
|
|
474
477
|
--
|
|
475
|
-
return
|
|
478
|
+
return main_c16()
|