pxt-common-packages 9.4.5 → 9.4.9
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/built/common-sim.d.ts +3 -2
- package/built/common-sim.js +15 -1
- package/libs/accelerometer/built/debug/binary.js +8 -8
- package/libs/azureiot/built/debug/binary.js +461 -461
- package/libs/base/fixed.ts +6 -0
- package/libs/color/built/debug/binary.js +8 -8
- package/libs/color/colors.ts +11 -0
- package/libs/color-sensor/built/debug/binary.js +8 -8
- package/libs/controller/built/debug/binary.js +9098 -7849
- package/libs/controller---none/built/debug/binary.js +9052 -7803
- package/libs/core/built/debug/binary.js +2 -2
- package/libs/core---samd/built/debug/binary.js +8 -8
- package/libs/datalogger/built/debug/binary.js +63 -63
- package/libs/edge-connector/built/debug/binary.js +8 -8
- package/libs/esp32/built/debug/binary.js +462 -462
- package/libs/game/_locales/game-strings.json +21 -0
- package/libs/game/built/debug/binary.js +8992 -7743
- package/libs/game/hitbox.ts +43 -25
- package/libs/game/sprite.ts +244 -16
- package/libs/game/spritesay.ts +2 -2
- package/libs/gamepad/built/debug/binary.js +8 -8
- package/libs/keyboard/built/debug/binary.js +8 -8
- package/libs/lcd/built/debug/binary.js +8 -8
- package/libs/light/built/debug/binary.js +8 -8
- package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
- package/libs/lora/built/debug/binary.js +8 -8
- package/libs/matrix-keypad/built/debug/binary.js +8 -8
- package/libs/microphone/built/debug/binary.js +8 -8
- package/libs/mouse/built/debug/binary.js +8 -8
- package/libs/mqtt/built/debug/binary.js +176 -176
- package/libs/music/built/debug/binary.js +8 -8
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net/controller.ts +10 -1
- package/libs/net-game/built/debug/binary.js +10730 -9477
- package/libs/palette/built/debug/binary.js +8991 -7742
- package/libs/pixel/built/debug/binary.js +8 -8
- package/libs/power/built/debug/binary.js +8 -8
- package/libs/proximity/built/debug/binary.js +9 -9
- package/libs/pulse/built/debug/binary.js +8 -8
- package/libs/radio/built/debug/binary.js +8 -8
- package/libs/radio-broadcast/built/debug/binary.js +8 -8
- package/libs/rotary-encoder/built/debug/binary.js +8 -8
- package/libs/screen/built/debug/binary.js +50 -50
- package/libs/screen/image.cpp +14 -4
- package/libs/screen/image.ts +5 -4
- package/libs/screen/sim/image.ts +15 -3
- package/libs/servo/built/debug/binary.js +8 -8
- package/libs/sprite-scaling/README.md +3 -0
- package/libs/sprite-scaling/_locales/sprite-scaling-jsdoc-strings.json +1 -0
- package/libs/sprite-scaling/_locales/sprite-scaling-strings.json +8 -0
- package/libs/sprite-scaling/built/debug/binary.js +40085 -0
- package/libs/sprite-scaling/pxt.json +16 -0
- package/libs/sprite-scaling/scaling.ts +103 -0
- package/libs/sprite-scaling/targetoverrides.ts +1 -0
- package/libs/sprite-scaling/test.ts +0 -0
- package/libs/storyboard/built/debug/binary.js +8991 -7742
- package/libs/tests/built/debug/binary.js +15 -15
- package/libs/thermometer/built/debug/binary.js +8 -8
- package/libs/wifi---esp32/README.md +12 -0
- package/libs/wifi---esp32/buildlogin.sh +1 -0
- package/libs/wifi---esp32/controller.ts +27 -1
- package/libs/wifi---esp32/enums.d.ts +4 -0
- package/libs/wifi---esp32/httpserver.cpp +168 -0
- package/libs/wifi---esp32/login.full.html +37 -0
- package/libs/wifi---esp32/login.html +1 -0
- package/libs/wifi---esp32/pxt.json +1 -0
- package/libs/wifi---esp32/shims.d.ts +8 -0
- package/libs/wifi---esp32/sim/wifisockets.ts +3 -0
- package/libs/wifi---esp32/wifi.cpp +24 -15
- package/libs/wifi---esp32/wifi.h +15 -1
- package/package.json +1 -1
package/built/common-sim.d.ts
CHANGED
|
@@ -1007,8 +1007,8 @@ declare namespace pxsim.ImageMethods {
|
|
|
1007
1007
|
function _fillCircle(img: RefImage, cxy: number, r: number, c: number): void;
|
|
1008
1008
|
function _blitRow(img: RefImage, xy: number, from: RefImage, xh: number): void;
|
|
1009
1009
|
function blitRow(img: RefImage, x: number, y: number, from: RefImage, fromX: number, fromH: number): void;
|
|
1010
|
-
function _blit(img: RefImage, src: RefImage, args: RefCollection):
|
|
1011
|
-
function blit(dst: RefImage, src: RefImage, args: RefCollection):
|
|
1010
|
+
function _blit(img: RefImage, src: RefImage, args: RefCollection): boolean;
|
|
1011
|
+
function blit(dst: RefImage, src: RefImage, args: RefCollection): boolean;
|
|
1012
1012
|
}
|
|
1013
1013
|
declare namespace pxsim.image {
|
|
1014
1014
|
function byteHeight(h: number, bpp: number): number;
|
|
@@ -1228,6 +1228,7 @@ declare namespace pxsim._wifi {
|
|
|
1228
1228
|
export function socketClose(fd: int32): int32;
|
|
1229
1229
|
export function eventID(): int32;
|
|
1230
1230
|
export function scanStart(): void;
|
|
1231
|
+
export function startLoginServer(): void;
|
|
1231
1232
|
export function scanResults(): RefBuffer;
|
|
1232
1233
|
export function connect(ssid: string, pass: string): int32;
|
|
1233
1234
|
export function disconnect(): int32;
|
package/built/common-sim.js
CHANGED
|
@@ -3905,7 +3905,7 @@ var pxsim;
|
|
|
3905
3905
|
}
|
|
3906
3906
|
ImageMethods.blitRow = blitRow;
|
|
3907
3907
|
function _blit(img, src, args) {
|
|
3908
|
-
blit(img, src, args);
|
|
3908
|
+
return blit(img, src, args);
|
|
3909
3909
|
}
|
|
3910
3910
|
ImageMethods._blit = _blit;
|
|
3911
3911
|
function blit(dst, src, args) {
|
|
@@ -3918,6 +3918,7 @@ var pxsim;
|
|
|
3918
3918
|
const wSrc = args.getAt(6);
|
|
3919
3919
|
const hSrc = args.getAt(7);
|
|
3920
3920
|
const transparent = args.getAt(8);
|
|
3921
|
+
const check = args.getAt(9);
|
|
3921
3922
|
const xSrcStep = ((wSrc << 16) / wDst) | 0;
|
|
3922
3923
|
const ySrcStep = ((hSrc << 16) / hDst) | 0;
|
|
3923
3924
|
const xDstClip = Math.abs(Math.min(0, xDst));
|
|
@@ -3930,16 +3931,26 @@ var pxsim;
|
|
|
3930
3931
|
const ySrcStart = Math.max(0, (ySrc << 16) + yDstClip * ySrcStep);
|
|
3931
3932
|
const xSrcEnd = Math.min(src._width, xSrc + wSrc) << 16;
|
|
3932
3933
|
const ySrcEnd = Math.min(src._height, ySrc + hSrc) << 16;
|
|
3934
|
+
if (!check)
|
|
3935
|
+
dst.makeWritable();
|
|
3933
3936
|
for (let yDstCur = yDstStart, ySrcCur = ySrcStart; yDstCur < yDstEnd && ySrcCur < ySrcEnd; ++yDstCur, ySrcCur += ySrcStep) {
|
|
3934
3937
|
const ySrcCurI = ySrcCur >> 16;
|
|
3935
3938
|
for (let xDstCur = xDstStart, xSrcCur = xSrcStart; xDstCur < xDstEnd && xSrcCur < xSrcEnd; ++xDstCur, xSrcCur += xSrcStep) {
|
|
3936
3939
|
const xSrcCurI = xSrcCur >> 16;
|
|
3937
3940
|
const cSrc = getPixel(src, xSrcCurI, ySrcCurI);
|
|
3941
|
+
if (check && cSrc) {
|
|
3942
|
+
const cDst = getPixel(dst, xDstCur, yDstCur);
|
|
3943
|
+
if (cDst) {
|
|
3944
|
+
return true;
|
|
3945
|
+
}
|
|
3946
|
+
continue;
|
|
3947
|
+
}
|
|
3938
3948
|
if (!transparent || cSrc) {
|
|
3939
3949
|
setPixel(dst, xDstCur, yDstCur, cSrc);
|
|
3940
3950
|
}
|
|
3941
3951
|
}
|
|
3942
3952
|
}
|
|
3953
|
+
return false;
|
|
3943
3954
|
}
|
|
3944
3955
|
ImageMethods.blit = blit;
|
|
3945
3956
|
})(ImageMethods = pxsim.ImageMethods || (pxsim.ImageMethods = {}));
|
|
@@ -5041,6 +5052,9 @@ var pxsim;
|
|
|
5041
5052
|
_raiseEvent(1 /* ScanDone */);
|
|
5042
5053
|
}
|
|
5043
5054
|
_wifi.scanStart = scanStart;
|
|
5055
|
+
function startLoginServer() {
|
|
5056
|
+
}
|
|
5057
|
+
_wifi.startLoginServer = startLoginServer;
|
|
5044
5058
|
function scanResults() {
|
|
5045
5059
|
const b = new Uint8Array(7);
|
|
5046
5060
|
b[0] = -20; // rssi
|
|
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
|
|
|
56
56
|
const pxsim_numops = pxsim.numops;
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
function
|
|
59
|
+
function _main___P10942(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.
|
|
70
|
-
globals.
|
|
69
|
+
globals._intervals___11185 = (undefined);
|
|
70
|
+
globals._pollEventQueue___11198 = (undefined);
|
|
71
71
|
r0 = undefined;
|
|
72
72
|
return leave(s, r0)
|
|
73
73
|
default: oops()
|
|
74
74
|
} } }
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
_main___P10942.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/base/ns.ts","functionName":"<main>","argumentNames":[]}
|
|
76
|
+
_main___P10942.continuations = [ ]
|
|
77
77
|
|
|
78
|
-
function
|
|
78
|
+
function _main___P10942_mk(s) {
|
|
79
79
|
checkStack(s.depth);
|
|
80
80
|
return {
|
|
81
|
-
parent: s, fn:
|
|
81
|
+
parent: s, fn: _main___P10942, 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___P10930_mk(s) {
|
|
|
88
88
|
|
|
89
89
|
const breakpoints = setupDebugger(1, [])
|
|
90
90
|
|
|
91
|
-
return
|
|
91
|
+
return _main___P10942
|
|
92
92
|
})
|