@gamely/gly-engine-micro 0.2.4 → 0.2.6

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.
Files changed (2) hide show
  1. package/dist/main.lua +51 -48
  2. package/package.json +1 -1
package/dist/main.lua CHANGED
@@ -1,32 +1,32 @@
1
1
  local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
2
- local source_version_13d6 = nil
3
- local source_engine_api_system_app_13e8 = nil
4
- local source_engine_api_system_key_13f3 = nil
5
- local source_engine_api_math_basic_13fe = nil
6
- local source_engine_api_math_clib_1409 = nil
7
- local source_engine_api_math_random_1414 = nil
8
- local source_engine_api_data_array_141f = nil
9
- local source_engine_api_draw_text_142a = nil
10
- local source_engine_api_draw_poly_1435 = nil
11
- local source_engine_api_raw_memory_1440 = nil
12
- local source_engine_api_system_color_1452 = nil
13
- local source_shared_var_object_std_145d = nil
14
- local source_shared_string_eval_code_146f = nil
15
- local source_shared_functional_decorator_17db = nil
16
- local function main_13cd()
17
- local version = source_version_13d6()
18
- local engine_game = source_engine_api_system_app_13e8()
19
- local engine_key = source_engine_api_system_key_13f3()
20
- local engine_math = source_engine_api_math_basic_13fe()
21
- local engine_math_clib = source_engine_api_math_clib_1409()
22
- local engine_math_random = source_engine_api_math_random_1414()
23
- local engine_array = source_engine_api_data_array_141f()
24
- local engine_api_draw_text = source_engine_api_draw_text_142a()
25
- local engine_api_draw_poly = source_engine_api_draw_poly_1435()
26
- local engine_raw_memory = source_engine_api_raw_memory_1440()
27
- local color = source_engine_api_system_color_1452()
28
- local std = source_shared_var_object_std_145d()
29
- local eval_code = source_shared_string_eval_code_146f()
2
+ local source_version_1438 = nil
3
+ local source_engine_api_system_app_144a = nil
4
+ local source_engine_api_system_key_1455 = nil
5
+ local source_engine_api_math_basic_1460 = nil
6
+ local source_engine_api_math_clib_146b = nil
7
+ local source_engine_api_math_random_1476 = nil
8
+ local source_engine_api_data_array_1481 = nil
9
+ local source_engine_api_draw_text_148c = nil
10
+ local source_engine_api_draw_poly_1497 = nil
11
+ local source_engine_api_raw_memory_14a2 = nil
12
+ local source_engine_api_system_color_14b4 = nil
13
+ local source_shared_var_object_std_14bf = nil
14
+ local source_shared_string_eval_code_14d1 = nil
15
+ local source_shared_functional_decorator_1856 = nil
16
+ local function main_142f()
17
+ local version = source_version_1438()
18
+ local engine_game = source_engine_api_system_app_144a()
19
+ local engine_key = source_engine_api_system_key_1455()
20
+ local engine_math = source_engine_api_math_basic_1460()
21
+ local engine_math_clib = source_engine_api_math_clib_146b()
22
+ local engine_math_random = source_engine_api_math_random_1476()
23
+ local engine_array = source_engine_api_data_array_1481()
24
+ local engine_api_draw_text = source_engine_api_draw_text_148c()
25
+ local engine_api_draw_poly = source_engine_api_draw_poly_1497()
26
+ local engine_raw_memory = source_engine_api_raw_memory_14a2()
27
+ local color = source_engine_api_system_color_14b4()
28
+ local std = source_shared_var_object_std_14bf()
29
+ local eval_code = source_shared_string_eval_code_14d1()
30
30
  local f=function(a,b)end
31
31
  local engine={keyboard=f}
32
32
  local application={
@@ -82,7 +82,10 @@ end
82
82
  function native_callback_init(width, height, game_lua)
83
83
  local ok, script=true, game_lua
84
84
  if type(script) == 'string' then
85
- ok, script=eval_code.script(script)
85
+ ok, script = eval_code.script(script)
86
+ end
87
+ if type(script) == 'function' then
88
+ ok, script = pcall(script)
86
89
  end
87
90
  if not script then
88
91
  ok, script=pcall(loadfile, 'game.lua')
@@ -138,12 +141,12 @@ version=version
138
141
  }
139
142
  return P
140
143
  end
141
- source_version_13d6 = function()
142
- return '0.2.4'
144
+ source_version_1438 = function()
145
+ return '0.2.6'
143
146
  end
144
147
  --
145
- source_engine_api_system_app_13e8 = function()
146
- local util_decorator = source_shared_functional_decorator_17db()
148
+ source_engine_api_system_app_144a = function()
149
+ local util_decorator = source_shared_functional_decorator_1856()
147
150
  local function reset(std, engine)
