@gamely/gly-engine-nano 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 +33 -32
  2. package/package.json +2 -2
package/dist/main.lua CHANGED
@@ -1,19 +1,19 @@
1
- local source_version_c2b = nil
2
- local source_engine_api_system_key_c3d = nil
3
- local source_engine_api_draw_text_c48 = nil
4
- local source_engine_api_draw_poly_c53 = nil
5
- local source_engine_api_system_color_c65 = nil
6
- local source_shared_var_object_std_c70 = nil
7
- local source_shared_string_eval_code_c82 = nil
8
- local source_shared_functional_decorator_10a6 = nil
9
- local function main_c22()
10
- local version = source_version_c2b()
11
- local engine_key = source_engine_api_system_key_c3d()
12
- local engine_api_draw_text = source_engine_api_draw_text_c48()
13
- local engine_api_draw_poly = source_engine_api_draw_poly_c53()
14
- local color = source_engine_api_system_color_c65()
15
- local std = source_shared_var_object_std_c70()
16
- local eval_code = source_shared_string_eval_code_c82()
1
+ local source_version_c15 = nil
2
+ local source_engine_api_system_key_c27 = nil
3
+ local source_engine_api_draw_text_c32 = nil
4
+ local source_engine_api_draw_poly_c3d = nil
5
+ local source_engine_api_system_color_c4f = nil
6
+ local source_shared_var_object_std_c5a = nil
7
+ local source_shared_string_eval_code_c6c = nil
8
+ local source_shared_functional_decorator_1097 = nil
9
+ local function main_c0c()
10
+ local version = source_version_c15()
11
+ local engine_key = source_engine_api_system_key_c27()
12
+ local engine_api_draw_text = source_engine_api_draw_text_c32()
13
+ local engine_api_draw_poly = source_engine_api_draw_poly_c3d()
14
+ local color = source_engine_api_system_color_c4f()
15
+ local std = source_shared_var_object_std_c5a()
16
+ local eval_code = source_shared_string_eval_code_c6c()
17
17
  local f=function(a,b)end
18
18
  local engine={keyboard=f}
19
19
  local application={
@@ -42,11 +42,11 @@ font_previous=native_text_font_previous
42
42
  }
43
43
  function native_callback_loop(dt)
44
44
  std.milis, std.delta=std.milis + dt, dt
45
- application.callbacks.loop(std, application.data)
45
+ application.callbacks.loop(application.data, std)
46
46
  end
47
47
  function native_callback_draw()
48
48
  native_draw_start()
49
- application.callbacks.draw(std, application.data)
49
+ application.callbacks.draw(application.data, std)
50
50
  native_draw_flush()
51
51
  end
52
52
  function native_callback_resize(width, height)
@@ -80,6 +80,7 @@ std.draw.rect=native_draw_rect
80
80
  std.draw.line=native_draw_line
81
81
  std.image.load=native_image_load
82
82
  std.image.draw=native_image_draw
83
+ std.image.mensure=native_image_mensure
83
84
  std.text.print=native_text_print
84
85
  std.text.mensure=native_text_mensure
85
86
  std.text.font_size=native_text_font_size
@@ -89,8 +90,8 @@ std.draw.clear=function(tint)
89
90
  native_draw_clear(tint, 0, 0, application.data.width, application.data.height)
90
91
  end
91
92
  std.app.reset = function()
92
- (application.callbacks.exit or function() end)(std, application.data)
93
- application.callbacks.init(std, application.data)
93
+ (application.callbacks.exit or function() end)(application.data, std)
94
+ application.callbacks.init(application.data, std)
94
95
  end
95
96
  engine.root=application
96
97
  color.install(std, engine)
@@ -98,7 +99,7 @@ engine_key.install(std, engine, {})
98
99
  engine_api_draw_text.install(std, engine, cfg_text)
99
100
  engine_api_draw_poly.install(std, engine, cfg_poly)
100
101
  engine.current=application
101
- application.callbacks.init(std, application.data)
102
+ application.callbacks.init(application.data, std)
102
103
  end
103
104
  local P={
104
105
  meta={
@@ -110,11 +111,11 @@ version=version
110
111
  }
111
112
  return P
112
113
  end
113
- source_version_c2b = function()
114
- return '0.1.5'
114
+ source_version_c15 = function()
115
+ return '0.2.1'
115
116
  end
116
117
  --
117
- source_engine_api_system_key_c3d = function()
118
+ source_engine_api_system_key_c27 = function()
118
119
  local function real_key(std, engine, rkey, rvalue)
119
120
  local value = rvalue == 1 or rvalue == true
120
121
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -151,8 +152,8 @@ install = install
151
152
  return P
152
153
  end
153
154
  --
154
- source_engine_api_draw_text_c48 = function()
155
- local util_decorator = source_shared_functional_decorator_10a6()
155
+ source_engine_api_draw_text_c32 = function()
156
+ local util_decorator = source_shared_functional_decorator_1097()
156
157
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
157
158
  size = size or 2
158
159
  local hem = engine.current.data.width / 80
@@ -181,7 +182,7 @@ install=install
181
182
  return P
182
183
  end
183
184
  --
184
- source_engine_api_draw_poly_c53 = function()
185
+ source_engine_api_draw_poly_c3d = function()
185
186
  local function decorator_poo(object, func)
186
187
  if not object or not func then return func end
187
188
  return function(a, b, c, d)
@@ -288,7 +289,7 @@ install=install
288
289
  return P
289
290
  end
290
291
  --
291
- source_engine_api_system_color_c65 = function()
292
+ source_engine_api_system_color_c4f = function()
292
293
  local function install(std)
293
294
  std.color = std.color or {}
294
295
  std.color.white = 0xFFFFFFFF
@@ -323,7 +324,7 @@ install = install
323
324
  return P
324
325
  end
325
326
  --
326
- source_shared_var_object_std_c70 = function()
327
+ source_shared_var_object_std_c5a = function()
327
328
  local P = {
328
329
  milis = 0,
329
330
  delta = 0,
@@ -391,7 +392,7 @@ any=false
391
392
  return P;
392
393
  end
393
394
  --
394
- source_shared_string_eval_code_c82 = function()
395
+ source_shared_string_eval_code_c6c = function()
395
396
  local function script(src)
396
397
  local loader = loadstring or load
397
398
  if not loader then
@@ -412,7 +413,7 @@ script = script,
412
413
  return P
413
414
  end
414
415
  --
415
- source_shared_functional_decorator_10a6 = function()
416
+ source_shared_functional_decorator_1097 = function()
416
417
  local function decorator_prefix3(zig, zag, zom, func)
417
418
  return function (a, b, c, d, e, f)
418
419
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -470,4 +471,4 @@ prefix1_t = table_prefix1
470
471
  return P
471
472
  end
472
473
  --
473
- return main_c22()
474
+ return main_c0c()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-nano",
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 nano --bundler --outdir dist/dist",
21
+ "step2": "cd ../.. && node cli.js build-engine @nano --bundler --outdir dist/dist",
22
22
  "step3": "cd ../.. && node cli.js meta source/cli/main.lua --infile npm/gly-engine-nano/package.json --outfile dist/package.json",
23
23
  "step4": "cd ../.. && echo \"declare module '@gamely/gly-engine-nano' {\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"