@gamely/gly-engine-micro 0.1.5 → 0.2.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.
Files changed (2) hide show
  1. package/dist/main.lua +53 -52
  2. package/package.json +2 -2
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_13ea = nil
3
- local source_engine_api_system_app_13fc = nil
4
- local source_engine_api_system_key_1407 = nil
5
- local source_engine_api_math_basic_1412 = nil
6
- local source_engine_api_math_clib_141d = nil
7
- local source_engine_api_math_random_1428 = nil
8
- local source_engine_api_data_array_1433 = nil
9
- local source_engine_api_draw_text_143e = nil
10
- local source_engine_api_draw_poly_1449 = nil
11
- local source_engine_api_raw_memory_1454 = nil
12
- local source_engine_api_system_color_1466 = nil
13
- local source_shared_var_object_std_1471 = nil
14
- local source_shared_string_eval_code_1483 = nil
15
- local source_shared_functional_decorator_17e1 = nil
16
- local function main_13e1()
17
- local version = source_version_13ea()
18
- local engine_game = source_engine_api_system_app_13fc()
19
- local engine_key = source_engine_api_system_key_1407()
20
- local engine_math = source_engine_api_math_basic_1412()
21
- local engine_math_clib = source_engine_api_math_clib_141d()
22
- local engine_math_random = source_engine_api_math_random_1428()
23
- local engine_array = source_engine_api_data_array_1433()
24
- local engine_api_draw_text = source_engine_api_draw_text_143e()
25
- local engine_api_draw_poly = source_engine_api_draw_poly_1449()
26
- local engine_raw_memory = source_engine_api_raw_memory_1454()
27
- local color = source_engine_api_system_color_1466()
28
- local std = source_shared_var_object_std_1471()
29
- local eval_code = source_shared_string_eval_code_1483()
2
+ local source_version_13d4 = nil
3
+ local source_engine_api_system_app_13e6 = nil
4
+ local source_engine_api_system_key_13f1 = nil
5
+ local source_engine_api_math_basic_13fc = nil
6
+ local source_engine_api_math_clib_1407 = nil
7
+ local source_engine_api_math_random_1412 = nil
8
+ local source_engine_api_data_array_141d = nil
9
+ local source_engine_api_draw_text_1428 = nil
10
+ local source_engine_api_draw_poly_1433 = nil
11
+ local source_engine_api_raw_memory_143e = nil
12
+ local source_engine_api_system_color_1450 = nil
13
+ local source_shared_var_object_std_145b = nil
14
+ local source_shared_string_eval_code_146d = nil
15
+ local source_shared_functional_decorator_17d2 = nil
16
+ local function main_13cb()
17
+ local version = source_version_13d4()
18
+ local engine_game = source_engine_api_system_app_13e6()
19
+ local engine_key = source_engine_api_system_key_13f1()
20
+ local engine_math = source_engine_api_math_basic_13fc()
21
+ local engine_math_clib = source_engine_api_math_clib_1407()
22
+ local engine_math_random = source_engine_api_math_random_1412()
23
+ local engine_array = source_engine_api_data_array_141d()
24
+ local engine_api_draw_text = source_engine_api_draw_text_1428()
25
+ local engine_api_draw_poly = source_engine_api_draw_poly_1433()
26
+ local engine_raw_memory = source_engine_api_raw_memory_143e()
27
+ local color = source_engine_api_system_color_1450()
28
+ local std = source_shared_var_object_std_145b()
29
+ local eval_code = source_shared_string_eval_code_146d()
30
30
  local f=function(a,b)end
31
31
  local engine={keyboard=f}
32
32
  local application={
@@ -63,11 +63,11 @@ font_previous=native_text_font_previous
63
63
  }
64
64
  function native_callback_loop(dt)
65
65
  std.milis, std.delta=std.milis + dt, dt
66
- application.callbacks.loop(std, application.data)
66
+ application.callbacks.loop(application.data, std)
67
67
  end
68
68
  function native_callback_draw()
69
69
  native_draw_start()
70
- application.callbacks.draw(std, application.data)
70
+ application.callbacks.draw(application.data, std)
71
71
  native_draw_flush()
72
72
  end
73
73
  function native_callback_resize(width, height)
@@ -101,6 +101,7 @@ std.draw.rect=native_draw_rect
101
101
  std.draw.line=native_draw_line
102
102
  std.image.load=native_image_load
103
103
  std.image.draw=native_image_draw
104
+ std.image.mensure=native_image_mensure
104
105
  std.text.print=native_text_print
105
106
  std.text.mensure=native_text_mensure
106
107
  std.text.font_size=native_text_font_size
@@ -124,7 +125,7 @@ if application.meta and application.meta.title then
124
125
  std.app.title(application.meta.title..' - '..(application.meta.version or ''))
125
126
  end
126
127
  engine.current=application
127
- application.callbacks.init(std, application.data)
128
+ application.callbacks.init(application.data, std)
128
129
  end