148
151
  if std.node then
149
152
  std.bus.emit('exit')
@@ -183,7 +186,7 @@ install=install
183
186
  return P
184
187
  end
185
188
  --
186
- source_engine_api_system_key_13f3 = function()
189
+ source_engine_api_system_key_1455 = function()
187
190
  local function real_key(std, engine, rkey, rvalue)
188
191
  local value = rvalue == 1 or rvalue == true
189
192
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -220,7 +223,7 @@ install = install
220
223
  return P
221
224
  end
222
225
  --
223
- source_engine_api_math_basic_13fe = function()
226
+ source_engine_api_math_basic_1460 = function()
224
227
  local function abs(value)
225
228
  if value < 0 then
226
229
  return -value
@@ -319,7 +322,7 @@ install = install
319
322
  return P
320
323
  end
321
324
  --
322
- source_engine_api_math_clib_1409 = function()
325
+ source_engine_api_math_clib_146b = function()
323
326
  local function install(std)
324
327
  assert(math and (1/2 ~= 0))
325
328
  std.math = std.math or {}
@@ -355,7 +358,7 @@ install = install
355
358
  return P
356
359
  end
357
360
  --
358
- source_engine_api_math_random_1414 = function()
361
+ source_engine_api_math_random_1476 = function()
359
362
  local function install(std)
360
363
  assert(math and (1/2 ~= 0))
361
364
  std.math = std.math or {}
@@ -372,8 +375,8 @@ install = install
372
375
  return P
373
376
  end
374
377
  --
375
- source_engine_api_data_array_141f = function()
376
- local util_decorator = source_shared_functional_decorator_17db()
378
+ source_engine_api_data_array_1481 = function()
379
+ local util_decorator = source_shared_functional_decorator_1856()
377
380
  local function array_map(array, func)
378
381
  local res = {}
379
382
  local index = 1
@@ -534,8 +537,8 @@ install = install
534
537
  return P
535
538
  end
536
539
  --
537
- source_engine_api_draw_text_142a = function()
538
- local util_decorator = source_shared_functional_decorator_17db()
540
+ source_engine_api_draw_text_148c = function()
541
+ local util_decorator = source_shared_functional_decorator_1856()
539
542
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
540
543
  size = size or 2
541
544
  local hem = engine.current.data.width / 80
@@ -564,7 +567,7 @@ install=install
564
567
  return P
565
568
  end
566
569
  --
567
- source_engine_api_draw_poly_1435 = function()
570
+ source_engine_api_draw_poly_1497 = function()
568
571
  local function decorator_poo(object, func)
569
572
  if not object or not func then return func end
570
573
  return function(a, b, c, d)
@@ -671,7 +674,7 @@ install=install
671
674
  return P
672
675
  end
673
676
  --
674
- source_engine_api_raw_memory_1440 = function()
677
+ source_engine_api_raw_memory_14a2 = function()
675
678
  local memory_dict_unload = {}
676
679
  local memory_dict = {}
677
680
  local memory_list = {}
@@ -726,7 +729,7 @@ install=install
726
729
  return P
727
730
  end
728
731
  --
729
- source_engine_api_system_color_1452 = function()
732
+ source_engine_api_system_color_14b4 = function()
730
733
  local function install(std)
731
734
  std.color = std.color or {}
732
735
  std.color.white = 0xFFFFFFFF
@@ -761,7 +764,7 @@ install = install
761
764
  return P
762
765
  end
763
766
  --
764
- source_shared_var_object_std_145d = function()
767
+ source_shared_var_object_std_14bf = function()
765
768
  local P = {
766
769
  milis = 0,
767
770
  delta = 0,
@@ -829,7 +832,7 @@ any=false
829
832
  return P;
830
833
  end
831
834
  --
832
- source_shared_string_eval_code_146f = function()
835
+ source_shared_string_eval_code_14d1 = function()
833
836
  local function script(src)
834
837
  local loader = loadstring or load
835
838
  if not loader then
@@ -850,7 +853,7 @@ script = script,
850
853
  return P
851
854
  end
852
855
  --
853
- source_shared_functional_decorator_17db = function()
856
+ source_shared_functional_decorator_1856 = function()
854
857
  local function decorator_prefix3(zig, zag, zom, func)
855
858
  return function (a, b, c, d, e, f)
856
859
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -908,4 +911,4 @@ prefix1_t = table_prefix1
908
911
  return P
909
912
  end
910
913
  --
911
- return main_13cd()
914
+ return main_142f()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-micro",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "author": "RodrigoDornelles",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.gamely.com.br",