pxt-common-packages 11.1.1 → 11.1.2

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 (38) hide show
  1. package/built/common-sim.d.ts +6 -0
  2. package/built/common-sim.js +62 -29
  3. package/libs/azureiot/built/debug/binary.js +461 -461
  4. package/libs/color/built/debug/binary.js +8 -8
  5. package/libs/color-sensor/built/debug/binary.js +8 -8
  6. package/libs/controller/built/debug/binary.js +7986 -7953
  7. package/libs/controller---none/built/debug/binary.js +7965 -7932
  8. package/libs/datalogger/built/debug/binary.js +63 -63
  9. package/libs/edge-connector/built/debug/binary.js +8 -8
  10. package/libs/esp32/built/debug/binary.js +462 -462
  11. package/libs/game/built/debug/binary.js +7878 -7845
  12. package/libs/game/sprite.ts +2 -0
  13. package/libs/game/sprites.ts +1 -0
  14. package/libs/lcd/built/debug/binary.js +8 -8
  15. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  16. package/libs/lora/built/debug/binary.js +8 -8
  17. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  18. package/libs/microphone/sim/state.ts +2 -0
  19. package/libs/mqtt/built/debug/binary.js +176 -176
  20. package/libs/net/built/debug/binary.js +176 -176
  21. package/libs/net-game/built/debug/binary.js +9666 -9633
  22. package/libs/palette/built/debug/binary.js +7877 -7844
  23. package/libs/pixel/built/debug/binary.js +8 -8
  24. package/libs/power/built/debug/binary.js +8 -8
  25. package/libs/proximity/built/debug/binary.js +8 -8
  26. package/libs/radio/built/debug/binary.js +8 -8
  27. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  28. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  29. package/libs/screen/built/debug/binary.js +50 -50
  30. package/libs/screen/sim/image.ts +32 -31
  31. package/libs/servo/built/debug/binary.js +8 -8
  32. package/libs/shader/pxt.json +14 -0
  33. package/libs/shader/shader.cpp +140 -0
  34. package/libs/shader/shader.ts +19 -0
  35. package/libs/shader/sim/shader.ts +37 -0
  36. package/libs/sprite-scaling/built/debug/binary.js +7877 -7844
  37. package/libs/storyboard/built/debug/binary.js +7877 -7844
  38. package/package.json +1 -1
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P56316(s) {
59
+ function _main___P56331(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___56559 = (undefined);
70
- globals._pollEventQueue___56572 = (undefined);
69
+ globals._intervals___56574 = (undefined);
70
+ globals._pollEventQueue___56587 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P56316.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/light/neopixel.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P56316.continuations = [ ]
75
+ _main___P56331.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/light/neopixel.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P56331.continuations = [ ]
77
77
 
78
- function _main___P56316_mk(s) {
78
+ function _main___P56331_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P56316, depth: s.depth + 1,
81
+ parent: s, fn: _main___P56331, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P56316_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P56316
91
+ return _main___P56331
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P63164(s) {
59
+ function _main___P63179(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___63407 = (undefined);
70
- globals._pollEventQueue___63420 = (undefined);
69
+ globals._intervals___63422 = (undefined);
70
+ globals._pollEventQueue___63435 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P63164.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"power.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P63164.continuations = [ ]
75
+ _main___P63179.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"power.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P63179.continuations = [ ]
77
77
 
78
- function _main___P63164_mk(s) {
78
+ function _main___P63179_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P63164, depth: s.depth + 1,
81
+ parent: s, fn: _main___P63179, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P63164_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P63164
91
+ return _main___P63179
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P102948(s) {
59
+ function _main___P102993(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___103191 = (undefined);
70
- globals._pollEventQueue___103204 = (undefined);
69
+ globals._intervals___103236 = (undefined);
70
+ globals._pollEventQueue___103249 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P102948.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"vl53l0x.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P102948.continuations = [ ]
75
+ _main___P102993.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"vl53l0x.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P102993.continuations = [ ]
77
77
 
78
- function _main___P102948_mk(s) {
78
+ function _main___P102993_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P102948, depth: s.depth + 1,
81
+ parent: s, fn: _main___P102993, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P102948_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P102948
91
+ return _main___P102993
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P189042(s) {
59
+ function _main___P189147(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___189285 = (undefined);
70
- globals._pollEventQueue___189298 = (undefined);
69
+ globals._intervals___189390 = (undefined);
70
+ globals._pollEventQueue___189403 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P189042.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P189042.continuations = [ ]
75
+ _main___P189147.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P189147.continuations = [ ]
77
77
 
78
- function _main___P189042_mk(s) {
78
+ function _main___P189147_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P189042, depth: s.depth + 1,
81
+ parent: s, fn: _main___P189147, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P189042_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P189042
91
+ return _main___P189147
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P190866(s) {
59
+ function _main___P190971(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___191109 = (undefined);
70
- globals._pollEventQueue___191122 = (undefined);
69
+ globals._intervals___191214 = (undefined);
70
+ globals._pollEventQueue___191227 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P190866.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"radio-broadcast.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P190866.continuations = [ ]
75
+ _main___P190971.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"radio-broadcast.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P190971.continuations = [ ]
77
77
 
78
- function _main___P190866_mk(s) {
78
+ function _main___P190971_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P190866, depth: s.depth + 1,
81
+ parent: s, fn: _main___P190971, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P190866_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P190866
91
+ return _main___P190971
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P171635(s) {
59
+ function _main___P171725(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___171878 = (undefined);
70
- globals._pollEventQueue___171891 = (undefined);
69
+ globals._intervals___171968 = (undefined);
70
+ globals._pollEventQueue___171981 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P171635.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P171635.continuations = [ ]
75
+ _main___P171725.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P171725.continuations = [ ]
77
77
 
78
- function _main___P171635_mk(s) {
78
+ function _main___P171725_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P171635, depth: s.depth + 1,
81
+ parent: s, fn: _main___P171725, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P171635_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P171635
91
+ return _main___P171725
92
92
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P50929(s) {
59
+ function _main___P50944(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,29 +66,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___51172 = (undefined);
70
- globals._pollEventQueue___51185 = (undefined);
71
- globals.__updated___51418 = (false);
72
- r0 = pxsim.control.runInParallel(control___screen_inline__P51423);
69
+ globals._intervals___51187 = (undefined);
70
+ globals._pollEventQueue___51200 = (undefined);
71
+ globals.__updated___51433 = (false);
72
+ r0 = pxsim.control.runInParallel(control___screen_inline__P51438);
73
73
  r0 = pxsim.image.create(178, 128);
74
- globals.screen___51446 = (r0);
75
- s.tmp_0 = control___screen_setupUpdate__P51420_mk(s);
76
- s.tmp_0.arg0 = _screen_internal_inline__P51451;
74
+ globals.screen___51461 = (r0);
75
+ s.tmp_0 = control___screen_setupUpdate__P51435_mk(s);
76
+ s.tmp_0.arg0 = _screen_internal_inline__P51466;
77
77
  s.callLocIdx = 4; s.pc = 1; return s.tmp_0;
78
78
  case 1:
79
79
  r0 = s.retval;
80
- globals.control_EventContext_onStats___51240 = (_screen_internal_inline__P51456);
80
+ globals.control_EventContext_onStats___51255 = (_screen_internal_inline__P51471);
81
81
  r0 = undefined;
82
82
  return leave(s, r0)
83
83
  default: oops()
84
84
  } } }
85
- _main___P50929.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"imagesoverrides.ts","functionName":"<main>","argumentNames":[]}
86
- _main___P50929.continuations = [ ]
85
+ _main___P50944.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"imagesoverrides.ts","functionName":"<main>","argumentNames":[]}
86
+ _main___P50944.continuations = [ ]
87
87
 
88
- function _main___P50929_mk(s) {
88
+ function _main___P50944_mk(s) {
89
89
  checkStack(s.depth);
90
90
  return {
91
- parent: s, fn: _main___P50929, depth: s.depth + 1,
91
+ parent: s, fn: _main___P50944, depth: s.depth + 1,
92
92
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
93
93
  tmp_0: undefined,
94
94
  } }
@@ -97,7 +97,7 @@ function _main___P50929_mk(s) {
97
97
 
98
98
 
99
99
 
100
- function control___screen_inline__P51423(s) {
100
+ function control___screen_inline__P51438(s) {
101
101
  let r0 = s.r0, step = s.pc;
102
102
  s.pc = -1;
103
103
 
@@ -110,23 +110,23 @@ switch (step) {
110
110
  case 1:
111
111
  r0 = pxsim_numops_toBoolDecr(true);
112
112
  if (!r0) { step = 4; continue; }
113
- globals.__updated___51418 = (false);
114
- s.tmp_0 = pause__P51249_mk(s);
113
+ globals.__updated___51433 = (false);
114
+ s.tmp_0 = pause__P51264_mk(s);
115
115
  s.tmp_0.arg0 = 200;
116
116
  s.callLocIdx = 2; s.pc = 5; return s.tmp_0;
117
117
  case 5:
118
118
  r0 = s.retval;
119
- r0 = pxsim_numops_toBoolDecr(globals.__updated___51418);
119
+ r0 = pxsim_numops_toBoolDecr(globals.__updated___51433);
120
120
  s.tmp_1 = r0;
121
121
  r0 = pxsim_Boolean__bang(s.tmp_1);
122
122
  s.tmp_0 = r0;
123
123
  r0 = pxsim_numops_toBoolDecr(s.tmp_0);
124
124
  if (!r0) { step = 2; continue; }
125
- s.tmp_2 = control___screen_update__P51419_mk(s);
125
+ s.tmp_2 = control___screen_update__P51434_mk(s);
126
126
  s.callLocIdx = 3; s.pc = 6; return s.tmp_2;
127
127
  case 6:
128
128
  r0 = s.retval;
129
- globals.__updated___51418 = (true);
129
+ globals.__updated___51433 = (true);
130
130
  case 2:
131
131
  case 3:
132
132
  { step = 1; continue; }
@@ -135,12 +135,12 @@ switch (step) {
135
135
  return leave(s, r0)
136
136
  default: oops()
137
137
  } } }
138
- control___screen_inline__P51423.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"frame.ts","functionName":"inline","argumentNames":[]}
138
+ control___screen_inline__P51438.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"frame.ts","functionName":"inline","argumentNames":[]}
139
139
 
140
- function control___screen_inline__P51423_mk(s) {
140
+ function control___screen_inline__P51438_mk(s) {
141
141
  checkStack(s.depth);
142
142
  return {
143
- parent: s, fn: control___screen_inline__P51423, depth: s.depth + 1,
143
+ parent: s, fn: control___screen_inline__P51438, depth: s.depth + 1,
144
144
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
145
145
  tmp_0: undefined,
146
146
  tmp_1: undefined,
@@ -151,7 +151,7 @@ function control___screen_inline__P51423_mk(s) {
151
151
 
152
152
 
153
153
 
154
- function _screen_internal_inline__P51451(s) {
154
+ function _screen_internal_inline__P51466(s) {
155
155
  let r0 = s.r0, step = s.pc;
156
156
  s.pc = -1;
157
157
 
@@ -161,17 +161,17 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
161
161
  switch (step) {
162
162
  case 0:
163
163
 
164
- r0 = pxsim_pxtcore.updateScreen(globals.screen___51446);
164
+ r0 = pxsim_pxtcore.updateScreen(globals.screen___51461);
165
165
  r0 = undefined;
166
166
  return leave(s, r0)
167
167
  default: oops()
168
168
  } } }
169
- _screen_internal_inline__P51451.info = {"start":327,"length":26,"line":8,"column":33,"endLine":8,"endColumn":59,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":[]}
169
+ _screen_internal_inline__P51466.info = {"start":327,"length":26,"line":8,"column":33,"endLine":8,"endColumn":59,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":[]}
170
170
 
171
- function _screen_internal_inline__P51451_mk(s) {
171
+ function _screen_internal_inline__P51466_mk(s) {
172
172
  checkStack(s.depth);
173
173
  return {
174
- parent: s, fn: _screen_internal_inline__P51451, depth: s.depth + 1,
174
+ parent: s, fn: _screen_internal_inline__P51466, depth: s.depth + 1,
175
175
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
176
176
  } }
177
177
 
@@ -179,7 +179,7 @@ function _screen_internal_inline__P51451_mk(s) {
179
179
 
180
180
 
181
181
 
182
- function _screen_internal_inline__P51456(s) {
182
+ function _screen_internal_inline__P51471(s) {
183
183
  let r0 = s.r0, step = s.pc;
184
184
  s.pc = -1;
185
185
 
@@ -198,12 +198,12 @@ switch (step) {
198
198
  return leave(s, r0)
199
199
  default: oops()
200
200
  } } }
201
- _screen_internal_inline__P51456.info = {"start":390,"length":56,"line":9,"column":35,"endLine":11,"endColumn":5,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":["msg"]}
201
+ _screen_internal_inline__P51471.info = {"start":390,"length":56,"line":9,"column":35,"endLine":11,"endColumn":5,"fileName":"targetoverrides.ts","functionName":"inline","argumentNames":["msg"]}
202
202
 
203
- function _screen_internal_inline__P51456_mk(s) {
203
+ function _screen_internal_inline__P51471_mk(s) {
204
204
  checkStack(s.depth);
205
205
  return {
206
- parent: s, fn: _screen_internal_inline__P51456, depth: s.depth + 1,
206
+ parent: s, fn: _screen_internal_inline__P51471, depth: s.depth + 1,
207
207
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
208
208
  arg0: undefined,
209
209
  } }
@@ -212,7 +212,7 @@ function _screen_internal_inline__P51456_mk(s) {
212
212
 
213
213
 
214
214
 
215
- function control___screen_setupUpdate__P51420(s) {
215
+ function control___screen_setupUpdate__P51435(s) {
216
216
  let r0 = s.r0, step = s.pc;
217
217
  s.pc = -1;
218
218
 
@@ -226,8 +226,8 @@ switch (step) {
226
226
  s.arg0 = (s.lambdaArgs[0]);
227
227
  s.lambdaArgs = null;
228
228
  }
229
- globals.__updated___51418 = (true);
230
- globals.__update___51416 = (s.arg0);
229
+ globals.__updated___51433 = (true);
230
+ globals.__update___51431 = (s.arg0);
231
231
  s.tmp_0 = lambda_1_mk(s);
232
232
  s.tmp_0.argL = s.arg0;
233
233
  setupLambda(s.tmp_0, s.tmp_0.argL);
@@ -238,12 +238,12 @@ switch (step) {
238
238
  return leave(s, r0)
239
239
  default: oops()
240
240
  } } }
241
- control___screen_setupUpdate__P51420.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"frame.ts","functionName":"setupUpdate","argumentNames":["update"]}
241
+ control___screen_setupUpdate__P51435.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"frame.ts","functionName":"setupUpdate","argumentNames":["update"]}
242
242
 
243
- function control___screen_setupUpdate__P51420_mk(s) {
243
+ function control___screen_setupUpdate__P51435_mk(s) {
244
244
  checkStack(s.depth);
245
245
  return {
246
- parent: s, fn: control___screen_setupUpdate__P51420, depth: s.depth + 1,
246
+ parent: s, fn: control___screen_setupUpdate__P51435, depth: s.depth + 1,
247
247
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
248
248
  tmp_0: undefined,
249
249
  arg0: undefined,
@@ -253,7 +253,7 @@ function control___screen_setupUpdate__P51420_mk(s) {
253
253
 
254
254
 
255
255
 
256
- function control___screen_update__P51419(s) {
256
+ function control___screen_update__P51434(s) {
257
257
  let r0 = s.r0, step = s.pc;
258
258
  s.pc = -1;
259
259
 
@@ -263,27 +263,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
263
263
  switch (step) {
264
264
  case 0:
265
265
 
266
- r0 = pxsim_numops_toBoolDecr(globals.__update___51416);
266
+ r0 = pxsim_numops_toBoolDecr(globals.__update___51431);
267
267
  if (!r0) { step = 1; continue; }
268
268
  s.tmp_0 = lambda_1_mk(s);
269
- s.tmp_0.argL = globals.__update___51416;
269
+ s.tmp_0.argL = globals.__update___51431;
270
270
  setupLambda(s.tmp_0, s.tmp_0.argL);
271
271
  s.callLocIdx = 0; s.pc = 3; return s.tmp_0;
272
272
  case 3:
273
273
  r0 = s.retval;
274
274
  case 1:
275
275
  case 2:
276
- globals.__updated___51418 = (true);
276
+ globals.__updated___51433 = (true);
277
277
  r0 = undefined;
278
278
  return leave(s, r0)
279
279
  default: oops()
280
280
  } } }
281
- control___screen_update__P51419.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"frame.ts","functionName":"update","argumentNames":[]}
281
+ control___screen_update__P51434.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"frame.ts","functionName":"update","argumentNames":[]}
282
282
 
283
- function control___screen_update__P51419_mk(s) {
283
+ function control___screen_update__P51434_mk(s) {
284
284
  checkStack(s.depth);
285
285
  return {
286
- parent: s, fn: control___screen_update__P51419, depth: s.depth + 1,
286
+ parent: s, fn: control___screen_update__P51434, depth: s.depth + 1,
287
287
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
288
288
  tmp_0: undefined,
289
289
  } }
@@ -292,7 +292,7 @@ function control___screen_update__P51419_mk(s) {
292
292
 
293
293
 
294
294
 
295
- function pause__P51249(s) {
295
+ function pause__P51264(s) {
296
296
  let r0 = s.r0, step = s.pc;
297
297
  s.pc = -1;
298
298
 
@@ -316,12 +316,12 @@ switch (step) {
316
316
  return leave(s, r0)
317
317
  default: oops()
318
318
  } } }
319
- pause__P51249.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
319
+ pause__P51264.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]}
320
320
 
321
- function pause__P51249_mk(s) {
321
+ function pause__P51264_mk(s) {
322
322
  checkStack(s.depth);
323
323
  return {
324
- parent: s, fn: pause__P51249, depth: s.depth + 1,
324
+ parent: s, fn: pause__P51264, depth: s.depth + 1,
325
325
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
326
326
  arg0: undefined,
327
327
  } }
@@ -343,7 +343,7 @@ function lambda_1_mk(s) {
343
343
  } }
344
344
 
345
345
 
346
- const breakpoints = setupDebugger(1, ["__updated___51418","screen___51446","__update___51416"])
346
+ const breakpoints = setupDebugger(1, ["__updated___51433","screen___51461","__update___51431"])
347
347
 
348
- return _main___P50929
348
+ return _main___P50944
349
349
  })
@@ -61,8 +61,8 @@ namespace pxsim {
61
61
  }
62
62
 
63
63
  namespace pxsim.ImageMethods {
64
- function XX(x: number) { return (x << 16) >> 16 }
65
- function YY(x: number) { return x >> 16 }
64
+ export function XX(x: number) { return (x << 16) >> 16 }
65
+ export function YY(x: number) { return x >> 16 }
66
66
 
67
67
  export function width(img: RefImage) { return img._width }
68
68
 
@@ -525,58 +525,59 @@ namespace pxsim.ImageMethods {
525
525
  }
526
526
 
527
527
  export function drawIcon(img: RefImage, icon: RefBuffer, x: number, y: number, color: number) {
528
- const img2: Uint8Array = icon.data
528
+ const src: Uint8Array = icon.data
529
529
  if (!image.isValidImage(icon))
530
530
  return
531
- if (img2[1] != 1)
531
+ if (src[1] != 1)
532
532
  return // only mono
533
- let w = image.bufW(img2)
534
- let h = image.bufH(img2)
535
- let byteH = image.byteHeight(h, 1)
533
+ let width = image.bufW(src)
534
+ let height = image.bufH(src)
535
+ let byteH = image.byteHeight(height, 1)
536
536
 
537
537
  x |= 0
538
538
  y |= 0
539
- const sh = img._height
540
- const sw = img._width
539
+ const destHeight = img._height
540
+ const destWidth = img._width
541
541
 
542
- if (x + w <= 0) return
543
- if (x >= sw) return
544
- if (y + h <= 0) return
545
- if (y >= sh) return
542
+ if (x + width <= 0) return
543
+ if (x >= destWidth) return
544
+ if (y + height <= 0) return
545
+ if (y >= destHeight) return
546
546
 
547
547
  img.makeWritable()
548
548
 
549
- let p = 8
549
+ let srcPointer = 8
550
550
  color = img.color(color)
551
551
  const screen = img.data
552
552
 
553
- for (let i = 0; i < w; ++i) {
554
- let xxx = x + i
555
- if (0 <= xxx && xxx < sw) {
556
- let dst = xxx + y * sw
557
- let src = p
558
- let yy = y
559
- let end = Math.min(sh, h + y)
553
+ for (let i = 0; i < width; ++i) {
554
+ let destX = x + i
555
+ if (0 <= destX && destX < destWidth) {
556
+ let destIndex = destX + y * destWidth
557
+ let srcIndex = srcPointer
558
+ let destY = y
559
+ let destEnd = Math.min(destHeight, height + y)
560
560
  if (y < 0) {
561
- src += ((-y) >> 3)
562
- yy += ((-y) >> 3) * 8
561
+ srcIndex += ((-y) >> 3)
562
+ destY += ((-y) >> 3) * 8
563
+ destIndex += (destY - y) * destWidth
563
564
  }
564
565
  let mask = 0x01
565
- let v = img2[src++]
566
- while (yy < end) {
567
- if (yy >= 0 && (v & mask)) {
568
- screen[dst] = color
566
+ let srcByte = src[srcIndex++]
567
+ while (destY < destEnd) {
568
+ if (destY >= 0 && (srcByte & mask)) {
569
+ screen[destIndex] = color
569
570
  }
570
571
  mask <<= 1
571
572
  if (mask == 0x100) {
572
573
  mask = 0x01
573
- v = img2[src++]
574
+ srcByte = src[srcIndex++]
574
575
  }
575
- dst += sw
576
- yy++
576
+ destIndex += destWidth
577
+ destY++
577
578
  }
578
579
  }
579
- p += byteH
580
+ srcPointer += byteH
580
581
  }
581
582
  }
582
583
 
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P52847(s) {
59
+ function _main___P52862(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___53090 = (undefined);
70
- globals._pollEventQueue___53103 = (undefined);
69
+ globals._intervals___53105 = (undefined);
70
+ globals._pollEventQueue___53118 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P52847.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P52847.continuations = [ ]
75
+ _main___P52862.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P52862.continuations = [ ]
77
77
 
78
- function _main___P52847_mk(s) {
78
+ function _main___P52862_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P52847, depth: s.depth + 1,
81
+ parent: s, fn: _main___P52862, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -88,5 +88,5 @@ function _main___P52847_mk(s) {
88
88
 
89
89
  const breakpoints = setupDebugger(1, [])
90
90
 
91
- return _main___P52847
91
+ return _main___P52862
92
92
  })