129
130
  local P={
130
131
  meta={
@@ -136,19 +137,19 @@ version=version
136
137
  }
137
138
  return P
138
139
  end
139
- source_version_13ea = function()
140
- return '0.1.5'
140
+ source_version_13d4 = function()
141
+ return '0.2.1'
141
142
  end
142
143
  --
143
- source_engine_api_system_app_13fc = function()
144
- local util_decorator = source_shared_functional_decorator_17e1()
144
+ source_engine_api_system_app_13e6 = function()
145
+ local util_decorator = source_shared_functional_decorator_17d2()
145
146
  local function reset(std, engine)
146
147
  if std.node then
147
148
  std.bus.emit('exit')
148
149
  std.bus.emit('init')
149
150
  else
150
- engine.root.callbacks.exit(std, engine.root.data)
151
- engine.root.callbacks.init(std, engine.root.data)
151
+ engine.root.callbacks.exit(engine.root.data, std)
152
+ engine.root.callbacks.init(engine.root.data, std)
152
153
  end
153
154
  end
154
155
  local function exit(std)
@@ -181,7 +182,7 @@ install=install
181
182
  return P
182
183
  end
183
184
  --
184
- source_engine_api_system_key_1407 = function()
185
+ source_engine_api_system_key_13f1 = function()
185
186
  local function real_key(std, engine, rkey, rvalue)
186
187
  local value = rvalue == 1 or rvalue == true
187
188
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -218,7 +219,7 @@ install = install
218
219
  return P
219
220
  end
220
221
  --
221
- source_engine_api_math_basic_1412 = function()
222
+ source_engine_api_math_basic_13fc = function()
222
223
  local function abs(value)
223
224
  if value < 0 then
224
225
  return -value
@@ -317,7 +318,7 @@ install = install
317
318
  return P
318
319
  end
319
320
  --
320
- source_engine_api_math_clib_141d = function()
321
+ source_engine_api_math_clib_1407 = function()
321
322
  local function install(std)
322
323
  assert(math and (1/2 ~= 0))
323
324
  std.math = std.math or {}
@@ -353,7 +354,7 @@ install = install
353
354
  return P
354
355
  end
355
356
  --
356
- source_engine_api_math_random_1428 = function()
357
+ source_engine_api_math_random_1412 = function()
357
358
  local function install(std)
358
359
  assert(math and (1/2 ~= 0))
359
360
  std.math = std.math or {}
@@ -370,8 +371,8 @@ install = install
370
371
  return P
371
372
  end
372
373
  --
373
- source_engine_api_data_array_1433 = function()
374
- local util_decorator = source_shared_functional_decorator_17e1()
374
+ source_engine_api_data_array_141d = function()
375
+ local util_decorator = source_shared_functional_decorator_17d2()
375
376
  local function array_map(array, func)
376
377
  local res = {}
377
378
  local index = 1
@@ -532,8 +533,8 @@ install = install
532
533
  return P
533
534
  end
534
535
  --
535
- source_engine_api_draw_text_143e = function()
536
- local util_decorator = source_shared_functional_decorator_17e1()
536
+ source_engine_api_draw_text_1428 = function()
537
+ local util_decorator = source_shared_functional_decorator_17d2()
537
538
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
538
539
  size = size or 2
539
540
  local hem = engine.current.data.width / 80
@@ -562,7 +563,7 @@ install=install
562
563
  return P
563
564
  end
564
565
  --
565
- source_engine_api_draw_poly_1449 = function()
566
+ source_engine_api_draw_poly_1433 = function()
566
567
  local function decorator_poo(object, func)
567
568
  if not object or not func then return func end
568
569
  return function(a, b, c, d)
@@ -669,7 +670,7 @@ install=install
669
670
  return P
670
671
  end
671
672
  --
672
- source_engine_api_raw_memory_1454 = function()
673
+ source_engine_api_raw_memory_143e = function()
673
674
  local memory_dict_unload = {}
674
675
  local memory_dict = {}
675
676
  local memory_list = {}
@@ -724,7 +725,7 @@ install=install
724
725
  return P
725
726
  end
726
727
  --
727
- source_engine_api_system_color_1466 = function()
728
+ source_engine_api_system_color_1450 = function()
728
729
  local function install(std)
729
730
  std.color = std.color or {}
730
731
  std.color.white = 0xFFFFFFFF
@@ -759,7 +760,7 @@ install = install
759
760
  return P
760
761
  end
761
762
  --
762
- source_shared_var_object_std_1471 = function()
763
+ source_shared_var_object_std_145b = function()
763
764
  local P = {
764
765
  milis = 0,
765
766
  delta = 0,
@@ -827,7 +828,7 @@ any=false
827
828
  return P;
828
829
  end
829
830
  --
830
- source_shared_string_eval_code_1483 = function()
831
+ source_shared_string_eval_code_146d = function()
831
832
  local function script(src)
832
833
  local loader = loadstring or load
833
834
  if not loader then
@@ -848,7 +849,7 @@ script = script,
848
849
  return P
849
850
  end
850
851
  --
851
- source_shared_functional_decorator_17e1 = function()
852
+ source_shared_functional_decorator_17d2 = function()
852
853
  local function decorator_prefix3(zig, zag, zom, func)
853
854
  return function (a, b, c, d, e, f)
854
855
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -906,4 +907,4 @@ prefix1_t = table_prefix1
906
907
  return P
907
908
  end
908
909
  --
909
- return main_13e1()
910
+ return main_13cb()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-micro",
3
- "version": "0.1.5",
3
+ "version": "0.2.1",
4
4
  "author": "RodrigoDornelles",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.gamely.com.br",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "step1": "cd ../.. && rm -Rf dist && mkdir -p ./dist/types",
21
- "step2": "cd ../.. && node cli.js build --core micro --bundler --outdir dist/dist",
21
+ "step2": "cd ../.. && node cli.js build-engine @micro --bundler --outdir dist/dist",
22
22
  "step3": "cd ../.. && node cli.js meta source/cli/main.lua --infile npm/gly-engine-micro/package.json --outfile dist/package.json",
23
23
  "step4": "cd ../.. && echo \"declare module '@gamely/gly-engine-micro' {\n const content: string;\n export default content;\n}\" > dist/types/main.d.ts",
24
24
  "build": "npm run step1 && npm run step2 && npm run step3 && npm run step4"