From 7ade85cf07dffad97a18ed236333c76b187da74b Mon Sep 17 00:00:00 2001 From: Alex Kulcsar <38046796+alex-kulcsar@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:07:56 -0400 Subject: [PATCH] 1.2.0 --- assets/js/binary.js | 50748 +++++++++++++++++++----------------------- assets/version.txt | 2 +- pxt.json | 2 +- 3 files changed, 23130 insertions(+), 27622 deletions(-) diff --git a/assets/js/binary.js b/assets/js/binary.js index fc420eb..f8d0467 100644 --- a/assets/js/binary.js +++ b/assets/js/binary.js @@ -1,5 +1,5 @@ -// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.12.56/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.1.0","target":"arcade","targetVersion":"1.12.56","repo":"robo-technical-group/pxt-typed-arrays"} -// total=1384818 new=8.88% cached=85.41% other=5.71% +// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.12.56/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"1.2.0","target":"arcade","targetVersion":"1.12.56","repo":"robo-technical-group/pxt-typed-arrays"} +// total=1248225 new=5.85% cached=88.48% other=5.67% (function (ectx) { 'use strict'; const runtime = ectx.runtime; @@ -37,7 +37,6 @@ pxsim.setConfigData({ }); pxtrt.mapKeyNames = [ "", - "BYTES_PER_ELEMENT", "__draw", "__drawCore", "__preUpdate", @@ -46,10 +45,6 @@ pxtrt.mapKeyNames = [ "_action", "_ax", "_ay", - "_buffer", - "_byteLength", - "_byteOffset", - "_bytes", "_col", "_connected", "_controlledSprites", @@ -71,7 +66,6 @@ pxtrt.mapKeyNames = [ "_lastY", "_layer", "_layers", - "_length", "_map", "_millis", "_obstacles", @@ -79,7 +73,6 @@ pxtrt.mapKeyNames = [ "_offsetY", "_overlappers", "_owner", - "_pack", "_player", "_pressed", "_pressedElasped", @@ -91,7 +84,6 @@ pxtrt.mapKeyNames = [ "_sx", "_sy", "_text", - "_unpack", "_update", "_vx", "_vy", @@ -119,13 +111,9 @@ pxtrt.mapKeyNames = [ "bgColor", "bottom", "buckets", - "buffer", "button", "buttonEventHandlers", "buttons", - "byteLength", - "byteOffset", - "bytes", "cachedTileView", "cachedVx", "cachedVy", @@ -143,15 +131,12 @@ pxtrt.mapKeyNames = [ "change", "charHeight", "charWidth", - "clamp", "clear", - "clearInterior", "clearObstacles", "collisionHandlers", "color", "column", "columnCount", - "columns", "condition", "connected", "constrain", @@ -161,9 +146,6 @@ pxtrt.mapKeyNames = [ "createMovingSprite", "createParticle", "createdHandlers", - "cursor", - "cursorCount", - "cursorRowHeight", "data", "defaultLifespan", "defaultRate", @@ -176,17 +158,13 @@ pxtrt.mapKeyNames = [ "distance", "down", "draw", - "drawBorder", - "drawCursorRow", "drawDebug", "drawOffsetX", "drawOffsetY", - "drawPartial", "drawParticle", "drawSay", "drawSprite", "drawText", - "drawTextCore", "dx", "dy", "effect", @@ -195,17 +173,13 @@ pxtrt.mapKeyNames = [ "enabled", "event", "eventContext", - "fastFill", "fastRandom", "fgColor", "flags", "followingSprites", - "font", - "frame", "frameCallbacks", "frameWorker", "framesInSample", - "fromArrayBuffer", "fx", "fy", "galois", @@ -234,8 +208,6 @@ pxtrt.mapKeyNames = [ "infoFont", "infoTop", "init", - "innerLeft", - "innerTop", "insertAABB", "insertAtKey", "isObstacle", @@ -264,11 +236,9 @@ pxtrt.mapKeyNames = [ "map", "maxLifespan", "maxNegativeVelocity", - "maxOffset", "maxSingleStep", "maxSpeed", "maxStep", - "maxSubOffset", "maxVelocity", "melody", "mergeAtKey", @@ -283,7 +253,6 @@ pxtrt.mapKeyNames = [ "multiplier", "neighbors", "next", - "offset", "offsetX", "offsetY", "onEvent", @@ -330,12 +299,10 @@ pxtrt.mapKeyNames = [ "repeatX", "repeatY", "resetHitbox", - "resize", "resizeBuckets", "right", "row", "rowCount", - "rows", "runButtonEvents", "runCallbacks", "runningCallbacks", @@ -354,14 +321,11 @@ pxtrt.mapKeyNames = [ "seed", "selectedCard", "selection", - "set", "setAcceleration", "setAnchor", "setDirection", "setFactory", "setFlag", - "setFont", - "setFromTypedArray", "setHitbox", "setImage", "setKind", @@ -372,15 +336,12 @@ pxtrt.mapKeyNames = [ "setSelection", "setSpeed", "setState", - "setSubtext", - "setText", "setTheme", "shakeAmplitude", "shakeDuration", "shakeStartTime", "shouldBeVisible", "show", - "slice", "soundSetByUser", "source", "sourceFactory", @@ -396,14 +357,10 @@ pxtrt.mapKeyNames = [ "start", "state", "stopped", - "subtext", "sx", "sy", "system", "text", - "textAreaHeight", - "textAreaWidth", - "textColor", "theme", "tileIndex", "tileMap", @@ -418,12 +375,10 @@ pxtrt.mapKeyNames = [ "times", "toString", "top", - "unit", "unregister", "up", "update", "updateCard", - "updateFont", "updateIfInvalid", "updateParticle", "updateScrollTarget", @@ -474,7 +429,7 @@ const pxsim_pxtrt = pxsim.pxtrt; const pxsim_numops = pxsim.numops; -function _main___P315607(s) { +function _main___P61375(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -484,289 +439,289 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - globals._intervals___276270 = (undefined); - globals._pollEventQueue___276279 = (undefined); - globals.minPriority___272191 = (1); + globals._intervals___20338 = (undefined); + globals._pollEventQueue___20351 = (undefined); + globals.minPriority___20357 = (1); r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, listeners_inline__P276282); - globals.listeners___276283 = (s.tmp_0); - globals.globalVolume___276336 = (null); - globals.playToneID___276343 = (0); - r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C273443_VT); + r0 = pxsim_Array__push(s.tmp_0, listeners_inline__P20358); + globals.listeners___20359 = (s.tmp_0); + globals.globalVolume___20538 = (null); + globals.playToneID___20548 = (0); + r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C20552_VT); s.tmp_0 = r0; - s.tmp_1 = music_Melody_constructor__P273446_mk(s); + s.tmp_1 = music_Melody_constructor__P20564_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = "~15 e3:3 r:1 d#:3 r:1 d:4 r:1 c#:8"; - s.callLocIdx = 0; s.pc = 23; return s.tmp_1; - case 23: + s.callLocIdx = 0; s.pc = 1; return s.tmp_1; + case 1: r0 = s.retval; - globals.wawawawaa___273464 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C273443_VT); + globals.wawawawaa___20577 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C20552_VT); s.tmp_0 = r0; - s.tmp_1 = music_Melody_constructor__P273446_mk(s); + s.tmp_1 = music_Melody_constructor__P20564_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = "g4:1 c5 e g:2 e:1 g:3"; - s.callLocIdx = 1; s.pc = 24; return s.tmp_1; - case 24: + s.callLocIdx = 1; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - globals.powerUp___273467 = (s.tmp_0); - globals.brightness___273768 = (100); + globals.powerUp___20583 = (s.tmp_0); + globals.brightness___20826 = (100); r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charWidth", 6); r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charHeight", 8); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex281847); - globals.font8___273792 = (s.tmp_0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex28270); + globals.font8___20856 = (s.tmp_0); r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charWidth", 12); r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charHeight", 12); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex281849); - globals.font12___273793 = (s.tmp_0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex28272); + globals.font12___20858 = (s.tmp_0); r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charWidth", 6); r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "charHeight", 5); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex284497); - globals.font5___273797 = (s.tmp_0); - globals.__updated___276450 = (false); - r0 = pxsim.control.runInParallel(control___screen_inline__P276453); - r0 = pxsim_pxtcore.setPalette(_hex276464); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex31009); + globals.font5___20863 = (s.tmp_0); + globals.__updated___20870 = (false); + r0 = pxsim.control.runInParallel(control___screen_inline__P20875); + r0 = pxsim_pxtcore.setPalette(_hex20901); r0 = pxsim_pxtcore.getConfig(2102, 160); s.tmp_0 = r0; r0 = pxsim_pxtcore.getConfig(2103, 120); s.tmp_1 = r0; r0 = pxsim.image.create(s.tmp_0, s.tmp_1); - globals.screen___273849 = (r0); - s.tmp_0 = control___screen_setupUpdate__P273811_mk(s); - s.tmp_0.arg0 = _screen_internal_inline__P276473; - s.callLocIdx = 6; s.pc = 25; return s.tmp_0; - case 25: + globals.screen___20904 = (r0); + s.tmp_0 = control___screen_setupUpdate__P20872_mk(s); + s.tmp_0.arg0 = _screen_internal_inline__P20913; + s.callLocIdx = 6; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - globals.control_EventContext_onStats___272214 = (_screen_internal_inline__P276478); - globals.RUN_KEY___276483 = ("#run"); - globals.SCOPE_KEY___276484 = ("#scope"); - s.tmp_0 = settings_initScopes__P276495_mk(s); - s.callLocIdx = 7; s.pc = 26; return s.tmp_0; - case 26: + globals.control_EventContext_onStats___20406 = (_screen_internal_inline__P20918); + globals.RUN_KEY___20925 = ("#run"); + globals.SCOPE_KEY___20926 = ("#scope"); + s.tmp_0 = settings_initScopes__P20938_mk(s); + s.callLocIdx = 7; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 5; s.tmp_1.arg2 = 4; - s.callLocIdx = 8; s.pc = 27; return s.tmp_1; - case 27: + s.callLocIdx = 8; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - globals.A___273930 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.A___20997 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 6; s.tmp_1.arg2 = 5; - s.callLocIdx = 9; s.pc = 28; return s.tmp_1; - case 28: + s.callLocIdx = 9; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; - globals.B___273931 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.B___20999 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 1; s.tmp_1.arg2 = 47; - s.callLocIdx = 10; s.pc = 29; return s.tmp_1; - case 29: + s.callLocIdx = 10; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; - globals.left___273932 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.left___21001 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 2; s.tmp_1.arg2 = 49; - s.callLocIdx = 11; s.pc = 30; return s.tmp_1; - case 30: + s.callLocIdx = 11; s.pc = 8; return s.tmp_1; + case 8: r0 = s.retval; - globals.up___273933 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.up___21003 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 3; s.tmp_1.arg2 = 48; - s.callLocIdx = 12; s.pc = 31; return s.tmp_1; - case 31: + s.callLocIdx = 12; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - globals.right___273934 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.right___21005 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 4; s.tmp_1.arg2 = 50; - s.callLocIdx = 13; s.pc = 32; return s.tmp_1; - case 32: + s.callLocIdx = 13; s.pc = 10; return s.tmp_1; + case 10: r0 = s.retval; - globals.down___273935 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); + globals.down___21007 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 7; s.tmp_1.arg2 = 51; - s.callLocIdx = 14; s.pc = 33; return s.tmp_1; - case 33: + s.callLocIdx = 14; s.pc = 11; return s.tmp_1; + case 11: r0 = s.retval; - globals.menu___273936 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C273951_VT); + globals.menu___21009 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C21104_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P273955_mk(s); + s.tmp_1 = controller_Controller_constructor__P21130_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 2; s.tmp_1.arg2 = undefined; - s.callLocIdx = 15; s.pc = 34; return s.tmp_1; - case 34: + s.callLocIdx = 15; s.pc = 12; return s.tmp_1; + case 12: r0 = s.retval; - globals.player2___273937 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C273951_VT); + globals.player2___21011 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C21104_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P273955_mk(s); + s.tmp_1 = controller_Controller_constructor__P21130_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 3; s.tmp_1.arg2 = undefined; - s.callLocIdx = 16; s.pc = 35; return s.tmp_1; - case 35: + s.callLocIdx = 16; s.pc = 13; return s.tmp_1; + case 13: r0 = s.retval; - globals.player3___273938 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C273951_VT); + globals.player3___21013 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C21104_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P273955_mk(s); + s.tmp_1 = controller_Controller_constructor__P21130_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 4; s.tmp_1.arg2 = undefined; - s.callLocIdx = 17; s.pc = 36; return s.tmp_1; - case 36: + s.callLocIdx = 17; s.pc = 14; return s.tmp_1; + case 14: r0 = s.retval; - globals.player4___273939 = (s.tmp_0); - s.tmp_0 = controller__player1__P273945_mk(s); - s.callLocIdx = 18; s.pc = 37; return s.tmp_0; - case 37: + globals.player4___21015 = (s.tmp_0); + s.tmp_0 = controller__player1__P21099_mk(s); + s.callLocIdx = 18; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - globals.player1___273940 = (r0); - s.tmp_0 = game_addScenePopHandler__P274837_mk(s); - s.tmp_0.arg0 = controller_inline__P276523; - s.callLocIdx = 23; s.pc = 38; return s.tmp_0; - case 38: + globals.player1___21017 = (r0); + s.tmp_0 = game_addScenePopHandler__P21020_mk(s); + s.tmp_0.arg0 = controller_inline__P21021; + s.callLocIdx = 23; s.pc = 16; return s.tmp_0; + case 16: r0 = s.retval; - s.tmp_0 = game_addScenePushHandler__P274835_mk(s); - s.tmp_0.arg0 = controller_inline__P276563; - s.callLocIdx = 25; s.pc = 39; return s.tmp_0; - case 39: + s.tmp_0 = game_addScenePushHandler__P21075_mk(s); + s.tmp_0.arg0 = controller_inline__P21076; + s.callLocIdx = 25; s.pc = 17; return s.tmp_0; + case 17: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_AnyButton__C276587_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_AnyButton__C21136_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P274012_mk(s); + s.tmp_1 = controller_Button_constructor__P21158_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 0; s.tmp_1.arg2 = -1; - s.callLocIdx = 26; s.pc = 40; return s.tmp_1; - case 40: + s.callLocIdx = 26; s.pc = 18; return s.tmp_1; + case 18: r0 = s.retval; - globals.anyButton___273987 = (s.tmp_0); - globals._userEventsEnabled___276601 = (true); - globals.defaultRepeatDelay___276603 = (500); - globals.defaultRepeatInterval___276605 = (30); - s.tmp_0 = SpriteKind_create__P274296_mk(s); - s.callLocIdx = 27; s.pc = 41; return s.tmp_0; - case 41: + globals.anyButton___21156 = (s.tmp_0); + globals._userEventsEnabled___21162 = (true); + globals.defaultRepeatDelay___21164 = (500); + globals.defaultRepeatInterval___21166 = (30); + s.tmp_0 = SpriteKind_create__P21363_mk(s); + s.callLocIdx = 27; s.pc = 19; return s.tmp_0; + case 19: r0 = s.retval; - globals.Player___274297 = (r0); - s.tmp_0 = SpriteKind_create__P274296_mk(s); - s.callLocIdx = 28; s.pc = 42; return s.tmp_0; - case 42: + globals.Player___21365 = (r0); + s.tmp_0 = SpriteKind_create__P21363_mk(s); + s.callLocIdx = 28; s.pc = 20; return s.tmp_0; + case 20: r0 = s.retval; - globals.Food___274299 = (r0); - s.tmp_0 = SpriteKind_create__P274296_mk(s); - s.callLocIdx = 29; s.pc = 43; return s.tmp_0; - case 43: + globals.Food___21370 = (r0); + s.tmp_0 = SpriteKind_create__P21363_mk(s); + s.callLocIdx = 29; s.pc = 21; return s.tmp_0; + case 21: r0 = s.retval; - globals.Enemy___274300 = (r0); + globals.Enemy___21373 = (r0); r0 = (0.1 * 256); s.tmp_0 = r0; r0 = (s.tmp_0 | 0); - globals.MIN_MOVE_GAP___274338 = (r0); - globals.infoState___276670 = (undefined); - s.tmp_0 = game_addScenePushHandler__P274835_mk(s); - s.tmp_0.arg0 = info_inline__P276674; - s.callLocIdx = 31; s.pc = 44; return s.tmp_0; - case 44: + globals.MIN_MOVE_GAP___21397 = (r0); + globals.infoState___21465 = (undefined); + s.tmp_0 = game_addScenePushHandler__P21075_mk(s); + s.tmp_0.arg0 = info_inline__P21469; + s.callLocIdx = 31; s.pc = 22; return s.tmp_0; + case 22: r0 = s.retval; - s.tmp_0 = game_addScenePopHandler__P274837_mk(s); - s.tmp_0.arg0 = info_inline__P276689; - s.callLocIdx = 35; s.pc = 45; return s.tmp_0; - case 45: + s.tmp_0 = game_addScenePopHandler__P21020_mk(s); + s.tmp_0.arg0 = info_inline__P21485; + s.callLocIdx = 35; s.pc = 23; return s.tmp_0; + case 23: r0 = s.retval; r0 = pxsim_Array__mk(); - globals.scene_Scene_initializers___274682 = (r0); - r0 = pxsim.image.ofBuffer(_hex276779); - globals.img_trophy_sm___276780 = (r0); - r0 = pxsim.image.ofBuffer(_hex276782); - globals.img_trophy_lg___276783 = (r0); - r0 = pxsim.image.ofBuffer(_hex276785); - globals.img_sleepy_sim___276786 = (r0); - globals.debug___274784 = (false); - globals.stats___274785 = (false); - globals.gameOverConfig___274815 = (gameOverConfig_inline__P276798); - s.tmp_0 = scene_systemMenu_initVolume__P277073_mk(s); - s.callLocIdx = 37; s.pc = 46; return s.tmp_0; - case 46: + globals.scene_Scene_initializers___21792 = (r0); + r0 = pxsim.image.ofBuffer(_hex21849); + globals.img_trophy_sm___21850 = (r0); + r0 = pxsim.image.ofBuffer(_hex21852); + globals.img_trophy_lg___21853 = (r0); + r0 = pxsim.image.ofBuffer(_hex21855); + globals.img_sleepy_sim___21856 = (r0); + globals.debug___21888 = (false); + globals.stats___21890 = (false); + globals.gameOverConfig___21904 = (gameOverConfig_inline__P21903); + s.tmp_0 = scene_systemMenu_initVolume__P22248_mk(s); + s.callLocIdx = 37; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - s.tmp_0 = scene_systemMenu_initScreen__P277074_mk(s); - s.callLocIdx = 38; s.pc = 47; return s.tmp_0; - case 47: + s.tmp_0 = scene_systemMenu_initScreen__P22249_mk(s); + s.callLocIdx = 38; s.pc = 25; return s.tmp_0; + case 25: r0 = s.retval; - r0 = pxsim_Array__push(globals.scene_Scene_initializers___274682, scene_systemMenu_register__P274923); - r0 = pxsim.image.ofBuffer(_hex277081); - globals.CARD_NORMAL___274928 = (r0); - r0 = pxsim.image.ofBuffer(_hex277083); - globals.CARD_SELECTED___274929 = (r0); - r0 = pxsim.image.ofBuffer(_hex277085); - globals.CARD_ACTIVE___274930 = (r0); - r0 = pxsim.image.ofBuffer(_hex277087); - globals.VOLUME_UP_ICON___274931 = (r0); - r0 = pxsim.image.ofBuffer(_hex277089); - globals.BRIGHTNESS_DOWN_ICON___274932 = (r0); - r0 = pxsim.image.ofBuffer(_hex277091); - globals.CLOSE_MENU_ICON___274933 = (r0); - r0 = pxsim.image.ofBuffer(_hex277093); - globals.VOLUME_DOWN_ICON___274934 = (r0); - r0 = pxsim.image.ofBuffer(_hex277095); - globals.SLEEP_ICON___274935 = (r0); - r0 = pxsim.image.ofBuffer(_hex277097); - globals.CONSOLE_ICON___274936 = (r0); - r0 = pxsim.image.ofBuffer(_hex277099); - globals.BRIGHTNESS_UP_ICON___274937 = (r0); - r0 = pxsim.image.ofBuffer(_hex277101); - globals.STATS_ICON___274938 = (r0); - globals.consoleColor___277104 = (1); - globals.tabSize___277107 = (8); - globals.consoleFont___277113 = (globals.font5___273797); - r0 = pxsim_ImageMethods.height(globals.screen___273849); + r0 = pxsim_Array__push(globals.scene_Scene_initializers___21792, scene_systemMenu_register__P22245); + r0 = pxsim.image.ofBuffer(_hex22256); + globals.CARD_NORMAL___22257 = (r0); + r0 = pxsim.image.ofBuffer(_hex22259); + globals.CARD_SELECTED___22260 = (r0); + r0 = pxsim.image.ofBuffer(_hex22262); + globals.CARD_ACTIVE___22263 = (r0); + r0 = pxsim.image.ofBuffer(_hex22265); + globals.VOLUME_UP_ICON___22266 = (r0); + r0 = pxsim.image.ofBuffer(_hex22268); + globals.BRIGHTNESS_DOWN_ICON___22269 = (r0); + r0 = pxsim.image.ofBuffer(_hex22271); + globals.CLOSE_MENU_ICON___22272 = (r0); + r0 = pxsim.image.ofBuffer(_hex22274); + globals.VOLUME_DOWN_ICON___22275 = (r0); + r0 = pxsim.image.ofBuffer(_hex22277); + globals.SLEEP_ICON___22278 = (r0); + r0 = pxsim.image.ofBuffer(_hex22280); + globals.CONSOLE_ICON___22281 = (r0); + r0 = pxsim.image.ofBuffer(_hex22283); + globals.BRIGHTNESS_UP_ICON___22284 = (r0); + r0 = pxsim.image.ofBuffer(_hex22286); + globals.STATS_ICON___22287 = (r0); + globals.consoleColor___22290 = (1); + globals.tabSize___22293 = (8); + globals.consoleFont___22299 = (globals.font5___20863); + r0 = pxsim_ImageMethods.height(globals.screen___20904); s.tmp_2 = r0; s.tmp_5 = if_charHeight_1_mk(s); - s.tmp_5.arg0 = globals.consoleFont___277113; + s.tmp_5.arg0 = globals.consoleFont___22299; if (!s.tmp_5.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); } else { s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["charHeight"]; if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["charHeight"]; } else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 39; s.pc = 48; return s.tmp_5; } + else { s.callLocIdx = 39; s.pc = 26; return s.tmp_5; } } - case 48: + case 26: r0 = s.retval; s.tmp_4 = r0; r0 = (s.tmp_4 + 2); @@ -776,431 +731,113 @@ switch (step) { r0 = pxsim.Math_.floor(s.tmp_1); s.tmp_0 = r0; r0 = (s.tmp_0 - 1); - globals.consoleLines___277118 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___273849); + globals.consoleLines___22304 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___20904); s.tmp_2 = r0; r0 = (s.tmp_2 - 8); s.tmp_1 = r0; s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = globals.consoleFont___277113; + s.tmp_4.arg0 = globals.consoleFont___22299; if (!s.tmp_4.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); } else { s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charWidth"]; if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charWidth"]; } else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 40; s.pc = 49; return s.tmp_4; } + else { s.callLocIdx = 40; s.pc = 27; return s.tmp_4; } } - case 49: + case 27: r0 = s.retval; s.tmp_3 = r0; r0 = (s.tmp_1 / s.tmp_3); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - globals.consoleColumns___277128 = (r0); - s.tmp_0 = console_addListener__P272199_mk(s); - s.tmp_0.arg0 = game_consoleOverlay_listener__P277140; - s.callLocIdx = 41; s.pc = 50; return s.tmp_0; - case 50: + globals.consoleColumns___22315 = (r0); + s.tmp_0 = console_addListener__P20367_mk(s); + s.tmp_0.arg0 = game_consoleOverlay_listener__P22327; + s.callLocIdx = 41; s.pc = 28; return s.tmp_0; + case 28: r0 = s.retval; s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = MAX_SOURCES_inline__P286822; + s.tmp_0.argL = MAX_SOURCES_inline__P33400; setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 43; s.pc = 51; return s.tmp_0; - case 51: + s.callLocIdx = 43; s.pc = 29; return s.tmp_0; + case 29: r0 = s.retval; - globals.MAX_SOURCES___277142 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_SprayFactory__C275008_VT); + globals.MAX_SOURCES___22335 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_SprayFactory__C22405_VT); s.tmp_0 = r0; - s.tmp_1 = particles_SprayFactory_constructor__P275009_mk(s); + s.tmp_1 = particles_SprayFactory_constructor__P22411_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 20; s.tmp_1.arg2 = 0; s.tmp_1.arg3 = 60; - s.callLocIdx = 44; s.pc = 52; return s.tmp_1; - case 52: + s.callLocIdx = 44; s.pc = 30; return s.tmp_1; + case 30: r0 = s.retval; - globals.defaultFactory___274988 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C274876_VT); + globals.defaultFactory___22361 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C22203_VT); s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P274878_mk(s); + s.tmp_1 = Math_FastRandom_constructor__P22210_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = undefined; - s.callLocIdx = 45; s.pc = 53; return s.tmp_1; - case 53: + s.callLocIdx = 45; s.pc = 31; return s.tmp_1; + case 31: r0 = s.retval; - globals.galois___277162 = (s.tmp_0); - globals.angleSlice___277170 = (0.06283185307179587); - r0 = pxsim_pxtcore_mkClassInstance(effects_ScreenEffect__C275083_VT); + globals.galois___22384 = (s.tmp_0); + globals.angleSlice___22392 = (0.06283185307179587); + r0 = pxsim_pxtcore_mkClassInstance(effects_ScreenEffect__C22478_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ScreenEffect_constructor__P275084_mk(s); + s.tmp_1 = effects_ScreenEffect_constructor__P22482_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 10; s.tmp_1.arg2 = 40; s.tmp_1.arg3 = 4000; - s.tmp_1.arg4 = confetti_inline__P286576; - s.callLocIdx = 51; s.pc = 54; return s.tmp_1; - case 54: + s.tmp_1.arg4 = confetti_inline__P33149; + s.callLocIdx = 51; s.pc = 32; return s.tmp_1; + case 32: r0 = s.retval; - globals.confetti___275091 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C275107_VT); + globals.confetti___22492 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C22521_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ImageEffect_constructor__P275108_mk(s); + s.tmp_1 = effects_ImageEffect_constructor__P22525_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 100; - s.tmp_1.arg2 = dissolve_inline__P285179; - s.callLocIdx = 57; s.pc = 55; return s.tmp_1; - case 55: + s.tmp_1.arg2 = dissolve_inline__P31707; + s.callLocIdx = 57; s.pc = 33; return s.tmp_1; + case 33: r0 = s.retval; - globals.dissolve___275112 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C275107_VT); + globals.dissolve___22527 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C22521_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ImageEffect_constructor__P275108_mk(s); + s.tmp_1 = effects_ImageEffect_constructor__P22525_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 125; - s.tmp_1.arg2 = melt_inline__P286522; - s.callLocIdx = 60; s.pc = 56; return s.tmp_1; - case 56: - r0 = s.retval; - globals.melt___275113 = (s.tmp_0); - s.tmp_0 = game_setWaitAnyButton__P274817_mk(s); - s.tmp_0.arg0 = controller_pauseUntilAnyButtonIsPressed__P274022; - s.callLocIdx = 61; s.pc = 57; return s.tmp_0; - case 57: - r0 = s.retval; - s.tmp_0 = game_eventContext__P274819_mk(s); - s.callLocIdx = 62; s.pc = 58; return s.tmp_0; - case 58: - r0 = s.retval; - globals.allPassed___315150 = (true); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 0); - r0 = pxsim_Array__push(s.tmp_0, 1); - r0 = pxsim_Array__push(s.tmp_0, 2); - r0 = pxsim_Array__push(s.tmp_0, 3); - r0 = pxsim_Array__push(s.tmp_0, 4); - r0 = pxsim_Array__push(s.tmp_0, 5); - r0 = pxsim_Array__push(s.tmp_0, 6); - r0 = pxsim_Array__push(s.tmp_0, 7); - r0 = pxsim_Array__push(s.tmp_0, 8); - r0 = pxsim_Array__push(s.tmp_0, 9); - s.tmp_1 = create__P315174_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 109; s.pc = 59; return s.tmp_1; - case 59: - r0 = s.retval; - globals.buf___315203 = (r0); - r0 = globals.buf___315203.fields["_byteLength"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != 10); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = game_splash__P274782_mk(s); - s.tmp_2.arg0 = "Array buffer slice test 1 failed."; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 111; s.pc = 60; return s.tmp_2; - case 60: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 1: - case 2: - s.tmp_3 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_3.arg0 = globals.buf___315203; - s.tmp_3.arg1 = 5; - s.tmp_3.arg2 = null; - s.callLocIdx = 112; s.pc = 61; return s.tmp_3; - case 61: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_byteLength"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != 5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_4 = game_splash__P274782_mk(s); - s.tmp_4.arg0 = "Array buffer slice test 2 failed."; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 114; s.pc = 62; return s.tmp_4; - case 62: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 3: - case 4: - s.tmp_3 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_3.arg0 = globals.buf___315203; - s.tmp_3.arg1 = -2; - s.tmp_3.arg2 = null; - s.callLocIdx = 115; s.pc = 63; return s.tmp_3; - case 63: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_byteLength"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = game_splash__P274782_mk(s); - s.tmp_4.arg0 = "Array buffer slice test 3 failed."; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 117; s.pc = 64; return s.tmp_4; - case 64: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 5: - case 6: - s.tmp_3 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_3.arg0 = globals.buf___315203; - s.tmp_3.arg1 = -4; - s.tmp_3.arg2 = -2; - s.callLocIdx = 118; s.pc = 65; return s.tmp_3; - case 65: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_byteLength"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_4 = game_splash__P274782_mk(s); - s.tmp_4.arg0 = "Array buffer slice test 4 failed."; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 120; s.pc = 66; return s.tmp_4; - case 66: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 7: - case 8: - s.tmp_3 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_3.arg0 = globals.buf___315203; - s.tmp_3.arg1 = -1000; - s.tmp_3.arg2 = 5; - s.callLocIdx = 121; s.pc = 67; return s.tmp_3; - case 67: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_byteLength"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != 5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_4 = game_splash__P274782_mk(s); - s.tmp_4.arg0 = "Array buffer slice test 5 failed."; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 123; s.pc = 68; return s.tmp_4; - case 68: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 9: - case 10: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 5); - r0 = pxsim_Array__push(s.tmp_0, 6); - r0 = pxsim_Array__push(s.tmp_0, 7); - r0 = pxsim_Array__push(s.tmp_0, 8); - r0 = pxsim_Array__push(s.tmp_0, 9); - s.tmp_4 = areEquivalent__P315151_mk(s); - s.tmp_4.arg0 = s.tmp_0; - s.tmp_5 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_5.arg0 = globals.buf___315203; - s.tmp_5.arg1 = 5; - s.tmp_5.arg2 = null; - s.callLocIdx = 124; s.pc = 70; return s.tmp_5; - case 70: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 125; s.pc = 69; return s.tmp_4; - case 69: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 11; continue; } - s.tmp_6 = game_splash__P274782_mk(s); - s.tmp_6.arg0 = "Array buffer slice test 6 failed."; - s.tmp_6.arg1 = undefined; - s.callLocIdx = 126; s.pc = 71; return s.tmp_6; - case 71: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 11: - case 12: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 0); - r0 = pxsim_Array__push(s.tmp_0, 1); - r0 = pxsim_Array__push(s.tmp_0, 2); - r0 = pxsim_Array__push(s.tmp_0, 3); - r0 = pxsim_Array__push(s.tmp_0, 4); - s.tmp_4 = areEquivalent__P315151_mk(s); - s.tmp_4.arg0 = s.tmp_0; - s.tmp_5 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_5.arg0 = globals.buf___315203; - s.tmp_5.arg1 = 0; - s.tmp_5.arg2 = 5; - s.callLocIdx = 127; s.pc = 73; return s.tmp_5; - case 73: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 128; s.pc = 72; return s.tmp_4; - case 72: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 13; continue; } - s.tmp_6 = game_splash__P274782_mk(s); - s.tmp_6.arg0 = "Array buffer slice test 7 failed."; - s.tmp_6.arg1 = undefined; - s.callLocIdx = 129; s.pc = 74; return s.tmp_6; - case 74: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 13: - case 14: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 5); - r0 = pxsim_Array__push(s.tmp_0, 6); - s.tmp_4 = areEquivalent__P315151_mk(s); - s.tmp_4.arg0 = s.tmp_0; - s.tmp_5 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_5.arg0 = globals.buf___315203; - s.tmp_5.arg1 = 5; - s.tmp_5.arg2 = 7; - s.callLocIdx = 130; s.pc = 76; return s.tmp_5; - case 76: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 131; s.pc = 75; return s.tmp_4; - case 75: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 15; continue; } - s.tmp_6 = game_splash__P274782_mk(s); - s.tmp_6.arg0 = "Array buffer slice test 8 failed."; - s.tmp_6.arg1 = undefined; - s.callLocIdx = 132; s.pc = 77; return s.tmp_6; - case 77: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 15: - case 16: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 6); - r0 = pxsim_Array__push(s.tmp_0, 7); - s.tmp_4 = areEquivalent__P315151_mk(s); - s.tmp_4.arg0 = s.tmp_0; - s.tmp_5 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_5.arg0 = globals.buf___315203; - s.tmp_5.arg1 = -4; - s.tmp_5.arg2 = -2; - s.callLocIdx = 133; s.pc = 79; return s.tmp_5; - case 79: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 134; s.pc = 78; return s.tmp_4; - case 78: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 17; continue; } - s.tmp_6 = game_splash__P274782_mk(s); - s.tmp_6.arg0 = "Array buffer slice test 9 failed."; - s.tmp_6.arg1 = undefined; - s.callLocIdx = 135; s.pc = 80; return s.tmp_6; - case 80: - r0 = s.retval; - globals.allPassed___315150 = (false); - case 17: - case 18: - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, 2); - r0 = pxsim_Array__push(s.tmp_0, 3); - r0 = pxsim_Array__push(s.tmp_0, 4); - r0 = pxsim_Array__push(s.tmp_0, 5); - r0 = pxsim_Array__push(s.tmp_0, 6); - r0 = pxsim_Array__push(s.tmp_0, 7); - s.tmp_4 = areEquivalent__P315151_mk(s); - s.tmp_4.arg0 = s.tmp_0; - s.tmp_5 = ArrayBuffer_slice__P300772_mk(s); - s.tmp_5.arg0 = globals.buf___315203; - s.tmp_5.arg1 = 2; - s.tmp_5.arg2 = -2; - s.callLocIdx = 136; s.pc = 82; return s.tmp_5; - case 82: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 137; s.pc = 81; return s.tmp_4; - case 81: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 19; continue; } - s.tmp_6 = game_splash__P274782_mk(s); - s.tmp_6.arg0 = "Array buffer slice test 10 failed."; - s.tmp_6.arg1 = undefined; - s.callLocIdx = 138; s.pc = 83; return s.tmp_6; - case 83: + s.tmp_1.arg2 = melt_inline__P33095; + s.callLocIdx = 60; s.pc = 34; return s.tmp_1; + case 34: r0 = s.retval; - globals.allPassed___315150 = (false); - case 19: - case 20: - r0 = pxsim_numops_toBoolDecr(globals.allPassed___315150); - if (!r0) { step = 21; continue; } - s.tmp_0 = game_splash__P274782_mk(s); - s.tmp_0.arg0 = "All tests passed!"; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 139; s.pc = 84; return s.tmp_0; - case 84: + globals.melt___22529 = (s.tmp_0); + s.tmp_0 = game_setWaitAnyButton__P21919_mk(s); + s.tmp_0.arg0 = controller_pauseUntilAnyButtonIsPressed__P21174; + s.callLocIdx = 61; s.pc = 35; return s.tmp_0; + case 35: r0 = s.retval; - { step = 22; continue; } - case 21: - s.tmp_0 = game_splash__P274782_mk(s); - s.tmp_0.arg0 = "At least one test failed."; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 140; s.pc = 85; return s.tmp_0; - case 85: + s.tmp_0 = game_eventContext__P21921_mk(s); + s.callLocIdx = 62; s.pc = 36; return s.tmp_0; + case 36: r0 = s.retval; - case 22: r0 = undefined; return leave(s, r0) default: oops() } } } -_main___P315607.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"main.ts","functionName":"
","argumentNames":[]} -_main___P315607.continuations = [ ] +_main___P61375.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"main.ts","functionName":"
","argumentNames":[]} +_main___P61375.continuations = [ ] -function _main___P315607_mk(s) { +function _main___P61375_mk(s) { checkStack(s.depth); return { - parent: s, fn: _main___P315607, depth: s.depth + 1, + parent: s, fn: _main___P61375, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1208,32 +845,31 @@ function _main___P315607_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, } } -const _hex281847 = pxsim.BufferMethods.createBufferFromHex("2000000000000000210000005e0000002200000e000e0000230028fe28fe280024004c92ff926400250002651248a64026006c92926ca000270000000e000000280000007c82000029000000827c00002a005438103854002b0010107c1010002c000000907000002d001010101010002e000000606000002f000060100806003000003c42423c00310000447e4000003200004462524c00330000424a4e320034003028247e20003500004e4a4a32003600003c4a4a30003700000262120e00380000344a4a34003900000c52523c003a0000006c6c00003b000000967600003c001028284444003d002828282828003e004444282810003f0000025909060040003c425a560800410078141214780042007e4a4a4a34004300003c424224004400007e42423c004500007e4a4a42004600007e0a0a02004700003c425234004800007e08087e00490000427e4200004a002040423e02004b00007e081462004c00007e404040004d007e0418047e004e00007e04087e004f003c4242423c005000007e12120c005100003c5262bc005200007e12126c00530000244a522400540002027e0202005500003e40403e005600001e70701e0057007e2018207e00580042241824420059000608700806005a000062524a46005b00007e424200005c000006081060005d000042427e00005e000804020408005f00808080808000600000000204000061000030484878006200007e4848300063000030484848006400003048487e006500003068585000660000107c12040067000018a4a478006800007e08087000690000487a4000006a000040847d00006b00007e102840006c0000427e4000006d007808300870006e000078080870006f00003048483000700000fc24241800710000182424fc0072000078100810007300005058682800740000083e48200075000038404078007600001860601800770038403040380078000048303048007900005ca0a07c007a000048685848007b000008364100007c000000fe0000007d000041360800007e00000804080400a000000000000000a10000007a000000a200003048fc4800a30090fc92928400a400542844285400a5002a2c782c2a00a6000000ee000000a7000094aaaa5200a800000200020000a9003e414955413eaa0000242a2e0000ab00102854284400ac00001010107000ad00001010101000ae003e415d45413eaf00000202020200b000000814140800b1008888be888800b2000024322c0000b30000222a140000b400000004020000b50000f840207800b6000c1e7e027e00b700000010000000b800000080400000b90000243e200000ba0000242a240000bb00442854281000bc00025f70f84000bd00021f90c8b000be0011557af84000bf000030484d2000c000601916186000c100601816196000c200601a151a6000c300601a151a6100c400601914196000c500601a151a6000c6007c0a7e4a4200c700001ea1611200c800007c55564400c900007c56554400ca00007c56554600cb00007c55544500cc0000457e440000cd0000447e450000ce0000467d460000cf0000457c450000d000087e4a423c00d100007e09127d00d200003845463800d300003846453800d400003846453a00d500003a45463900d600003845443900d700442810284400d80000fc724e3f00d900003c41423c00da00003c42413c00db00003c42413e00dc00003c41403d00dd00040872090400de00007e24241800df00007c025a2400e0000030494a7800e10000304a497800e20000304a497a00e3000032494a7900e40000304a487a00e50000304a4d7a00e600304878685000e7000018a4642400e8000030695a5000e90000306a595000ea0000306a595200eb0000306a585200ec0000497a400000ed0000487a410000ee00004a79420000ef00004a78420000f00000304a4b3d00f100007a090a7100f2000030494a3000f30000304a493000f40000304a493200f5000032494a3100f60000304a483200f700101054101000f800007068583800f900003841427800fa00003842417800fb00003842417a00fc00003842407a00fd0000b84241f800fe0000ff24241800ff00005ca1a07d000001601915196000010100304a4a7a000201611a16196000030100314a4a790004013c0a094abc00050100182464bc000601003846452800070100304a4948000801003846452a00090100304a494a000a010038444528000b010030484a48000c010038454629000d010030494a49000e01007c454639000f0100314a497e001001087e4a423c00110130484c7e04001201007d55554500130100326a5a52001401007d56564500150100316a5a51001601007c55544400170100306a5850001801003f65a521001901001874ac28001a01007c555645001b010030695a51001c010038465536001d0100304a49f2001e010039465635001f0100314a4af100200100384455340021010018a4a578002201001ea1691a0023010018a6a578002401007812117a0025017e080a7102002601047e147e04002701047e0c08700028010002457e450029010002497a41002a0100457d4500002b01004a7a4200002c0100014a7a49002d0100014a7a41002e0100217fa100002f0100247da00000300100447d440000310100487840000032017e0022423e0033013d0040847d0034012040463d0600350100800af90200360100bf440a3100370100bf4814200038010078102848003901007c404241003a0100467d4000003b01003fa06020003c0100a17f2000003d01007c414241003e0100457e4100003f01007e40484000400100427e4008004101107e48404000420100527e4800004301007c0a117c00440100780a097000450100bf42043f00460100bc440438004701007c09127d00480100790a09700049010a06780870004a01003f02847f004b01003c048478004c013945454539004d0100324a4a32004e013946464639004f0100314a4a310050013a4544463900510132494832010052013c427e4a420053013048306850005401007c163548005501007812091000560100bf49093600570100bc480408005801007d1635480059010079120910005a010048565524005b0100505a6928005c010048565526005d0100505a692a005e010012a56912005f010028ac741400600100485556250061010050596a290062010101bf410100630100049f641000640104057e050400650100083d4a2100660102127e120200670100183e5820006801003a414239006901003a414279006a01003d41413d006b01003a42427a006c010039424239006d010039424279006e01003a45453a006f01003a45457a0070013a41403a010071013a41407a01007201001f60a01f007301001c60a03c00740178221122780075013842314238007601081261120800770100b84241fa00780104097009040079010064564d44007a0100486a5948007b010064544d44007c010048685a48007d010064554e45007e010048695a49007f0100087c0204008f01003452523c00920100887e090200a0013c42423c0806a101003048483008af01003e403e0806b001003840781008b501006a5a4a4e00b601005878585800d101003845463900d2010030494a3100e601003845563500e7010030494af100fa0100742a750000fb0100304c4a7d00fc0178147e554400fd0130487a695000fe010078744e3d00ff0100706a59380018020012a569120019020028ac7414001a020101bf4101001b0200049f641000bb0200000c0a0000bc0200000a060000bd020000060a0000c602000201020000c702000102010000c902000202020000d802000102020100d902000002000000da02000205020000db02000040800000dc02000201020100dd02020100020100740300000201000075030000804000007a030000c08000007e03000096760000840300000300000085030200030002008603037c12127c008703000010000000880303007e4a4200890303007e087e008a030300427e42008c03033c42423c008e0303000e700e008f03035c62625c00900302003b400200910378141214780092037e4a4a4a34009303007e0202020094036058465860009503007e4a4a420096030062524a46009703007e08087e0098033c4a4a4a3c00990300427e4200009a03007e081462009b036018061860009c037e0418047e009d03007e04087e009e0300424a4a42009f033c4242423c00a003007e02027e00a103007e12120c00a30300665a424200a40302027e020200a503060870080600a60318247e241800a703422418244200a8030e107e100e00a9035c6202625c00aa0300457c450000ab03040970090400ac030030484a7900ad030030685a5100ae0378100a09f000af03003a41200000b0033a4043403a00b103003048487800b20300fe25251a00b3030c30c0300c00b403344a4a4a3000b503003068585000b603021aa6a24200b7033c080404f800b803003c4a4a3c00b903003840200000ba03007820504800bb03641212227c00bc03fc2020103c00bd03182040201800be03112d2ba94100bf03003048483000c003087808780800c103f82424241800c2031824a4a44800c303304848582800c403000838482800c503384040403800c6031c20f8241800c703c4281028c400c8031c20fc201c00c903304820483000ca03000238422000cb03384240423800cc0330484a493000cd03384042413800ce03304822493000d0033c52525c2000d10310344a3c0800d203067804020400d303120a7c020400d4030d7009040800d5031824ff241800d603384828483800d70348302221d800da031c2221a14200db031824a4a44200dc037e1212020200dd0300fc24240400de033e2010087c00df030c0ac9281800e003700c621c7000e10301092516f800e2039ea0bea07e00e30398a0b8a07800e4030c1214107e00e503001028207800e603be9088887000e70348544e443800e803245252524c00e903285454544800ea0364524c526400eb03086458640800ec03385454542200ed03306848682400ee03184a7e4a1800ef031848ff0a0800f003483020205800f10378a4a4a49800f203304848485000f303006080847d00f4033c4a4a4a3c00f5030030585848000004007c555644000104007c55544500020401013f8579000304007c0605040004043c4a4a422400050400244a522400060400427e420000070400457c45000008042040423e020009047c027e4830000a047e087e4830000b0402027e0a72000c04007c102a45000d047c2112087c000e040c5152523d000f043f20e0203f00100478141214780011047e4a4a4a300012047e4a4a4a34001304007e020202001404c07c427ec0001504007e4a4a4200160476087e087600170424424a4a34001804007e08047e001904007d120a7d001a04007e081462001b04403c02027e001c047e0418047e001d04007e08087e001e043c4242423c001f047e0202027e002004007e12120c002104003c42422400220402027e02020023040e5050503e00240418247e241800250442241824420026043f2020bf600027040e1010107e0028047e407e407e0029043f203fa07f002a04027e484830002b047e4848307e002c04007e484830002d0424424a4a3c002e047e183c423c002f04006c12127e0030043048487840003104003c4a4a3100320400786850200033040078080808003404c0704878c000350430686850000036044830783048003704004058683000380478402010780039047942221279003a040078203048003b044030080878003c047810201078003d047810101078003e043048484830003f047808080878004004fc24242418004104304848485000420408087808080043041ca0a0a07c0044041824ff241800450400483030480046043c2020bc60004704182020207800480478407840780049043c203ca07c004a040878505020004b047850502078004c040078505020004d044858683000004e047830304830004f0450282878000050040030696a500051040032686a50005204023f0a887000530400780a09080054040030685848005504005058682800560400487a4000005704004a784200005804004080847d0059047008785020005a047810785020005b04047e141060005c040078223148005d047841221078005e0418a1a2a279005f043c20e0203c006204027f4a4830006304087e5850200070040e107e100e00710418207820180072043c4a4a4a3c0073043068586830007404001e70180c0075040018603010009004007e020203009104007808080c009204087e0a0a0200930420782808080096043b043f043be0970424183c1824c09a04003f040a31c09b04003c101824c0ae04060870080600af040c10e0100c00b004161870181600b1042c30e0302c00b20421120c1221c0b3040024181824c0ba047e0808087000bb04007e08087000d804003452523c00d904002868583000e20400457d450000e304004a7a420000e8043c4a4a4a3c00e904003058583000ee04003d41413d00ef04003a42427a00d005681020285000d105484848784000d205004830600000d305080808780800d405680808087800d505000008780000d605080818680800d705087808087800d805784050487800d905000008180000da0504040404fc00db05484848483800dc050e4848281800dd05087848487800de05582010487000df05000004fc0000e005004040487800e105000878483800e205487840281800e305041c0404fc00e405485848483800e50504f820140800e605485060685000e705f40424241c00e805080808087000e905785058403800ea05487808087800f005087800087800f105081800087800f205081800081800f305000010080000f405100800100800021e7c5455542800031e007e484930000a1e007c454438000b1e003049487e001e1e007c151404001f1e001079140800401e7e0419047e00411e780832087000561e007c15140800571e00fc25241800601e004854552400611e0050586a28006a1e04047d0404006b1e00083d482000801e7c2112207c00811e384132403800821e7c2012217c00831e384032413800841e7c2110217c00851e384230423800f21e040972080400f31e00b84142f800a3207e0a7a120a00a420a8fcaa828400a720087e2a1c0800ab200098a4a6bf02ac20183c5a5a4200af20627f224438009021103854101000912108047e0408009221101054381000932110207e201000942110381010381095212844fe442800") -const _hex281849 = pxsim.BufferMethods.createBufferFromHex("20000000000000000000000000000000000000000000000000002100000000000006fc0000000000000000000000000000000000220000001c00000000001c0000000000000000000000000000002300a000f807a000f807a00000000000000000000000000000002400000018022404460c8803000000000000000000000000000025003802c4017800200390040803000000000000000000000000260080037804a4041803800340040000000000000000000000002700000000001c00000000000000000000000000000000000000280000000000f8010606010800000000000000000000000000002900000001080606f801000000000000000000000000000000002a00040014000e001400040000000000000000000000000000002b0040004000f8034000400000000000000000000000000000002c000000000000090006000000000000000000000000000000002d000000800080008000000000000000000000000000000000002e000000000000060000000000000000000000000000000000002f00000c800360001c000300000000000000000000000000000030000000f80304040404f80300000000000000000000000000003100000004040404fc07000400040000000000000000000000003200000008060405c4043804000000000000000000000000000033000000080244044404b803000000000000000000000000000034000000800170010801fc070001000000000000000000000000350000023c0424042404c403000000000000000000000000000036000000f0034804440488030000000000000000000000000000370000000400c40734000c00000000000000000000000000000038000000b80344044404b803000000000000000000000000000039000000780284048802f00100000000000000000000000000003a000000000030060000000000000000000000000000000000003b000000000018090006000000000000000000000000000000003c004000a000a000a000100100000000000000000000000000003d002001200120012001200100000000000000000000000000003e0000001001a000a000a00040000000000000000000000000003f000000080084066400180000000000000000000000000000004000f0030c04c20822092409f80900000000000000000000000041000007f8008400f8000007000000000000000000000000000042000000fc0744044404b803000000000000000000000000000043000000f001080204040404080200000000000000000000000044000000fc0704040802f001000000000000000000000000000045000000fc07440444044404000000000000000000000000000046000000fc07440044004400000000000000000000000000000047000000f00108024404c803000000000000000000000000000048000000fc0740004000fc070000000000000000000000000000490000000404fc070404040400000000000000000000000000004a000000000200040004fc0300000000000000000000000000004b000000fc074000f0000c0304040000000000000000000000004c000000fc0700040004000400000000000000000000000000004d000000fc0738007000fc0700000000000000000000000000004e000000fc073800c003fc0700000000000000000000000000004f000000f80304040404f803000000000000000000000000000050000000fc07840084004400780000000000000000000000000051000000fc0102020206fc09000000000000000000000000000052000000fc074400c4013806000000000000000000000000000053000000180224044404880300000000000000000000000000005400000004000400fc070400040000000000000000000000000055000000fc0300040004fc03000000000000000000000000000056000c00f0030004f0030c00000000000000000000000000000057007c008007e001f0010007fc0000000000000000000000000058000404b8034000b80304040000000000000000000000000000590004003800c00730000c0000000000000000000000000000005a0004040407e4041c04040400000000000000000000000000005b0000000000ff0f0108010800000000000000000000000000005c0003001c0060008003000c00000000000000000000000000005d00000001080108ff0f000000000000000000000000000000005e004000380004003800400000000000000000000000000000005f00000800080008000800080000000000000000000000000000600000000000020004000000000000000000000000000000000061000000200390049004e007000000000000000000000000000062000000fc0710041004e003000000000000000000000000000063000000c001200210043004000200000000000000000000000064000000e00310041004fc07000000000000000000000000000065000000e00390049004e0040000000000000000000000000000660000001000f80714001400000000000000000000000000000067000000b806440944093c09040600000000000000000000000068000000fc0710001000e0070000000000000000000000000000690000000000f4070000000000000000000000000000000000006a00000800080008fd07000000000000000000000000000000006b000000fe078000e001100610040000000000000000000000006c0000000000fc030004000400000000000000000000000000006d00f00710001000e0071000e0070000000000000000000000006e000000f00710001000e00700000000000000000000000000006f000000e00310041004e003000000000000000000000000000070000000fc0f04010401f800000000000000000000000000000071000000f80004010401fc0f000000000000000000000000000072000000f00720001000100000000000000000000000000000007300000060029004900420030000000000000000000000000000740000001000fc0310041004000000000000000000000000000075000000f00300040004f007000000000000000000000000000076003000c0030004c003300000000000000000000000000000007700f0000007e003c0010007f000000000000000000000000000780010046003800060031004000000000000000000000000000079000c0870088007f0000c0000000000000000000000000000007a000000000410079004700410040000000000000000000000007b0000004000be070108010800000000000000000000000000007c0000000000ff0f0000000000000000000000000000000000007d00000001080108be07400000000000000000000000000000007e00800040004000800080004000000000000000000000000000") -const _hex284497 = pxsim.BufferMethods.createBufferFromHex("20000000000000002100001700000000220000030003000023000a1f0a1f0a0024000a17151d0a00250013090412190026000a15150a100027000003000000002800000e11000000290000110e0000002a00000a040a00002b0000040e0400002c000010080000002d000004040400002e000008000000002f0010080402010030000e11110e0000310000121f100000320019151512000033000911150b000034000c0a091f080035001715151509003600081416150800370011090503010038000a1515150a00390002150d0502003a00000a000000003b0000100a0000003c0000040a1100003d00000a0a0a00003e0000110a0400003f0002011505020040000e1115090e0041001e05051e000042001f15150a000043000e111111000044001f11110e000045001f151511000046001f050501000047000e1111150c0048001f04041f00004900111f110000004a000911110f01004b001f040a1100004c001f10101000004d001f0204021f004e001f0204081f004f000e11110e000050001f0505020000510006091916000052001f05050a10005300121515090000540001011f01010055000f10100f0000560007081008070057001f0804081f0058001b04041b0000590001021c0201005a001915131100005b00001f111100005c000102040810005d000011111f00005e000002010200005f00101010101000600000010200000061000c12121e100062001f141408000063000c121212000064000814141f000065000e15151200006600041e0501000067000215150f000068001f04041800006900001d000000006a000010100d00006b001f040a1000006c00000f101000006d001e0204021e006e001e02021c00006f000c12120c000070001e0a0a0400007100040a0a1e000072001c0202020000730010140a0200007400000f1414100075000e10101e1000760006081008060077001e1008101e007800120c0c12000079001214080402007a00121a161200007b0000041f1100007c00001f000000007d00111f040000007e00000404080800d3000c1213130c00f3000c12130d000004010e05051e100005010609191f080006010c121313120007010c121313000018010f0b1b19000019010e151d1a000041011f14121000004201100f1412000043011f0205081f0044011e03031c00005a0110140b0302005b0110140b0300007901121a171300007a01121a171300007b01121b171200007c01121b17120000") -const _hex276464 = pxsim.BufferMethods.createBufferFromHex("000000ffffffff2121ff93c4ff8135fff609249ca378dc52003fad87f2ff8e2ec4a4839f5c406ce5cdc491463d000000") -const _hex276779 = pxsim.BufferMethods.createBufferFromHex("870407000800000000000000404400005055040450555505505501011011000000000000") -const _hex276782 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000050050000000000000550000000005045444404000000455544444400040045555555550404004555555555450500455555555511050045555555150101004555111111000100501511110100000000000550000000000000500500000000000000000000000000000000000000") -const _hex276785 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000000000000006666666666060060ffffff666f660060fffffff6ff660060fff1ff666f660060fff1ff6666660060fffff16666660060fffff16666660060fff1ff6666660060fff1ff66f6660060ffffff6666660060fffffff6666600006666666666060000000000000000000000000000000000") -const _hex277081 = pxsim.BufferMethods.createBufferFromHex("8704240024000000001111111111111111111111111111111100000010313333333333333333333333333333130100001113111111111111111111111111111131110000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000111311111111111111111111111111113111000010313333333333333333333333333333130100000011111111111111111111111111111111000000") -const _hex277083 = pxsim.BufferMethods.createBufferFromHex("8704240024000000002222222222222222222222222222222200000020323333333333333333333333333333230200002223222222222222222222222222222232220000322211111111111111111111111111112223000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003222111111111111111111111111111122230000222322222222222222222222222222223222000020323333333333333333333333333333230200000022222222222222222222222222222222000000") -const _hex277085 = pxsim.BufferMethods.createBufferFromHex("8704240024000000004444444444444444444444444444444400000040343333333333333333333333333333430400004443444444444444444444444444444434440000344411111111111111111111111111114443000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003444111111111111111111111111111144430000444344444444444444444444444444443444000040343333333333333333333333333333430400000044444444444444444444444444444444000000") -const _hex277087 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d00000000000000000000000070666607000000000000000000000000006776000000000000000000000000660700007066000000000000000000006766777766760000000000000000000060666666660600000000000000000066006766667600660000000000000000667600000000676600000000000000006766767777676676000000000000000060666666666666060000000000000000006766666666760000000000000000000000676666760000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277089 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0bb000000000000000000000000b000404500b0000000000000000000005b0b000400540b0000000000000000b0550400000054b5000000000000000000440040bb0040040000000000000000000040d4ddbb0000000000000000000000004055ddbd000000000000000000004b005455d5dd0b400b000000000000005b045411d5dd0b540b000000000000004b005411d5dd0b400b0000000000000000004055ddbd00000000000000000000000040d4ddbb0000000000000000000000440040bb0040040000000000000000b0550400000054b50000000000000000005b04000400540b000000000000000000b000404500b0000000000000000000000000b0bb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277091 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020020000000000002002000000000000202200000000000022020000000000000022020000000020220000000000000000202200000000220200000000000000000022020000202200000000000000000000202200002202000000000000000000000022022022000000000000000000000000202222020000000000000000000000000022220000000000000000000000000000222200000000000000000000000000202222020000000000000000000000002202202200000000000000000000002022000022020000000000000000000022020000202200000000000000000020220000000022020000000000000000220200000000202200000000000000202200000000000022020000000000002002000000000000200200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277093 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d0000000000000000000000007066660700000000000000000000000000677600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277095 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0cbcc0c0000000000000000000000b0db55d5cd0c00000000000000000000db555555ddcd000000000000000000b055555555d59d0b0000000000000000db55555555d59db900000000000000005b55555555d5ddb900000000000000b05db5cccc5bdddd990b000000000000b055ccccccccdddd9d0b000000000000b0b5ccccccccdbdd9d0b000000000000b0c5ccccccccdcdd9d0b000000000000b0c5ccdccbccdcdd9d0c000000000000b0cdcc5b55ccdcdd9d0c00000000000000ccdc55b5ccdcddc90000000000000000cccc5b55ccdbddc90000000000000000c0ccdccbccdd9d0c000000000000000000ccccccdbddcd00000000000000000000c0dcddddcd0c0000000000000000000000c0cccc0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277097 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc00000000000000b0bbbbbbbbcb00c0cd000000000000001bddddddddbd0c1ccd000000000000b011cbccccccbc0c1ccd000000000000b01d6c666666bc0cbccd000000000000b01d6c616661bc0c1ccd000000000000b01d6c161666bccc1bcd000000000000b01d6c666166bcccbbcd000000000000b01d6c666666bccc1bcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666661bcccbbcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666666bc0c1ccd000000000000b01dcbccccccbc0cbccd000000000000c0b1bbbbbbbbbb0cdccb000000000000c0bbbbbbbbbbcb00dc0c00000000000000cccccccccc0c00cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277099 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004004000000000000000000000000000054450000000000000000000000440b00bbbb00b0440000000000000040550b00000000b0550400000000000040b5000044bb00005b04000000000000b00b0044ddddbb00b00b0000000000000000405d55d5dd0b00000000000000000000d4555555ddbd0000000000000000000054555555d5bd0000000000000000b44055555555d5dd0b4b000000000040b54055555555d5dd0b5b040000000040b54055555555d5dd0b5b040000000000b44055115555d5dd0b4b000000000000000054115555d5bd00000000000000000000d4555555ddbd00000000000000000000405d55d5dd0b0000000000000000b00b0044ddddbb00b00b00000000000040b5000044bb00005b0400000000000040550b00000000b0550400000000000000440b00bbbb00b0440000000000000000000000544500000000000000000000000000004004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex277101 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbbb00000000000000000000000000b055bb00bbbbbb000000000000000000b0b5bdbcbbbbddcb0000000000000000b0dbcb5b5555bbdd0c00000000000000b0cbdcbdbb5b55dbcd0000000000000000c0dddb11d15bb5bd0c00000000000000bbbd111111b155bb0c00000000000000db1b111111115bb5cb00000000000000db1bb11d1199b9d5cb00000000000000db1b11bb9199b955cb000000000000005b1b11b19b99995bcb000000000000005b1d1111bb99995ccb00000000000000b0b511bbbb99995ccb00000000000000b0d51d919999d95b0b00000000000000005bdb919999c9d50b0000000000000000b0d51b99d9bcb5000000000000000000005bd5bbbc550b00000000000000000000b05b5555bd000000000000000000000000b0bbbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex28270 = pxsim.BufferMethods.createBufferFromHex("2000000000000000210000005e0000002200000e000e0000230028fe28fe280024004c92ff926400250002651248a64026006c92926ca000270000000e000000280000007c82000029000000827c00002a005438103854002b0010107c1010002c000000907000002d001010101010002e000000606000002f000060100806003000003c42423c00310000447e4000003200004462524c00330000424a4e320034003028247e20003500004e4a4a32003600003c4a4a30003700000262120e00380000344a4a34003900000c52523c003a0000006c6c00003b000000967600003c001028284444003d002828282828003e004444282810003f0000025909060040003c425a560800410078141214780042007e4a4a4a34004300003c424224004400007e42423c004500007e4a4a42004600007e0a0a02004700003c425234004800007e08087e00490000427e4200004a002040423e02004b00007e081462004c00007e404040004d007e0418047e004e00007e04087e004f003c4242423c005000007e12120c005100003c5262bc005200007e12126c00530000244a522400540002027e0202005500003e40403e005600001e70701e0057007e2018207e00580042241824420059000608700806005a000062524a46005b00007e424200005c000006081060005d000042427e00005e000804020408005f00808080808000600000000204000061000030484878006200007e4848300063000030484848006400003048487e006500003068585000660000107c12040067000018a4a478006800007e08087000690000487a4000006a000040847d00006b00007e102840006c0000427e4000006d007808300870006e000078080870006f00003048483000700000fc24241800710000182424fc0072000078100810007300005058682800740000083e48200075000038404078007600001860601800770038403040380078000048303048007900005ca0a07c007a000048685848007b000008364100007c000000fe0000007d000041360800007e00000804080400a000000000000000a10000007a000000a200003048fc4800a30090fc92928400a400542844285400a5002a2c782c2a00a6000000ee000000a7000094aaaa5200a800000200020000a9003e414955413eaa0000242a2e0000ab00102854284400ac00001010107000ad00001010101000ae003e415d45413eaf00000202020200b000000814140800b1008888be888800b2000024322c0000b30000222a140000b400000004020000b50000f840207800b6000c1e7e027e00b700000010000000b800000080400000b90000243e200000ba0000242a240000bb00442854281000bc00025f70f84000bd00021f90c8b000be0011557af84000bf000030484d2000c000601916186000c100601816196000c200601a151a6000c300601a151a6100c400601914196000c500601a151a6000c6007c0a7e4a4200c700001ea1611200c800007c55564400c900007c56554400ca00007c56554600cb00007c55544500cc0000457e440000cd0000447e450000ce0000467d460000cf0000457c450000d000087e4a423c00d100007e09127d00d200003845463800d300003846453800d400003846453a00d500003a45463900d600003845443900d700442810284400d80000fc724e3f00d900003c41423c00da00003c42413c00db00003c42413e00dc00003c41403d00dd00040872090400de00007e24241800df00007c025a2400e0000030494a7800e10000304a497800e20000304a497a00e3000032494a7900e40000304a487a00e50000304a4d7a00e600304878685000e7000018a4642400e8000030695a5000e90000306a595000ea0000306a595200eb0000306a585200ec0000497a400000ed0000487a410000ee00004a79420000ef00004a78420000f00000304a4b3d00f100007a090a7100f2000030494a3000f30000304a493000f40000304a493200f5000032494a3100f60000304a483200f700101054101000f800007068583800f900003841427800fa00003842417800fb00003842417a00fc00003842407a00fd0000b84241f800fe0000ff24241800ff00005ca1a07d000001601915196000010100304a4a7a000201611a16196000030100314a4a790004013c0a094abc00050100182464bc000601003846452800070100304a4948000801003846452a00090100304a494a000a010038444528000b010030484a48000c010038454629000d010030494a49000e01007c454639000f0100314a497e001001087e4a423c00110130484c7e04001201007d55554500130100326a5a52001401007d56564500150100316a5a51001601007c55544400170100306a5850001801003f65a521001901001874ac28001a01007c555645001b010030695a51001c010038465536001d0100304a49f2001e010039465635001f0100314a4af100200100384455340021010018a4a578002201001ea1691a0023010018a6a578002401007812117a0025017e080a7102002601047e147e04002701047e0c08700028010002457e450029010002497a41002a0100457d4500002b01004a7a4200002c0100014a7a49002d0100014a7a41002e0100217fa100002f0100247da00000300100447d440000310100487840000032017e0022423e0033013d0040847d0034012040463d0600350100800af90200360100bf440a3100370100bf4814200038010078102848003901007c404241003a0100467d4000003b01003fa06020003c0100a17f2000003d01007c414241003e0100457e4100003f01007e40484000400100427e4008004101107e48404000420100527e4800004301007c0a117c00440100780a097000450100bf42043f00460100bc440438004701007c09127d00480100790a09700049010a06780870004a01003f02847f004b01003c048478004c013945454539004d0100324a4a32004e013946464639004f0100314a4a310050013a4544463900510132494832010052013c427e4a420053013048306850005401007c163548005501007812091000560100bf49093600570100bc480408005801007d1635480059010079120910005a010048565524005b0100505a6928005c010048565526005d0100505a692a005e010012a56912005f010028ac741400600100485556250061010050596a290062010101bf410100630100049f641000640104057e050400650100083d4a2100660102127e120200670100183e5820006801003a414239006901003a414279006a01003d41413d006b01003a42427a006c010039424239006d010039424279006e01003a45453a006f01003a45457a0070013a41403a010071013a41407a01007201001f60a01f007301001c60a03c00740178221122780075013842314238007601081261120800770100b84241fa00780104097009040079010064564d44007a0100486a5948007b010064544d44007c010048685a48007d010064554e45007e010048695a49007f0100087c0204008f01003452523c00920100887e090200a0013c42423c0806a101003048483008af01003e403e0806b001003840781008b501006a5a4a4e00b601005878585800d101003845463900d2010030494a3100e601003845563500e7010030494af100fa0100742a750000fb0100304c4a7d00fc0178147e554400fd0130487a695000fe010078744e3d00ff0100706a59380018020012a569120019020028ac7414001a020101bf4101001b0200049f641000bb0200000c0a0000bc0200000a060000bd020000060a0000c602000201020000c702000102010000c902000202020000d802000102020100d902000002000000da02000205020000db02000040800000dc02000201020100dd02020100020100740300000201000075030000804000007a030000c08000007e03000096760000840300000300000085030200030002008603037c12127c008703000010000000880303007e4a4200890303007e087e008a030300427e42008c03033c42423c008e0303000e700e008f03035c62625c00900302003b400200910378141214780092037e4a4a4a34009303007e0202020094036058465860009503007e4a4a420096030062524a46009703007e08087e0098033c4a4a4a3c00990300427e4200009a03007e081462009b036018061860009c037e0418047e009d03007e04087e009e0300424a4a42009f033c4242423c00a003007e02027e00a103007e12120c00a30300665a424200a40302027e020200a503060870080600a60318247e241800a703422418244200a8030e107e100e00a9035c6202625c00aa0300457c450000ab03040970090400ac030030484a7900ad030030685a5100ae0378100a09f000af03003a41200000b0033a4043403a00b103003048487800b20300fe25251a00b3030c30c0300c00b403344a4a4a3000b503003068585000b603021aa6a24200b7033c080404f800b803003c4a4a3c00b903003840200000ba03007820504800bb03641212227c00bc03fc2020103c00bd03182040201800be03112d2ba94100bf03003048483000c003087808780800c103f82424241800c2031824a4a44800c303304848582800c403000838482800c503384040403800c6031c20f8241800c703c4281028c400c8031c20fc201c00c903304820483000ca03000238422000cb03384240423800cc0330484a493000cd03384042413800ce03304822493000d0033c52525c2000d10310344a3c0800d203067804020400d303120a7c020400d4030d7009040800d5031824ff241800d603384828483800d70348302221d800da031c2221a14200db031824a4a44200dc037e1212020200dd0300fc24240400de033e2010087c00df030c0ac9281800e003700c621c7000e10301092516f800e2039ea0bea07e00e30398a0b8a07800e4030c1214107e00e503001028207800e603be9088887000e70348544e443800e803245252524c00e903285454544800ea0364524c526400eb03086458640800ec03385454542200ed03306848682400ee03184a7e4a1800ef031848ff0a0800f003483020205800f10378a4a4a49800f203304848485000f303006080847d00f4033c4a4a4a3c00f5030030585848000004007c555644000104007c55544500020401013f8579000304007c0605040004043c4a4a422400050400244a522400060400427e420000070400457c45000008042040423e020009047c027e4830000a047e087e4830000b0402027e0a72000c04007c102a45000d047c2112087c000e040c5152523d000f043f20e0203f00100478141214780011047e4a4a4a300012047e4a4a4a34001304007e020202001404c07c427ec0001504007e4a4a4200160476087e087600170424424a4a34001804007e08047e001904007d120a7d001a04007e081462001b04403c02027e001c047e0418047e001d04007e08087e001e043c4242423c001f047e0202027e002004007e12120c002104003c42422400220402027e02020023040e5050503e00240418247e241800250442241824420026043f2020bf600027040e1010107e0028047e407e407e0029043f203fa07f002a04027e484830002b047e4848307e002c04007e484830002d0424424a4a3c002e047e183c423c002f04006c12127e0030043048487840003104003c4a4a3100320400786850200033040078080808003404c0704878c000350430686850000036044830783048003704004058683000380478402010780039047942221279003a040078203048003b044030080878003c047810201078003d047810101078003e043048484830003f047808080878004004fc24242418004104304848485000420408087808080043041ca0a0a07c0044041824ff241800450400483030480046043c2020bc60004704182020207800480478407840780049043c203ca07c004a040878505020004b047850502078004c040078505020004d044858683000004e047830304830004f0450282878000050040030696a500051040032686a50005204023f0a887000530400780a09080054040030685848005504005058682800560400487a4000005704004a784200005804004080847d0059047008785020005a047810785020005b04047e141060005c040078223148005d047841221078005e0418a1a2a279005f043c20e0203c006204027f4a4830006304087e5850200070040e107e100e00710418207820180072043c4a4a4a3c0073043068586830007404001e70180c0075040018603010009004007e020203009104007808080c009204087e0a0a0200930420782808080096043b043f043be0970424183c1824c09a04003f040a31c09b04003c101824c0ae04060870080600af040c10e0100c00b004161870181600b1042c30e0302c00b20421120c1221c0b3040024181824c0ba047e0808087000bb04007e08087000d804003452523c00d904002868583000e20400457d450000e304004a7a420000e8043c4a4a4a3c00e904003058583000ee04003d41413d00ef04003a42427a00d005681020285000d105484848784000d205004830600000d305080808780800d405680808087800d505000008780000d605080818680800d705087808087800d805784050487800d905000008180000da0504040404fc00db05484848483800dc050e4848281800dd05087848487800de05582010487000df05000004fc0000e005004040487800e105000878483800e205487840281800e305041c0404fc00e405485848483800e50504f820140800e605485060685000e705f40424241c00e805080808087000e905785058403800ea05487808087800f005087800087800f105081800087800f205081800081800f305000010080000f405100800100800021e7c5455542800031e007e484930000a1e007c454438000b1e003049487e001e1e007c151404001f1e001079140800401e7e0419047e00411e780832087000561e007c15140800571e00fc25241800601e004854552400611e0050586a28006a1e04047d0404006b1e00083d482000801e7c2112207c00811e384132403800821e7c2012217c00831e384032413800841e7c2110217c00851e384230423800f21e040972080400f31e00b84142f800a3207e0a7a120a00a420a8fcaa828400a720087e2a1c0800ab200098a4a6bf02ac20183c5a5a4200af20627f224438009021103854101000912108047e0408009221101054381000932110207e201000942110381010381095212844fe442800") +const _hex28272 = pxsim.BufferMethods.createBufferFromHex("20000000000000000000000000000000000000000000000000002100000000000006fc0000000000000000000000000000000000220000001c00000000001c0000000000000000000000000000002300a000f807a000f807a00000000000000000000000000000002400000018022404460c8803000000000000000000000000000025003802c4017800200390040803000000000000000000000000260080037804a4041803800340040000000000000000000000002700000000001c00000000000000000000000000000000000000280000000000f8010606010800000000000000000000000000002900000001080606f801000000000000000000000000000000002a00040014000e001400040000000000000000000000000000002b0040004000f8034000400000000000000000000000000000002c000000000000090006000000000000000000000000000000002d000000800080008000000000000000000000000000000000002e000000000000060000000000000000000000000000000000002f00000c800360001c000300000000000000000000000000000030000000f80304040404f80300000000000000000000000000003100000004040404fc07000400040000000000000000000000003200000008060405c4043804000000000000000000000000000033000000080244044404b803000000000000000000000000000034000000800170010801fc070001000000000000000000000000350000023c0424042404c403000000000000000000000000000036000000f0034804440488030000000000000000000000000000370000000400c40734000c00000000000000000000000000000038000000b80344044404b803000000000000000000000000000039000000780284048802f00100000000000000000000000000003a000000000030060000000000000000000000000000000000003b000000000018090006000000000000000000000000000000003c004000a000a000a000100100000000000000000000000000003d002001200120012001200100000000000000000000000000003e0000001001a000a000a00040000000000000000000000000003f000000080084066400180000000000000000000000000000004000f0030c04c20822092409f80900000000000000000000000041000007f8008400f8000007000000000000000000000000000042000000fc0744044404b803000000000000000000000000000043000000f001080204040404080200000000000000000000000044000000fc0704040802f001000000000000000000000000000045000000fc07440444044404000000000000000000000000000046000000fc07440044004400000000000000000000000000000047000000f00108024404c803000000000000000000000000000048000000fc0740004000fc070000000000000000000000000000490000000404fc070404040400000000000000000000000000004a000000000200040004fc0300000000000000000000000000004b000000fc074000f0000c0304040000000000000000000000004c000000fc0700040004000400000000000000000000000000004d000000fc0738007000fc0700000000000000000000000000004e000000fc073800c003fc0700000000000000000000000000004f000000f80304040404f803000000000000000000000000000050000000fc07840084004400780000000000000000000000000051000000fc0102020206fc09000000000000000000000000000052000000fc074400c4013806000000000000000000000000000053000000180224044404880300000000000000000000000000005400000004000400fc070400040000000000000000000000000055000000fc0300040004fc03000000000000000000000000000056000c00f0030004f0030c00000000000000000000000000000057007c008007e001f0010007fc0000000000000000000000000058000404b8034000b80304040000000000000000000000000000590004003800c00730000c0000000000000000000000000000005a0004040407e4041c04040400000000000000000000000000005b0000000000ff0f0108010800000000000000000000000000005c0003001c0060008003000c00000000000000000000000000005d00000001080108ff0f000000000000000000000000000000005e004000380004003800400000000000000000000000000000005f00000800080008000800080000000000000000000000000000600000000000020004000000000000000000000000000000000061000000200390049004e007000000000000000000000000000062000000fc0710041004e003000000000000000000000000000063000000c001200210043004000200000000000000000000000064000000e00310041004fc07000000000000000000000000000065000000e00390049004e0040000000000000000000000000000660000001000f80714001400000000000000000000000000000067000000b806440944093c09040600000000000000000000000068000000fc0710001000e0070000000000000000000000000000690000000000f4070000000000000000000000000000000000006a00000800080008fd07000000000000000000000000000000006b000000fe078000e001100610040000000000000000000000006c0000000000fc030004000400000000000000000000000000006d00f00710001000e0071000e0070000000000000000000000006e000000f00710001000e00700000000000000000000000000006f000000e00310041004e003000000000000000000000000000070000000fc0f04010401f800000000000000000000000000000071000000f80004010401fc0f000000000000000000000000000072000000f00720001000100000000000000000000000000000007300000060029004900420030000000000000000000000000000740000001000fc0310041004000000000000000000000000000075000000f00300040004f007000000000000000000000000000076003000c0030004c003300000000000000000000000000000007700f0000007e003c0010007f000000000000000000000000000780010046003800060031004000000000000000000000000000079000c0870088007f0000c0000000000000000000000000000007a000000000410079004700410040000000000000000000000007b0000004000be070108010800000000000000000000000000007c0000000000ff0f0000000000000000000000000000000000007d00000001080108be07400000000000000000000000000000007e00800040004000800080004000000000000000000000000000") +const _hex31009 = pxsim.BufferMethods.createBufferFromHex("20000000000000002100001700000000220000030003000023000a1f0a1f0a0024000a17151d0a00250013090412190026000a15150a100027000003000000002800000e11000000290000110e0000002a00000a040a00002b0000040e0400002c000010080000002d000004040400002e000008000000002f0010080402010030000e11110e0000310000121f100000320019151512000033000911150b000034000c0a091f080035001715151509003600081416150800370011090503010038000a1515150a00390002150d0502003a00000a000000003b0000100a0000003c0000040a1100003d00000a0a0a00003e0000110a0400003f0002011505020040000e1115090e0041001e05051e000042001f15150a000043000e111111000044001f11110e000045001f151511000046001f050501000047000e1111150c0048001f04041f00004900111f110000004a000911110f01004b001f040a1100004c001f10101000004d001f0204021f004e001f0204081f004f000e11110e000050001f0505020000510006091916000052001f05050a10005300121515090000540001011f01010055000f10100f0000560007081008070057001f0804081f0058001b04041b0000590001021c0201005a001915131100005b00001f111100005c000102040810005d000011111f00005e000002010200005f00101010101000600000010200000061000c12121e100062001f141408000063000c121212000064000814141f000065000e15151200006600041e0501000067000215150f000068001f04041800006900001d000000006a000010100d00006b001f040a1000006c00000f101000006d001e0204021e006e001e02021c00006f000c12120c000070001e0a0a0400007100040a0a1e000072001c0202020000730010140a0200007400000f1414100075000e10101e1000760006081008060077001e1008101e007800120c0c12000079001214080402007a00121a161200007b0000041f1100007c00001f000000007d00111f040000007e00000404080800d3000c1213130c00f3000c12130d000004010e05051e100005010609191f080006010c121313120007010c121313000018010f0b1b19000019010e151d1a000041011f14121000004201100f1412000043011f0205081f0044011e03031c00005a0110140b0302005b0110140b0300007901121a171300007a01121a171300007b01121b171200007c01121b17120000") +const _hex20901 = pxsim.BufferMethods.createBufferFromHex("000000ffffffff2121ff93c4ff8135fff609249ca378dc52003fad87f2ff8e2ec4a4839f5c406ce5cdc491463d000000") +const _hex21849 = pxsim.BufferMethods.createBufferFromHex("870407000800000000000000404400005055040450555505505501011011000000000000") +const _hex21852 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000050050000000000000550000000005045444404000000455544444400040045555555550404004555555555450500455555555511050045555555150101004555111111000100501511110100000000000550000000000000500500000000000000000000000000000000000000") +const _hex21855 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000000000000006666666666060060ffffff666f660060fffffff6ff660060fff1ff666f660060fff1ff6666660060fffff16666660060fffff16666660060fff1ff6666660060fff1ff66f6660060ffffff6666660060fffffff6666600006666666666060000000000000000000000000000000000") +const _hex22256 = pxsim.BufferMethods.createBufferFromHex("8704240024000000001111111111111111111111111111111100000010313333333333333333333333333333130100001113111111111111111111111111111131110000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000111311111111111111111111111111113111000010313333333333333333333333333333130100000011111111111111111111111111111111000000") +const _hex22259 = pxsim.BufferMethods.createBufferFromHex("8704240024000000002222222222222222222222222222222200000020323333333333333333333333333333230200002223222222222222222222222222222232220000322211111111111111111111111111112223000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003222111111111111111111111111111122230000222322222222222222222222222222223222000020323333333333333333333333333333230200000022222222222222222222222222222222000000") +const _hex22262 = pxsim.BufferMethods.createBufferFromHex("8704240024000000004444444444444444444444444444444400000040343333333333333333333333333333430400004443444444444444444444444444444434440000344411111111111111111111111111114443000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003444111111111111111111111111111144430000444344444444444444444444444444443444000040343333333333333333333333333333430400000044444444444444444444444444444444000000") +const _hex22265 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d00000000000000000000000070666607000000000000000000000000006776000000000000000000000000660700007066000000000000000000006766777766760000000000000000000060666666660600000000000000000066006766667600660000000000000000667600000000676600000000000000006766767777676676000000000000000060666666666666060000000000000000006766666666760000000000000000000000676666760000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22268 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0bb000000000000000000000000b000404500b0000000000000000000005b0b000400540b0000000000000000b0550400000054b5000000000000000000440040bb0040040000000000000000000040d4ddbb0000000000000000000000004055ddbd000000000000000000004b005455d5dd0b400b000000000000005b045411d5dd0b540b000000000000004b005411d5dd0b400b0000000000000000004055ddbd00000000000000000000000040d4ddbb0000000000000000000000440040bb0040040000000000000000b0550400000054b50000000000000000005b04000400540b000000000000000000b000404500b0000000000000000000000000b0bb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22271 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020020000000000002002000000000000202200000000000022020000000000000022020000000020220000000000000000202200000000220200000000000000000022020000202200000000000000000000202200002202000000000000000000000022022022000000000000000000000000202222020000000000000000000000000022220000000000000000000000000000222200000000000000000000000000202222020000000000000000000000002202202200000000000000000000002022000022020000000000000000000022020000202200000000000000000020220000000022020000000000000000220200000000202200000000000000202200000000000022020000000000002002000000000000200200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22274 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d0000000000000000000000007066660700000000000000000000000000677600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22277 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0cbcc0c0000000000000000000000b0db55d5cd0c00000000000000000000db555555ddcd000000000000000000b055555555d59d0b0000000000000000db55555555d59db900000000000000005b55555555d5ddb900000000000000b05db5cccc5bdddd990b000000000000b055ccccccccdddd9d0b000000000000b0b5ccccccccdbdd9d0b000000000000b0c5ccccccccdcdd9d0b000000000000b0c5ccdccbccdcdd9d0c000000000000b0cdcc5b55ccdcdd9d0c00000000000000ccdc55b5ccdcddc90000000000000000cccc5b55ccdbddc90000000000000000c0ccdccbccdd9d0c000000000000000000ccccccdbddcd00000000000000000000c0dcddddcd0c0000000000000000000000c0cccc0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22280 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc00000000000000b0bbbbbbbbcb00c0cd000000000000001bddddddddbd0c1ccd000000000000b011cbccccccbc0c1ccd000000000000b01d6c666666bc0cbccd000000000000b01d6c616661bc0c1ccd000000000000b01d6c161666bccc1bcd000000000000b01d6c666166bcccbbcd000000000000b01d6c666666bccc1bcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666661bcccbbcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666666bc0c1ccd000000000000b01dcbccccccbc0cbccd000000000000c0b1bbbbbbbbbb0cdccb000000000000c0bbbbbbbbbbcb00dc0c00000000000000cccccccccc0c00cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22283 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004004000000000000000000000000000054450000000000000000000000440b00bbbb00b0440000000000000040550b00000000b0550400000000000040b5000044bb00005b04000000000000b00b0044ddddbb00b00b0000000000000000405d55d5dd0b00000000000000000000d4555555ddbd0000000000000000000054555555d5bd0000000000000000b44055555555d5dd0b4b000000000040b54055555555d5dd0b5b040000000040b54055555555d5dd0b5b040000000000b44055115555d5dd0b4b000000000000000054115555d5bd00000000000000000000d4555555ddbd00000000000000000000405d55d5dd0b0000000000000000b00b0044ddddbb00b00b00000000000040b5000044bb00005b0400000000000040550b00000000b0550400000000000000440b00bbbb00b0440000000000000000000000544500000000000000000000000000004004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex22286 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbbb00000000000000000000000000b055bb00bbbbbb000000000000000000b0b5bdbcbbbbddcb0000000000000000b0dbcb5b5555bbdd0c00000000000000b0cbdcbdbb5b55dbcd0000000000000000c0dddb11d15bb5bd0c00000000000000bbbd111111b155bb0c00000000000000db1b111111115bb5cb00000000000000db1bb11d1199b9d5cb00000000000000db1b11bb9199b955cb000000000000005b1b11b19b99995bcb000000000000005b1d1111bb99995ccb00000000000000b0b511bbbb99995ccb00000000000000b0d51d919999d95b0b00000000000000005bdb919999c9d50b0000000000000000b0d51b99d9bcb5000000000000000000005bd5bbbc550b00000000000000000000b05b5555bd000000000000000000000000b0bbbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -function control___screen_inline__P276453(s) { +function control___screen_inline__P20875(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1246,23 +882,23 @@ switch (step) { case 1: r0 = pxsim_numops_toBoolDecr(true); if (!r0) { step = 4; continue; } - globals.__updated___276450 = (false); - s.tmp_0 = pause__P272229_mk(s); + globals.__updated___20870 = (false); + s.tmp_0 = pause__P20415_mk(s); s.tmp_0.arg0 = 200; s.callLocIdx = 2; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals.__updated___276450); + r0 = pxsim_numops_toBoolDecr(globals.__updated___20870); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 2; continue; } - s.tmp_2 = control___screen_update__P273810_mk(s); + s.tmp_2 = control___screen_update__P20871_mk(s); s.callLocIdx = 3; s.pc = 6; return s.tmp_2; case 6: r0 = s.retval; - globals.__updated___276450 = (true); + globals.__updated___20870 = (true); case 2: case 3: { step = 1; continue; } @@ -1271,12 +907,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -control___screen_inline__P276453.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"inline","argumentNames":[]} +control___screen_inline__P20875.info = {"start":396,"length":211,"line":17,"column":26,"endLine":26,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"inline","argumentNames":[]} -function control___screen_inline__P276453_mk(s) { +function control___screen_inline__P20875_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_inline__P276453, depth: s.depth + 1, + parent: s, fn: control___screen_inline__P20875, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1287,7 +923,7 @@ function control___screen_inline__P276453_mk(s) { -function _screen_internal_inline__P276473(s) { +function _screen_internal_inline__P20913(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1297,17 +933,17 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.updateScreen(globals.screen___273849); + r0 = pxsim_pxtcore.updateScreen(globals.screen___20904); r0 = undefined; return leave(s, r0) default: oops() } } } -_screen_internal_inline__P276473.info = {"start":1122,"length":26,"line":32,"column":33,"endLine":32,"endColumn":59,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"inline","argumentNames":[]} +_screen_internal_inline__P20913.info = {"start":1122,"length":26,"line":32,"column":33,"endLine":32,"endColumn":59,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"inline","argumentNames":[]} -function _screen_internal_inline__P276473_mk(s) { +function _screen_internal_inline__P20913_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_inline__P276473, depth: s.depth + 1, + parent: s, fn: _screen_internal_inline__P20913, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, } } @@ -1315,7 +951,7 @@ function _screen_internal_inline__P276473_mk(s) { -function _screen_internal_inline__P276478(s) { +function _screen_internal_inline__P20918(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1334,12 +970,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -_screen_internal_inline__P276478.info = {"start":1185,"length":56,"line":33,"column":35,"endLine":35,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"inline","argumentNames":["msg"]} +_screen_internal_inline__P20918.info = {"start":1185,"length":56,"line":33,"column":35,"endLine":35,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"inline","argumentNames":["msg"]} -function _screen_internal_inline__P276478_mk(s) { +function _screen_internal_inline__P20918_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_inline__P276478, depth: s.depth + 1, + parent: s, fn: _screen_internal_inline__P20918, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -1348,7 +984,7 @@ function _screen_internal_inline__P276478_mk(s) { -function controller_inline__P276523(s) { +function controller_inline__P21021(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1358,16 +994,16 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.stateWhenPushed___276524 = undefined; - s.i___276530 = undefined; - s.p___276536 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); + s.stateWhenPushed___21022 = undefined; + s.i___21037 = undefined; + s.p___21044 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); s.callLocIdx = 19; s.pc = 12; return s.tmp_0; case 12: r0 = s.retval; r0 = r0.fields["controllerConnectionState"]; - s.stateWhenPushed___276524 = (r0); - r0 = pxsim_numops_toBoolDecr(s.stateWhenPushed___276524); + s.stateWhenPushed___21022 = (r0); + r0 = pxsim_numops_toBoolDecr(s.stateWhenPushed___21022); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -1376,24 +1012,24 @@ switch (step) { { step = 11; continue; } case 1: case 2: - s.i___276530 = (0); + s.i___21037 = (0); case 3: - s.tmp_1 = r0 = s.i___276530; - r0 = pxsim_Array__length(s.stateWhenPushed___276524); + s.tmp_1 = r0 = s.i___21037; + r0 = pxsim_Array__length(s.stateWhenPushed___21022); s.tmp_2 = r0; r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(globals._players___276521, s.i___276530); - s.p___276536 = (r0); - s.tmp_0 = r0 = s.p___276536; + r0 = pxsim_Array__getAt(globals._players___21018, s.i___21037); + s.p___21044 = (r0); + s.tmp_0 = r0 = s.p___21044; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 4; continue; } r0 = s.tmp_0; { step = 5; continue; } case 4: - r0 = pxsim_Array__getAt(s.stateWhenPushed___276524, s.i___276530); + r0 = pxsim_Array__getAt(s.stateWhenPushed___21022, s.i___21037); s.tmp_5 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_5); s.tmp_4 = r0; @@ -1403,7 +1039,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = s.p___276536.fields["_connected"]; + r0 = s.p___21044.fields["_connected"]; s.tmp_10 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_10); s.tmp_9 = r0; @@ -1419,7 +1055,7 @@ switch (step) { s.tmp_11 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_11); if (!r0) { step = 8; continue; } - r0 = s.p___276536.fields["_connected"]; + r0 = s.p___21044.fields["_connected"]; s.tmp_12 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_12); if (!r0) { step = 6; continue; } @@ -1430,13 +1066,13 @@ switch (step) { case 7: // jmp value (already in r0) s.tmp_13 = r0; - r0 = s.p___276536.fields["_id"]; + r0 = s.p___21044.fields["_id"]; s.tmp_14 = r0; r0 = pxsim.control.raiseEvent(s.tmp_14, s.tmp_13); case 8: case 9: - r0 = (s.i___276530 + 1); - s.i___276530 = (r0); + r0 = (s.i___21037 + 1); + s.i___21037 = (r0); { step = 3; continue; } case 10: case 11: @@ -1444,12 +1080,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_inline__P276523.info = {"start":344,"length":582,"line":15,"column":28,"endLine":30,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":[]} +controller_inline__P21021.info = {"start":344,"length":582,"line":15,"column":28,"endLine":30,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":[]} -function controller_inline__P276523_mk(s) { +function controller_inline__P21021_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_inline__P276523, depth: s.depth + 1, + parent: s, fn: controller_inline__P21021, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1466,16 +1102,16 @@ function controller_inline__P276523_mk(s) { tmp_12: undefined, tmp_13: undefined, tmp_14: undefined, - stateWhenPushed___276524: undefined, - i___276530: undefined, - p___276536: undefined, + stateWhenPushed___21022: undefined, + i___21037: undefined, + p___21044: undefined, } } -function controller_inline__P276563(s) { +function controller_inline__P21076(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1485,7 +1121,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___276568 = undefined; + s.i___21081 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; @@ -1494,43 +1130,43 @@ switch (step) { r0 = pxsim_Array__mk(); s.tmp_1 = r0; r0 = (s.tmp_0).fields["controllerConnectionState"] = (s.tmp_1); - s.i___276568 = (0); + s.i___21081 = (0); case 1: - s.tmp_1 = r0 = s.i___276568; - r0 = pxsim_Array__length(globals._players___276521); + s.tmp_1 = r0 = s.i___21081; + r0 = pxsim_Array__length(globals._players___21018); s.tmp_2 = r0; r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(globals._players___276521, s.i___276568); + r0 = pxsim_Array__getAt(globals._players___21018, s.i___21081); s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 2; continue; } r0 = s.arg0.fields["controllerConnectionState"]; s.tmp_4 = r0; - s.tmp_5 = r0 = s.i___276568; - r0 = pxsim_Array__getAt(globals._players___276521, s.i___276568); + s.tmp_5 = r0 = s.i___21081; + r0 = pxsim_Array__getAt(globals._players___21018, s.i___21081); s.tmp_7 = r0; r0 = s.tmp_7.fields["_connected"]; s.tmp_6 = r0; r0 = pxsim_Array_.setAt(s.tmp_4, s.tmp_5, s.tmp_6); case 2: case 3: - r0 = (s.i___276568 + 1); - s.i___276568 = (r0); + r0 = (s.i___21081 + 1); + s.i___21081 = (r0); { step = 1; continue; } case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_inline__P276563.info = {"start":957,"length":254,"line":31,"column":29,"endLine":38,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["oldScene"]} +controller_inline__P21076.info = {"start":957,"length":254,"line":31,"column":29,"endLine":38,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["oldScene"]} -function controller_inline__P276563_mk(s) { +function controller_inline__P21076_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_inline__P276563, depth: s.depth + 1, + parent: s, fn: controller_inline__P21076, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1540,7 +1176,7 @@ function controller_inline__P276563_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - i___276568: undefined, + i___21081: undefined, arg0: undefined, } } @@ -1548,7 +1184,7 @@ function controller_inline__P276563_mk(s) { -function info_inline__P276674(s) { +function info_inline__P21469(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1562,36 +1198,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.infoState___276670); + r0 = pxsim_numops_toBoolDecr(globals.infoState___21465); if (!r0) { step = 3; continue; } - r0 = pxsim_numops_toBoolDecr(globals.infoStateStack___276672); + r0 = pxsim_numops_toBoolDecr(globals.infoStateStack___21467); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = pxsim_Array__mk(); - globals.infoStateStack___276672 = (r0); + globals.infoStateStack___21467 = (r0); case 1: case 2: r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "state", globals.infoState___276670); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "state", globals.infoState___21465); r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "scene", s.arg0); - r0 = pxsim_Array__push(globals.infoStateStack___276672, s.tmp_0); - globals.infoState___276670 = (undefined); + r0 = pxsim_Array__push(globals.infoStateStack___21467, s.tmp_0); + globals.infoState___21465 = (undefined); case 3: case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -info_inline__P276674.info = {"start":2619,"length":259,"line":94,"column":29,"endLine":103,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["oldScene"]} +info_inline__P21469.info = {"start":2619,"length":259,"line":94,"column":29,"endLine":103,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":["oldScene"]} -function info_inline__P276674_mk(s) { +function info_inline__P21469_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_inline__P276674, depth: s.depth + 1, + parent: s, fn: info_inline__P21469, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1602,7 +1238,7 @@ function info_inline__P276674_mk(s) { -function info_inline__P276689(s) { +function info_inline__P21485(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1612,30 +1248,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___276690 = undefined; - s.nextState___276699 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); + s.scene___21486 = undefined; + s.nextState___21495 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); s.callLocIdx = 32; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; - s.scene___276690 = (r0); - globals.infoState___276670 = (undefined); - s.tmp_0 = r0 = globals.infoStateStack___276672; + s.scene___21486 = (r0); + globals.infoState___21465 = (undefined); + s.tmp_0 = r0 = globals.infoStateStack___21467; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array__length(globals.infoStateStack___276672); + r0 = pxsim_Array__length(globals.infoStateStack___21467); case 2: // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 5; continue; } - r0 = pxsim_Array_.pop(globals.infoStateStack___276672); - s.nextState___276699 = (r0); + r0 = pxsim_Array_.pop(globals.infoStateStack___21467); + s.nextState___21495 = (r0); s.tmp_2 = if_scene_1_mk(s); - s.tmp_2.arg0 = s.nextState___276699; + s.tmp_2.arg0 = s.nextState___21495; if (!s.tmp_2.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "scene"); } else { @@ -1647,12 +1283,12 @@ switch (step) { case 8: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 == s.scene___276690); + r0 = (s.tmp_1 == s.scene___21486); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } s.tmp_3 = if_state_1_mk(s); - s.tmp_3.arg0 = s.nextState___276699; + s.tmp_3.arg0 = s.nextState___21495; if (!s.tmp_3.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "state"); } else { @@ -1663,10 +1299,10 @@ switch (step) { } case 9: r0 = s.retval; - globals.infoState___276670 = (r0); + globals.infoState___21465 = (r0); { step = 4; continue; } case 3: - r0 = pxsim_Array__push(globals.infoStateStack___276672, s.nextState___276699); + r0 = pxsim_Array__push(globals.infoStateStack___21467, s.nextState___21495); case 4: case 5: case 6: @@ -1674,26 +1310,26 @@ switch (step) { return leave(s, r0) default: oops() } } } -info_inline__P276689.info = {"start":2910,"length":376,"line":105,"column":28,"endLine":116,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} +info_inline__P21485.info = {"start":2910,"length":376,"line":105,"column":28,"endLine":116,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} -function info_inline__P276689_mk(s) { +function info_inline__P21485_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_inline__P276689, depth: s.depth + 1, + parent: s, fn: info_inline__P21485, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - scene___276690: undefined, - nextState___276699: undefined, + scene___21486: undefined, + nextState___21495: undefined, } } -function gameOverConfig_inline__P276798(s) { +function gameOverConfig_inline__P21903(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1703,32 +1339,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._gameOverConfig___276797); + r0 = pxsim_numops_toBoolDecr(globals._gameOverConfig___21902); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkClassInstance(game_GameOverConfig__C274790_VT); + r0 = pxsim_pxtcore_mkClassInstance(game_GameOverConfig__C21891_VT); s.tmp_2 = r0; - s.tmp_3 = game_GameOverConfig_constructor__P274805_mk(s); + s.tmp_3 = game_GameOverConfig_constructor__P21901_mk(s); s.tmp_3.arg0 = s.tmp_2; s.callLocIdx = 36; s.pc = 3; return s.tmp_3; case 3: r0 = s.retval; - globals._gameOverConfig___276797 = (s.tmp_2); + globals._gameOverConfig___21902 = (s.tmp_2); case 1: case 2: - r0 = globals._gameOverConfig___276797; + r0 = globals._gameOverConfig___21902; return leave(s, r0) default: oops() } } } -gameOverConfig_inline__P276798.info = {"start":3714,"length":115,"line":107,"column":34,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} +gameOverConfig_inline__P21903.info = {"start":3714,"length":115,"line":107,"column":34,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} -function gameOverConfig_inline__P276798_mk(s) { +function gameOverConfig_inline__P21903_mk(s) { checkStack(s.depth); return { - parent: s, fn: gameOverConfig_inline__P276798, depth: s.depth + 1, + parent: s, fn: gameOverConfig_inline__P21903, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1740,7 +1376,7 @@ function gameOverConfig_inline__P276798_mk(s) { -function areEquivalent__P315151(s) { +function game_eventContext__P21921(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1750,80 +1386,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___315159 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__length(s.arg0); - s.tmp_1 = r0; - r0 = s.arg1.fields["_byteLength"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 != s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 7; continue; } + s.tmp_0 = game_init__P21922_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1010; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.i___315159 = (0); - case 3: - s.tmp_1 = r0 = s.i___315159; - r0 = pxsim_Array__length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___315159); - s.tmp_4 = r0; - r0 = s.arg1.fields["_bytes"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.i___315159); - s.tmp_5 = r0; - r0 = (s.tmp_4 != s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 4; continue; } - r0 = false; - { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___315159 + 1); - s.i___315159 = (r0); - { step = 3; continue; } - case 6: - r0 = true; - case 7: + r0 = s.retval; + r0 = globals._scene___21911.fields["eventContext"]; return leave(s, r0) default: oops() } } } -areEquivalent__P315151.info = {"start":31,"length":267,"line":2,"column":0,"endLine":12,"endColumn":1,"fileName":"test.ts","functionName":"areEquivalent","argumentNames":["a","b"]} +game_eventContext__P21921.info = {"start":4442,"length":112,"line":136,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"eventContext","argumentNames":[]} -function areEquivalent__P315151_mk(s) { +function game_eventContext__P21921_mk(s) { checkStack(s.depth); return { - parent: s, fn: areEquivalent__P315151, depth: s.depth + 1, + parent: s, fn: game_eventContext__P21921, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - i___315159: undefined, - arg0: undefined, - arg1: undefined, } } -function ArrayBuffer_bytes__P300771(s) { +function game_init__P21922(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1837,20 +1423,59 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } + r0 = pxsim_numops_toBoolDecr(globals._scene___21911); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: r0 = s.arg0; - if (!checkSubtype(r0, ArrayBuffer__C300769_VT)) failedCast(r0); - r0 = s.arg0.fields["_bytes"]; - return leaveAccessor(s, r0) + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C21026_VT); + s.tmp_3 = r0; + s.tmp_4 = scene_Scene_constructor__P21793_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_5 = control_pushEventContext__P20410_mk(s); + s.callLocIdx = 1011; s.pc = 6; return s.tmp_5; + case 6: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.tmp_4.arg2 = globals._scene___21911; + s.callLocIdx = 1012; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + globals._scene___21911 = (s.tmp_3); + case 3: + case 4: + s.tmp_0 = scene_Scene_init__P21027_mk(s); + s.tmp_0.arg0 = globals._scene___21911; + s.callLocIdx = 1013; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArrayBuffer_bytes__P300771.info = {"start":2319,"length":63,"line":65,"column":4,"endLine":67,"endColumn":5,"fileName":"arrayBuffer.ts","functionName":"bytes","argumentNames":["this"]} -ArrayBuffer_bytes__P300771.isGetter = true; +game_init__P21922.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} -function ArrayBuffer_bytes__P300771_mk(s) { +function game_init__P21922_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArrayBuffer_bytes__P300771, depth: s.depth + 1, + parent: s, fn: game_init__P21922, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, } } @@ -1858,7 +1483,7 @@ function ArrayBuffer_bytes__P300771_mk(s) { -function ArrayBuffer_slice__P300772(s) { +function scene_Scene_constructor__P21793(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1868,13 +1493,6 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.length___300810 = undefined; - s.begin___300812 = undefined; - s.end___300816 = undefined; - s.num___300830 = undefined; - s.target___300834 = undefined; - s.targetArray___300838 = undefined; - s.sourceArray___300844 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -1882,120 +1500,101 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArrayBuffer__C300769_VT)) failedCast(r0); - r0 = s.arg0.fields["_byteLength"]; - s.length___300810 = (r0); - s.tmp_0 = ArrayBuffer_clamp__P300773_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.length___300810; - s.callLocIdx = 64; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.begin___300812 = (r0); - s.end___300816 = (s.length___300810); - r0 = (s.arg2 !== null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = ArrayBuffer_clamp__P300773_mk(s); - s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.length___300810; - s.callLocIdx = 65; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - s.end___300816 = (r0); - case 1: - case 2: - r0 = (s.begin___300812 > s.end___300816); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(ArrayBuffer__C300769_VT); - s.tmp_1 = r0; - s.tmp_2 = ArrayBuffer_constructor__P300774_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = 0; - s.callLocIdx = 66; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - r0 = s.tmp_1; - { step = 5; continue; } - case 3: - case 4: - r0 = (s.end___300816 - s.begin___300812); - s.num___300830 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(ArrayBuffer__C300769_VT); + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = (s.arg0).fields["previousScene"] = (s.arg2); + r0 = (s.arg0).fields["eventContext"] = (s.arg1); + r0 = (s.arg0).fields["flags"] = (0); + r0 = pxsim_pxtcore_mkClassInstance(ArcadePhysicsEngine__C21435_VT); s.tmp_0 = r0; - s.tmp_1 = ArrayBuffer_constructor__P300774_mk(s); + s.tmp_1 = ArcadePhysicsEngine_constructor__P21457_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.num___300830; - s.callLocIdx = 67; s.pc = 9; return s.tmp_1; - case 9: + s.tmp_1.arg1 = 500; + s.tmp_1.arg2 = 2; + s.tmp_1.arg3 = 4; + s.callLocIdx = 905; s.pc = 1; return s.tmp_1; + case 1: r0 = s.retval; - s.target___300834 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Uint8Array__C276205_VT); + r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C21717_VT); s.tmp_0 = r0; - s.tmp_1 = Uint8Array_constructor__P276206_mk(s); + s.tmp_1 = scene_Camera_constructor__P21731_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 68; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.targetArray___300838 = (s.tmp_0); - s.tmp_0 = TypedArray_fromArrayBuffer__P276178_mk(s); - s.tmp_0.arg0 = s.targetArray___300838; - s.tmp_0.arg1 = s.target___300834; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = null; - s.callLocIdx = 69; s.pc = 11; return s.tmp_0; - case 11: + s.callLocIdx = 906; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(Uint8Array__C276205_VT); + r0 = (s.arg0).fields["camera"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Background__C21617_VT); s.tmp_0 = r0; - s.tmp_1 = Uint8Array_constructor__P276206_mk(s); + s.tmp_1 = scene_Background_constructor__P21623_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 70; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.sourceArray___300844 = (s.tmp_0); - s.tmp_0 = TypedArray_fromArrayBuffer__P276178_mk(s); - s.tmp_0.arg0 = s.sourceArray___300844; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.begin___300812; - s.tmp_0.arg3 = s.num___300830; - s.callLocIdx = 71; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = TypedArray_setFromTypedArray__P276188_mk(s); - s.tmp_0.arg0 = s.targetArray___300838; - s.tmp_0.arg1 = s.sourceArray___300844; - s.tmp_0.arg2 = 0; - s.callLocIdx = 72; s.pc = 14; return s.tmp_0; - case 14: + r0 = s.arg0.fields["camera"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 907; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = s.target___300834; - case 5: + r0 = (s.arg0).fields["background"] = (s.tmp_0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["destroyedHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["createdHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["overlapHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["overlapMap"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["tileOverlapHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["collisionHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["wallCollisionHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["gameForeverHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["spritesByKind"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["controlledSprites"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["buttonEventHandlers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_data"] = (s.tmp_1); + r0 = (s.arg0).fields["_millis"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -ArrayBuffer_slice__P300772.info = {"start":2512,"length":742,"line":73,"column":4,"endLine":95,"endColumn":5,"fileName":"arrayBuffer.ts","functionName":"slice","argumentNames":["this","from","to"]} +scene_Scene_constructor__P21793.info = {"start":3586,"length":836,"line":106,"column":8,"endLine":125,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","eventContext","previousScene"]} -function ArrayBuffer_slice__P300772_mk(s) { +function scene_Scene_constructor__P21793_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArrayBuffer_slice__P300772, depth: s.depth + 1, + parent: s, fn: scene_Scene_constructor__P21793, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - length___300810: undefined, - begin___300812: undefined, - end___300816: undefined, - num___300830: undefined, - target___300834: undefined, - targetArray___300838: undefined, - sourceArray___300844: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -2005,7 +1604,7 @@ function ArrayBuffer_slice__P300772_mk(s) { -function TypedArray_setFromTypedArray__P276188(s) { +function scene_Camera_constructor__P21731(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2015,192 +1614,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.byteOffset___279509 = undefined; - s.byteLength___279516 = undefined; - s.tmp___279526 = undefined; - s.i___279528 = undefined; - s.s___279529 = undefined; - s.d___279553 = undefined; - s.i___279575 = undefined; - s.s___279576 = undefined; - s.d___279577 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = (s.arg2 >>> 0); - s.arg2 = (r0); - s.tmp_2 = r0 = s.arg2; - r0 = s.arg1.fields["_length"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = s.arg0.fields["_length"]; - s.tmp_4 = r0; - r0 = (s.tmp_1 > s.tmp_4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore.throwValue("Offset plus length of array is out of range."); - case 1: - case 2: - r0 = s.arg0.fields["_byteOffset"]; - s.tmp_5 = r0; - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_7 = r0; - r0 = (s.arg2 * s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.byteOffset___279509 = (r0); - r0 = s.arg1.fields["_length"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.byteLength___279516 = (r0); - r0 = s.arg1.fields["_buffer"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_buffer"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array__mk(); - s.tmp___279526 = (r0); - s.i___279528 = (0); - r0 = s.arg1.fields["_byteOffset"]; - s.tmp_0 = r0; - s.s___279529 = (r0); - r0 = s.tmp_0; - case 3: - r0 = (s.i___279528 < s.byteLength___279516); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_1 = r0 = s.tmp___279526; - r0 = s.arg1.fields["_buffer"]; - s.tmp_4 = r0; - r0 = s.tmp_4.fields["_bytes"]; - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_3, s.s___279529); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___279528 + 1); - s.i___279528 = (r0); - s.tmp_0 = r0 = s.s___279529; - r0 = (s.tmp_0 + 1); - s.s___279529 = (r0); - r0 = s.tmp_0; - { step = 3; continue; } - case 4: - s.i___279528 = (0); - s.tmp_0 = r0 = s.byteOffset___279509; - s.d___279553 = (r0); - r0 = s.tmp_0; - case 5: - r0 = (s.i___279528 < s.byteLength___279516); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg0.fields["_buffer"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_bytes"]; - s.tmp_1 = r0; - s.tmp_3 = r0 = s.d___279553; - r0 = pxsim_Array__getAt(s.tmp___279526, s.i___279528); - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_1, s.tmp_3, s.tmp_4); - r0 = (s.i___279528 + 1); - s.i___279528 = (r0); - s.tmp_0 = r0 = s.d___279553; - r0 = (s.tmp_0 + 1); - s.d___279553 = (r0); - r0 = s.tmp_0; - { step = 5; continue; } - case 6: - { step = 10; continue; } - case 7: - s.i___279575 = (0); - r0 = s.arg1.fields["_byteOffset"]; - s.tmp_0 = r0; - s.s___279576 = (r0); - s.tmp_1 = r0 = s.byteOffset___279509; - s.d___279577 = (r0); - r0 = s.tmp_0; - r0 = s.tmp_1; - case 8: - r0 = (s.i___279575 < s.byteLength___279516); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.arg0.fields["_buffer"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_bytes"]; - s.tmp_1 = r0; - s.tmp_3 = r0 = s.d___279577; - r0 = s.arg1.fields["_buffer"]; - s.tmp_6 = r0; - r0 = s.tmp_6.fields["_bytes"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.s___279576); - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_1, s.tmp_3, s.tmp_4); - r0 = (s.i___279575 + 1); - s.i___279575 = (r0); - s.tmp_0 = r0 = s.s___279576; - r0 = (s.tmp_0 + 1); - s.s___279576 = (r0); - s.tmp_1 = r0 = s.d___279577; - r0 = (s.tmp_1 + 1); - s.d___279577 = (r0); - r0 = s.tmp_0; - r0 = s.tmp_1; - { step = 8; continue; } - case 9: - case 10: + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = (s.arg0).fields["_offsetX"] = (0); + r0 = (s.arg0).fields["_offsetY"] = (0); + r0 = (s.arg0).fields["drawOffsetX"] = (0); + r0 = (s.arg0).fields["drawOffsetY"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -TypedArray_setFromTypedArray__P276188.info = {"start":6102,"length":1205,"line":197,"column":4,"endLine":234,"endColumn":5,"fileName":"typedArray.ts","functionName":"setFromTypedArray","argumentNames":["this","source","offset"]} +scene_Camera_constructor__P21731.info = {"start":550,"length":156,"line":17,"column":8,"endLine":23,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} -function TypedArray_setFromTypedArray__P276188_mk(s) { +function scene_Camera_constructor__P21731_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_setFromTypedArray__P276188, depth: s.depth + 1, + parent: s, fn: scene_Camera_constructor__P21731, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - byteOffset___279509: undefined, - byteLength___279516: undefined, - tmp___279526: undefined, - i___279528: undefined, - s___279529: undefined, - d___279553: undefined, - i___279575: undefined, - s___279576: undefined, - d___279577: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function TypedArray_buffer__P276180(s) { +function scene_Background_constructor__P21623(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2212,30 +1654,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = s.arg0.fields["_buffer"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, scene_Background__C21617_VT)) failedCast(r0); + r0 = (s.arg0).fields["color"] = (0); + r0 = (s.arg0).fields["camera"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -TypedArray_buffer__P276180.info = {"start":4392,"length":68,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"typedArray.ts","functionName":"buffer","argumentNames":["this"]} -TypedArray_buffer__P276180.isGetter = true; +scene_Background_constructor__P21623.info = {"start":367,"length":132,"line":20,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","camera"]} -function TypedArray_buffer__P276180_mk(s) { +function scene_Background_constructor__P21623_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_buffer__P276180, depth: s.depth + 1, + parent: s, fn: scene_Background_constructor__P21623, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, } } -function TypedArray_byteOffset__P276182(s) { +function ArcadePhysicsEngine_constructor__P21457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2247,30 +1698,68 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = s.arg0.fields["_byteOffset"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteMap__C21331_VT); + s.tmp_0 = r0; + s.tmp_1 = sprites_SpriteMap_constructor__P21342_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 526; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = (s.arg0).fields["map"] = (s.tmp_0); + s.tmp_0 = ArcadePhysicsEngine_maxSpeed__P21438_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 527; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = ArcadePhysicsEngine_maxStep__P21442_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 528; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = ArcadePhysicsEngine_minStep__P21440_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 529; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -TypedArray_byteOffset__P276182.info = {"start":4543,"length":71,"line":134,"column":4,"endLine":136,"endColumn":5,"fileName":"typedArray.ts","functionName":"byteOffset","argumentNames":["this"]} -TypedArray_byteOffset__P276182.isGetter = true; +ArcadePhysicsEngine_constructor__P21457.info = {"start":1601,"length":277,"line":58,"column":4,"endLine":65,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","maxVelocity","minSingleStep","maxSingleStep"]} -function TypedArray_byteOffset__P276182_mk(s) { +function ArcadePhysicsEngine_constructor__P21457_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_byteOffset__P276182, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_constructor__P21457, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function TypedArray_length__P276184(s) { +function ArcadePhysicsEngine_maxStep__P21442(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2282,30 +1771,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = s.arg0.fields["_length"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["maxSingleStep"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -TypedArray_length__P276184.info = {"start":4708,"length":63,"line":142,"column":4,"endLine":144,"endColumn":5,"fileName":"typedArray.ts","functionName":"length","argumentNames":["this"]} -TypedArray_length__P276184.isGetter = true; +ArcadePhysicsEngine_maxStep__P21442.info = {"start":2329,"length":67,"line":88,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} -function TypedArray_length__P276184_mk(s) { +function ArcadePhysicsEngine_maxStep__P21442_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_length__P276184, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P21442, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function TypedArray_fromArrayBuffer__P276178(s) { +function ArcadePhysicsEngine_maxStep__P21441(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2315,117 +1814,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.byteLength___279282 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = (s.arg2 >>> 0); - s.arg2 = (r0); - s.tmp_1 = r0 = s.arg2; - r0 = s.arg1.fields["_byteLength"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 > s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore.throwValue("byteOffset out of range."); - case 1: - case 2: - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_5 = r0; - r0 = (s.arg2 % s.tmp_5); - s.tmp_4 = r0; - r0 = (s.tmp_4 != 0); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore.throwValue("Buffer length minus the byteOffset is not a multiple of the element size."); - case 3: - case 4: - r0 = (s.arg3 == null); - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 7; continue; } - r0 = s.arg1.fields["_byteLength"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 - s.arg2); - s.byteLength___279282 = (r0); - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_2 = r0; - r0 = (s.byteLength___279282 % s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_1 != 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = pxsim_pxtcore.throwValue("Length of buffer minus byteOffset not a multiple of the element size."); - case 5: - case 6: - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_3 = r0; - r0 = (s.byteLength___279282 / s.tmp_3); - s.arg3 = (r0); - { step = 8; continue; } - case 7: - r0 = (s.arg3 >>> 0); - s.arg3 = (r0); - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg0.fields["maxSingleStep"]; s.tmp_0 = r0; - r0 = (s.arg3 * s.tmp_0); - s.byteLength___279282 = (r0); - case 8: - r0 = (s.arg2 + s.byteLength___279282); + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; - r0 = s.arg1.fields["_byteLength"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 > s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore.throwValue("byteOffset and length reference are an area beyond the end of the buffer."); - case 9: - case 10: - r0 = (s.arg0).fields["_buffer"] = (s.arg1); - r0 = (s.arg0).fields["_byteLength"] = (s.byteLength___279282); - r0 = (s.arg0).fields["_byteOffset"] = (s.arg2); - r0 = (s.arg0).fields["_length"] = (s.arg3); - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -TypedArray_fromArrayBuffer__P276178.info = {"start":2622,"length":1324,"line":71,"column":4,"endLine":109,"endColumn":5,"fileName":"typedArray.ts","functionName":"fromArrayBuffer","argumentNames":["this","source","byteOffset","length"]} +ArcadePhysicsEngine_maxStep__P21441.info = {"start":2249,"length":74,"line":84,"column":4,"endLine":86,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this"]} +ArcadePhysicsEngine_maxStep__P21441.isGetter = true; -function TypedArray_fromArrayBuffer__P276178_mk(s) { +function ArcadePhysicsEngine_maxStep__P21441_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_fromArrayBuffer__P276178, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P21441, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - byteLength___279282: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Uint8Array_constructor__P276206(s) { +function Fx_toInt__P20227(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2437,46 +1857,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Uint8Array__C276205_VT)) failedCast(r0); - s.tmp_0 = TypedArray_constructor__P276176_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 99; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = (s.arg0).fields["BYTES_PER_ELEMENT"] = (1); - r0 = (s.arg0).fields["_pack"] = (Uint8Array_inline__P279793); - r0 = (s.arg0).fields["_unpack"] = (Uint8Array_inline__P279799); - s.tmp_0 = TypedArray_init__P278939_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 102; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg0 + 128); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -Uint8Array_constructor__P276206.info = {"start":1677,"length":246,"line":38,"column":4,"endLine":44,"endColumn":5,"fileName":"unit8array.ts","functionName":"inline","argumentNames":["this","length"]} +Fx_toInt__P20227.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} -function Uint8Array_constructor__P276206_mk(s) { +function Fx_toInt__P20227_mk(s) { checkStack(s.depth); return { - parent: s, fn: Uint8Array_constructor__P276206, depth: s.depth + 1, + parent: s, fn: Fx_toInt__P20227, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Uint8Array_inline__P279793(s) { +function ArcadePhysicsEngine_minStep__P21440(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2488,32 +1892,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Convert_packU8__P276194_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 100; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Uint8Array_inline__P279793.info = {"start":1789,"length":40,"line":41,"column":21,"endLine":41,"endColumn":61,"fileName":"unit8array.ts","functionName":"inline","argumentNames":["value"]} +ArcadePhysicsEngine_minStep__P21440.info = {"start":2176,"length":67,"line":80,"column":4,"endLine":82,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} -function Uint8Array_inline__P279793_mk(s) { +function ArcadePhysicsEngine_minStep__P21440_mk(s) { checkStack(s.depth); return { - parent: s, fn: Uint8Array_inline__P279793, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P21440, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function Uint8Array_inline__P279799(s) { +function ArcadePhysicsEngine_minStep__P21439(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2527,22 +1939,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Convert_unpackU8__P276195_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 101; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg0.fields["minSingleStep"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -Uint8Array_inline__P279799.info = {"start":1853,"length":44,"line":42,"column":23,"endLine":42,"endColumn":67,"fileName":"unit8array.ts","functionName":"inline","argumentNames":["bytes"]} +ArcadePhysicsEngine_minStep__P21439.info = {"start":2096,"length":74,"line":76,"column":4,"endLine":78,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this"]} +ArcadePhysicsEngine_minStep__P21439.isGetter = true; -function Uint8Array_inline__P279799_mk(s) { +function ArcadePhysicsEngine_minStep__P21439_mk(s) { checkStack(s.depth); return { - parent: s, fn: Uint8Array_inline__P279799, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P21439, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -2550,7 +1966,7 @@ function Uint8Array_inline__P279799_mk(s) { -function TypedArray_init__P278939(s) { +function ArcadePhysicsEngine_maxSpeed__P21438(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2562,51 +1978,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_length"]; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_byteLength"] = (s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(ArrayBuffer__C300769_VT); - s.tmp_0 = r0; - s.tmp_1 = ArrayBuffer_constructor__P300774_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["_byteLength"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 97; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = (s.arg0).fields["_buffer"] = (s.tmp_0); + r0 = (s.tmp_0).fields["maxVelocity"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["maxNegativeVelocity"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -TypedArray_init__P278939.info = {"start":7430,"length":151,"line":242,"column":4,"endLine":245,"endColumn":4,"fileName":"typedArray.ts","functionName":"init","argumentNames":["this"]} +ArcadePhysicsEngine_maxSpeed__P21438.info = {"start":1963,"length":127,"line":71,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} -function TypedArray_init__P278939_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P21438_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_init__P278939, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P21438, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, arg0: undefined, + arg1: undefined, } } -function Convert_unpackU8__P276195(s) { +function Fx_neg__P20210(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2620,24 +2031,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Convert_as_unsigned__P279654_mk(s); - r0 = pxsim_Array__getAt(s.arg0, 0); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 8; - s.callLocIdx = 98; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (0 - s.arg0); return leave(s, r0) default: oops() } } } -Convert_unpackU8__P276195.info = {"start":2304,"length":86,"line":49,"column":4,"endLine":49,"endColumn":90,"fileName":"convert.ts","functionName":"unpackU8","argumentNames":["bytes"]} +Fx_neg__P20210.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} -function Convert_unpackU8__P276195_mk(s) { +function Fx_neg__P20210_mk(s) { checkStack(s.depth); return { - parent: s, fn: Convert_unpackU8__P276195, depth: s.depth + 1, + parent: s, fn: Fx_neg__P20210, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -2645,7 +2049,7 @@ function Convert_unpackU8__P276195_mk(s) { -function Convert_as_unsigned__P279654(s) { +function ArcadePhysicsEngine_maxSpeed__P21437(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2655,38 +2059,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___279657 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (32 - s.arg1); - s.s___279657 = (r0); - r0 = (s.arg0 << s.s___279657); + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg0.fields["maxVelocity"]; s.tmp_0 = r0; - r0 = (s.tmp_0 >>> s.s___279657); - return leave(s, r0) + r0 = (s.tmp_0 + 128); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -Convert_as_unsigned__P279654.info = {"start":1959,"length":107,"line":43,"column":4,"endLine":43,"endColumn":111,"fileName":"convert.ts","functionName":"as_unsigned","argumentNames":["value","bits"]} +ArcadePhysicsEngine_maxSpeed__P21437.info = {"start":1884,"length":73,"line":67,"column":4,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this"]} +ArcadePhysicsEngine_maxSpeed__P21437.isGetter = true; -function Convert_as_unsigned__P279654_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P21437_mk(s) { checkStack(s.depth); return { - parent: s, fn: Convert_as_unsigned__P279654, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P21437, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - s___279657: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function Convert_packU8__P276194(s) { +function PhysicsEngine_constructor__P21392(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2700,24 +2104,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = (s.arg0 & 255); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -Convert_packU8__P276194.info = {"start":2233,"length":66,"line":48,"column":4,"endLine":48,"endColumn":70,"fileName":"convert.ts","functionName":"packU8","argumentNames":["n"]} +PhysicsEngine_constructor__P21392.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} -function Convert_packU8__P276194_mk(s) { +function PhysicsEngine_constructor__P21392_mk(s) { checkStack(s.depth); return { - parent: s, fn: Convert_packU8__P276194, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_constructor__P21392, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -2725,7 +2124,7 @@ function Convert_packU8__P276194_mk(s) { -function TypedArray_constructor__P276176(s) { +function sprites_SpriteMap_constructor__P21342(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2737,43 +2136,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = (s.arg1 >> 0); - s.arg1 = (r0); - r0 = (s.arg1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore.throwValue("length is not a small enough non-negative integer."); - case 1: - case 2: - r0 = (s.arg0).fields["_length"] = (s.arg1); - r0 = (s.arg0).fields["_byteOffset"] = (0); + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -TypedArray_constructor__P276176.info = {"start":1932,"length":238,"line":46,"column":4,"endLine":54,"endColumn":5,"fileName":"typedArray.ts","functionName":"inline","argumentNames":["this","length"]} +sprites_SpriteMap_constructor__P21342.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} -function TypedArray_constructor__P276176_mk(s) { +function sprites_SpriteMap_constructor__P21342_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_constructor__P276176, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_constructor__P21342, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function ArrayBuffer_constructor__P300774(s) { +function scene_Scene_init__P21027(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2783,64 +2174,138 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___300790 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArrayBuffer__C300769_VT)) failedCast(r0); - r0 = (s.arg1 >> 0); - s.arg1 = (r0); - r0 = (s.arg1 < 0); + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore.throwValue("ArrayBuffer size cannot be negative."); + { step = 3; continue; } case 1: case 2: - r0 = (s.arg0).fields["_byteLength"] = (s.arg1); + s.tmp_1 = power_poke__P20816_mk(s); + s.callLocIdx = 908; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; s.tmp_0 = r0 = s.arg0; r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_bytes"] = (s.tmp_1); - s.i___300790 = (0); - case 3: - r0 = (s.i___300790 < s.arg1); + r0 = (s.tmp_0).fields["allSprites"] = (s.tmp_1); + r0 = (s.arg0).fields["spriteNextId"] = (0); + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28585); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["_bytes"]; - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_1, 0); - r0 = (s.i___300790 + 1); - s.i___300790 = (r0); - { step = 3; continue; } - case 4: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 8; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 911; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 13; + s.tmp_0.arg2 = controller__moveSprites__P21103; + s.callLocIdx = 912; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28609); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 15; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 914; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28622); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 55; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 918; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28645); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 90; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 920; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28653); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 150; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 924; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P20399_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 200; + s.tmp_0.arg2 = control___screen_update__P20871; + s.callLocIdx = 925; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = multiplayer_initServer__P22643_mk(s); + s.callLocIdx = 926; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = multiplayer_initPlayerConnectionListeners__P22644_mk(s); + s.callLocIdx = 927; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P28684); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1.arg0 = globals.scene_Scene_initializers___21792; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 929; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -ArrayBuffer_constructor__P300774.info = {"start":1809,"length":321,"line":42,"column":4,"endLine":53,"endColumn":5,"fileName":"arrayBuffer.ts","functionName":"inline","argumentNames":["this","length"]} +scene_Scene_init__P21027.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} -function ArrayBuffer_constructor__P300774_mk(s) { +function scene_Scene_init__P21027_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArrayBuffer_constructor__P300774, depth: s.depth + 1, + parent: s, fn: scene_Scene_init__P21027, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - i___300790: undefined, arg0: undefined, - arg1: undefined, } } -function ArrayBuffer_clamp__P300773(s) { +function scene_Scene_init_inline__P28585(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2850,66 +2315,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 | 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = 0; - case 2: - // jmp value (already in r0) + s.tmp_0 = r0 = s.caps[0]; + r0 = s.tmp_0.fields["_millis"]; + s.tmp_2 = r0; + r0 = s.caps[0].fields["eventContext"]; + r0 = r0.fields["deltaTimeMillis"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); s.tmp_1 = r0; - s.arg0 = (s.tmp_1); - r0 = (s.arg0 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = Math_max__P271946_mk(s); - r0 = (s.arg0 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 73; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - { step = 5; continue; } - case 3: - case 4: - s.tmp_2 = Math_min__P271947_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 74; s.pc = 7; return s.tmp_2; - case 7: + r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); + s.tmp_0 = controller___update__P21131_mk(s); + r0 = s.caps[0].fields["eventContext"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["deltaTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 / 1000); + s.tmp_0.arg0 = r0; + s.callLocIdx = 910; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -ArrayBuffer_clamp__P300773.info = {"start":3260,"length":211,"line":97,"column":4,"endLine":103,"endColumn":5,"fileName":"arrayBuffer.ts","functionName":"clamp","argumentNames":["val","length"]} +scene_Scene_init_inline__P28585.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function ArrayBuffer_clamp__P300773_mk(s) { +function scene_Scene_init_inline__P28585_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArrayBuffer_clamp__P300773, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28585, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - arg0: undefined, - arg1: undefined, + tmp_3: undefined, } } -function Math_min__P271947(s) { +function scene_Scene_init_inline__P28609(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2919,41 +2365,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 <= s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } + s.tmp_0 = PhysicsEngine__C21384_v4_2_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + r0 = s.caps[0].fields["eventContext"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["deltaTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 / 1000); + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.move; + s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = s.arg1; - case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_min__P271947.info = {"start":16854,"length":105,"line":568,"column":4,"endLine":571,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"min","argumentNames":["a","b"]} +scene_Scene_init_inline__P28609.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function Math_min__P271947_mk(s) { +function scene_Scene_init_inline__P28609_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_min__P271947, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28609, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, + tmp_2: undefined, } } -function Math_max__P271946(s) { +function scene_Scene_init_inline__P28622(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2963,41 +2409,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 >= s.arg1); + s.dt___28623 = undefined; + s.s___28632 = undefined; + s.unnamed178___U2 = undefined; + s.unnamed179___U3 = undefined; + r0 = s.caps[0].fields["eventContext"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } + r0 = s.tmp_0.fields["deltaTimeMillis"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 / 1000); + s.dt___28623 = (r0); + s.tmp_0 = scene_Camera_update__P21730_mk(s); + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 916; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.s___28632 = (undefined); + r0 = s.caps[0].fields["allSprites"]; + s.unnamed178___U2 = (r0); + s.unnamed179___U3 = (0); case 1: + s.tmp_0 = r0 = s.unnamed179___U3; + r0 = pxsim_Array__length(s.unnamed178___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed178___U2, s.unnamed179___U3); + s.s___28632 = (r0); + s.tmp_2 = if___update_3_mk(s); + s.tmp_2.arg0 = s.s___28632; + r0 = s.caps[0].fields["camera"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.dt___28623; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); + s.callLocIdx = 917; s.pc = 4; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["__update"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["__update"], 3); s.callLocIdx = 917; s.pc = 4; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 917; s.pc = 4; return s.tmp_2;; } + else { s.callLocIdx = 917; s.pc = 4; return s.tmp_2; } + } + case 4: + r0 = s.retval; + r0 = (s.unnamed179___U3 + 1); + s.unnamed179___U3 = (r0); + { step = 1; continue; } case 2: - r0 = s.arg1; - case 3: + s.unnamed178___U2 = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_max__P271946.info = {"start":16614,"length":105,"line":558,"column":4,"endLine":561,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"max","argumentNames":["a","b"]} +scene_Scene_init_inline__P28622.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function Math_max__P271946_mk(s) { +function scene_Scene_init_inline__P28622_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_max__P271946, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28622, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, + tmp_2: undefined, + dt___28623: undefined, + s___28632: undefined, + unnamed178___U2: undefined, + unnamed179___U3: undefined, } } -function game_splash__P274782(s) { +function scene_Scene_init_inline__P28645(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3007,160 +2492,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dialog___279996 = undefined; - s.s___280009 = undefined; - s.pressed___280016 = undefined; - s.done___280017 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = console_inspect__P272198_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 20; - s.callLocIdx = 992; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.arg0 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - s.tmp_0 = console_inspect__P272198_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 20; - s.callLocIdx = 993; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - { step = 2; continue; } + s.tmp_0 = scene_Scene_render__P21032_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 919; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg1; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - s.arg1 = (s.tmp_1); - s.tmp_0 = controller__setUserEventsEnabled__P274023_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 994; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = game_pushScene__P274820_mk(s); - s.callLocIdx = 995; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 996; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 2); - s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); - r0 = pxsim_pxtcore_mkClassInstance(game_SplashDialog__C274749_VT); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 3; continue; } - r0 = 42; - { step = 4; continue; } - case 3: - r0 = 35; - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_2 = game_SplashDialog_constructor__P274756_mk(s); - s.tmp_2.arg0 = s.tmp_0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.tmp_1; - s.callLocIdx = 997; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.dialog___279996 = (s.tmp_0); - s.tmp_0 = game_SplashDialog__C274749_v1_2_mk(s); - s.tmp_0.arg0 = s.dialog___279996; - s.tmp_0.arg1 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, game_SplashDialog__C274749_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setText; - s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 5; continue; } - s.tmp_0 = game_SplashDialog_setSubtext__P274758_mk(s); - s.tmp_0.arg0 = s.dialog___279996; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 998; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 5: - case 6: - s.tmp_0 = sprites_create__P274092_mk(s); - r0 = s.dialog___279996.fields["image"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 999; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.s___280009 = (r0); - r0 = pxsim_pxtrt.mklocRef(); - s.pressed___280016 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.pressed___280016, true); - r0 = pxsim_pxtrt.mklocRef(); - s.done___280017 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.done___280017, false); - r0 = pxsim_pxtcore_mkAction(3, game_splash_inline__P280019); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dialog___279996); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pressed___280016); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.done___280017); - s.tmp_1 = game_onUpdate__P274840_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1002; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, game_splash_inline__P280042); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.done___280017); - s.tmp_1 = pauseUntil__P272183_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1003; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0 = controller__setUserEventsEnabled__P274023_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1004; s.pc = 18; return s.tmp_0; - case 18: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_splash__P274782.info = {"start":30591,"length":1082,"line":865,"column":4,"endLine":896,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"splash","argumentNames":["title","subtitle"]} +scene_Scene_init_inline__P28645.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function game_splash__P274782_mk(s) { +function scene_Scene_init_inline__P28645_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_splash__P274782, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28645, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - dialog___279996: undefined, - s___280009: undefined, - pressed___280016: undefined, - done___280017: undefined, - arg0: undefined, - arg1: undefined, } } -function game_splash_inline__P280019(s) { +function scene_Scene_init_inline__P28653(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3170,93 +2525,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currentState___280022 = undefined; - s.tmp_0 = game_BaseDialog__C274720_v0_1_mk(s); - s.tmp_0.arg0 = s.caps[0]; - if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C274720_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.update; - s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = controller_Button__C274006_v0_1_mk(s); - s.tmp_0.arg0 = globals.A___273930; - if (!checkSubtype(s.tmp_0.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.isPressed; - s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - s.currentState___280022 = (r0); - s.tmp_0 = r0 = s.currentState___280022; + s.tmp_0 = r0 = globals.stats___21890; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = globals.control_EventContext_onStats___20406; case 2: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[1], true); - s.tmp_0 = scene_setBackgroundImage__P274702_mk(s); - s.tmp_0.arg0 = null; - s.callLocIdx = 1000; s.pc = 11; return s.tmp_0; - case 11: + s.tmp_2 = lambda_2_mk(s); + s.tmp_2.argL = globals.control_EventContext_onStats___20406; + if ((globals.control_EventContext_lastStats___20405) && (globals.control_EventContext_lastStats___20405).vtable) { + setupResume(s, 8); + pxsim_String__stringConv(globals.control_EventContext_lastStats___20405); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___20405) + ""; } + case 8: r0 = s.retval; - s.tmp_0 = game_popScene__P274821_mk(s); - s.callLocIdx = 1001; s.pc = 12; return s.tmp_0; - case 12: + s.tmp_3 = r0; + r0 = s.caps[0].fields["allSprites"]; + s.tmp_8 = r0; + r0 = pxsim_Array__length(s.tmp_8); + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 9); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } + case 9: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(" sprites:", s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 10); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 10: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.tmp_2.arg0 = r0; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 921; s.pc = 7; return s.tmp_2; + case 7: r0 = s.retval; - r0 = pxsim_pxtrt_stlocRef(s.caps[2], true); - { step = 8; continue; } case 3: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } case 4: - r0 = pxsim_numops_toBoolDecr(s.currentState___280022); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_numops_toBoolDecr(globals.debug___21888); + if (!r0) { step = 5; continue; } + s.tmp_0 = PhysicsEngine__C21384_v3_1_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; + s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; case 5: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[1], false); case 6: - case 7: - case 8: + s.tmp_0 = game_consoleOverlay_draw__P22331_mk(s); + s.callLocIdx = 922; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = power_checkDeepSleep__P20817_mk(s); + s.callLocIdx = 923; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_splash_inline__P280019.info = {"start":31175,"length":410,"line":880,"column":22,"endLine":892,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} +scene_Scene_init_inline__P28653.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function game_splash_inline__P280019_mk(s) { +function scene_Scene_init_inline__P28653_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_splash_inline__P280019, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28653, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - currentState___280022: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, } } -function game_splash_inline__P280042(s) { +function scene_Scene_init_inline__P28684(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3266,24 +2636,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = s.arg0; + s.tmp_0.arg0 = s.caps[0]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 928; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_splash_inline__P280042.info = {"start":31607,"length":10,"line":894,"column":19,"endLine":894,"endColumn":29,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} +scene_Scene_init_inline__P28684.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} -function game_splash_inline__P280042_mk(s) { +function scene_Scene_init_inline__P28684_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_splash_inline__P280042, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P28684, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function game_onUpdate__P274840(s) { +function multiplayer_initPlayerConnectionListeners__P22644(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3293,54 +2676,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.p___28687 = undefined; + s.p___28687 = (1); + case 1: + r0 = (s.p___28687 <= 4); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_2 = control_EventContext_registerFrameHandler__P272219_mk(s); - s.tmp_3 = game_eventContext__P274819_mk(s); - s.callLocIdx = 1028; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 20; - s.tmp_2.arg2 = s.arg0; - s.callLocIdx = 1029; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; + if (!r0) { step = 2; continue; } + s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P22645_mk(s); + s.tmp_1.arg0 = s.p___28687; + s.callLocIdx = 1345; s.pc = 3; return s.tmp_1; case 3: + r0 = s.retval; + r0 = (s.p___28687 + 1); + s.p___28687 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdate__P274840.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} +multiplayer_initPlayerConnectionListeners__P22644.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} -function game_onUpdate__P274840_mk(s) { +function multiplayer_initPlayerConnectionListeners__P22644_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdate__P274840, depth: s.depth + 1, + parent: s, fn: multiplayer_initPlayerConnectionListeners__P22644, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, + p___28687: undefined, } } -function control_EventContext_registerFrameHandler__P272219(s) { +function multiplayer_registerPlayerConnectionListeners__P22645(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3350,105 +2722,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.fn___281054 = undefined; - s.i___281063 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P28699); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["frameCallbacks"] = (s.tmp_4); - s.tmp_0 = control_EventContext_registerFrameCallbacks__P276303_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 51; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P20386_mk(s); + s.tmp_1.arg0 = 3241; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.tmp_0; + s.tmp_1.arg3 = 16; + s.callLocIdx = 1347; s.pc = 1; return s.tmp_1; case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C272208_VT); - s.fn___281054 = (r0); - r0 = (s.fn___281054).fields["order"] = (s.arg1); - r0 = (s.fn___281054).fields["handler"] = (s.arg2); - s.i___281063 = (0); - case 3: - s.tmp_1 = r0 = s.i___281063; - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_6, s.i___281063); - r0 = r0.fields["order"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 > s.arg1); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_7 = r0; - r0 = pxsim_Array_.insertAt(s.tmp_7, s.i___281063, s.fn___281054); - r0 = s.fn___281054; - { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___281063 + 1); - s.i___281063 = (r0); - { step = 3; continue; } - case 6: - r0 = s.arg0.fields["frameCallbacks"]; + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P28705); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.fn___281054); - r0 = s.fn___281054; - case 7: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P20386_mk(s); + s.tmp_1.arg0 = 3242; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.tmp_0; + s.tmp_1.arg3 = 16; + s.callLocIdx = 1349; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameHandler__P272219.info = {"start":4862,"length":643,"line":147,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]} +multiplayer_registerPlayerConnectionListeners__P22645.info = {"start":1484,"length":415,"line":45,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"registerPlayerConnectionListeners","argumentNames":["playerNumber"]} -function control_EventContext_registerFrameHandler__P272219_mk(s) { +function multiplayer_registerPlayerConnectionListeners__P22645_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameHandler__P272219, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners__P22645, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - fn___281054: undefined, - i___281063: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_EventContext_registerFrameCallbacks__P276303(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P28699(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3458,55 +2778,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.worker___280544 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P22646_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 1346; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = s.arg0.fields["frameWorker"]; - s.worker___280544 = (r0); - r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P280550); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___280544); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 3: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks__P276303.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} +multiplayer_registerPlayerConnectionListeners_inline__P28699.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks__P276303_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P28699_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks__P276303, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P28699, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - worker___280544: undefined, - arg0: undefined, } } -function control_EventContext_registerFrameCallbacks_inline__P280550(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P28705(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3516,73 +2812,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___280580 = undefined; - r0 = s.caps[0].fields["runningCallbacks"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkAction(1, control_EventContext_registerFrameCallbacks_inline__P280556); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); - s.tmp_2 = pauseUntil__P272183_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 45; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P22646_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 1348; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = (s.caps[0]).fields["runningCallbacks"] = (true); - r0 = (s.caps[0]).fields["framesInSample"] = (0); - r0 = (s.caps[0]).fields["timeInSample"] = (0); - r0 = (s.caps[0]).fields["deltaTimeMillis"] = (0); - s.tmp_0 = r0 = s.caps[0]; - r0 = pxsim.control.millis(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["prevTimeMillis"] = (s.tmp_1); - case 3: - r0 = s.caps[0].fields["frameWorker"]; - s.tmp_1 = r0; - r0 = (s.caps[1] == s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = control_EventContext_runCallbacks__P276302_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 46; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.delay___280580 = (r0); - s.tmp_0 = pause__P272229_mk(s); - s.tmp_0.arg0 = s.delay___280580; - s.callLocIdx = 47; s.pc = 7; return s.tmp_0; - case 7: r0 = s.retval; - { step = 3; continue; } - case 4: - r0 = (s.caps[0]).fields["runningCallbacks"] = (false); r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks_inline__P280550.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +multiplayer_registerPlayerConnectionListeners_inline__P28705.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks_inline__P280550_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P28705_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P280550, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P28705, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - delay___280580: undefined, } } -function control_EventContext_registerFrameCallbacks_inline__P280556(s) { +function multiplayer_receiveConnectionChangedEvent__P22646(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3592,30 +2846,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["runningCallbacks"]; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + s.c___28710 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = s.tmp_0; + { step = 5; continue; } + case 1: + s.c___28710 = (globals.player1___21017); + { step = 5; continue; } + case 2: + s.c___28710 = (globals.player2___21011); + { step = 5; continue; } + case 3: + s.c___28710 = (globals.player3___21013); + { step = 5; continue; } + case 4: + s.c___28710 = (globals.player4___21015); + case 5: + r0 = pxsim_numops_toBoolDecr(s.c___28710); + if (!r0) { step = 6; continue; } + s.tmp_0 = controller_Controller_connected__P21121_mk(s); + s.tmp_0.arg0 = s.c___28710; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1350; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks_inline__P280556.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +multiplayer_receiveConnectionChangedEvent__P22646.info = {"start":1905,"length":552,"line":58,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"receiveConnectionChangedEvent","argumentNames":["playerNumber","connected"]} -function control_EventContext_registerFrameCallbacks_inline__P280556_mk(s) { +function multiplayer_receiveConnectionChangedEvent__P22646_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P280556, depth: s.depth + 1, + parent: s, fn: multiplayer_receiveConnectionChangedEvent__P22646, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + c___28710: undefined, + arg0: undefined, + arg1: undefined, } } -function control_EventContext_runCallbacks__P276302(s) { +function controller_Controller_connected__P21121(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3625,291 +2916,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.loopStart___280589 = undefined; - s.f___280602 = undefined; - s.unnamed2114___U2 = undefined; - s.unnamed2115___U3 = undefined; - s.now___280607 = undefined; - s.runtime___280610 = undefined; - s.realTimeInSample___280629 = undefined; - s.fps___280638 = undefined; - s.delay___280707 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.loopStart___280589 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["prevTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.loopStart___280589 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); - r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___280589); - s.f___280602 = (undefined); - r0 = s.arg0.fields["frameCallbacks"]; - s.unnamed2114___U2 = (r0); - s.unnamed2115___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2115___U3; - r0 = pxsim_Array__length(s.unnamed2114___U2); + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2114___U2, s.unnamed2115___U3); - s.f___280602 = (r0); - s.tmp_2 = if_handler_1_mk(s); - s.tmp_2.arg0 = s.f___280602; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); - s.callLocIdx = 43; s.pc = 11; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["handler"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["handler"], 1); s.callLocIdx = 43; s.pc = 11; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 43; s.pc = 11; return s.tmp_2;; } - else { s.callLocIdx = 43; s.pc = 11; return s.tmp_2; } - } - case 11: - r0 = s.retval; - r0 = (s.unnamed2115___U3 + 1); - s.unnamed2115___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed2114___U2 = (undefined); - r0 = pxsim.control.millis(); - s.now___280607 = (r0); - r0 = (s.now___280607 - s.loopStart___280589); - s.runtime___280610 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["timeInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.runtime___280610); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["timeInSample"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["framesInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["framesInSample"] = (s.tmp_1); - r0 = s.arg0.fields["timeInSample"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 1000); + r0 = (s.arg1 != s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["framesInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 30); - case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 9; continue; } - r0 = s.arg0.fields["lastPerfDump"]; - s.tmp_4 = r0; - r0 = (s.now___280607 - s.tmp_4); - s.realTimeInSample___280629 = (r0); - r0 = (s.arg0).fields["lastPerfDump"] = (s.now___280607); - r0 = s.arg0.fields["framesInSample"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["timeInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_1 = r0; - r0 = (s.tmp_0 / s.tmp_1); - s.fps___280638 = (r0); - r0 = pxsim.Math_.round(s.fps___280638); - s.tmp_1 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 12); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 12: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat("fps:", s.tmp_0); - globals.control_EventContext_lastStats___272213 = (r0); - r0 = (s.fps___280638 < 99); + r0 = (s.arg0).fields["_connected"] = (s.arg1); + r0 = s.arg0.fields["_connected"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - if ((globals.control_EventContext_lastStats___272213) && (globals.control_EventContext_lastStats___272213).vtable) { - setupResume(s, 13); - pxsim_String__stringConv(globals.control_EventContext_lastStats___272213); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___272213) + ""; } - case 13: - r0 = s.retval; + if (!r0) { step = 1; continue; } + r0 = 1; + { step = 2; continue; } + case 1: + r0 = 2; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.fps___280638 * 10); - s.tmp_7 = r0; - r0 = pxsim.Math_.round(s.tmp_7); - s.tmp_6 = r0; - r0 = (s.tmp_6 % 10); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 14); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 14: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(".", s.tmp_4); - s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 15: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); - globals.control_EventContext_lastStats___272213 = (r0); - case 5: - case 6: - r0 = pxsim.control.profilingEnabled(); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_9 = r0; - r0 = (s.fps___280638 * 100); - s.tmp_12 = r0; - r0 = (s.tmp_12 | 0); - s.tmp_11 = r0; - if ((s.tmp_11) && (s.tmp_11).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.tmp_11); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_11) + ""; } - case 16: - r0 = s.retval; - s.tmp_10 = r0; - r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_8, "/100 fps - "); - s.tmp_7 = r0; - r0 = s.arg0.fields["framesInSample"]; - s.tmp_14 = r0; - if ((s.tmp_14) && (s.tmp_14).vtable) { - setupResume(s, 17); - pxsim_String__stringConv(s.tmp_14); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_14) + ""; } - case 17: - r0 = s.retval; - s.tmp_13 = r0; - r0 = pxsim_String__concat(s.tmp_7, s.tmp_13); - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_6, " frames ("); - s.tmp_5 = r0; - r0 = s.arg0.fields["timeInSample"]; - s.tmp_16 = r0; - if ((s.tmp_16) && (s.tmp_16).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.tmp_16); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_16) + ""; } - case 18: - r0 = s.retval; - s.tmp_15 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, "ms/"); - s.tmp_3 = r0; - if ((s.realTimeInSample___280629) && (s.realTimeInSample___280629).vtable) { - setupResume(s, 19); - pxsim_String__stringConv(s.realTimeInSample___280629); - checkResumeConsumed(); - return; - } else { s.retval = (s.realTimeInSample___280629) + ""; } - case 19: - r0 = s.retval; - s.tmp_17 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_17); + r0 = s.arg0.fields["_id"]; s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, "ms)"); - s.tmp_1 = r0; - r0 = pxsim.control.dmesg(s.tmp_1); - r0 = pxsim.control.gc(); - r0 = pxsim_pxtcore.dumpPerfCounters(); - case 7: - case 8: - r0 = (s.arg0).fields["timeInSample"] = (0); - r0 = (s.arg0).fields["framesInSample"] = (0); - case 9: - case 10: - s.tmp_0 = Math_max__P271946_mk(s); - s.tmp_0.arg0 = 1; - r0 = (20 - s.runtime___280610); - s.tmp_0.arg1 = r0; - s.callLocIdx = 44; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - s.delay___280707 = (r0); - r0 = s.delay___280707; + r0 = pxsim.control.raiseEvent(s.tmp_2, s.tmp_1); + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_runCallbacks__P276302.info = {"start":2220,"length":1395,"line":75,"column":8,"endLine":106,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} +controller_Controller_connected__P21121.info = {"start":7796,"length":261,"line":254,"column":8,"endLine":259,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this","value"]} -function control_EventContext_runCallbacks__P276302_mk(s) { +function controller_Controller_connected__P21121_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_runCallbacks__P276302, depth: s.depth + 1, + parent: s, fn: controller_Controller_connected__P21121, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - loopStart___280589: undefined, - f___280602: undefined, - unnamed2114___U2: undefined, - unnamed2115___U3: undefined, - now___280607: undefined, - runtime___280610: undefined, - realTimeInSample___280629: undefined, - fps___280638: undefined, - delay___280707: undefined, arg0: undefined, + arg1: undefined, } } -function game_popScene__P274821(s) { +function controller__player1__P21099(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3919,84 +2978,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___280282 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1020; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.oldScene___280282 = (r0); - s.tmp_0 = r0 = globals._sceneStack___276806; + r0 = pxsim_numops_toBoolDecr(globals._players___21018); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array__length(globals._sceneStack___276806); + r0 = pxsim_Array__getAt(globals._players___21018, 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - r0 = pxsim_Array_.pop(globals._sceneStack___276806); - globals._scene___276805 = (r0); - s.tmp_0 = control_popEventContext__P272226_mk(s); - s.callLocIdx = 1021; s.pc = 12; return s.tmp_0; - case 12: + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C21104_VT); + s.tmp_5 = r0; + r0 = pxsim_Array__mk(); + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_6, globals.left___21001); + r0 = pxsim_Array__push(s.tmp_6, globals.up___21003); + r0 = pxsim_Array__push(s.tmp_6, globals.right___21005); + r0 = pxsim_Array__push(s.tmp_6, globals.down___21007); + r0 = pxsim_Array__push(s.tmp_6, globals.A___20997); + r0 = pxsim_Array__push(s.tmp_6, globals.B___20999); + r0 = pxsim_Array__push(s.tmp_6, globals.menu___21009); + s.tmp_7 = controller_Controller_constructor__P21130_mk(s); + s.tmp_7.arg0 = s.tmp_5; + s.tmp_7.arg1 = 1; + s.tmp_7.arg2 = s.tmp_6; + s.callLocIdx = 152; s.pc = 5; return s.tmp_7; + case 5: r0 = s.retval; - { step = 6; continue; } case 3: - r0 = pxsim_numops_toBoolDecr(globals._scene___276805); - if (!r0) { step = 4; continue; } - s.tmp_0 = control_popEventContext__P272226_mk(s); - s.callLocIdx = 1022; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - globals._scene___276805 = (undefined); case 4: - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(globals._scene___276805); - if (!r0) { step = 7; continue; } - s.tmp_0 = particles_enableAll__P275000_mk(s); - s.callLocIdx = 1023; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 7: - case 8: - r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___276808); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P280303); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___280282); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1.arg0 = globals._scenePopHandlers___276808; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1025; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - case 9: - case 10: - r0 = undefined; + r0 = pxsim_Array__getAt(globals._players___21018, 0); return leave(s, r0) default: oops() } } } -game_popScene__P274821.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} +controller__player1__P21099.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} -function game_popScene__P274821_mk(s) { +function controller__player1__P21099_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene__P274821, depth: s.depth + 1, + parent: s, fn: controller__player1__P21099, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - oldScene___280282: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, } } -function game_popScene_inline__P280303(s) { +function controller_Controller_constructor__P21130(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4006,37 +3052,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.leftId___28769 = undefined; + s.i___28777 = undefined; + s.i___28795 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = s.arg0; - s.tmp_0.arg0 = s.caps[0]; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1024; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.control.allocateNotifyEvent(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_id"] = (s.tmp_1); + r0 = (s.arg0).fields["_connected"] = (false); + r0 = (s.arg0).fields["playerIndex"] = (s.arg1); + r0 = (s.arg0).fields["analog"] = (false); + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["buttons"] = (s.arg2); + { step = 4; continue; } case 1: + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["buttons"] = (s.tmp_1); + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 7); + s.tmp_0 = r0; + r0 = (1 + s.tmp_0); + s.leftId___28769 = (r0); + s.i___28777 = (0); + case 2: + r0 = (s.i___28777 < 7); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C21138_VT); + s.tmp_1 = r0; + s.tmp_2 = controller_Button_constructor__P21158_mk(s); + s.tmp_2.arg0 = s.tmp_1; + r0 = (s.leftId___28769 + s.i___28777); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = -1; + s.callLocIdx = 158; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = s.arg0.fields["buttons"]; + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_1); + r0 = (s.i___28777 + 1); + s.i___28777 = (r0); + { step = 2; continue; } + case 3: + case 4: + s.i___28795 = (0); + case 5: + s.tmp_1 = r0 = s.i___28795; + r0 = s.arg0.fields["buttons"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["buttons"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.i___28795); + s.tmp_4 = r0; + r0 = (s.tmp_4).fields["_owner"] = (s.arg0); + r0 = (s.i___28795 + 1); + s.i___28795 = (r0); + { step = 5; continue; } + case 6: + s.tmp_0 = controller_addController__P21098_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 159; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_popScene_inline__P280303.info = {"start":5645,"length":18,"line":177,"column":38,"endLine":177,"endColumn":56,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +controller_Controller_constructor__P21130.info = {"start":2452,"length":696,"line":82,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","playerIndex","buttons"]} -function game_popScene_inline__P280303_mk(s) { +function controller_Controller_constructor__P21130_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene_inline__P280303, depth: s.depth + 1, + parent: s, fn: controller_Controller_constructor__P21130, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + leftId___28769: undefined, + i___28777: undefined, + i___28795: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_enableAll__P275000(s) { +function controller_addController__P21098(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4046,46 +3175,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___280324 = undefined; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1262; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___280324 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___280324); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(globals._players___21018); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - s.tmp_0.arg0 = s.sources___280324; - s.tmp_0.arg1 = particles_enableAll_inline__P280330; - s.callLocIdx = 1264; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P277152_mk(s); - s.callLocIdx = 1265; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + r0 = pxsim_Array__mk(); + globals._players___21018 = (r0); case 1: case 2: + s.tmp_0 = r0 = globals._players___21018; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_enableAll__P275000.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} +controller_addController__P21098.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} -function particles_enableAll__P275000_mk(s) { +function controller_addController__P21098_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll__P275000, depth: s.depth + 1, + parent: s, fn: controller_addController__P21098, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___280324: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, } } -function particles_enableAll_inline__P280330(s) { +function control_onEvent__P20386(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4095,36 +3226,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ctx___26469 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_enabled__P274981_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1263; s.pc = 1; return s.tmp_0; + s.tmp_0 = control_eventContext__P20409_mk(s); + s.callLocIdx = 40; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.ctx___26469 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___26469); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.control.internalOnEvent(s.arg0, s.arg1, s.arg2, s.arg3); + { step = 2; continue; } case 1: + s.tmp_0 = control_EventContext_registerHandler__P20401_mk(s); + s.tmp_0.arg0 = s.ctx___26469; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg2; + s.tmp_0.arg4 = s.arg3; + s.callLocIdx = 41; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = true; + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_enableAll_inline__P280330.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +control_onEvent__P20386.info = {"start":336,"length":325,"line":9,"column":4,"endLine":15,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]} -function particles_enableAll_inline__P280330_mk(s) { +function control_onEvent__P20386_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll_inline__P280330, depth: s.depth + 1, + parent: s, fn: control_onEvent__P20386, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + ctx___26469: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_particleSources__P277156(s) { +function control_eventContext__P20409(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4134,33 +3292,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___280505 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1266; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___20408); + if (!r0) { step = 1; continue; } + s.tmp_0 = r0 = globals.eventContexts___20408; + r0 = pxsim_Array__length(globals.eventContexts___20408); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = r0.fields["particleSources"]; - s.sources___280505 = (r0); - r0 = s.sources___280505; + r0 = undefined; + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -particles_particleSources__P277156.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} +control_eventContext__P20409.info = {"start":7094,"length":136,"line":213,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} -function particles_particleSources__P277156_mk(s) { +function control_eventContext__P20409_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_particleSources__P277156, depth: s.depth + 1, + parent: s, fn: control_eventContext__P20409, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___280505: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, } } -function particles_pruneParticles__P277152(s) { +function control_EventContext_registerHandler__P20401(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4170,51 +3337,113 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___280335 = undefined; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1249; s.pc = 3; return s.tmp_0; + s.h___26492 = undefined; + s.unnamed152___U1 = undefined; + s.unnamed153___U2 = undefined; + s.hn___26515 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + s.h___26492 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed152___U1 = (r0); + s.unnamed153___U2 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed153___U2; + r0 = pxsim_Array__length(s.unnamed152___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed152___U1, s.unnamed153___U2); + s.h___26492 = (r0); + r0 = s.h___26492.fields["src"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 == s.arg1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 2; continue; } + r0 = s.tmp_2; + { step = 3; continue; } + case 2: + r0 = s.h___26492.fields["value"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == s.arg2); case 3: - r0 = s.retval; - s.sources___280335 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___280335); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1 = helpers_arraySlice__P271931_mk(s); - s.tmp_1.arg0 = s.sources___280335; - s.tmp_1.arg1 = 0; - r0 = pxsim_Array__length(s.sources___280335); - s.tmp_1.arg2 = r0; - s.callLocIdx = 1250; s.pc = 5; return s.tmp_1; + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 4; continue; } + r0 = (s.h___26492).fields["flags"] = (s.arg4); + r0 = (s.h___26492).fields["handler"] = (s.arg3); + { step = 7; continue; } + case 4: case 5: + r0 = (s.unnamed153___U2 + 1); + s.unnamed153___U2 = (r0); + { step = 1; continue; } + case 6: + s.unnamed152___U1 = (undefined); + r0 = pxsim_pxtcore_mkClassInstance(control_EventHandler__C20388_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventHandler_constructor__P20391_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.tmp_1.arg3 = s.arg3; + s.tmp_1.arg4 = s.arg4; + s.callLocIdx = 52; s.pc = 8; return s.tmp_1; + case 8: r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = particles_pruneParticles_inline__P280344; - s.callLocIdx = 1252; s.pc = 4; return s.tmp_0; - case 4: + s.hn___26515 = (s.tmp_0); + r0 = s.arg0.fields["handlers"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.hn___26515); + s.tmp_0 = control_EventHandler_register__P20389_mk(s); + s.tmp_0.arg0 = s.hn___26515; + s.callLocIdx = 53; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - case 1: - case 2: + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_pruneParticles__P277152.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} +control_EventContext_registerHandler__P20401.info = {"start":5760,"length":525,"line":173,"column":8,"endLine":186,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]} -function particles_pruneParticles__P277152_mk(s) { +function control_EventContext_registerHandler__P20401_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles__P277152, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerHandler__P20401, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - sources___280335: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + h___26492: undefined, + unnamed152___U1: undefined, + unnamed153___U2: undefined, + hn___26515: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function particles_pruneParticles_inline__P280344(s) { +function control_EventHandler_constructor__P20391(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4226,33 +3455,41 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource__prune__P274976_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1251; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, control_EventHandler__C20388_VT)) failedCast(r0); + r0 = (s.arg0).fields["src"] = (s.arg1); + r0 = (s.arg0).fields["value"] = (s.arg2); + r0 = (s.arg0).fields["handler"] = (s.arg3); + r0 = (s.arg0).fields["flags"] = (s.arg4); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_pruneParticles_inline__P280344.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +control_EventHandler_constructor__P20391.info = {"start":786,"length":165,"line":23,"column":8,"endLine":28,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]} -function particles_pruneParticles_inline__P280344_mk(s) { +function control_EventHandler_constructor__P20391_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles_inline__P280344, depth: s.depth + 1, + parent: s, fn: control_EventHandler_constructor__P20391, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function particles_ParticleSource__prune__P274976(s) { +function control_EventHandler_register__P20389(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4262,147 +3499,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___280374 = undefined; - s.sources___280382 = undefined; - s.current___280396 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - case 1: - r0 = s.arg0.fields["head"]; + if (!checkSubtype(r0, control_EventHandler__C20388_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkAction(1, control_EventHandler_register_inline__P26536); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = s.arg0.fields["head"]; - r0 = r0.fields["lifespan"]; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = s.arg0.fields["src"]; s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); - case 3: - // jmp value (already in r0) + r0 = s.arg0.fields["value"]; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["head"]; - r0 = r0.fields["next"]; + r0 = s.arg0.fields["flags"]; s.tmp_3 = r0; - r0 = (s.arg0).fields["head"] = (s.tmp_3); - { step = 1; continue; } - case 4: - r0 = s.arg0.fields["pFlags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = s.arg0.fields["head"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 6: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 13; continue; } - s.tmp_5 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1224; s.pc = 21; return s.tmp_5; - case 21: - r0 = s.retval; - s.scene___280374 = (r0); - r0 = pxsim_numops_toBoolDecr(s.scene___280374); - if (!r0) { step = 7; continue; } - r0 = s.scene___280374.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - case 7: - case 8: - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1225; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; - s.sources___280382 = (r0); - s.tmp_0 = r0 = s.sources___280382; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = pxsim_Array__length(s.sources___280382); - case 10: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 11; continue; } - r0 = pxsim_Array_.removeElement(s.sources___280382, s.arg0); - case 11: - case 12: - r0 = s.arg0.fields["anchor"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 == undefined); - case 13: - case 14: - r0 = s.arg0.fields["head"]; - s.current___280396 = (r0); - case 15: - s.tmp_0 = r0 = s.current___280396; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 16: - r0 = s.current___280396.fields["next"]; - case 17: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 20; continue; } - r0 = s.current___280396.fields["next"]; - r0 = r0.fields["lifespan"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 <= 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 18; continue; } - r0 = s.current___280396.fields["next"]; - r0 = r0.fields["next"]; - s.tmp_4 = r0; - r0 = (s.current___280396).fields["next"] = (s.tmp_4); - { step = 19; continue; } - case 18: - r0 = s.current___280396.fields["next"]; - s.current___280396 = (r0); - case 19: - { step = 15; continue; } - case 20: + r0 = pxsim.control.internalOnEvent(s.tmp_1, s.tmp_2, s.tmp_0, s.tmp_3); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource__prune__P274976.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} +control_EventHandler_register__P20389.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function particles_ParticleSource__prune__P274976_mk(s) { +function control_EventHandler_register__P20389_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__prune__P274976, depth: s.depth + 1, + parent: s, fn: control_EventHandler_register__P20389, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - scene___280374: undefined, - sources___280382: undefined, - current___280396: undefined, arg0: undefined, } } @@ -4410,7 +3537,7 @@ function particles_ParticleSource__prune__P274976_mk(s) { -function helpers_arraySlice__P271931(s) { +function control_EventHandler_register_inline__P26536(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4420,114 +3547,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___280419 = undefined; - s.len___280421 = undefined; - s.i___280455 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__mk(); - s.res___280419 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___280421 = (r0); - r0 = (s.arg1 === undefined); + r0 = s.caps[0].fields["handler"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.arg1 = (0); - { step = 4; continue; } - case 1: - r0 = (s.arg1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_max__P271946_mk(s); - r0 = (s.len___280421 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 9; s.pc = 16; return s.tmp_1; - case 16: + s.tmp_1 = if_handler_1_mk(s); + s.tmp_1.arg0 = s.caps[0]; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "handler"), 1); + s.callLocIdx = 42; s.pc = 3; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["handler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["handler"], 1); s.callLocIdx = 42; s.pc = 3; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 42; s.pc = 3; return s.tmp_1;; } + else { s.callLocIdx = 42; s.pc = 3; return s.tmp_1; } + } + case 3: r0 = s.retval; - s.arg1 = (r0); + case 1: case 2: - case 3: - case 4: - r0 = (s.arg1 > s.len___280421); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.res___280419; - { step = 15; continue; } - case 5: - case 6: - r0 = (s.arg2 === undefined); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - s.arg2 = (s.len___280421); - { step = 10; continue; } - case 7: - r0 = (s.arg2 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - r0 = (s.len___280421 + s.arg2); - s.arg2 = (r0); - case 8: - case 9: - case 10: - r0 = (s.arg2 > s.len___280421); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.arg2 = (s.len___280421); - case 11: - case 12: - s.i___280455 = (s.arg1); - case 13: - r0 = (s.i___280455 < s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_1 = r0 = s.res___280419; - r0 = pxsim_Array__getAt(s.arg0, s.i___280455); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___280455 + 1); - s.i___280455 = (r0); - { step = 13; continue; } - case 14: - r0 = s.res___280419; - case 15: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySlice__P271931.info = {"start":9027,"length":690,"line":303,"column":4,"endLine":328,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySlice","argumentNames":["arr","start","end"]} +control_EventHandler_register_inline__P26536.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function helpers_arraySlice__P271931_mk(s) { +function control_EventHandler_register_inline__P26536_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySlice__P271931, depth: s.depth + 1, + parent: s, fn: control_EventHandler_register_inline__P26536, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - res___280419: undefined, - len___280421: undefined, - i___280455: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function particles_ParticleSource_enabled__P274981(s) { +function multiplayer_initServer__P22643(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4537,68 +3595,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = particles_ParticleSource_enabled__P274980_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1228; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 !== s.tmp_2); + r0 = pxsim.multiplayer.getOrigin(); + s.tmp_1 = r0; + r0 = (s.tmp_1 === "server"); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["pFlags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 1); - { step = 2; continue; } + s.tmp_2 = control_EventContext_registerFrameHandler__P20399_mk(s); + s.tmp_3 = game_eventContext__P21921_mk(s); + s.callLocIdx = 1343; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 210; + s.tmp_2.arg2 = multiplayer_initServer_inline__P28879; + s.callLocIdx = 1344; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; case 1: - r0 = s.arg0.fields["pFlags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 ^ 1); case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = (s.arg0).fields["pFlags"] = (s.tmp_6); - r0 = (s.arg0).fields["timer"] = (0); - case 3: - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P274981.info = {"start":6816,"length":214,"line":223,"column":8,"endLine":228,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} +multiplayer_initServer__P22643.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} -function particles_ParticleSource_enabled__P274981_mk(s) { +function multiplayer_initServer__P22643_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P274981, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer__P22643, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_enabled__P274980(s) { +function multiplayer_initServer_inline__P28879(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4608,47 +3645,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = s.arg0.fields["pFlags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 1); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = pxsim.multiplayer.getOrigin(); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_1 === "server"); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.multiplayer.postImage(globals.screen___20904); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P274980.info = {"start":6622,"length":76,"line":216,"column":8,"endLine":218,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this"]} -particles_ParticleSource_enabled__P274980.isGetter = true; +multiplayer_initServer_inline__P28879.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function particles_ParticleSource_enabled__P274980_mk(s) { +function multiplayer_initServer_inline__P28879_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P274980, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer_inline__P28879, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, } } -function control_popEventContext__P272226(s) { +function game_consoleOverlay_draw__P22331(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4658,146 +3683,216 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___280512 = undefined; - s.context___280520 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___276305); + s.height___28933 = undefined; + s.top___28938 = undefined; + s.i___28944 = undefined; + s.t___28958 = undefined; + s.tOff___28966 = undefined; + s.tab___28968 = undefined; + s.unnamed182___U6 = undefined; + s.unnamed183___U7 = undefined; + s.padding___28970 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_numops_toBoolDecr(globals.instance___22211); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - r0 = pxsim_Array_.pop(globals.eventContexts___276305); - s.ctx___280512 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___280512); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); if (!r0) { step = 3; continue; } - { step = 7; continue; } + { step = 13; continue; } case 3: case 4: - s.tmp_2 = control_EventContext_unregister__P272218_mk(s); - s.tmp_2.arg0 = s.ctx___280512; - s.callLocIdx = 57; s.pc = 8; return s.tmp_2; - case 8: + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = globals.consoleFont___22299; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); + } else { + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 1197; s.pc = 14; return s.tmp_7; } + } + case 14: r0 = s.retval; - s.tmp_0 = r0 = globals.eventContexts___276305; - r0 = pxsim_Array__length(globals.eventContexts___276305); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - s.context___280520 = (r0); - r0 = pxsim_numops_toBoolDecr(s.context___280520); + s.tmp_6 = r0; + r0 = (s.tmp_6 + 2); + s.height___28933 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21890); if (!r0) { step = 5; continue; } - s.tmp_0 = control_EventContext_register__P272217_mk(s); - s.tmp_0.arg0 = s.context___280520; - s.callLocIdx = 58; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; + r0 = s.height___28933; { step = 6; continue; } case 5: - globals.eventContexts___276305 = (undefined); + r0 = 0; case 6: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (2 + s.tmp_0); + s.top___28938 = (r0); + s.i___28944 = (0); case 7: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_popEventContext__P272226.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} - -function control_popEventContext__P272226_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_popEventContext__P272226, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - ctx___280512: undefined, - context___280520: undefined, -} } - - - - - -function control_EventContext_unregister__P272218(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.h___280715 = undefined; - s.unnamed2118___U1 = undefined; - s.unnamed2119___U2 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - s.h___280715 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed2118___U1 = (r0); - s.unnamed2119___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2119___U2; - r0 = pxsim_Array__length(s.unnamed2118___U1); + s.tmp_1 = r0 = s.i___28944; + r0 = pxsim_Array__length(globals.consoleStrings___22291); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = pxsim_Array__getAt(globals.consoleStrings___22291, s.i___28944); + s.tmp_5 = r0; + r0 = pxsim_String_.indexOf(s.tmp_5, "\t", undefined); + s.tmp_4 = r0; + r0 = (s.tmp_4 >= 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 10; continue; } + s.tmp_6 = helpers_stringSplit__P20168_mk(s); + r0 = pxsim_Array__getAt(globals.consoleStrings___22291, s.i___28944); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = "\t"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1198; s.pc = 15; return s.tmp_6; + case 15: + r0 = s.retval; + s.t___28958 = (r0); + s.tOff___28966 = (0); + s.tab___28968 = (undefined); + s.unnamed182___U6 = (s.t___28958); + s.unnamed183___U7 = (0); + case 8: + s.tmp_0 = r0 = s.unnamed183___U7; + r0 = pxsim_Array__length(s.unnamed182___U6); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2118___U1, s.unnamed2119___U2); - s.h___280715 = (r0); - s.tmp_2 = control_EventHandler_unregister__P276299_mk(s); - s.tmp_2.arg0 = s.h___280715; - s.callLocIdx = 50; s.pc = 3; return s.tmp_2; - case 3: + if (!r0) { step = 9; continue; } + r0 = pxsim_Array__getAt(s.unnamed182___U6, s.unnamed183___U7); + s.tab___28968 = (r0); + s.tmp_2 = r0 = globals.tabSize___22293; + s.tmp_5 = r0 = s.tOff___28966; + r0 = pxsim_String_.length(s.tab___28968); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_4 % globals.tabSize___22293); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.padding___28970 = (r0); + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_0.arg1 = s.tab___28968; + s.tmp_2 = r0 = s.tOff___28966; + s.tmp_4 = if_charWidth_1_mk(s); + s.tmp_4.arg0 = globals.consoleFont___22299; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charWidth"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charWidth"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 1199; s.pc = 17; return s.tmp_4; } + } + case 17: r0 = s.retval; - r0 = (s.unnamed2119___U2 + 1); - s.unnamed2119___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed2118___U1 = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["frameWorker"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); + s.tmp_1 = r0; + r0 = (4 + s.tmp_1); + s.tmp_0.arg2 = r0; + s.tmp_5 = r0 = s.top___28938; + r0 = (s.i___28944 * s.height___28933); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___22290; + s.tmp_0.arg5 = globals.consoleFont___22299; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1200; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.tmp_0 = r0 = s.tOff___28966; + r0 = pxsim_String_.length(s.tab___28968); s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = (s.tmp_2 + s.padding___28970); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["frameWorker"] = (s.tmp_1); + r0 = (s.tmp_0 + s.tmp_1); + s.tOff___28966 = (r0); + r0 = (s.unnamed183___U7 + 1); + s.unnamed183___U7 = (r0); + { step = 8; continue; } + case 9: + s.unnamed182___U6 = (undefined); + { step = 11; continue; } + case 10: + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + r0 = pxsim_Array__getAt(globals.consoleStrings___22291, s.i___28944); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 4; + s.tmp_1 = r0 = s.top___28938; + r0 = (s.i___28944 * s.height___28933); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___22290; + s.tmp_0.arg5 = globals.consoleFont___22299; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1201; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 11: + r0 = (s.i___28944 + 1); + s.i___28944 = (r0); + { step = 7; continue; } + case 12: + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_unregister__P272218.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +game_consoleOverlay_draw__P22331.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} -function control_EventContext_unregister__P272218_mk(s) { +function game_consoleOverlay_draw__P22331_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_unregister__P272218, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_draw__P22331, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - h___280715: undefined, - unnamed2118___U1: undefined, - unnamed2119___U2: undefined, - arg0: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + height___28933: undefined, + top___28938: undefined, + i___28944: undefined, + t___28958: undefined, + tOff___28966: undefined, + tab___28968: undefined, + unnamed182___U6: undefined, + unnamed183___U7: undefined, + padding___28970: undefined, } } -function control_EventHandler_unregister__P276299(s) { +function scene_systemMenu_isVisible__P22247(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4807,68 +3902,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C276297_VT)) failedCast(r0); - r0 = s.arg0.fields["src"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["value"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["flags"]; + r0 = pxsim_numops_toBoolDecr(globals.instance___22211); s.tmp_2 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P276301, s.tmp_2); - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -control_EventHandler_unregister__P276299.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +scene_systemMenu_isVisible__P22247.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} -function control_EventHandler_unregister__P276299_mk(s) { +function scene_systemMenu_isVisible__P22247_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_unregister__P276299, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_isVisible__P22247, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - arg0: undefined, -} } - - - - - -function control_doNothing__P276301(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_doNothing__P276301.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} - -function control_doNothing__P276301_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_doNothing__P276301, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, } } -function control_EventContext_register__P272217(s) { +function helpers_imagePrint__P20867(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4878,115 +3938,506 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___280533 = undefined; - s.unnamed2116___U1 = undefined; - s.unnamed2117___U2 = undefined; + s.x0___29043 = undefined; + s.cp___29045 = undefined; + s.mult___29046 = undefined; + s.dataW___29052 = undefined; + s.dataH___29058 = undefined; + s.byteHeight___29064 = undefined; + s.charSize___29070 = undefined; + s.dataSize___29074 = undefined; + s.fontdata___29078 = undefined; + s.lastchar___29082 = undefined; + s.imgBuf___29090 = undefined; + s.xOffset___29114 = undefined; + s.yOffset___29115 = undefined; + s.ch___29132 = undefined; + s.l___29151 = undefined; + s.r___29152 = undefined; + s.off___29154 = undefined; + s.guess___29155 = undefined; + s.m___29176 = undefined; + s.v___29185 = undefined; + s.i___29244 = undefined; + s.j___29249 = undefined; + s.mask___29250 = undefined; + s.c___29251 = undefined; + s.n___29268 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - s.h___280533 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed2116___U1 = (r0); - s.unnamed2117___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2117___U2; - r0 = pxsim_Array__length(s.unnamed2116___U1); + r0 = (s.arg2 | 0); + s.arg2 = (r0); + r0 = (s.arg3 | 0); + s.arg3 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg5); s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2116___U1, s.unnamed2117___U2); - s.h___280533 = (r0); - s.tmp_2 = control_EventHandler_register__P276298_mk(s); - s.tmp_2.arg0 = s.h___280533; - s.callLocIdx = 48; s.pc = 3; return s.tmp_2; - case 3: + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = image_getFontForText__P20859_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 98; s.pc = 39; return s.tmp_2; + case 39: r0 = s.retval; - r0 = (s.unnamed2117___U2 + 1); - s.unnamed2117___U2 = (r0); - { step = 1; continue; } + s.arg5 = (r0); + case 1: case 2: - s.unnamed2116___U1 = (undefined); - s.tmp_0 = control_EventContext_registerFrameCallbacks__P276303_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 49; s.pc = 4; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.arg4); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.arg4 = (1); + case 3: case 4: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_EventContext_register__P272217.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} - -function control_EventContext_register__P272217_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_EventContext_register__P272217, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - h___280533: undefined, - unnamed2116___U1: undefined, - unnamed2117___U2: undefined, - arg0: undefined, -} } - - - - - -function control_EventHandler_register__P276298(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; + s.x0___29043 = (s.arg2); + s.cp___29045 = (0); + s.tmp_1 = if_multiplier_1_mk(s); + s.tmp_1.arg0 = s.arg5; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "multiplier"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["multiplier"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["multiplier"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 99; s.pc = 40; return s.tmp_1; } } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C276297_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkAction(1, control_EventHandler_register_inline__P280171); + case 40: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = s.arg0.fields["src"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["value"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["flags"]; - s.tmp_3 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_1, s.tmp_2, s.tmp_0, s.tmp_3); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_EventHandler_register__P276298.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} - -function control_EventHandler_register__P276298_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_EventHandler_register__P276298, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = if_multiplier_1_mk(s); + s.tmp_2.arg0 = s.arg5; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "multiplier"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["multiplier"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["multiplier"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 100; s.pc = 41; return s.tmp_2; } + } + case 41: + r0 = s.retval; + { step = 6; continue; } + case 5: + r0 = 1; + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + s.mult___29046 = (s.tmp_3); + s.tmp_1 = if_charWidth_1_mk(s); + s.tmp_1.arg0 = s.arg5; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "charWidth"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["charWidth"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["charWidth"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 101; s.pc = 42; return s.tmp_1; } + } + case 42: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___29046); + s.dataW___29052 = (r0); + s.tmp_1 = if_charHeight_1_mk(s); + s.tmp_1.arg0 = s.arg5; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "charHeight"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["charHeight"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["charHeight"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 102; s.pc = 43; return s.tmp_1; } + } + case 43: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___29046); + s.dataH___29058 = (r0); + r0 = (s.dataH___29058 + 7); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 3); + s.byteHeight___29064 = (r0); + r0 = (s.byteHeight___29064 * s.dataW___29052); + s.charSize___29070 = (r0); + r0 = (2 + s.charSize___29070); + s.dataSize___29074 = (r0); + s.tmp_0 = if_data_1_mk(s); + s.tmp_0.arg0 = s.arg5; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "data"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["data"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["data"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 103; s.pc = 44; return s.tmp_0; } + } + case 44: + r0 = s.retval; + s.fontdata___29078 = (r0); + r0 = pxsim.BufferMethods.length(s.fontdata___29078); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___29074); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.lastchar___29082 = (r0); + r0 = (s.mult___29046 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (8 + s.charSize___29070); + s.tmp_1 = r0; + r0 = pxsim.control.createBuffer(s.tmp_1); + s.imgBuf___29090 = (r0); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___29090, 0, 135); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___29090, 1, 1); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___29090, 2, s.dataW___29052); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___29090, 4, s.dataH___29058); + case 7: + case 8: + case 9: + s.tmp_1 = r0 = s.cp___29045; + r0 = pxsim_String_.length(s.arg1); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 38; continue; } + s.xOffset___29114 = (0); + s.yOffset___29115 = (0); + s.tmp_0 = r0 = s.arg6; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 10; continue; } + r0 = s.tmp_0; + { step = 11; continue; } + case 10: + s.tmp_1 = r0 = s.cp___29045; + r0 = pxsim_Array__length(s.arg6); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + case 11: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 12; continue; } + s.tmp_4 = if_xOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___29045); + s.tmp_4.arg0 = r0; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "xOffset"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["xOffset"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["xOffset"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 104; s.pc = 45; return s.tmp_4; } + } + case 45: + r0 = s.retval; + s.xOffset___29114 = (r0); + s.tmp_0 = if_yOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___29045); + s.tmp_0.arg0 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "yOffset"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["yOffset"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["yOffset"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 105; s.pc = 46; return s.tmp_0; } + } + case 46: + r0 = s.retval; + s.yOffset___29115 = (r0); + case 12: + case 13: + s.tmp_0 = r0 = s.cp___29045; + r0 = (s.tmp_0 + 1); + s.cp___29045 = (r0); + r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); + s.ch___29132 = (r0); + r0 = (s.ch___29132 == 10); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tmp_1 = r0 = s.arg3; + s.tmp_4 = if_charHeight_1_mk(s); + s.tmp_4.arg0 = s.arg5; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charHeight"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charHeight"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charHeight"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 106; s.pc = 47; return s.tmp_4; } + } + case 47: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 2); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.arg3 = (r0); + s.arg2 = (s.x0___29043); + case 14: + case 15: + r0 = (s.ch___29132 < 32); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 16; continue; } + { step = 9; continue; } + case 16: + case 17: + s.l___29151 = (0); + s.r___29152 = (s.lastchar___29082); + s.off___29154 = (0); + r0 = (s.ch___29132 - 32); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.dataSize___29074); + s.guess___29155 = (r0); + r0 = pxsim.BufferMethods.getNumber(s.fontdata___29078, 4, s.guess___29155); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.ch___29132); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 18; continue; } + s.off___29154 = (s.guess___29155); + { step = 25; continue; } + case 18: + case 19: + r0 = (s.l___29151 <= s.r___29152); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 24; continue; } + s.tmp_1 = r0 = s.l___29151; + r0 = (s.r___29152 - s.l___29151); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.m___29176 = (r0); + s.tmp_0 = r0 = s.fontdata___29078; + r0 = (s.m___29176 * s.dataSize___29074); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); + s.v___29185 = (r0); + r0 = (s.v___29185 == s.ch___29132); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.m___29176 * s.dataSize___29074); + s.off___29154 = (r0); + { step = 24; continue; } + case 20: + case 21: + r0 = (s.v___29185 < s.ch___29132); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.m___29176 + 1); + s.l___29151 = (r0); + { step = 23; continue; } + case 22: + r0 = (s.m___29176 - 1); + s.r___29152 = (r0); + case 23: + { step = 19; continue; } + case 24: + case 25: + r0 = (s.mult___29046 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 26; continue; } + s.tmp_1 = r0 = s.imgBuf___29090; + s.tmp_3 = r0 = s.fontdata___29078; + r0 = (s.off___29154 + 2); + s.tmp_4 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___29070); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); + s.tmp_0 = helpers_imageDrawIcon__P20840_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.imgBuf___29090; + r0 = (s.arg2 + s.xOffset___29114); + s.tmp_0.arg2 = r0; + r0 = (s.arg3 + s.yOffset___29115); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg4; + s.callLocIdx = 107; s.pc = 48; return s.tmp_0; + case 48: + r0 = s.retval; + s.tmp_0 = r0 = s.arg2; + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.arg5; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charWidth"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charWidth"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 108; s.pc = 49; return s.tmp_2; } + } + case 49: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.arg2 = (r0); + { step = 37; continue; } + case 26: + r0 = (s.off___29154 + 2); + s.off___29154 = (r0); + s.i___29244 = (0); + case 27: + r0 = (s.i___29244 < s.dataW___29052); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 36; continue; } + s.j___29249 = (0); + s.mask___29250 = (1); + s.tmp_0 = r0 = s.off___29154; + r0 = (s.tmp_0 + 1); + s.off___29154 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___29078, s.tmp_0); + s.c___29251 = (r0); + case 28: + r0 = (s.j___29249 < s.dataH___29058); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = (s.mask___29250 == 256); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 29; continue; } + s.tmp_2 = r0 = s.off___29154; + r0 = (s.tmp_2 + 1); + s.off___29154 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___29078, s.tmp_2); + s.c___29251 = (r0); + s.mask___29250 = (1); + case 29: + case 30: + s.n___29268 = (0); + case 31: + r0 = (s.c___29251 & s.mask___29250); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 32; continue; } + r0 = (s.n___29268 + 1); + s.n___29268 = (r0); + r0 = (s.mask___29250 << 1); + s.mask___29250 = (r0); + { step = 31; continue; } + case 32: + r0 = pxsim_numops_toBoolDecr(s.n___29268); + if (!r0) { step = 33; continue; } + s.tmp_0 = helpers_imageFillRect__P20841_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg2; + r0 = (s.xOffset___29114 * s.mult___29046); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg1 = r0; + s.tmp_3 = r0 = s.arg3; + r0 = (s.j___29249 + s.yOffset___29115); + s.tmp_5 = r0; + r0 = (s.tmp_5 * s.mult___29046); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.mult___29046; + r0 = (s.mult___29046 * s.n___29268); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg4; + s.callLocIdx = 109; s.pc = 50; return s.tmp_0; + case 50: + r0 = s.retval; + r0 = (s.j___29249 + s.n___29268); + s.j___29249 = (r0); + { step = 34; continue; } + case 33: + r0 = (s.mask___29250 << 1); + s.mask___29250 = (r0); + r0 = (s.j___29249 + 1); + s.j___29249 = (r0); + case 34: + { step = 28; continue; } + case 35: + r0 = (s.arg2 + s.mult___29046); + s.arg2 = (r0); + r0 = (s.i___29244 + 1); + s.i___29244 = (r0); + { step = 27; continue; } + case 36: + case 37: + { step = 9; continue; } + case 38: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +helpers_imagePrint__P20867.info = {"start":15326,"length":3300,"line":213,"column":4,"endLine":306,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"imagePrint","argumentNames":["img","text","x","y","color","font","offsets"]} + +function helpers_imagePrint__P20867_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_imagePrint__P20867, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + x0___29043: undefined, + cp___29045: undefined, + mult___29046: undefined, + dataW___29052: undefined, + dataH___29058: undefined, + byteHeight___29064: undefined, + charSize___29070: undefined, + dataSize___29074: undefined, + fontdata___29078: undefined, + lastchar___29082: undefined, + imgBuf___29090: undefined, + xOffset___29114: undefined, + yOffset___29115: undefined, + ch___29132: undefined, + l___29151: undefined, + r___29152: undefined, + off___29154: undefined, + guess___29155: undefined, + m___29176: undefined, + v___29185: undefined, + i___29244: undefined, + j___29249: undefined, + mask___29250: undefined, + c___29251: undefined, + n___29268: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function control_EventHandler_register_inline__P280171(s) { +function image_getFontForText__P20859(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4996,45 +4447,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["handler"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = if_handler_1_mk(s); - s.tmp_1.arg0 = s.caps[0]; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "handler"), 1); - s.callLocIdx = 42; s.pc = 3; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["handler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["handler"], 1); s.callLocIdx = 42; s.pc = 3; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 42; s.pc = 3; return s.tmp_1;; } - else { s.callLocIdx = 42; s.pc = 3; return s.tmp_1; } + s.i___28252 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; } - case 3: - r0 = s.retval; + s.i___28252 = (0); case 1: + s.tmp_1 = r0 = s.i___28252; + r0 = pxsim_String_.length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_String_.charCodeAt(s.arg0, s.i___28252); + s.tmp_4 = r0; + r0 = (s.tmp_4 > 8192); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + r0 = globals.font12___20858; + { step = 5; continue; } case 2: - r0 = undefined; + case 3: + r0 = (s.i___28252 + 1); + s.i___28252 = (r0); + { step = 1; continue; } + case 4: + r0 = globals.font8___20856; + case 5: return leave(s, r0) default: oops() } } } -control_EventHandler_register_inline__P280171.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +image_getFontForText__P20859.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} -function control_EventHandler_register_inline__P280171_mk(s) { +function image_getFontForText__P20859_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_register_inline__P280171, depth: s.depth + 1, + parent: s, fn: image_getFontForText__P20859, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + i___28252: undefined, + arg0: undefined, } } -function helpers_arrayForEach__P271925(s) { +function helpers_imageFillRect__P20841(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5044,58 +4510,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___280309 = undefined; - s.i___280312 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = pxsim_Array__length(s.arg0); - s.len___280309 = (r0); - s.i___280312 = (0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_pack__P20836_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 80; s.pc = 1; return s.tmp_2; case 1: - r0 = (s.i___280312 < s.len___280309); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___280312); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___280312; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 6; s.pc = 3; return s.tmp_1; - case 3: r0 = s.retval; - r0 = (s.i___280312 + 1); - s.i___280312 = (r0); - { step = 1; continue; } + s.tmp_1 = r0; + s.tmp_4 = helpers_pack__P20836_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 81; s.pc = 2; return s.tmp_4; case 2: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods._fillRect(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayForEach__P271925.info = {"start":7439,"length":250,"line":254,"column":4,"endLine":259,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayForEach","argumentNames":["arr","callbackfn"]} +helpers_imageFillRect__P20841.info = {"start":5454,"length":159,"line":176,"column":4,"endLine":178,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageFillRect","argumentNames":["img","x","y","w","h","c"]} -function helpers_arrayForEach__P271925_mk(s) { +function helpers_imageFillRect__P20841_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayForEach__P271925, depth: s.depth + 1, + parent: s, fn: helpers_imageFillRect__P20841, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___280309: undefined, - i___280312: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function game_pushScene__P274820(s) { +function helpers_pack__P20836(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5105,70 +4573,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___282110 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1014; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.oldScene___282110 = (r0); - s.tmp_0 = particles_clearAll__P274998_mk(s); - s.callLocIdx = 1015; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_disableAll__P274999_mk(s); - s.callLocIdx = 1016; s.pc = 7; return s.tmp_0; - case 7: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_2 = Math_clamp__P20173_mk(s); + s.tmp_2.arg0 = -30000; + s.tmp_2.arg1 = 30000; + r0 = (s.arg0 | 0); + s.tmp_2.arg2 = r0; + s.callLocIdx = 77; s.pc = 1; return s.tmp_2; + case 1: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._sceneStack___276806); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 & 65535); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._sceneStack___276806 = (r0); - case 1: + s.tmp_5 = Math_clamp__P20173_mk(s); + s.tmp_5.arg0 = -30000; + s.tmp_5.arg1 = 30000; + r0 = (s.arg1 | 0); + s.tmp_5.arg2 = r0; + s.callLocIdx = 78; s.pc = 2; return s.tmp_5; case 2: - r0 = pxsim_Array__push(globals._sceneStack___276806, globals._scene___276805); - s.tmp_0 = game_init__P276813_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1017; s.pc = 8; return s.tmp_0; - case 8: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___276807); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P282127); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___282110); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1.arg0 = globals._scenePushHandlers___276807; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 1019; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; + s.tmp_4 = r0; + r0 = (s.tmp_4 << 16); + s.tmp_3 = r0; + r0 = (s.tmp_0 | s.tmp_3); return leave(s, r0) default: oops() } } } -game_pushScene__P274820.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} +helpers_pack__P20836.info = {"start":4278,"length":145,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} -function game_pushScene__P274820_mk(s) { +function helpers_pack__P20836_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene__P274820, depth: s.depth + 1, + parent: s, fn: helpers_pack__P20836, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - oldScene___282110: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, } } -function game_pushScene_inline__P282127(s) { +function Math_clamp__P20173(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5180,35 +4637,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = s.arg0; - s.tmp_0.arg0 = s.caps[0]; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1018; s.pc = 1; return s.tmp_0; + s.tmp_0 = Math_min__P20177_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg2; + s.callLocIdx = 15; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 16; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -game_pushScene_inline__P282127.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +Math_clamp__P20173.info = {"start":15643,"length":130,"line":528,"column":4,"endLine":530,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"clamp","argumentNames":["min","max","value"]} -function game_pushScene_inline__P282127_mk(s) { +function Math_clamp__P20173_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene_inline__P282127, depth: s.depth + 1, + parent: s, fn: Math_clamp__P20173, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_init__P276813(s) { +function Math_min__P20177(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5220,69 +4686,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._scene___276805); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.arg0 <= s.arg1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: r0 = s.arg0; + { step = 3; continue; } + case 1: case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C274660_VT); - s.tmp_3 = r0; - s.tmp_4 = scene_Scene_constructor__P274683_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_5 = control_pushEventContext__P272225_mk(s); - s.callLocIdx = 1011; s.pc = 6; return s.tmp_5; - case 6: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.tmp_4.arg2 = globals._scene___276805; - s.callLocIdx = 1012; s.pc = 5; return s.tmp_4; - case 5: - r0 = s.retval; - globals._scene___276805 = (s.tmp_3); + r0 = s.arg1; case 3: - case 4: - s.tmp_0 = scene_Scene_init__P274684_mk(s); - s.tmp_0.arg0 = globals._scene___276805; - s.callLocIdx = 1013; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -game_init__P276813.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} +Math_min__P20177.info = {"start":16854,"length":105,"line":568,"column":4,"endLine":571,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"min","argumentNames":["a","b"]} -function game_init__P276813_mk(s) { +function Math_min__P20177_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_init__P276813, depth: s.depth + 1, + parent: s, fn: Math_min__P20177, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, + arg1: undefined, } } -function scene_Scene_init__P274684(s) { +function Math_max__P20176(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5294,136 +4730,93 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + r0 = (s.arg0 >= s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } + r0 = s.arg0; { step = 3; continue; } case 1: case 2: - s.tmp_1 = power_poke__P273746_mk(s); - s.callLocIdx = 908; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; + r0 = s.arg1; + case 3: + return leave(s, r0) + default: oops() +} } } +Math_max__P20176.info = {"start":16614,"length":105,"line":558,"column":4,"endLine":561,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"max","argumentNames":["a","b"]} + +function Math_max__P20176_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Math_max__P20176, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function helpers_imageDrawIcon__P20840(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.lambdaArgs = null; + } s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["allSprites"] = (s.tmp_1); - r0 = (s.arg0).fields["spriteNextId"] = (0); - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282156); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 8; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 911; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 13; - s.tmp_0.arg2 = controller__moveSprites__P273950; - s.callLocIdx = 912; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282180); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 15; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 914; s.pc = 7; return s.tmp_1; - case 7: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282193); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 55; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 918; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282214); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 90; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 920; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282222); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 150; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 924; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P272219_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 200; - s.tmp_0.arg2 = control___screen_update__P273810; - s.callLocIdx = 925; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = multiplayer_initServer__P275205_mk(s); - s.callLocIdx = 926; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = multiplayer_initPlayerConnectionListeners__P275206_mk(s); - s.callLocIdx = 927; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P282253); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1.arg0 = globals.scene_Scene_initializers___274682; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 929; s.pc = 14; return s.tmp_1; - case 14: + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = helpers_pack__P20836_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg3; + s.callLocIdx = 79; s.pc = 1; return s.tmp_3; + case 1: r0 = s.retval; - case 3: + s.tmp_2 = r0; + r0 = pxsim_ImageMethods._drawIcon(s.tmp_0, s.tmp_1, s.tmp_2, s.arg4); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init__P274684.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} +helpers_imageDrawIcon__P20840.info = {"start":5304,"length":145,"line":173,"column":4,"endLine":175,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawIcon","argumentNames":["img","icon","x","y","c"]} -function scene_Scene_init__P274684_mk(s) { +function helpers_imageDrawIcon__P20840_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init__P274684, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawIcon__P20840, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function scene_Scene_init_inline__P282156(s) { +function helpers_stringSplit__P20168(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5433,47 +4826,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = r0 = s.caps[0]; - r0 = s.tmp_0.fields["_millis"]; - s.tmp_2 = r0; - r0 = s.caps[0].fields["eventContext"]; - r0 = r0.fields["deltaTimeMillis"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); + s.A___29331 = undefined; + s.lim___29333 = undefined; + s.s___29349 = undefined; + s.p___29352 = undefined; + s.R___29353 = undefined; + s.z___29367 = undefined; + s.T___29380 = undefined; + s.q___29381 = undefined; + s.e___29387 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__mk(); + s.A___29331 = (r0); + s.lim___29333 = (0); + r0 = (s.arg2 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (536870912 - 1); + s.lim___29333 = (r0); + { step = 4; continue; } + case 1: + r0 = (s.arg2 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.lim___29333 = (0); + { step = 3; continue; } + case 2: + r0 = (s.arg2 | 0); + s.lim___29333 = (r0); + case 3: + case 4: + r0 = pxsim_String_.length(s.arg0); + s.s___29349 = (r0); + s.p___29352 = (0); + s.R___29353 = (s.arg1); + r0 = (s.lim___29333 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.A___29331; + { step = 21; continue; } + case 5: + case 6: + r0 = (s.arg1 === undefined); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); - s.tmp_0 = controller___update__P273982_mk(s); - r0 = s.caps[0].fields["eventContext"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 7; continue; } + r0 = pxsim_Array_.setAt(s.A___29331, 0, s.arg0); + r0 = s.A___29331; + { step = 21; continue; } + case 7: + case 8: + r0 = (s.s___29349 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = helpers_splitMatch__P20169_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.tmp_1.arg2 = s.R___29353; + s.callLocIdx = 11; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + s.z___29367 = (r0); + r0 = (s.z___29367 > -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = s.A___29331; + { step = 21; continue; } + case 9: + case 10: + r0 = pxsim_Array_.setAt(s.A___29331, 0, s.arg0); + r0 = s.A___29331; + { step = 21; continue; } + case 11: + case 12: + s.q___29381 = (s.p___29352); + case 13: + r0 = (s.q___29381 != s.s___29349); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_1 = helpers_splitMatch__P20169_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.q___29381; + s.tmp_1.arg2 = s.R___29353; + s.callLocIdx = 12; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + s.e___29387 = (r0); + r0 = (s.e___29387 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.q___29381 + 1); + s.q___29381 = (r0); + { step = 19; continue; } + case 14: + r0 = (s.e___29387 == s.p___29352); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = (s.q___29381 + 1); + s.q___29381 = (r0); + { step = 18; continue; } + case 15: + s.tmp_0 = helpers_stringSlice__P20165_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___29352; + s.tmp_0.arg2 = s.q___29381; + s.callLocIdx = 13; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.T___29380 = (r0); + r0 = pxsim_Array__push(s.A___29331, s.T___29380); + r0 = pxsim_Array__length(s.A___29331); s.tmp_1 = r0; - r0 = s.tmp_1.fields["deltaTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg0 = r0; - s.callLocIdx = 910; s.pc = 1; return s.tmp_0; - case 1: + r0 = (s.tmp_1 == s.lim___29333); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 16; continue; } + r0 = s.A___29331; + { step = 21; continue; } + case 16: + case 17: + s.p___29352 = (s.e___29387); + s.q___29381 = (s.p___29352); + case 18: + case 19: + { step = 13; continue; } + case 20: + s.tmp_0 = helpers_stringSlice__P20165_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___29352; + s.tmp_0.arg2 = s.q___29381; + s.callLocIdx = 14; s.pc = 25; return s.tmp_0; + case 25: r0 = s.retval; - r0 = undefined; + s.T___29380 = (r0); + r0 = pxsim_Array__push(s.A___29331, s.T___29380); + r0 = s.A___29331; + case 21: return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P282156.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +helpers_stringSplit__P20168.info = {"start":12919,"length":1319,"line":434,"column":4,"endLine":478,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSplit","argumentNames":["S","separator","limit"]} -function scene_Scene_init_inline__P282156_mk(s) { +function helpers_stringSplit__P20168_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P282156, depth: s.depth + 1, + parent: s, fn: helpers_stringSplit__P20168, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + A___29331: undefined, + lim___29333: undefined, + s___29349: undefined, + p___29352: undefined, + R___29353: undefined, + z___29367: undefined, + T___29380: undefined, + q___29381: undefined, + e___29387: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Scene_init_inline__P282180(s) { +function helpers_splitMatch__P20169(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5483,41 +5015,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = PhysicsEngine__C274328_v4_2_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - r0 = s.caps[0].fields["eventContext"]; + s.r___29467 = undefined; + s.s___29470 = undefined; + s.i___29480 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = pxsim_String_.length(s.arg2); + s.r___29467 = (r0); + r0 = pxsim_String_.length(s.arg0); + s.s___29470 = (r0); + r0 = (s.arg1 + s.r___29467); s.tmp_1 = r0; - r0 = s.tmp_1.fields["deltaTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.move; - s.pc = 1; return s.tmp_0; + r0 = (s.tmp_1 > s.s___29470); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = -1; + { step = 7; continue; } case 1: - r0 = s.retval; - r0 = undefined; + case 2: + s.i___29480 = (0); + case 3: + r0 = (s.i___29480 < s.r___29467); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = (s.arg1 + s.i___29480); + s.tmp_4 = r0; + r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); + s.tmp_2 = r0; + r0 = pxsim_String_.charAt(s.arg2, s.i___29480); + s.tmp_5 = r0; + r0 = (s.tmp_2 != s.tmp_5); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = -1; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___29480 + 1); + s.i___29480 = (r0); + { step = 3; continue; } + case 6: + r0 = (s.arg1 + s.r___29467); + case 7: return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P282180.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +helpers_splitMatch__P20169.info = {"start":14244,"length":289,"line":480,"column":4,"endLine":489,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"splitMatch","argumentNames":["S","q","R"]} -function scene_Scene_init_inline__P282180_mk(s) { +function helpers_splitMatch__P20169_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P282180, depth: s.depth + 1, + parent: s, fn: helpers_splitMatch__P20169, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + r___29467: undefined, + s___29470: undefined, + i___29480: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Scene_init_inline__P282193(s) { +function helpers_stringSlice__P20165(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5527,80 +5103,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___282194 = undefined; - s.s___282202 = undefined; - s.unnamed2146___U2 = undefined; - s.unnamed2147___U3 = undefined; - r0 = s.caps[0].fields["eventContext"]; + s.len___29432 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = pxsim_String_.length(s.arg0); + s.len___29432 = (r0); + r0 = (s.arg1 < 0); s.tmp_0 = r0; - r0 = s.tmp_0.fields["deltaTimeMillis"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 / 1000); - s.dt___282194 = (r0); - s.tmp_0 = scene_Camera_update__P274615_mk(s); - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 916; s.pc = 3; return s.tmp_0; - case 3: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = Math_max__P20176_mk(s); + r0 = (s.len___29432 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 10; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - s.s___282202 = (undefined); - r0 = s.caps[0].fields["allSprites"]; - s.unnamed2146___U2 = (r0); - s.unnamed2147___U3 = (0); + s.arg1 = (r0); case 1: - s.tmp_0 = r0 = s.unnamed2147___U3; - r0 = pxsim_Array__length(s.unnamed2146___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2146___U2, s.unnamed2147___U3); - s.s___282202 = (r0); - s.tmp_2 = if___update_3_mk(s); - s.tmp_2.arg0 = s.s___282202; - r0 = s.caps[0].fields["camera"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.dt___282194; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); - s.callLocIdx = 917; s.pc = 4; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["__update"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["__update"], 3); s.callLocIdx = 917; s.pc = 4; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 917; s.pc = 4; return s.tmp_2;; } - else { s.callLocIdx = 917; s.pc = 4; return s.tmp_2; } - } - case 4: - r0 = s.retval; - r0 = (s.unnamed2147___U3 + 1); - s.unnamed2147___U3 = (r0); - { step = 1; continue; } case 2: - s.unnamed2146___U2 = (undefined); - r0 = undefined; + r0 = (s.arg2 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.arg2 = (s.len___29432); + { step = 6; continue; } + case 3: + r0 = (s.arg2 === null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.arg2 = (0); + case 4: + case 5: + case 6: + r0 = (s.arg2 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (s.len___29432 + s.arg2); + s.arg2 = (r0); + case 7: + case 8: + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + r0 = (s.arg2 - s.arg1); + s.tmp_2 = r0; + r0 = pxsim_String_.substr(s.tmp_0, s.tmp_1, s.tmp_2); return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P282193.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +helpers_stringSlice__P20165.info = {"start":11496,"length":440,"line":384,"column":4,"endLine":402,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSlice","argumentNames":["s","start","end"]} -function scene_Scene_init_inline__P282193_mk(s) { +function helpers_stringSlice__P20165_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P282193, depth: s.depth + 1, + parent: s, fn: helpers_stringSlice__P20165, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - dt___282194: undefined, - s___282202: undefined, - unnamed2146___U2: undefined, - unnamed2147___U3: undefined, + len___29432: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Scene_init_inline__P282214(s) { +function scene_Camera_update__P21730(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5610,141 +5187,187 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_Scene_render__P274689_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 919; s.pc = 1; return s.tmp_0; - case 1: + s.elapsed___29971 = undefined; + s.percentComplete___29985 = undefined; + s.damp___29992 = undefined; + s.f___30001 = undefined; + s.x___30007 = undefined; + s.y___30014 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["sprite"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = r0 = s.arg0; + s.tmp_3 = Sprite_x__P21244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 892; s.pc = 9; return s.tmp_3; + case 9: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_lastUpdatedSpriteX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 893; s.pc = 10; return s.tmp_2; + case 10: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Scene_init_inline__P282214.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} - -function scene_Scene_init_inline__P282214_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Scene_init_inline__P282214, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function scene_Scene_init_inline__P282222(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = r0 = globals.stats___274785; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = globals.control_EventContext_onStats___272214; - case 2: - // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - s.tmp_2 = lambda_2_mk(s); - s.tmp_2.argL = globals.control_EventContext_onStats___272214; - if ((globals.control_EventContext_lastStats___272213) && (globals.control_EventContext_lastStats___272213).vtable) { - setupResume(s, 8); - pxsim_String__stringConv(globals.control_EventContext_lastStats___272213); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___272213) + ""; } - case 8: + r0 = (s.tmp_0).fields["_lastUpdatedSpriteY"] = (s.tmp_1); + s.tmp_0 = scene_Camera_offsetX__P21719_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_x__P21244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 894; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 1); s.tmp_3 = r0; - r0 = s.caps[0].fields["allSprites"]; - s.tmp_8 = r0; - r0 = pxsim_Array__length(s.tmp_8); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 9); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 9: + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg1 = r0; + s.callLocIdx = 895; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(" sprites:", s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 10); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 10: + s.tmp_0 = scene_Camera_offsetY__P21721_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 896; s.pc = 14; return s.tmp_2; + case 14: r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.tmp_2.arg0 = r0; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 921; s.pc = 7; return s.tmp_2; - case 7: + r0 = (s.tmp_4 >> 1); + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg1 = r0; + s.callLocIdx = 897; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; + case 1: + case 2: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["_offsetX"]; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["drawOffsetX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["_offsetY"]; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); + r0 = s.arg0.fields["shakeStartTime"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = pxsim.control.millis(); + s.tmp_2 = r0; + r0 = s.arg0.fields["shakeStartTime"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.elapsed___29971 = (r0); + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_1 = r0; + r0 = (s.elapsed___29971 >= s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = (s.arg0).fields["shakeStartTime"] = (undefined); + { step = 6; continue; } case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(globals.debug___274784); - if (!r0) { step = 5; continue; } - s.tmp_0 = PhysicsEngine__C274328_v3_1_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; - s.pc = 11; return s.tmp_0; - case 11: + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_0 = r0; + r0 = (s.elapsed___29971 / s.tmp_0); + s.percentComplete___29985 = (r0); + s.damp___29992 = (1); + r0 = (s.percentComplete___29985 >= 0.75); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_1.arg0 = 0; + r0 = (1 - s.percentComplete___29985); + s.tmp_1.arg1 = r0; + s.callLocIdx = 900; s.pc = 15; return s.tmp_1; + case 15: r0 = s.retval; + s.damp___29992 = (r0); + case 4: case 5: + r0 = s.arg0.fields["shakeAmplitude"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.damp___29992); + s.f___30001 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___30001); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.x___30007 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___30001); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.y___30014 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["drawOffsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.x___30007); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["drawOffsetX"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["drawOffsetY"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.y___30014); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); case 6: - s.tmp_0 = game_consoleOverlay_draw__P274944_mk(s); - s.callLocIdx = 922; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = power_checkDeepSleep__P273747_mk(s); - s.callLocIdx = 923; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; + case 7: + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P282222.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +scene_Camera_update__P21730.info = {"start":2563,"length":1418,"line":83,"column":8,"endLine":116,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} -function scene_Scene_init_inline__P282222_mk(s) { +function scene_Camera_update__P21730_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P282222, depth: s.depth + 1, + parent: s, fn: scene_Camera_update__P21730, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, + elapsed___29971: undefined, + percentComplete___29985: undefined, + damp___29992: undefined, + f___30001: undefined, + x___30007: undefined, + y___30014: undefined, + arg0: undefined, } } -function scene_Scene_init_inline__P282253(s) { +function scene_Camera_offsetY__P21721(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5754,37 +5377,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___30033 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = lambda_2_mk(s); - s.tmp_0.argL = s.arg0; - s.tmp_0.arg0 = s.caps[0]; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 928; s.pc = 1; return s.tmp_0; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 883; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - r0 = undefined; - return leave(s, r0) + s.scene___30033 = (r0); + r0 = s.scene___30033.fields["tileMap"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.scene___30033.fields["tileMap"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["_map"]; + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 3; continue; } + s.tmp_7 = r0 = s.arg0; + s.tmp_10 = tiles_TileMap_offsetY__P21675_mk(s); + r0 = s.scene___30033.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 885; s.pc = 6; return s.tmp_10; + case 6: + r0 = s.retval; + s.tmp_9 = r0; + r0 = pxsim.Math_.floor(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_7).fields["_offsetY"] = (s.tmp_8); + { step = 4; continue; } + case 3: + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.Math_.floor(s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_offsetY"] = (s.tmp_1); + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P282253.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} +scene_Camera_offsetY__P21721.info = {"start":1152,"length":291,"line":39,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} -function scene_Scene_init_inline__P282253_mk(s) { +function scene_Camera_offsetY__P21721_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P282253, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P21721, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + scene___30033: undefined, arg0: undefined, + arg1: undefined, } } -function multiplayer_initPlayerConnectionListeners__P275206(s) { +function tiles_TileMap_enabled__P21680(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5794,43 +5473,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___282256 = undefined; - s.p___282256 = (1); - case 1: - r0 = (s.p___282256 <= 4); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P277262_mk(s); - s.tmp_1.arg0 = s.p___282256; - s.callLocIdx = 1345; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.p___282256 + 1); - s.p___282256 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -multiplayer_initPlayerConnectionListeners__P275206.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} +tiles_TileMap_enabled__P21680.info = {"start":10177,"length":66,"line":351,"column":8,"endLine":353,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"enabled","argumentNames":["this"]} +tiles_TileMap_enabled__P21680.isGetter = true; -function multiplayer_initPlayerConnectionListeners__P275206_mk(s) { +function tiles_TileMap_enabled__P21680_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initPlayerConnectionListeners__P275206, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_enabled__P21680, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - p___282256: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, } } -function multiplayer_registerPlayerConnectionListeners__P277262(s) { +function tiles_TileMap_offsetY__P21675(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5842,51 +5522,57 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P282268); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_onEvent__P272207_mk(s); - s.tmp_1.arg0 = 3241; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.tmp_0; - s.tmp_1.arg3 = 16; - s.callLocIdx = 1347; s.pc = 1; return s.tmp_1; - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_3 = tiles_TileMap_areaHeight__P21677_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 822; s.pc = 3; return s.tmp_3; + case 3: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P282274); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_onEvent__P272207_mk(s); - s.tmp_1.arg0 = 3242; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.tmp_0; - s.tmp_1.arg3 = 16; - s.callLocIdx = 1349; s.pc = 2; return s.tmp_1; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 823; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - r0 = undefined; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 824; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners__P277262.info = {"start":1484,"length":415,"line":45,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"registerPlayerConnectionListeners","argumentNames":["playerNumber"]} +tiles_TileMap_offsetY__P21675.info = {"start":9630,"length":123,"line":329,"column":8,"endLine":331,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} -function multiplayer_registerPlayerConnectionListeners__P277262_mk(s) { +function tiles_TileMap_offsetY__P21675_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners__P277262, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetY__P21675, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function multiplayer_registerPlayerConnectionListeners_inline__P282268(s) { +function tiles_TileMap_areaHeight__P21677(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5896,31 +5582,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P277263_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 1346; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["_map"]; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_height"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 << s.tmp_3); + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners_inline__P282268.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +tiles_TileMap_areaHeight__P21677.info = {"start":9864,"length":93,"line":337,"column":8,"endLine":339,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} -function multiplayer_registerPlayerConnectionListeners_inline__P282268_mk(s) { +function tiles_TileMap_areaHeight__P21677_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P282268, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaHeight__P21677, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, } } -function multiplayer_registerPlayerConnectionListeners_inline__P282274(s) { +function tiles_TileMap_scale__P21671(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5930,31 +5638,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P277263_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 1348; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners_inline__P282274.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +tiles_TileMap_scale__P21671.info = {"start":9205,"length":55,"line":310,"column":8,"endLine":312,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} +tiles_TileMap_scale__P21671.isGetter = true; -function multiplayer_registerPlayerConnectionListeners_inline__P282274_mk(s) { +function tiles_TileMap_scale__P21671_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P282274, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P21671, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, } } -function multiplayer_receiveConnectionChangedEvent__P277263(s) { +function tiles_TileMapData_height__P21657(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5964,67 +5673,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.c___282279 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } - case 1: - s.c___282279 = (globals.player1___273940); - { step = 5; continue; } - case 2: - s.c___282279 = (globals.player2___273937); - { step = 5; continue; } - case 3: - s.c___282279 = (globals.player3___273938); - { step = 5; continue; } - case 4: - s.c___282279 = (globals.player4___273939); - case 5: - r0 = pxsim_numops_toBoolDecr(s.c___282279); - if (!r0) { step = 6; continue; } - s.tmp_0 = controller_Controller_connected__P273973_mk(s); - s.tmp_0.arg0 = s.c___282279; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1350; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 6: - case 7: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; + return leaveAccessor(s, r0) default: oops() } } } -multiplayer_receiveConnectionChangedEvent__P277263.info = {"start":1905,"length":552,"line":58,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"receiveConnectionChangedEvent","argumentNames":["playerNumber","connected"]} +tiles_TileMapData_height__P21657.info = {"start":6489,"length":65,"line":218,"column":8,"endLine":220,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"height","argumentNames":["this"]} +tiles_TileMapData_height__P21657.isGetter = true; -function multiplayer_receiveConnectionChangedEvent__P277263_mk(s) { +function tiles_TileMapData_height__P21657_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_receiveConnectionChangedEvent__P277263, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_height__P21657, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - c___282279: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Controller_connected__P273973(s) { +function scene_Camera_offsetY__P21720(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6036,57 +5710,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - s.tmp_1 = r0; - r0 = (s.arg1 != s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["_connected"] = (s.arg1); - r0 = s.arg0.fields["_connected"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 1; - { step = 2; continue; } - case 1: - r0 = 2; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["_id"]; - s.tmp_2 = r0; - r0 = pxsim.control.raiseEvent(s.tmp_2, s.tmp_1); - case 3: - case 4: - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + return leaveAccessor(s, r0) default: oops() } } } -controller_Controller_connected__P273973.info = {"start":7796,"length":261,"line":254,"column":8,"endLine":259,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this","value"]} +scene_Camera_offsetY__P21720.info = {"start":1084,"length":59,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this"]} +scene_Camera_offsetY__P21720.isGetter = true; -function controller_Controller_connected__P273973_mk(s) { +function scene_Camera_offsetY__P21720_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_connected__P273973, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P21720, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function controller__player1__P273945(s) { +function scene_Camera_offsetX__P21719(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6096,55 +5743,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._players___276521); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.scene___30094 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 880; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.scene___30094 = (r0); + r0 = s.scene___30094.fields["tileMap"]; s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array__getAt(globals._players___276521, 0); + r0 = s.scene___30094.fields["tileMap"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["_map"]; + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); case 2: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C273951_VT); - s.tmp_5 = r0; - r0 = pxsim_Array__mk(); s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_6, globals.left___273932); - r0 = pxsim_Array__push(s.tmp_6, globals.up___273933); - r0 = pxsim_Array__push(s.tmp_6, globals.right___273934); - r0 = pxsim_Array__push(s.tmp_6, globals.down___273935); - r0 = pxsim_Array__push(s.tmp_6, globals.A___273930); - r0 = pxsim_Array__push(s.tmp_6, globals.B___273931); - r0 = pxsim_Array__push(s.tmp_6, globals.menu___273936); - s.tmp_7 = controller_Controller_constructor__P273955_mk(s); - s.tmp_7.arg0 = s.tmp_5; - s.tmp_7.arg1 = 1; - s.tmp_7.arg2 = s.tmp_6; - s.callLocIdx = 152; s.pc = 5; return s.tmp_7; - case 5: + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 3; continue; } + s.tmp_7 = r0 = s.arg0; + s.tmp_10 = tiles_TileMap_offsetX__P21674_mk(s); + r0 = s.scene___30094.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 882; s.pc = 6; return s.tmp_10; + case 6: r0 = s.retval; + s.tmp_9 = r0; + r0 = pxsim.Math_.floor(s.tmp_9); + s.tmp_8 = r0; + r0 = (s.tmp_7).fields["_offsetX"] = (s.tmp_8); + { step = 4; continue; } case 3: + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.Math_.floor(s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_offsetX"] = (s.tmp_1); case 4: - r0 = pxsim_Array__getAt(globals._players___276521, 0); + r0 = undefined; return leave(s, r0) default: oops() } } } -controller__player1__P273945.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} +scene_Camera_offsetX__P21719.info = {"start":784,"length":291,"line":28,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} -function controller__player1__P273945_mk(s) { +function scene_Camera_offsetX__P21719_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__player1__P273945, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P21719, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -6154,13 +5817,19 @@ function controller__player1__P273945_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + scene___30094: undefined, + arg0: undefined, + arg1: undefined, } } -function controller_Controller_constructor__P273955(s) { +function tiles_TileMap_offsetX__P21674(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6170,120 +5839,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.leftId___282335 = undefined; - s.i___282343 = undefined; - s.i___282361 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.control.allocateNotifyEvent(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_id"] = (s.tmp_1); - r0 = (s.arg0).fields["_connected"] = (false); - r0 = (s.arg0).fields["playerIndex"] = (s.arg1); - r0 = (s.arg0).fields["analog"] = (false); - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["buttons"] = (s.arg2); - { step = 4; continue; } - case 1: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buttons"] = (s.tmp_1); - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 7); - s.tmp_0 = r0; - r0 = (1 + s.tmp_0); - s.leftId___282335 = (r0); - s.i___282343 = (0); - case 2: - r0 = (s.i___282343 < 7); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C274006_VT); - s.tmp_1 = r0; - s.tmp_2 = controller_Button_constructor__P274012_mk(s); - s.tmp_2.arg0 = s.tmp_1; - r0 = (s.leftId___282335 + s.i___282343); - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = -1; - s.callLocIdx = 158; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = s.arg0.fields["buttons"]; - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_1); - r0 = (s.i___282343 + 1); - s.i___282343 = (r0); - { step = 2; continue; } + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_3 = tiles_TileMap_areaWidth__P21676_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 819; s.pc = 3; return s.tmp_3; case 3: - case 4: - s.i___282361 = (0); - case 5: - s.tmp_1 = r0 = s.i___282361; - r0 = s.arg0.fields["buttons"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg0.fields["buttons"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___282361); + r0 = pxsim_ImageMethods.width(globals.screen___20904); s.tmp_4 = r0; - r0 = (s.tmp_4).fields["_owner"] = (s.arg0); - r0 = (s.i___282361 + 1); - s.i___282361 = (r0); - { step = 5; continue; } - case 6: - s.tmp_0 = controller_addController__P276585_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 159; s.pc = 8; return s.tmp_0; - case 8: + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 820; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 821; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller_constructor__P273955.info = {"start":2452,"length":696,"line":82,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","playerIndex","buttons"]} +tiles_TileMap_offsetX__P21674.info = {"start":9499,"length":121,"line":325,"column":8,"endLine":327,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetX","argumentNames":["this","value"]} -function controller_Controller_constructor__P273955_mk(s) { +function tiles_TileMap_offsetX__P21674_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_constructor__P273955, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetX__P21674, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - leftId___282335: undefined, - i___282343: undefined, - i___282361: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function controller_addController__P276585(s) { +function tiles_TileMap_areaWidth__P21676(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6297,36 +5905,41 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._players___276521); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._players___276521 = (r0); - case 1: - case 2: - s.tmp_0 = r0 = globals._players___276521; - r0 = s.arg0.fields["playerIndex"]; + r0 = s.arg0.fields["_map"]; s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); + r0 = s.tmp_2.fields["_width"]; s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.arg0); - r0 = undefined; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 << s.tmp_3); + { step = 2; continue; } + case 1: + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -controller_addController__P276585.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} +tiles_TileMap_areaWidth__P21676.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} -function controller_addController__P276585_mk(s) { +function tiles_TileMap_areaWidth__P21676_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_addController__P276585, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaWidth__P21676, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, } } @@ -6334,7 +5947,7 @@ function controller_addController__P276585_mk(s) { -function control_onEvent__P272207(s) { +function tiles_TileMapData_width__P21656(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6344,63 +5957,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___280104 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_0 = control_eventContext__P272224_mk(s); - s.callLocIdx = 40; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.ctx___280104 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___280104); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.control.internalOnEvent(s.arg0, s.arg1, s.arg2, s.arg3); - { step = 2; continue; } - case 1: - s.tmp_0 = control_EventContext_registerHandler__P272221_mk(s); - s.tmp_0.arg0 = s.ctx___280104; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.tmp_0.arg3 = s.arg2; - s.tmp_0.arg4 = s.arg3; - s.callLocIdx = 41; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - case 2: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; + return leaveAccessor(s, r0) default: oops() } } } -control_onEvent__P272207.info = {"start":336,"length":325,"line":9,"column":4,"endLine":15,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"onEvent","argumentNames":["src","value","handler","flags"]} +tiles_TileMapData_width__P21656.info = {"start":6416,"length":63,"line":214,"column":8,"endLine":216,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"width","argumentNames":["this"]} +tiles_TileMapData_width__P21656.isGetter = true; -function control_onEvent__P272207_mk(s) { +function tiles_TileMapData_width__P21656_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_onEvent__P272207, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_width__P21656, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - ctx___280104: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function control_eventContext__P272224(s) { +function scene_Camera_offsetX__P21718(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6410,42 +5992,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___276305); - if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = globals.eventContexts___276305; - r0 = pxsim_Array__length(globals.eventContexts___276305); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - { step = 2; continue; } - case 1: - r0 = undefined; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + return leaveAccessor(s, r0) default: oops() } } } -control_eventContext__P272224.info = {"start":7094,"length":136,"line":213,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} +scene_Camera_offsetX__P21718.info = {"start":716,"length":59,"line":25,"column":8,"endLine":27,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this"]} +scene_Camera_offsetX__P21718.isGetter = true; -function control_eventContext__P272224_mk(s) { +function scene_Camera_offsetX__P21718_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_eventContext__P272224, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P21718, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + arg0: undefined, } } -function control_EventContext_registerHandler__P272221(s) { +function Sprite_y__P21246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6455,113 +6027,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___280127 = undefined; - s.unnamed2120___U1 = undefined; - s.unnamed2121___U2 = undefined; - s.hn___280150 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - s.h___280127 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed2120___U1 = (r0); - s.unnamed2121___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2121___U2; - r0 = pxsim_Array__length(s.unnamed2120___U1); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed2120___U1, s.unnamed2121___U2); - s.h___280127 = (r0); - r0 = s.h___280127.fields["src"]; + r0 = s.arg0.fields["_height"]; s.tmp_3 = r0; - r0 = (s.tmp_3 == s.arg1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 2; continue; } - r0 = s.tmp_2; - { step = 3; continue; } - case 2: - r0 = s.h___280127.fields["value"]; + r0 = (s.tmp_3 << 8); s.tmp_4 = r0; - r0 = (s.tmp_4 == s.arg2); - case 3: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 4; continue; } - r0 = (s.h___280127).fields["flags"] = (s.arg4); - r0 = (s.h___280127).fields["handler"] = (s.arg3); - { step = 7; continue; } - case 4: - case 5: - r0 = (s.unnamed2121___U2 + 1); - s.unnamed2121___U2 = (r0); - { step = 1; continue; } - case 6: - s.unnamed2120___U1 = (undefined); - r0 = pxsim_pxtcore_mkClassInstance(control_EventHandler__C276297_VT); - s.tmp_0 = r0; - s.tmp_1 = control_EventHandler_constructor__P276300_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.tmp_1.arg3 = s.arg3; - s.tmp_1.arg4 = s.arg4; - s.callLocIdx = 52; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.hn___280150 = (s.tmp_0); - r0 = s.arg0.fields["handlers"]; + r0 = pxsim.Math_.idiv(s.tmp_4, 512); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.hn___280150); - s.tmp_0 = control_EventHandler_register__P276298_mk(s); - s.tmp_0.arg0 = s.hn___280150; - s.callLocIdx = 53; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - case 7: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -control_EventContext_registerHandler__P272221.info = {"start":5760,"length":525,"line":173,"column":8,"endLine":186,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerHandler","argumentNames":["this","src","value","handler","flags"]} +Sprite_y__P21246.info = {"start":2893,"length":100,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this"]} +Sprite_y__P21246.isGetter = true; -function control_EventContext_registerHandler__P272221_mk(s) { +function Sprite_y__P21246_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerHandler__P272221, depth: s.depth + 1, + parent: s, fn: Sprite_y__P21246, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - h___280127: undefined, - unnamed2120___U1: undefined, - unnamed2121___U2: undefined, - hn___280150: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function control_EventHandler_constructor__P276300(s) { +function Fx_toFloat__P20228(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6573,41 +6079,27 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C276297_VT)) failedCast(r0); - r0 = (s.arg0).fields["src"] = (s.arg1); - r0 = (s.arg0).fields["value"] = (s.arg2); - r0 = (s.arg0).fields["handler"] = (s.arg3); - r0 = (s.arg0).fields["flags"] = (s.arg4); - r0 = undefined; + r0 = (s.arg0 / 256); return leave(s, r0) default: oops() } } } -control_EventHandler_constructor__P276300.info = {"start":786,"length":165,"line":23,"column":8,"endLine":28,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this","src","value","handler","flags"]} +Fx_toFloat__P20228.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} -function control_EventHandler_constructor__P276300_mk(s) { +function Fx_toFloat__P20228_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_constructor__P276300, depth: s.depth + 1, + parent: s, fn: Fx_toFloat__P20228, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function multiplayer_initServer__P275205(s) { +function Fx_div__P20217(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6617,47 +6109,242 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim.multiplayer.getOrigin(); - s.tmp_1 = r0; - r0 = (s.tmp_1 === "server"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = control_EventContext_registerFrameHandler__P272219_mk(s); - s.tmp_3 = game_eventContext__P274819_mk(s); - s.callLocIdx = 1343; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 210; - s.tmp_2.arg2 = multiplayer_initServer_inline__P282433; - s.callLocIdx = 1344; s.pc = 3; return s.tmp_2; - case 3: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 << 8); + s.tmp_0 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_div__P20217.info = {"start":1145,"length":129,"line":35,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"div","argumentNames":["a","b"]} + +function Fx_div__P20217_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_div__P20217, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Fx_add__P20212(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 + s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_add__P20212.info = {"start":511,"length":118,"line":20,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"add","argumentNames":["a","b"]} + +function Fx_add__P20212_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_add__P20212, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Sprite_x__P21244(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_4 = r0; + r0 = pxsim.Math_.idiv(s.tmp_4, 512); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_x__P21244.info = {"start":2537,"length":99,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this"]} +Sprite_x__P21244.isGetter = true; + +function Sprite_x__P21244_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_x__P21244, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, +} } + + + + + +function PhysicsEngine_move__P21389(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +PhysicsEngine_move__P21389.info = {"start":351,"length":20,"line":18,"column":4,"endLine":18,"endColumn":24,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} + +function PhysicsEngine_move__P21389_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: PhysicsEngine_move__P21389, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function PhysicsEngine_draw__P21388(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +PhysicsEngine_draw__P21388.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} + +function PhysicsEngine_draw__P21388_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: PhysicsEngine_draw__P21388, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function controller___update__P21131(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.dtms___30388 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 * 1000); + s.tmp_0 = r0; + r0 = (s.tmp_0 | 0); + s.dtms___30388 = (r0); + r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P30395); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___30388); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_2 = controller_players__P21100_mk(s); + s.callLocIdx = 194; s.pc = 2; return s.tmp_2; + case 2: r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 196; s.pc = 1; return s.tmp_1; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_initServer__P275205.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} +controller___update__P21131.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} -function multiplayer_initServer__P275205_mk(s) { +function controller___update__P21131_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer__P275205, depth: s.depth + 1, + parent: s, fn: controller___update__P21131, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, + dtms___30388: undefined, + arg0: undefined, } } -function multiplayer_initServer_inline__P282433(s) { +function controller___update_inline__P30395(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6667,35 +6354,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim.multiplayer.getOrigin(); - s.tmp_1 = r0; - r0 = (s.tmp_1 === "server"); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = controller_Controller___update__P21128_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller___update_inline__P30395.info = {"start":13835,"length":27,"line":416,"column":26,"endLine":416,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} + +function controller___update_inline__P30395_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller___update_inline__P30395, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller___update__P21128(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.multiplayer.postImage(globals.screen___273849); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); + s.arg1 = (s.tmp_0); + s.tmp_1 = r0 = s.arg1; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 0); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + r0 = pxsim_pxtcore_mkAction(1, controller_Controller___update_inline__P30408); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + r0 = s.arg0.fields["buttons"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 193; s.pc = 1; return s.tmp_1; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_initServer_inline__P282433.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +controller_Controller___update__P21128.info = {"start":13211,"length":124,"line":396,"column":8,"endLine":399,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} -function multiplayer_initServer_inline__P282433_mk(s) { +function controller_Controller___update__P21128_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer_inline__P282433, depth: s.depth + 1, + parent: s, fn: controller_Controller___update__P21128, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, + arg1: undefined, } } -function game_consoleOverlay_draw__P274944(s) { +function controller_Controller___update_inline__P30408(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6705,191 +6453,145 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.height___282486 = undefined; - s.top___282491 = undefined; - s.i___282497 = undefined; - s.t___282510 = undefined; - s.tOff___282517 = undefined; - s.tab___282519 = undefined; - s.unnamed2150___U6 = undefined; - s.unnamed2151___U7 = undefined; - s.padding___282521 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = controller_Button___update__P21151_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0.arg1 = r0; + s.callLocIdx = 192; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Controller___update_inline__P30408.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} + +function controller_Controller___update_inline__P30408_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller___update_inline__P30408, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function controller_Button___update__P21151(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.delay___30424 = undefined; + s.interval___30434 = undefined; + s.count___30448 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 11; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(globals.instance___277059); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["_pressedElasped"]; s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); + r0 = (s.tmp_5 + s.arg1); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["_pressedElasped"] = (s.tmp_4); + r0 = s.arg0.fields["repeatDelay"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - { step = 13; continue; } + r0 = globals.defaultRepeatDelay___21164; + { step = 4; continue; } case 3: + r0 = s.arg0.fields["repeatDelay"]; case 4: - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = globals.consoleFont___277113; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 1197; s.pc = 14; return s.tmp_7; } - } - case 14: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.height___282486 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___274785); + // jmp value (already in r0) + s.tmp_2 = r0; + s.delay___30424 = (s.tmp_2); + r0 = s.arg0.fields["repeatInterval"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = s.height___282486; + r0 = globals.defaultRepeatInterval___21166; { step = 6; continue; } case 5: - r0 = 0; + r0 = s.arg0.fields["repeatInterval"]; case 6: // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (2 + s.tmp_0); - s.top___282491 = (r0); - s.i___282497 = (0); - case 7: - s.tmp_1 = r0 = s.i___282497; - r0 = pxsim_Array__length(globals.consoleStrings___277105); s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + s.interval___30434 = (s.tmp_2); + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < s.delay___30424); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = pxsim_Array__getAt(globals.consoleStrings___277105, s.i___282497); + if (!r0) { step = 7; continue; } + { step = 11; continue; } + case 7: + case 8: + r0 = s.arg0.fields["_pressedElasped"]; s.tmp_5 = r0; - r0 = pxsim_String_.indexOf(s.tmp_5, "\t", undefined); + r0 = (s.tmp_5 - s.delay___30424); s.tmp_4 = r0; - r0 = (s.tmp_4 >= 0); + r0 = (s.tmp_4 - s.interval___30434); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 10; continue; } - s.tmp_6 = helpers_stringSplit__P271938_mk(s); - r0 = pxsim_Array__getAt(globals.consoleStrings___277105, s.i___282497); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = "\t"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1198; s.pc = 15; return s.tmp_6; - case 15: - r0 = s.retval; - s.t___282510 = (r0); - s.tOff___282517 = (0); - s.tab___282519 = (undefined); - s.unnamed2150___U6 = (s.t___282510); - s.unnamed2151___U7 = (0); - case 8: - s.tmp_0 = r0 = s.unnamed2151___U7; - r0 = pxsim_Array__length(s.unnamed2150___U6); + r0 = (s.tmp_3 / s.interval___30434); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.count___30448 = (r0); + r0 = s.arg0.fields["_repeatCount"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); + r0 = (s.count___30448 != s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed2150___U6, s.unnamed2151___U7); - s.tab___282519 = (r0); - s.tmp_2 = r0 = globals.tabSize___277107; - s.tmp_5 = r0 = s.tOff___282517; - r0 = pxsim_String_.length(s.tab___282519); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 % globals.tabSize___277107); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.padding___282521 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_0.arg1 = s.tab___282519; - s.tmp_2 = r0 = s.tOff___282517; - s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = globals.consoleFont___277113; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charWidth"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charWidth"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 1199; s.pc = 17; return s.tmp_4; } - } - case 17: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = (4 + s.tmp_1); - s.tmp_0.arg2 = r0; - s.tmp_5 = r0 = s.top___282491; - r0 = (s.i___282497 * s.height___282486); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___277104; - s.tmp_0.arg5 = globals.consoleFont___277113; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1200; s.pc = 16; return s.tmp_0; - case 16: + s.tmp_2 = controller_Button_raiseButtonRepeat__P21143_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 208; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; - s.tmp_0 = r0 = s.tOff___282517; - r0 = pxsim_String_.length(s.tab___282519); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.padding___282521); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.tOff___282517 = (r0); - r0 = (s.unnamed2151___U7 + 1); - s.unnamed2151___U7 = (r0); - { step = 8; continue; } + r0 = (s.arg0).fields["_repeatCount"] = (s.count___30448); case 9: - s.unnamed2150___U6 = (undefined); - { step = 11; continue; } case 10: - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - r0 = pxsim_Array__getAt(globals.consoleStrings___277105, s.i___282497); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 4; - s.tmp_1 = r0 = s.top___282491; - r0 = (s.i___282497 * s.height___282486); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___277104; - s.tmp_0.arg5 = globals.consoleFont___277113; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1201; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; case 11: - r0 = (s.i___282497 + 1); - s.i___282497 = (r0); - { step = 7; continue; } - case 12: - case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_draw__P274944.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} +controller_Button___update__P21151.info = {"start":7291,"length":704,"line":217,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"__update","argumentNames":["this","dtms"]} -function game_consoleOverlay_draw__P274944_mk(s) { +function controller_Button___update__P21151_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_draw__P274944, depth: s.depth + 1, + parent: s, fn: controller_Button___update__P21151, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -6897,24 +6599,101 @@ function game_consoleOverlay_draw__P274944_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - height___282486: undefined, - top___282491: undefined, - i___282497: undefined, - t___282510: undefined, - tOff___282517: undefined, - tab___282519: undefined, - unnamed2150___U6: undefined, - unnamed2151___U7: undefined, - padding___282521: undefined, + delay___30424: undefined, + interval___30434: undefined, + count___30448: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function controller_Button_raiseButtonRepeat__P21143(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___21162); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2054, s.tmp_0); + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2055, s.tmp_0); + case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_raiseButtonRepeat__P21143.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} + +function controller_Button_raiseButtonRepeat__P21143_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_raiseButtonRepeat__P21143, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function controller_players__P21100(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller__player1__P21099_mk(s); + s.callLocIdx = 153; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = helpers_arrayFilter__P20155_mk(s); + s.tmp_0.arg0 = globals._players___21018; + s.tmp_0.arg1 = controller_players_inline__P30378; + s.callLocIdx = 154; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +controller_players__P21100.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} + +function controller_players__P21100_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_players__P21100, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, } } -function scene_systemMenu_isVisible__P274925(s) { +function controller_players_inline__P30378(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6924,7 +6703,11 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___277059); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; @@ -6934,23 +6717,24 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_systemMenu_isVisible__P274925.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} +controller_players_inline__P30378.info = {"start":1767,"length":14,"line":55,"column":31,"endLine":55,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function scene_systemMenu_isVisible__P274925_mk(s) { +function controller_players_inline__P30378_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_isVisible__P274925, depth: s.depth + 1, + parent: s, fn: controller_players_inline__P30378, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + arg0: undefined, } } -function helpers_imagePrint__P273807(s) { +function helpers_arrayFilter__P20155(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6960,569 +6744,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___282593 = undefined; - s.cp___282595 = undefined; - s.mult___282596 = undefined; - s.dataW___282601 = undefined; - s.dataH___282607 = undefined; - s.byteHeight___282613 = undefined; - s.charSize___282619 = undefined; - s.dataSize___282623 = undefined; - s.fontdata___282627 = undefined; - s.lastchar___282630 = undefined; - s.imgBuf___282637 = undefined; - s.xOffset___282661 = undefined; - s.yOffset___282662 = undefined; - s.ch___282677 = undefined; - s.l___282696 = undefined; - s.r___282697 = undefined; - s.off___282699 = undefined; - s.guess___282700 = undefined; - s.m___282719 = undefined; - s.v___282728 = undefined; - s.i___282784 = undefined; - s.j___282789 = undefined; - s.mask___282790 = undefined; - s.c___282791 = undefined; - s.n___282808 = undefined; + s.res___27513 = undefined; + s.len___27515 = undefined; + s.i___27518 = undefined; + s.v___27523 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } - r0 = (s.arg2 | 0); - s.arg2 = (r0); - r0 = (s.arg3 | 0); - s.arg3 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg5); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = image_getFontForText__P273794_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 98; s.pc = 39; return s.tmp_2; - case 39: - r0 = s.retval; - s.arg5 = (r0); + r0 = pxsim_Array__mk(); + s.res___27513 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___27515 = (r0); + s.i___27518 = (0); case 1: - case 2: - r0 = pxsim_numops_toBoolDecr(s.arg4); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.arg4 = (1); - case 3: - case 4: - s.x0___282593 = (s.arg2); - s.cp___282595 = (0); - s.tmp_1 = if_multiplier_1_mk(s); - s.tmp_1.arg0 = s.arg5; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "multiplier"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["multiplier"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["multiplier"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 99; s.pc = 40; return s.tmp_1; } - } - case 40: - r0 = s.retval; + r0 = (s.i___27518 < s.len___27515); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = if_multiplier_1_mk(s); - s.tmp_2.arg0 = s.arg5; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "multiplier"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["multiplier"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["multiplier"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 100; s.pc = 41; return s.tmp_2; } - } - case 41: - r0 = s.retval; - { step = 6; continue; } + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___27518); + s.v___27523 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___27523; + s.tmp_1.arg1 = s.i___27518; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 7; s.pc = 5; return s.tmp_1; case 5: - r0 = 1; - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - s.mult___282596 = (s.tmp_3); - s.tmp_1 = if_charWidth_1_mk(s); - s.tmp_1.arg0 = s.arg5; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "charWidth"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["charWidth"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["charWidth"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 101; s.pc = 42; return s.tmp_1; } - } - case 42: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___282596); - s.dataW___282601 = (r0); - s.tmp_1 = if_charHeight_1_mk(s); - s.tmp_1.arg0 = s.arg5; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "charHeight"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["charHeight"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["charHeight"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 102; s.pc = 43; return s.tmp_1; } - } - case 43: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.mult___282596); - s.dataH___282607 = (r0); - r0 = (s.dataH___282607 + 7); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 3); - s.byteHeight___282613 = (r0); - r0 = (s.byteHeight___282613 * s.dataW___282601); - s.charSize___282619 = (r0); - r0 = (2 + s.charSize___282619); - s.dataSize___282623 = (r0); - s.tmp_0 = if_data_1_mk(s); - s.tmp_0.arg0 = s.arg5; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "data"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["data"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["data"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 103; s.pc = 44; return s.tmp_0; } - } - case 44: - r0 = s.retval; - s.fontdata___282627 = (r0); - r0 = pxsim.BufferMethods.length(s.fontdata___282627); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___282623); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.lastchar___282630 = (r0); - r0 = (s.mult___282596 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = (8 + s.charSize___282619); - s.tmp_1 = r0; - r0 = pxsim.control.createBuffer(s.tmp_1); - s.imgBuf___282637 = (r0); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___282637, 0, 135); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___282637, 1, 1); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___282637, 2, s.dataW___282601); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___282637, 4, s.dataH___282607); - case 7: - case 8: - case 9: - s.tmp_1 = r0 = s.cp___282595; - r0 = pxsim_String_.length(s.arg1); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 38; continue; } - s.xOffset___282661 = (0); - s.yOffset___282662 = (0); - s.tmp_0 = r0 = s.arg6; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 10; continue; } - r0 = s.tmp_0; - { step = 11; continue; } - case 10: - s.tmp_1 = r0 = s.cp___282595; - r0 = pxsim_Array__length(s.arg6); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - case 11: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 12; continue; } - s.tmp_4 = if_xOffset_1_mk(s); - r0 = pxsim_Array__getAt(s.arg6, s.cp___282595); - s.tmp_4.arg0 = r0; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "xOffset"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["xOffset"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["xOffset"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 104; s.pc = 45; return s.tmp_4; } - } - case 45: - r0 = s.retval; - s.xOffset___282661 = (r0); - s.tmp_0 = if_yOffset_1_mk(s); - r0 = pxsim_Array__getAt(s.arg6, s.cp___282595); - s.tmp_0.arg0 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "yOffset"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["yOffset"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["yOffset"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 105; s.pc = 46; return s.tmp_0; } - } - case 46: - r0 = s.retval; - s.yOffset___282662 = (r0); - case 12: - case 13: - s.tmp_0 = r0 = s.cp___282595; - r0 = (s.tmp_0 + 1); - s.cp___282595 = (r0); - r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); - s.ch___282677 = (r0); - r0 = (s.ch___282677 == 10); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_1 = r0 = s.arg3; - s.tmp_4 = if_charHeight_1_mk(s); - s.tmp_4.arg0 = s.arg5; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charHeight"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charHeight"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charHeight"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 106; s.pc = 47; return s.tmp_4; } - } - case 47: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 2); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.arg3 = (r0); - s.arg2 = (s.x0___282593); - case 14: - case 15: - r0 = (s.ch___282677 < 32); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - { step = 9; continue; } - case 16: - case 17: - s.l___282696 = (0); - s.r___282697 = (s.lastchar___282630); - s.off___282699 = (0); - r0 = (s.ch___282677 - 32); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.dataSize___282623); - s.guess___282700 = (r0); - r0 = pxsim.BufferMethods.getNumber(s.fontdata___282627, 4, s.guess___282700); - s.tmp_1 = r0; - r0 = (s.tmp_1 == s.ch___282677); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 18; continue; } - s.off___282699 = (s.guess___282700); - { step = 25; continue; } - case 18: - case 19: - r0 = (s.l___282696 <= s.r___282697); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 24; continue; } - s.tmp_1 = r0 = s.l___282696; - r0 = (s.r___282697 - s.l___282696); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.m___282719 = (r0); - s.tmp_0 = r0 = s.fontdata___282627; - r0 = (s.m___282719 * s.dataSize___282623); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); - s.v___282728 = (r0); - r0 = (s.v___282728 == s.ch___282677); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.m___282719 * s.dataSize___282623); - s.off___282699 = (r0); - { step = 24; continue; } - case 20: - case 21: - r0 = (s.v___282728 < s.ch___282677); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.m___282719 + 1); - s.l___282696 = (r0); - { step = 23; continue; } - case 22: - r0 = (s.m___282719 - 1); - s.r___282697 = (r0); - case 23: - { step = 19; continue; } - case 24: - case 25: - r0 = (s.mult___282596 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 26; continue; } - s.tmp_1 = r0 = s.imgBuf___282637; - s.tmp_3 = r0 = s.fontdata___282627; - r0 = (s.off___282699 + 2); - s.tmp_4 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___282619); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); - s.tmp_0 = helpers_imageDrawIcon__P273772_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.imgBuf___282637; - r0 = (s.arg2 + s.xOffset___282661); - s.tmp_0.arg2 = r0; - r0 = (s.arg3 + s.yOffset___282662); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg4; - s.callLocIdx = 107; s.pc = 48; return s.tmp_0; - case 48: - r0 = s.retval; - s.tmp_0 = r0 = s.arg2; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.arg5; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charWidth"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charWidth"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 108; s.pc = 49; return s.tmp_2; } - } - case 49: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.arg2 = (r0); - { step = 37; continue; } - case 26: - r0 = (s.off___282699 + 2); - s.off___282699 = (r0); - s.i___282784 = (0); - case 27: - r0 = (s.i___282784 < s.dataW___282601); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 36; continue; } - s.j___282789 = (0); - s.mask___282790 = (1); - s.tmp_0 = r0 = s.off___282699; - r0 = (s.tmp_0 + 1); - s.off___282699 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___282627, s.tmp_0); - s.c___282791 = (r0); - case 28: - r0 = (s.j___282789 < s.dataH___282607); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 35; continue; } - r0 = (s.mask___282790 == 256); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 29; continue; } - s.tmp_2 = r0 = s.off___282699; - r0 = (s.tmp_2 + 1); - s.off___282699 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___282627, s.tmp_2); - s.c___282791 = (r0); - s.mask___282790 = (1); - case 29: - case 30: - s.n___282808 = (0); - case 31: - r0 = (s.c___282791 & s.mask___282790); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 32; continue; } - r0 = (s.n___282808 + 1); - s.n___282808 = (r0); - r0 = (s.mask___282790 << 1); - s.mask___282790 = (r0); - { step = 31; continue; } - case 32: - r0 = pxsim_numops_toBoolDecr(s.n___282808); - if (!r0) { step = 33; continue; } - s.tmp_0 = helpers_imageFillRect__P273773_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg2; - r0 = (s.xOffset___282661 * s.mult___282596); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg1 = r0; - s.tmp_3 = r0 = s.arg3; - r0 = (s.j___282789 + s.yOffset___282662); - s.tmp_5 = r0; - r0 = (s.tmp_5 * s.mult___282596); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.mult___282596; - r0 = (s.mult___282596 * s.n___282808); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg4; - s.callLocIdx = 109; s.pc = 50; return s.tmp_0; - case 50: r0 = s.retval; - r0 = (s.j___282789 + s.n___282808); - s.j___282789 = (r0); - { step = 34; continue; } - case 33: - r0 = (s.mask___282790 << 1); - s.mask___282790 = (r0); - r0 = (s.j___282789 + 1); - s.j___282789 = (r0); - case 34: - { step = 28; continue; } - case 35: - r0 = (s.arg2 + s.mult___282596); - s.arg2 = (r0); - r0 = (s.i___282784 + 1); - s.i___282784 = (r0); - { step = 27; continue; } - case 36: - case 37: - { step = 9; continue; } - case 38: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -helpers_imagePrint__P273807.info = {"start":15326,"length":3300,"line":213,"column":4,"endLine":306,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"imagePrint","argumentNames":["img","text","x","y","color","font","offsets"]} - -function helpers_imagePrint__P273807_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_imagePrint__P273807, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - x0___282593: undefined, - cp___282595: undefined, - mult___282596: undefined, - dataW___282601: undefined, - dataH___282607: undefined, - byteHeight___282613: undefined, - charSize___282619: undefined, - dataSize___282623: undefined, - fontdata___282627: undefined, - lastchar___282630: undefined, - imgBuf___282637: undefined, - xOffset___282661: undefined, - yOffset___282662: undefined, - ch___282677: undefined, - l___282696: undefined, - r___282697: undefined, - off___282699: undefined, - guess___282700: undefined, - m___282719: undefined, - v___282728: undefined, - i___282784: undefined, - j___282789: undefined, - mask___282790: undefined, - c___282791: undefined, - n___282808: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, -} } - - - - - -function image_getFontForText__P273794(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.i___281830 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.i___281830 = (0); - case 1: - s.tmp_1 = r0 = s.i___281830; - r0 = pxsim_String_.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_String_.charCodeAt(s.arg0, s.i___281830); - s.tmp_4 = r0; - r0 = (s.tmp_4 > 8192); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 2; continue; } - r0 = globals.font12___273793; - { step = 5; continue; } + r0 = pxsim_Array__push(s.res___27513, s.v___27523); case 2: case 3: - r0 = (s.i___281830 + 1); - s.i___281830 = (r0); + r0 = (s.i___27518 + 1); + s.i___27518 = (r0); { step = 1; continue; } case 4: - r0 = globals.font8___273792; - case 5: + r0 = s.res___27513; return leave(s, r0) default: oops() } } } -image_getFontForText__P273794.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} +helpers_arrayFilter__P20155.info = {"start":7695,"length":317,"line":261,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayFilter","argumentNames":["arr","callbackfn"]} -function image_getFontForText__P273794_mk(s) { +function helpers_arrayFilter__P20155_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_getFontForText__P273794, depth: s.depth + 1, + parent: s, fn: helpers_arrayFilter__P20155, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - i___281830: undefined, + res___27513: undefined, + len___27515: undefined, + i___27518: undefined, + v___27523: undefined, arg0: undefined, + arg1: undefined, } } -function helpers_imageFillRect__P273773(s) { +function controller__moveSprites__P21103(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7532,60 +6818,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P276442_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 80; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P276442_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 81; s.pc = 2; return s.tmp_4; + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1 = controller_players__P21100_mk(s); + s.callLocIdx = 155; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods._fillRect(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = controller__moveSprites_inline__P30174; + s.callLocIdx = 157; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageFillRect__P273773.info = {"start":5454,"length":159,"line":176,"column":4,"endLine":178,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageFillRect","argumentNames":["img","x","y","w","h","c"]} +controller__moveSprites__P21103.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} -function helpers_imageFillRect__P273773_mk(s) { +function controller__moveSprites__P21103_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageFillRect__P273773, depth: s.depth + 1, + parent: s, fn: controller__moveSprites__P21103, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function helpers_pack__P276442(s) { +function controller__moveSprites_inline__P30174(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7597,57 +6859,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_2 = Math_clamp__P271943_mk(s); - s.tmp_2.arg0 = -30000; - s.tmp_2.arg1 = 30000; - r0 = (s.arg0 | 0); - s.tmp_2.arg2 = r0; - s.callLocIdx = 77; s.pc = 1; return s.tmp_2; + s.tmp_0 = controller_Controller___preUpdate__P21127_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 156; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 65535); - s.tmp_0 = r0; - s.tmp_5 = Math_clamp__P271943_mk(s); - s.tmp_5.arg0 = -30000; - s.tmp_5.arg1 = 30000; - r0 = (s.arg1 | 0); - s.tmp_5.arg2 = r0; - s.callLocIdx = 78; s.pc = 2; return s.tmp_5; - case 2: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 << 16); - s.tmp_3 = r0; - r0 = (s.tmp_0 | s.tmp_3); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_pack__P276442.info = {"start":4278,"length":145,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} +controller__moveSprites_inline__P30174.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function helpers_pack__P276442_mk(s) { +function controller__moveSprites_inline__P30174_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_pack__P276442, depth: s.depth + 1, + parent: s, fn: controller__moveSprites_inline__P30174, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function Math_clamp__P271943(s) { +function controller_Controller___preUpdate__P21127(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7657,100 +6895,334 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.deadSprites___30181 = undefined; + s.svx___30182 = undefined; + s.svy___30183 = undefined; + s.svxInCricle___30218 = undefined; + s.svyInCircle___30220 = undefined; + s.sq___30222 = undefined; + s.scale___30237 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = Math_min__P271947_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg2; - s.callLocIdx = 15; s.pc = 2; return s.tmp_1; - case 2: + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + s.tmp_3 = controller_Controller__controlledSprites__P21105_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 167; s.pc = 18; return s.tmp_3; + case 18: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 16; s.pc = 1; return s.tmp_0; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 17; continue; } case 1: + case 2: + r0 = pxsim_pxtrt.mklocRef(); + s.deadSprites___30181 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.deadSprites___30181, false); + r0 = pxsim_pxtrt.mklocRef(); + s.svx___30182 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svx___30182, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.svy___30183 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svy___30183, 0); + r0 = s.arg0.fields["analog"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = r0 = s.svx___30182; + s.tmp_5 = controller_Button_pressureLevel__P21149_mk(s); + s.tmp_6 = controller_Controller_right__P21109_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 168; s.pc = 20; return s.tmp_6; + case 20: r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -Math_clamp__P271943.info = {"start":15643,"length":130,"line":528,"column":4,"endLine":530,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"clamp","argumentNames":["min","max","value"]} - -function Math_clamp__P271943_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_clamp__P271943, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function helpers_imageDrawIcon__P273772(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.lambdaArgs = null; - } - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = helpers_pack__P276442_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg3; - s.callLocIdx = 79; s.pc = 1; return s.tmp_3; - case 1: + s.tmp_5.arg0 = r0; + s.callLocIdx = 169; s.pc = 19; return s.tmp_5; + case 19: + r0 = s.retval; + s.tmp_4 = r0; + s.tmp_8 = controller_Button_pressureLevel__P21149_mk(s); + s.tmp_9 = controller_Controller_left__P21108_mk(s); + s.tmp_9.arg0 = s.arg0; + s.callLocIdx = 170; s.pc = 22; return s.tmp_9; + case 22: r0 = s.retval; + s.tmp_8.arg0 = r0; + s.callLocIdx = 171; s.pc = 21; return s.tmp_8; + case 21: + r0 = s.retval; + s.tmp_7 = r0; + r0 = (s.tmp_4 - s.tmp_7); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = pxsim_ImageMethods._drawIcon(s.tmp_0, s.tmp_1, s.tmp_2, s.arg4); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -helpers_imageDrawIcon__P273772.info = {"start":5304,"length":145,"line":173,"column":4,"endLine":175,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawIcon","argumentNames":["img","icon","x","y","c"]} - -function helpers_imageDrawIcon__P273772_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_imageDrawIcon__P273772, depth: s.depth + 1, + r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + s.tmp_0 = r0 = s.svy___30183; + s.tmp_4 = controller_Button_pressureLevel__P21149_mk(s); + s.tmp_5 = controller_Controller_down__P21111_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 172; s.pc = 24; return s.tmp_5; + case 24: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.callLocIdx = 173; s.pc = 23; return s.tmp_4; + case 23: + r0 = s.retval; + s.tmp_3 = r0; + s.tmp_7 = controller_Button_pressureLevel__P21149_mk(s); + s.tmp_8 = controller_Controller_up__P21110_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 174; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 175; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_3 - s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 12; continue; } + case 3: + s.tmp_1 = controller_Button__C21138_v0_1_mk(s); + s.tmp_2 = controller_Controller_right__P21109_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 176; s.pc = 28; return s.tmp_2; + case 28: + r0 = s.retval; + s.tmp_1.arg0 = r0; + if (!checkSubtype(s.tmp_1.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; + s.pc = 27; return s.tmp_1; + case 27: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = 256; + { step = 5; continue; } + case 4: + r0 = 0; + case 5: + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_5 = controller_Button__C21138_v0_1_mk(s); + s.tmp_6 = controller_Controller_left__P21108_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 177; s.pc = 30; return s.tmp_6; + case 30: + r0 = s.retval; + s.tmp_5.arg0 = r0; + if (!checkSubtype(s.tmp_5.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_5.arg0); + s.tmp_5.fn = s.tmp_5.arg0.vtable.methods.isPressed; + s.pc = 29; return s.tmp_5; + case 29: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 6; continue; } + r0 = 256; + { step = 7; continue; } + case 6: + r0 = 0; + case 7: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.svx___30182; + r0 = (s.tmp_3 - s.tmp_7); + s.tmp_9 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_8, s.tmp_9); + s.tmp_1 = controller_Button__C21138_v0_1_mk(s); + s.tmp_2 = controller_Controller_down__P21111_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 178; s.pc = 32; return s.tmp_2; + case 32: + r0 = s.retval; + s.tmp_1.arg0 = r0; + if (!checkSubtype(s.tmp_1.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; + s.pc = 31; return s.tmp_1; + case 31: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = 256; + { step = 9; continue; } + case 8: + r0 = 0; + case 9: + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_5 = controller_Button__C21138_v0_1_mk(s); + s.tmp_6 = controller_Controller_up__P21110_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 179; s.pc = 34; return s.tmp_6; + case 34: + r0 = s.retval; + s.tmp_5.arg0 = r0; + if (!checkSubtype(s.tmp_5.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_5.arg0); + s.tmp_5.fn = s.tmp_5.arg0.vtable.methods.isPressed; + s.pc = 33; return s.tmp_5; + case 33: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 10; continue; } + r0 = 256; + { step = 11; continue; } + case 10: + r0 = 0; + case 11: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.svy___30183; + r0 = (s.tmp_3 - s.tmp_7); + s.tmp_9 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_8, s.tmp_9); + case 12: + r0 = pxsim_pxtrt.mklocRef(); + s.svxInCricle___30218 = (r0); + s.tmp_0 = r0 = s.svxInCricle___30218; + r0 = pxsim_pxtrt_ldlocRef(s.svx___30182); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt.mklocRef(); + s.svyInCircle___30220 = (r0); + s.tmp_0 = r0 = s.svyInCircle___30220; + r0 = pxsim_pxtrt_ldlocRef(s.svy___30183); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_ldlocRef(s.svx___30182); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svx___30182); + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___30183); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___30183); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_0 + s.tmp_3); + s.sq___30222 = (r0); + r0 = (s.sq___30222 > 65536); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (65536 / s.sq___30222); + s.tmp_1 = r0; + r0 = pxsim.Math_.sqrt(s.tmp_1); + s.scale___30237 = (r0); + s.tmp_0 = r0 = s.svxInCricle___30218; + s.tmp_3 = r0 = s.scale___30237; + r0 = pxsim_pxtrt_ldlocRef(s.svx___30182); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + s.tmp_0 = r0 = s.svyInCircle___30220; + s.tmp_3 = r0 = s.scale___30237; + r0 = pxsim_pxtrt_ldlocRef(s.svy___30183); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + case 13: + case 14: + r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P30255); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___30181); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___30182); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___30183); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___30218); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___30220); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_2 = controller_Controller__controlledSprites__P21105_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 180; s.pc = 36; return s.tmp_2; + case 36: + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 188; s.pc = 35; return s.tmp_1; + case 35: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___30181); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + s.tmp_1 = controller_Controller__controlledSprites__P21106_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = helpers_arrayFilter__P20155_mk(s); + s.tmp_3 = controller_Controller__controlledSprites__P21105_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 189; s.pc = 39; return s.tmp_3; + case 39: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = controller_Controller___preUpdate_inline__P30313; + s.callLocIdx = 190; s.pc = 38; return s.tmp_2; + case 38: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 191; s.pc = 37; return s.tmp_1; + case 37: + r0 = s.retval; + case 15: + case 16: + case 17: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Controller___preUpdate__P21127.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} + +function controller_Controller___preUpdate__P21127_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller___preUpdate__P21127, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + deadSprites___30181: undefined, + svx___30182: undefined, + svy___30183: undefined, + svxInCricle___30218: undefined, + svyInCircle___30220: undefined, + sq___30222: undefined, + scale___30237: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function helpers_stringSplit__P271938(s) { +function controller_Controller___preUpdate_inline__P30255(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7760,186 +7232,175 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___282871 = undefined; - s.lim___282873 = undefined; - s.s___282889 = undefined; - s.p___282892 = undefined; - s.R___282893 = undefined; - s.z___282907 = undefined; - s.T___282920 = undefined; - s.q___282921 = undefined; - s.e___282927 = undefined; + s.s___30258 = undefined; + s.vx___30259 = undefined; + s.vy___30260 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.A___282871 = (r0); - s.lim___282873 = (0); - r0 = (s.arg2 === undefined); + s.tmp_0 = if_s_1_mk(s); + s.tmp_1 = r0 = s.arg0; + s.tmp_0.arg0 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "s"); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["s"]; + if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["s"]; } + else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } + else { s.callLocIdx = 181; s.pc = 22; return s.tmp_0; } + } + case 22: + r0 = s.retval; + s.s___30258 = (r0); + s.tmp_2 = if_vx_1_mk(s); + s.tmp_2.arg0 = s.tmp_1; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "vx"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["vx"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["vx"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 182; s.pc = 23; return s.tmp_2; } + } + case 23: + r0 = s.retval; + s.vx___30259 = (r0); + s.tmp_3 = if_vy_1_mk(s); + s.tmp_3.arg0 = s.tmp_1; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "vy"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["vy"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["vy"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 183; s.pc = 24; return s.tmp_3; } + } + case 24: + r0 = s.retval; + s.vy___30260 = (r0); + r0 = s.s___30258.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (536870912 - 1); - s.lim___282873 = (r0); - { step = 4; continue; } + r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); + { step = 21; continue; } case 1: - r0 = (s.arg2 < 0); + case 2: + r0 = s.arg0.fields["_inputLastFrame"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.lim___282873 = (0); - { step = 3; continue; } - case 2: - r0 = (s.arg2 | 0); - s.lim___282873 = (r0); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.vx___30259); + if (!r0) { step = 3; continue; } + r0 = (s.s___30258).fields["_vx"] = (0); case 3: case 4: - r0 = pxsim_String_.length(s.arg0); - s.s___282889 = (r0); - s.p___282892 = (0); - s.R___282893 = (s.arg1); - r0 = (s.lim___282873 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.vy___30260); if (!r0) { step = 5; continue; } - r0 = s.A___282871; - { step = 21; continue; } + r0 = (s.s___30258).fields["_vy"] = (0); case 5: case 6: - r0 = (s.arg1 === undefined); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array_.setAt(s.A___282871, 0, s.arg0); - r0 = s.A___282871; - { step = 21; continue; } case 7: case 8: - r0 = (s.s___282889 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_1 = helpers_splitMatch__P276228_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = 0; - s.tmp_1.arg2 = s.R___282893; - s.callLocIdx = 11; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - s.z___282907 = (r0); - r0 = (s.z___282907 > -1); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 9; continue; } - r0 = s.A___282871; - { step = 21; continue; } + r0 = s.tmp_0; + { step = 10; continue; } case 9: + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); case 10: - r0 = pxsim_Array_.setAt(s.A___282871, 0, s.arg0); - r0 = s.A___282871; - { step = 21; continue; } + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 19; continue; } + s.tmp_2 = r0 = s.vx___30259; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 11; continue; } + r0 = s.tmp_2; + { step = 12; continue; } case 11: + r0 = s.vy___30260; case 12: - s.q___282921 = (s.p___282892); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 13; continue; } + s.tmp_4 = r0 = s.s___30258; + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.vx___30259); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); + s.tmp_0 = r0 = s.s___30258; + r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___30260); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + { step = 18; continue; } case 13: - r0 = (s.q___282921 != s.s___282889); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_1 = helpers_splitMatch__P276228_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.q___282921; - s.tmp_1.arg2 = s.R___282893; - s.callLocIdx = 12; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - s.e___282927 = (r0); - r0 = (s.e___282927 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.vx___30259); if (!r0) { step = 14; continue; } - r0 = (s.q___282921 + 1); - s.q___282921 = (r0); - { step = 19; continue; } + s.tmp_0 = r0 = s.s___30258; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vx___30259); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + { step = 17; continue; } case 14: - r0 = (s.e___282927 == s.p___282892); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.vy___30260); if (!r0) { step = 15; continue; } - r0 = (s.q___282921 + 1); - s.q___282921 = (r0); - { step = 18; continue; } - case 15: - s.tmp_0 = helpers_stringSlice__P271935_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___282892; - s.tmp_0.arg2 = s.q___282921; - s.callLocIdx = 13; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.T___282920 = (r0); - r0 = pxsim_Array__push(s.A___282871, s.T___282920); - r0 = pxsim_Array__length(s.A___282871); + s.tmp_0 = r0 = s.s___30258; + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___30260); s.tmp_1 = r0; - r0 = (s.tmp_1 == s.lim___282873); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - r0 = s.A___282871; - { step = 21; continue; } + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + case 15: case 16: case 17: - s.p___282892 = (s.e___282927); - s.q___282921 = (s.p___282892); case 18: + r0 = (s.arg0).fields["_inputLastFrame"] = (true); + { step = 20; continue; } case 19: - { step = 13; continue; } + r0 = (s.arg0).fields["_inputLastFrame"] = (false); case 20: - s.tmp_0 = helpers_stringSlice__P271935_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___282892; - s.tmp_0.arg2 = s.q___282921; - s.callLocIdx = 14; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.T___282920 = (r0); - r0 = pxsim_Array__push(s.A___282871, s.T___282920); - r0 = s.A___282871; case 21: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_stringSplit__P271938.info = {"start":12919,"length":1319,"line":434,"column":4,"endLine":478,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSplit","argumentNames":["S","separator","limit"]} +controller_Controller___preUpdate_inline__P30255.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} -function helpers_stringSplit__P271938_mk(s) { +function controller_Controller___preUpdate_inline__P30255_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSplit__P271938, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P30255, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - A___282871: undefined, - lim___282873: undefined, - s___282889: undefined, - p___282892: undefined, - R___282893: undefined, - z___282907: undefined, - T___282920: undefined, - q___282921: undefined, - e___282927: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + s___30258: undefined, + vx___30259: undefined, + vy___30260: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_splitMatch__P276228(s) { +function controller_Controller___preUpdate_inline__P30313(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7949,85 +7410,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___283007 = undefined; - s.s___283010 = undefined; - s.i___283020 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_String_.length(s.arg2); - s.r___283007 = (r0); - r0 = pxsim_String_.length(s.arg0); - s.s___283010 = (r0); - r0 = (s.arg1 + s.r___283007); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.s___283010); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = -1; - { step = 7; continue; } - case 1: - case 2: - s.i___283020 = (0); - case 3: - r0 = (s.i___283020 < s.r___283007); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = (s.arg1 + s.i___283020); - s.tmp_4 = r0; - r0 = pxsim_String_.charAt(s.tmp_3, s.tmp_4); + r0 = s.arg0.fields["s"]; + r0 = r0.fields["flags"]; s.tmp_2 = r0; - r0 = pxsim_String_.charAt(s.arg2, s.i___283020); - s.tmp_5 = r0; - r0 = (s.tmp_2 != s.tmp_5); + r0 = (s.tmp_2 & 2); s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = -1; - { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___283020 + 1); - s.i___283020 = (r0); - { step = 3; continue; } - case 6: - r0 = (s.arg1 + s.r___283007); - case 7: + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -helpers_splitMatch__P276228.info = {"start":14244,"length":289,"line":480,"column":4,"endLine":489,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"splitMatch","argumentNames":["S","q","R"]} +controller_Controller___preUpdate_inline__P30313.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} -function helpers_splitMatch__P276228_mk(s) { +function controller_Controller___preUpdate_inline__P30313_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_splitMatch__P276228, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P30313, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - r___283007: undefined, - s___283010: undefined, - i___283020: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_stringSlice__P271935(s) { +function controller_Button_pressureLevel__P21149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8037,81 +7452,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___282972 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_String_.length(s.arg0); - s.len___282972 = (r0); - r0 = (s.arg1 < 0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = pxsim.control.deviceDalVersion(); + s.tmp_1 = r0; + r0 = (s.tmp_1 == "sim"); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = Math_max__P271946_mk(s); - r0 = (s.len___282972 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 10; s.pc = 9; return s.tmp_1; - case 9: + if (!r0) { step = 3; continue; } + s.tmp_3 = controller_Button__C21138_v0_1_mk(s); + s.tmp_3.arg0 = s.arg0; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_3.arg0); + s.tmp_3.fn = s.tmp_3.arg0.vtable.methods.isPressed; + s.pc = 6; return s.tmp_3; + case 6: r0 = s.retval; - s.arg1 = (r0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 1; continue; } + r0 = 512; + { step = 2; continue; } case 1: + r0 = 0; case 2: - r0 = (s.arg2 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.arg2 = (s.len___282972); - { step = 6; continue; } + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; + { step = 5; continue; } + { step = 4; continue; } case 3: - r0 = (s.arg2 === null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.arg2 = (0); + r0 = s.arg0.fields["id"]; + s.tmp_5 = r0; + r0 = pxsim_pxtcore.pressureLevelByButtonId(s.tmp_5, -1); + { step = 5; continue; } case 4: + r0 = undefined; case 5: - case 6: - r0 = (s.arg2 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = (s.len___282972 + s.arg2); - s.arg2 = (r0); - case 7: - case 8: - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = (s.arg2 - s.arg1); - s.tmp_2 = r0; - r0 = pxsim_String_.substr(s.tmp_0, s.tmp_1, s.tmp_2); return leave(s, r0) default: oops() } } } -helpers_stringSlice__P271935.info = {"start":11496,"length":440,"line":384,"column":4,"endLine":402,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"stringSlice","argumentNames":["s","start","end"]} +controller_Button_pressureLevel__P21149.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} -function helpers_stringSlice__P271935_mk(s) { +function controller_Button_pressureLevel__P21149_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSlice__P271935, depth: s.depth + 1, + parent: s, fn: controller_Button_pressureLevel__P21149, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - len___282972: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_Scene_render__P274689(s) { +function controller_Button_isPressed__P21148(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8121,70 +7525,438 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___283104 = undefined; - s.unnamed2148___U1 = undefined; - s.unnamed2149___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + return leave(s, r0) + default: oops() +} } } +controller_Button_isPressed__P21148.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} + +function controller_Button_isPressed__P21148_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_isPressed__P21148, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function controller_Controller_down__P21111(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 11; continue; } - case 1: - case 2: - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 4); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); - r0 = s.arg0.fields["flags"]; + r0 = (4 - 1); s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["previousScene"]; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 5; continue; } - s.tmp_3 = scene_Scene_render__P274689_mk(s); - r0 = s.arg0.fields["previousScene"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 931; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = scene_Background_draw__P274495_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 932; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - case 6: - r0 = s.arg0.fields["flags"]; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_down__P21111.info = {"start":4131,"length":77,"line":145,"column":8,"endLine":147,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"down","argumentNames":["this"]} +controller_Controller_down__P21111.isGetter = true; + +function controller_Controller_down__P21111_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_down__P21111, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller_button__P21118(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (s.arg1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leave(s, r0) + default: oops() +} } } +controller_Controller_button__P21118.info = {"start":6666,"length":105,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} + +function controller_Controller_button__P21118_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_button__P21118, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function controller_Controller_up__P21110(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_up__P21110.info = {"start":3979,"length":73,"line":137,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"up","argumentNames":["this"]} +controller_Controller_up__P21110.isGetter = true; + +function controller_Controller_up__P21110_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_up__P21110, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller_right__P21109(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (3 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_right__P21109.info = {"start":3823,"length":79,"line":129,"column":8,"endLine":131,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"right","argumentNames":["this"]} +controller_Controller_right__P21109.isGetter = true; + +function controller_Controller_right__P21109_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_right__P21109, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller_left__P21108(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; + s.tmp_0 = r0; + r0 = (1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_left__P21108.info = {"start":3666,"length":77,"line":121,"column":8,"endLine":123,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"left","argumentNames":["this"]} +controller_Controller_left__P21108.isGetter = true; + +function controller_Controller_left__P21108_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_left__P21108, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function controller_Controller__controlledSprites__P21106(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 161; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Controller__controlledSprites__P21106.info = {"start":3300,"length":134,"line":105,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} + +function controller_Controller__controlledSprites__P21106_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller__controlledSprites__P21106, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function controller_Controller__controlledSprites__P21105(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 160; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = r0.fields["controlledSprites"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["playerIndex"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller__controlledSprites__P21105.info = {"start":3158,"length":132,"line":101,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this"]} +controller_Controller__controlledSprites__P21105.isGetter = true; + +function controller_Controller__controlledSprites__P21105_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller__controlledSprites__P21105, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, +} } + + + + + +function Fx_imul__P20216(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim.Math_.imul(s.arg0, s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_imul__P20216.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} + +function Fx_imul__P20216_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_imul__P20216, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function scene_Scene_render__P21032(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.s___29567 = undefined; + s.unnamed180___U1 = undefined; + s.unnamed181___U2 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } + case 1: + case 2: + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 | 4); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = s.arg0.fields["previousScene"]; + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 5; continue; } + s.tmp_3 = scene_Scene_render__P21032_mk(s); + r0 = s.arg0.fields["previousScene"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 931; s.pc = 12; return s.tmp_3; + case 12: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = scene_Background_draw__P21622_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 932; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + case 6: + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 7; continue; } - s.tmp_2 = helpers_arraySort__P271921_mk(s); + s.tmp_2 = helpers_arraySort__P20150_mk(s); r0 = s.arg0.fields["allSprites"]; s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = scene_Scene_render_inline__P283081; + s.tmp_2.arg1 = scene_Scene_render_inline__P29543; s.callLocIdx = 937; s.pc = 14; return s.tmp_2; case 14: r0 = s.retval; @@ -8196,20 +7968,20 @@ switch (step) { r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); case 7: case 8: - s.s___283104 = (undefined); + s.s___29567 = (undefined); r0 = s.arg0.fields["allSprites"]; - s.unnamed2148___U1 = (r0); - s.unnamed2149___U2 = (0); + s.unnamed180___U1 = (r0); + s.unnamed181___U2 = (0); case 9: - s.tmp_0 = r0 = s.unnamed2149___U2; - r0 = pxsim_Array__length(s.unnamed2148___U1); + s.tmp_0 = r0 = s.unnamed181___U2; + r0 = pxsim_Array__length(s.unnamed180___U1); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed2148___U1, s.unnamed2149___U2); - s.s___283104 = (r0); + r0 = pxsim_Array__getAt(s.unnamed180___U1, s.unnamed181___U2); + s.s___29567 = (r0); s.tmp_2 = if___draw_2_mk(s); - s.tmp_2.arg0 = s.s___283104; + s.tmp_2.arg0 = s.s___29567; r0 = s.arg0.fields["camera"]; s.tmp_2.arg1 = r0; if (!s.tmp_2.arg0.vtable.iface) { @@ -8223,11 +7995,11 @@ switch (step) { } case 15: r0 = s.retval; - r0 = (s.unnamed2149___U2 + 1); - s.unnamed2149___U2 = (r0); + r0 = (s.unnamed181___U2 + 1); + s.unnamed181___U2 = (r0); { step = 9; continue; } case 10: - s.unnamed2148___U1 = (undefined); + s.unnamed180___U1 = (undefined); s.tmp_0 = r0 = s.arg0; r0 = s.tmp_0.fields["flags"]; s.tmp_2 = r0; @@ -8239,21 +8011,21 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Scene_render__P274689.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} +scene_Scene_render__P21032.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} -function scene_Scene_render__P274689_mk(s) { +function scene_Scene_render__P21032_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render__P274689, depth: s.depth + 1, + parent: s, fn: scene_Scene_render__P21032, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - s___283104: undefined, - unnamed2148___U1: undefined, - unnamed2149___U2: undefined, + s___29567: undefined, + unnamed180___U1: undefined, + unnamed181___U2: undefined, arg0: undefined, } } @@ -8261,7 +8033,7 @@ function scene_Scene_render__P274689_mk(s) { -function scene_Scene_render_inline__P283081(s) { +function scene_Scene_render_inline__P29543(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8343,12 +8115,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Scene_render_inline__P283081.info = {"start":8781,"length":52,"line":242,"column":37,"endLine":242,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} +scene_Scene_render_inline__P29543.info = {"start":8781,"length":52,"line":242,"column":37,"endLine":242,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} -function scene_Scene_render_inline__P283081_mk(s) { +function scene_Scene_render_inline__P29543_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render_inline__P283081, depth: s.depth + 1, + parent: s, fn: scene_Scene_render_inline__P29543, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8368,7 +8140,7 @@ function scene_Scene_render_inline__P283081_mk(s) { -function scene_Background_draw__P274495(s) { +function scene_Background_draw__P21622(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8383,27 +8155,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C274486_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Background__C21617_VT)) failedCast(r0); r0 = s.arg0.fields["color"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.fill(globals.screen___273849, s.tmp_0); + r0 = pxsim_ImageMethods.fill(globals.screen___20904, s.tmp_0); r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.arg0.fields["_image"]; s.tmp_1 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___273849, s.tmp_1, 0, 0); + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___20904, s.tmp_1, 0, 0); case 1: case 2: r0 = s.arg0.fields["_layers"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, scene_Background_draw_inline__P283252); + r0 = pxsim_pxtcore_mkAction(1, scene_Background_draw_inline__P29719); s.tmp_1 = r0; r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P271925_mk(s); + s.tmp_2 = helpers_arrayForEach__P20154_mk(s); r0 = s.arg0.fields["_layers"]; s.tmp_2.arg0 = r0; s.tmp_2.arg1 = s.tmp_1; @@ -8416,12 +8188,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Background_draw__P274495.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} +scene_Background_draw__P21622.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} -function scene_Background_draw__P274495_mk(s) { +function scene_Background_draw__P21622_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw__P274495, depth: s.depth + 1, + parent: s, fn: scene_Background_draw__P21622, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8433,7 +8205,7 @@ function scene_Background_draw__P274495_mk(s) { -function scene_Background_draw_inline__P283252(s) { +function scene_Background_draw_inline__P29719(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8443,8 +8215,8 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___283254 = undefined; - s.oy___283265 = undefined; + s.ox___29721 = undefined; + s.oy___29735 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; @@ -8459,7 +8231,7 @@ switch (step) { r0 = (s.tmp_1 / s.tmp_2); s.tmp_0 = r0; r0 = pxsim.Math_.round(s.tmp_0); - s.ox___283254 = (r0); + s.ox___29721 = (r0); r0 = s.caps[0].fields["camera"]; r0 = r0.fields["drawOffsetY"]; s.tmp_1 = r0; @@ -8470,11 +8242,11 @@ switch (step) { r0 = (s.tmp_1 / s.tmp_2); s.tmp_0 = r0; r0 = pxsim.Math_.round(s.tmp_0); - s.oy___283265 = (r0); - s.tmp_0 = scene_BackgroundLayer_draw__P274504_mk(s); + s.oy___29735 = (r0); + s.tmp_0 = scene_BackgroundLayer_draw__P21625_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ox___283254; - s.tmp_0.arg2 = s.oy___283265; + s.tmp_0.arg1 = s.ox___29721; + s.tmp_0.arg2 = s.oy___29735; s.callLocIdx = 793; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; @@ -8482,19 +8254,19 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Background_draw_inline__P283252.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} +scene_Background_draw_inline__P29719.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} -function scene_Background_draw_inline__P283252_mk(s) { +function scene_Background_draw_inline__P29719_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw_inline__P283252, depth: s.depth + 1, + parent: s, fn: scene_Background_draw_inline__P29719, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - ox___283254: undefined, - oy___283265: undefined, + ox___29721: undefined, + oy___29735: undefined, arg0: undefined, } } @@ -8502,7 +8274,7 @@ function scene_Background_draw_inline__P283252_mk(s) { -function scene_BackgroundLayer_draw__P274504(s) { +function scene_BackgroundLayer_draw__P21625(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8512,19 +8284,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___283283 = undefined; - s.h___283286 = undefined; - s.pw___283289 = undefined; - s.ph___283293 = undefined; - s.rx___283302 = undefined; - s.ry___283305 = undefined; - s.y___283374 = undefined; - s.py___283375 = undefined; - s.dh___283384 = undefined; - s.x___283392 = undefined; - s.rxl___283393 = undefined; - s.px___283399 = undefined; - s.dw___283403 = undefined; + s.w___29754 = undefined; + s.h___29757 = undefined; + s.pw___29760 = undefined; + s.ph___29765 = undefined; + s.rx___29774 = undefined; + s.ry___29777 = undefined; + s.y___29851 = undefined; + s.py___29852 = undefined; + s.dh___29861 = undefined; + s.x___29869 = undefined; + s.rxl___29870 = undefined; + s.px___29876 = undefined; + s.dw___29880 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -8532,20 +8304,20 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_BackgroundLayer__C274496_VT)) failedCast(r0); - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.w___283283 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.h___283286 = (r0); + if (!checkSubtype(r0, scene_BackgroundLayer__C21624_VT)) failedCast(r0); + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.w___29754 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.h___29757 = (r0); r0 = s.arg0.fields["img"]; s.tmp_0 = r0; r0 = pxsim_ImageMethods.width(s.tmp_0); - s.pw___283289 = (r0); + s.pw___29760 = (r0); r0 = s.arg0.fields["img"]; s.tmp_0 = r0; r0 = pxsim_ImageMethods.height(s.tmp_0); - s.ph___283293 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pw___283289); + s.ph___29765 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pw___29760); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -8554,7 +8326,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(s.ph___283293); + r0 = pxsim_numops_toBoolDecr(s.ph___29765); s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); case 2: @@ -8566,9 +8338,9 @@ switch (step) { case 3: case 4: r0 = (0 - s.arg1); - s.rx___283302 = (r0); + s.rx___29774 = (r0); r0 = (0 - s.arg2); - s.ry___283305 = (r0); + s.ry___29777 = (r0); r0 = s.arg0.fields["alignX"]; s.tmp_0 = r0; r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); @@ -8578,20 +8350,20 @@ switch (step) { r0 = s.tmp_0; { step = 7; continue; } case 5: - s.tmp_1 = r0 = s.rx___283302; - r0 = (s.w___283283 + s.pw___283289); + s.tmp_1 = r0 = s.rx___29774; + r0 = (s.w___29754 + s.pw___29760); s.tmp_2 = r0; r0 = (s.tmp_1 - s.tmp_2); - s.rx___283302 = (r0); + s.rx___29774 = (r0); { step = 7; continue; } case 6: - s.tmp_0 = r0 = s.rx___283302; - r0 = (s.w___283283 + s.pw___283289); + s.tmp_0 = r0 = s.rx___29774; + r0 = (s.w___29754 + s.pw___29760); s.tmp_2 = r0; r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.rx___283302 = (r0); + s.rx___29774 = (r0); case 7: r0 = s.arg0.fields["alignY"]; s.tmp_0 = r0; @@ -8602,120 +8374,120 @@ switch (step) { r0 = s.tmp_0; { step = 10; continue; } case 8: - s.tmp_1 = r0 = s.ry___283305; - r0 = (s.h___283286 + s.ph___283293); + s.tmp_1 = r0 = s.ry___29777; + r0 = (s.h___29757 + s.ph___29765); s.tmp_2 = r0; r0 = (s.tmp_1 - s.tmp_2); - s.ry___283305 = (r0); + s.ry___29777 = (r0); { step = 10; continue; } case 9: - s.tmp_0 = r0 = s.ry___283305; - r0 = (s.h___283286 + s.ph___283293); + s.tmp_0 = r0 = s.ry___29777; + r0 = (s.h___29757 + s.ph___29765); s.tmp_2 = r0; r0 = (s.tmp_2 >> 1); s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.ry___283305 = (r0); + s.ry___29777 = (r0); case 10: - r0 = (s.rx___283302 % s.w___283283); - s.rx___283302 = (r0); - r0 = (s.rx___283302 < 0); + r0 = (s.rx___29774 % s.w___29754); + s.rx___29774 = (r0); + r0 = (s.rx___29774 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 11; continue; } - r0 = (s.rx___283302 + s.w___283283); - s.rx___283302 = (r0); + r0 = (s.rx___29774 + s.w___29754); + s.rx___29774 = (r0); case 11: case 12: - r0 = (s.ry___283305 % s.h___283286); - s.ry___283305 = (r0); - r0 = (s.ry___283305 < 0); + r0 = (s.ry___29777 % s.h___29757); + s.ry___29777 = (r0); + r0 = (s.ry___29777 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 13; continue; } - r0 = (s.ry___283305 + s.h___283286); - s.ry___283305 = (r0); + r0 = (s.ry___29777 + s.h___29757); + s.ry___29777 = (r0); case 13: case 14: - r0 = pxsim.Math_.floor(s.rx___283302); - s.rx___283302 = (r0); - r0 = pxsim.Math_.floor(s.ry___283305); - s.ry___283305 = (r0); - s.y___283374 = (0); - s.py___283375 = (0); + r0 = pxsim.Math_.floor(s.rx___29774); + s.rx___29774 = (r0); + r0 = pxsim.Math_.floor(s.ry___29777); + s.ry___29777 = (r0); + s.y___29851 = (0); + s.py___29852 = (0); case 15: - r0 = (s.y___283374 < s.h___283286); + r0 = (s.y___29851 < s.h___29757); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 22; continue; } - r0 = (s.y___283374 % s.ph___283293); - s.py___283375 = (r0); - s.tmp_0 = Math_min__P271947_mk(s); - r0 = (s.ph___283293 - s.py___283375); + r0 = (s.y___29851 % s.ph___29765); + s.py___29852 = (r0); + s.tmp_0 = Math_min__P20177_mk(s); + r0 = (s.ph___29765 - s.py___29852); s.tmp_0.arg0 = r0; - r0 = (s.h___283286 - s.ry___283305); + r0 = (s.h___29757 - s.ry___29777); s.tmp_0.arg1 = r0; s.callLocIdx = 796; s.pc = 24; return s.tmp_0; case 24: r0 = s.retval; - s.dh___283384 = (r0); - s.x___283392 = (0); - s.rxl___283393 = (s.rx___283302); + s.dh___29861 = (r0); + s.x___29869 = (0); + s.rxl___29870 = (s.rx___29774); case 16: - r0 = (s.x___283392 < s.w___283283); + r0 = (s.x___29869 < s.w___29754); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 19; continue; } - r0 = (s.x___283392 % s.pw___283289); - s.px___283399 = (r0); - s.tmp_0 = Math_min__P271947_mk(s); - r0 = (s.pw___283289 - s.px___283399); + r0 = (s.x___29869 % s.pw___29760); + s.px___29876 = (r0); + s.tmp_0 = Math_min__P20177_mk(s); + r0 = (s.pw___29760 - s.px___29876); s.tmp_0.arg0 = r0; - r0 = (s.w___283283 - s.rxl___283393); + r0 = (s.w___29754 - s.rxl___29870); s.tmp_0.arg1 = r0; s.callLocIdx = 797; s.pc = 25; return s.tmp_0; case 25: r0 = s.retval; - s.dw___283403 = (r0); + s.dw___29880 = (r0); r0 = s.arg0.fields["img"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawImage(globals.screen___273849, s.tmp_0, s.rxl___283393, s.ry___283305); - r0 = (s.rxl___283393 + s.dw___283403); + r0 = pxsim_ImageMethods.drawImage(globals.screen___20904, s.tmp_0, s.rxl___29870, s.ry___29777); + r0 = (s.rxl___29870 + s.dw___29880); s.tmp_0 = r0; - r0 = (s.tmp_0 % s.w___283283); - s.rxl___283393 = (r0); + r0 = (s.tmp_0 % s.w___29754); + s.rxl___29870 = (r0); r0 = s.arg0.fields["repeatX"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 17; continue; } - r0 = s.dw___283403; + r0 = s.dw___29880; { step = 18; continue; } case 17: - r0 = s.w___283283; + r0 = s.w___29754; case 18: // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.x___283392 + s.tmp_1); - s.x___283392 = (r0); + r0 = (s.x___29869 + s.tmp_1); + s.x___29869 = (r0); { step = 16; continue; } case 19: - r0 = (s.ry___283305 + s.dh___283384); + r0 = (s.ry___29777 + s.dh___29861); s.tmp_0 = r0; - r0 = (s.tmp_0 % s.h___283286); - s.ry___283305 = (r0); + r0 = (s.tmp_0 % s.h___29757); + s.ry___29777 = (r0); r0 = s.arg0.fields["repeatY"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 20; continue; } - r0 = s.dh___283384; + r0 = s.dh___29861; { step = 21; continue; } case 20: - r0 = s.h___283286; + r0 = s.h___29757; case 21: // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.y___283374 + s.tmp_1); - s.y___283374 = (r0); + r0 = (s.y___29851 + s.tmp_1); + s.y___29851 = (r0); { step = 15; continue; } case 22: case 23: @@ -8723,30 +8495,30 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_draw__P274504.info = {"start":3063,"length":1537,"line":99,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this","offsetX","offsetY"]} +scene_BackgroundLayer_draw__P21625.info = {"start":3063,"length":1537,"line":99,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this","offsetX","offsetY"]} -function scene_BackgroundLayer_draw__P274504_mk(s) { +function scene_BackgroundLayer_draw__P21625_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_draw__P274504, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_draw__P21625, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - w___283283: undefined, - h___283286: undefined, - pw___283289: undefined, - ph___283293: undefined, - rx___283302: undefined, - ry___283305: undefined, - y___283374: undefined, - py___283375: undefined, - dh___283384: undefined, - x___283392: undefined, - rxl___283393: undefined, - px___283399: undefined, - dw___283403: undefined, + w___29754: undefined, + h___29757: undefined, + pw___29760: undefined, + ph___29765: undefined, + rx___29774: undefined, + ry___29777: undefined, + y___29851: undefined, + py___29852: undefined, + dh___29861: undefined, + x___29869: undefined, + rxl___29870: undefined, + px___29876: undefined, + dw___29880: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -8756,7 +8528,7 @@ function scene_BackgroundLayer_draw__P274504_mk(s) { -function helpers_arraySort__P271921(s) { +function helpers_arraySort__P20150(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8788,10 +8560,10 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - s.arg1 = (helpers_arraySort_inline__P283126); + s.arg1 = (helpers_arraySort_inline__P29590); case 3: case 4: - s.tmp_0 = helpers_sortHelper__P276226_mk(s); + s.tmp_0 = helpers_sortHelper__P20149_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; s.callLocIdx = 3; s.pc = 5; return s.tmp_0; @@ -8800,12 +8572,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -helpers_arraySort__P271921.info = {"start":5663,"length":859,"line":207,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySort","argumentNames":["arr","callbackfn"]} +helpers_arraySort__P20150.info = {"start":5663,"length":859,"line":207,"column":4,"endLine":227,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySort","argumentNames":["arr","callbackfn"]} -function helpers_arraySort__P271921_mk(s) { +function helpers_arraySort__P20150_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort__P271921, depth: s.depth + 1, + parent: s, fn: helpers_arraySort__P20150, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8819,7 +8591,7 @@ function helpers_arraySort__P271921_mk(s) { -function helpers_arraySort_inline__P283126(s) { +function helpers_arraySort_inline__P29590(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8829,26 +8601,26 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.aIsUndef___283129 = undefined; - s.bIsUndef___283133 = undefined; - s.aIsNull___283144 = undefined; - s.bIsNull___283148 = undefined; + s.aIsUndef___29593 = undefined; + s.bIsUndef___29597 = undefined; + s.aIsNull___29608 = undefined; + s.bIsNull___29612 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = (s.arg0 === undefined); - s.aIsUndef___283129 = (r0); + s.aIsUndef___29593 = (r0); r0 = (s.arg1 === undefined); - s.bIsUndef___283133 = (r0); - s.tmp_0 = r0 = s.aIsUndef___283129; + s.bIsUndef___29597 = (r0); + s.tmp_0 = r0 = s.aIsUndef___29593; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.bIsUndef___283133; + r0 = s.bIsUndef___29597; case 2: // jmp value (already in r0) s.tmp_1 = r0; @@ -8858,13 +8630,13 @@ switch (step) { { step = 17; continue; } { step = 8; continue; } case 3: - r0 = pxsim_numops_toBoolDecr(s.aIsUndef___283129); + r0 = pxsim_numops_toBoolDecr(s.aIsUndef___29593); if (!r0) { step = 4; continue; } r0 = 1; { step = 17; continue; } { step = 7; continue; } case 4: - r0 = pxsim_numops_toBoolDecr(s.bIsUndef___283133); + r0 = pxsim_numops_toBoolDecr(s.bIsUndef___29597); if (!r0) { step = 5; continue; } r0 = -1; { step = 17; continue; } @@ -8873,16 +8645,16 @@ switch (step) { case 7: case 8: r0 = (s.arg0 === null); - s.aIsNull___283144 = (r0); + s.aIsNull___29608 = (r0); r0 = (s.arg1 === null); - s.bIsNull___283148 = (r0); - s.tmp_0 = r0 = s.aIsNull___283144; + s.bIsNull___29612 = (r0); + s.tmp_0 = r0 = s.aIsNull___29608; r0 = pxsim_numops_toBool(s.tmp_0); if (r0) { step = 9; continue; } r0 = s.tmp_0; { step = 10; continue; } case 9: - r0 = s.bIsNull___283148; + r0 = s.bIsNull___29612; case 10: // jmp value (already in r0) s.tmp_1 = r0; @@ -8892,13 +8664,13 @@ switch (step) { { step = 17; continue; } { step = 16; continue; } case 11: - r0 = pxsim_numops_toBoolDecr(s.aIsNull___283144); + r0 = pxsim_numops_toBoolDecr(s.aIsNull___29608); if (!r0) { step = 12; continue; } r0 = 1; { step = 17; continue; } { step = 15; continue; } case 12: - r0 = pxsim_numops_toBoolDecr(s.bIsNull___283148); + r0 = pxsim_numops_toBoolDecr(s.bIsNull___29612); if (!r0) { step = 13; continue; } r0 = -1; { step = 17; continue; } @@ -8937,12 +8709,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -helpers_arraySort_inline__P283126.info = {"start":5826,"length":636,"line":209,"column":25,"endLine":224,"endColumn":13,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"inline","argumentNames":["a","b"]} +helpers_arraySort_inline__P29590.info = {"start":5826,"length":636,"line":209,"column":25,"endLine":224,"endColumn":13,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"inline","argumentNames":["a","b"]} -function helpers_arraySort_inline__P283126_mk(s) { +function helpers_arraySort_inline__P29590_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort_inline__P283126, depth: s.depth + 1, + parent: s, fn: helpers_arraySort_inline__P29590, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8952,10 +8724,10 @@ function helpers_arraySort_inline__P283126_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - aIsUndef___283129: undefined, - bIsUndef___283133: undefined, - aIsNull___283144: undefined, - bIsNull___283148: undefined, + aIsUndef___29593: undefined, + bIsUndef___29597: undefined, + aIsNull___29608: undefined, + bIsNull___29612: undefined, arg0: undefined, arg1: undefined, } } @@ -8964,7 +8736,7 @@ function helpers_arraySort_inline__P283126_mk(s) { -function helpers_sortHelper__P276226(s) { +function helpers_sortHelper__P20149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8974,9 +8746,9 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___283183 = undefined; - s.i___283186 = undefined; - s.j___283192 = undefined; + s.len___29648 = undefined; + s.i___29651 = undefined; + s.j___29657 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -9004,28 +8776,28 @@ switch (step) { case 3: case 4: r0 = pxsim_Array__length(s.arg0); - s.len___283183 = (r0); - s.i___283186 = (0); + s.len___29648 = (r0); + s.i___29651 = (0); case 5: - s.tmp_1 = r0 = s.i___283186; - r0 = (s.len___283183 - 1); + s.tmp_1 = r0 = s.i___29651; + r0 = (s.len___29648 - 1); s.tmp_2 = r0; r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 10; continue; } - r0 = (s.i___283186 + 1); - s.j___283192 = (r0); + r0 = (s.i___29651 + 1); + s.j___29657 = (r0); case 6: - r0 = (s.j___283192 < s.len___283183); + r0 = (s.j___29657 < s.len___29648); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } s.tmp_3 = lambda_3_mk(s); s.tmp_3.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___283186); + r0 = pxsim_Array__getAt(s.arg0, s.i___29651); s.tmp_3.arg0 = r0; - r0 = pxsim_Array__getAt(s.arg0, s.j___283192); + r0 = pxsim_Array__getAt(s.arg0, s.j___29657); s.tmp_3.arg1 = r0; setupLambda(s.tmp_3, s.tmp_3.argL); s.callLocIdx = 1; s.pc = 12; return s.tmp_3; @@ -9036,21 +8808,21 @@ switch (step) { s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 7; continue; } - s.tmp_4 = helpers_swap__P276225_mk(s); + s.tmp_4 = helpers_swap__P20148_mk(s); s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.i___283186; - s.tmp_4.arg2 = s.j___283192; + s.tmp_4.arg1 = s.i___29651; + s.tmp_4.arg2 = s.j___29657; s.callLocIdx = 2; s.pc = 13; return s.tmp_4; case 13: r0 = s.retval; case 7: case 8: - r0 = (s.j___283192 + 1); - s.j___283192 = (r0); + r0 = (s.j___29657 + 1); + s.j___29657 = (r0); { step = 6; continue; } case 9: - r0 = (s.i___283186 + 1); - s.i___283186 = (r0); + r0 = (s.i___29651 + 1); + s.i___29651 = (r0); { step = 5; continue; } case 10: r0 = s.arg0; @@ -9058,21 +8830,21 @@ switch (step) { return leave(s, r0) default: oops() } } } -helpers_sortHelper__P276226.info = {"start":5176,"length":481,"line":191,"column":4,"endLine":205,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"sortHelper","argumentNames":["arr","callbackfn"]} +helpers_sortHelper__P20149.info = {"start":5176,"length":481,"line":191,"column":4,"endLine":205,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"sortHelper","argumentNames":["arr","callbackfn"]} -function helpers_sortHelper__P276226_mk(s) { +function helpers_sortHelper__P20149_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_sortHelper__P276226, depth: s.depth + 1, + parent: s, fn: helpers_sortHelper__P20149, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - len___283183: undefined, - i___283186: undefined, - j___283192: undefined, + len___29648: undefined, + i___29651: undefined, + j___29657: undefined, arg0: undefined, arg1: undefined, } } @@ -9081,7 +8853,7 @@ function helpers_sortHelper__P276226_mk(s) { -function helpers_swap__P276225(s) { +function helpers_swap__P20148(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9091,7 +8863,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.temp___283221 = undefined; + s.temp___29686 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -9099,28 +8871,28 @@ switch (step) { s.lambdaArgs = null; } r0 = pxsim_Array__getAt(s.arg0, s.arg1); - s.temp___283221 = (r0); + s.temp___29686 = (r0); s.tmp_0 = r0 = s.arg0; s.tmp_1 = r0 = s.arg1; r0 = pxsim_Array__getAt(s.arg0, s.arg2); s.tmp_2 = r0; r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); - r0 = pxsim_Array_.setAt(s.arg0, s.arg2, s.temp___283221); + r0 = pxsim_Array_.setAt(s.arg0, s.arg2, s.temp___29686); r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_swap__P276225.info = {"start":5030,"length":140,"line":185,"column":4,"endLine":189,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"swap","argumentNames":["arr","i","j"]} +helpers_swap__P20148.info = {"start":5030,"length":140,"line":185,"column":4,"endLine":189,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"swap","argumentNames":["arr","i","j"]} -function helpers_swap__P276225_mk(s) { +function helpers_swap__P20148_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_swap__P276225, depth: s.depth + 1, + parent: s, fn: helpers_swap__P20148, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - temp___283221: undefined, + temp___29686: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -9130,7 +8902,7 @@ function helpers_swap__P276225_mk(s) { -function scene_Camera_update__P274615(s) { +function power_checkDeepSleep__P20817(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9140,187 +8912,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.elapsed___283490 = undefined; - s.percentComplete___283504 = undefined; - s.damp___283511 = undefined; - s.f___283520 = undefined; - s.x___283526 = undefined; - s.y___283533 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["sprite"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = r0 = s.arg0; - s.tmp_3 = Sprite_x__P274171_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 892; s.pc = 9; return s.tmp_3; - case 9: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_lastUpdatedSpriteX"] = (s.tmp_2); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 893; s.pc = 10; return s.tmp_2; - case 10: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_lastUpdatedSpriteY"] = (s.tmp_1); - s.tmp_0 = scene_Camera_offsetX__P274604_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_x__P274171_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 894; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0.arg1 = r0; - s.callLocIdx = 895; s.pc = 11; return s.tmp_0; + s.p___28887 = undefined; + s.to___28890 = undefined; + s.tmp_0 = power_init__P20819_mk(s); + s.callLocIdx = 76; s.pc = 11; return s.tmp_0; case 11: r0 = s.retval; - s.tmp_0 = scene_Camera_offsetY__P274606_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 896; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0.arg1 = r0; - s.callLocIdx = 897; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; + s.tmp_0 = r0 = globals._poked___20813; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = 0; case 2: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_offsetX"]; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetX"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_offsetY"]; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); - r0 = s.arg0.fields["shakeStartTime"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim.control.millis(); - s.tmp_2 = r0; - r0 = s.arg0.fields["shakeStartTime"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.elapsed___283490 = (r0); - r0 = s.arg0.fields["shakeDuration"]; + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.elapsed___283490 >= s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.p___28887 = (s.tmp_1); + s.tmp_0 = r0 = globals._timeout___20814; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["shakeStartTime"] = (undefined); - { step = 6; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 3: - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_0 = r0; - r0 = (s.elapsed___283490 / s.tmp_0); - s.percentComplete___283504 = (r0); - s.damp___283511 = (1); - r0 = (s.percentComplete___283504 >= 0.75); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_1.arg0 = 0; - r0 = (1 - s.percentComplete___283504); - s.tmp_1.arg1 = r0; - s.callLocIdx = 900; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.damp___283511 = (r0); + r0 = 0; case 4: - case 5: - r0 = s.arg0.fields["shakeAmplitude"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.damp___283511); - s.f___283520 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___283520); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.x___283526 = (r0); - r0 = pxsim.Math_.random(); + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___283520); + s.to___28890 = (s.tmp_1); + r0 = (s.to___28890 > 0); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.y___283533 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.x___283526); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetX"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["drawOffsetY"]; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + r0 = pxsim.control.millis(); s.tmp_2 = r0; - r0 = (s.tmp_2 + s.y___283533); + r0 = (s.tmp_2 - s.p___28887); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); + r0 = (s.tmp_1 > s.to___28890); case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 7; continue; } + r0 = s.tmp_3; + { step = 8; continue; } case 7: + r0 = pxsim.control.isUSBInitialized(); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); case 8: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore.deepSleep(); + case 9: + case 10: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_update__P274615.info = {"start":2563,"length":1418,"line":83,"column":8,"endLine":116,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} +power_checkDeepSleep__P20817.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} -function scene_Camera_update__P274615_mk(s) { +function power_checkDeepSleep__P20817_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_update__P274615, depth: s.depth + 1, + parent: s, fn: power_checkDeepSleep__P20817, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - elapsed___283490: undefined, - percentComplete___283504: undefined, - damp___283511: undefined, - f___283520: undefined, - x___283526: undefined, - y___283533: undefined, - arg0: undefined, + tmp_5: undefined, + tmp_6: undefined, + p___28887: undefined, + to___28890: undefined, } } -function scene_Camera_offsetY__P274606(s) { +function power_init__P20819(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9330,93 +9009,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___283552 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 883; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.scene___283552 = (r0); - r0 = s.scene___283552.fields["tileMap"]; + r0 = (globals._timeout___20814 !== undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } case 1: - r0 = s.scene___283552.fields["tileMap"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["_map"]; - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 3; continue; } - s.tmp_7 = r0 = s.arg0; - s.tmp_10 = tiles_TileMap_offsetY__P274559_mk(s); - r0 = s.scene___283552.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 885; s.pc = 6; return s.tmp_10; - case 6: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim.Math_.floor(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["_offsetY"] = (s.tmp_8); + r0 = pxsim_pxtcore.getConfig(212, -1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 1000); + globals._timeout___20814 = (r0); + r0 = (globals._timeout___20814 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; { step = 4; continue; } case 3: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.Math_.floor(s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_offsetY"] = (s.tmp_1); + r0 = (globals._timeout___20814 < 300000); case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 5; continue; } + globals._timeout___20814 = (300000); + case 5: + case 6: + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_offsetY__P274606.info = {"start":1152,"length":291,"line":39,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} +power_init__P20819.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} -function scene_Camera_offsetY__P274606_mk(s) { +function power_init__P20819_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P274606, depth: s.depth + 1, + parent: s, fn: power_init__P20819, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - scene___283552: undefined, - arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_enabled__P274564(s) { +function power_poke__P20816(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9426,44 +9066,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + s.tmp_0 = power_init__P20819_mk(s); + s.callLocIdx = 75; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = pxsim.control.millis(); + globals._poked___20813 = (r0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_enabled__P274564.info = {"start":10177,"length":66,"line":351,"column":8,"endLine":353,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"enabled","argumentNames":["this"]} -tiles_TileMap_enabled__P274564.isGetter = true; +power_poke__P20816.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} -function tiles_TileMap_enabled__P274564_mk(s) { +function power_poke__P20816_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_enabled__P274564, depth: s.depth + 1, + parent: s, fn: power_poke__P20816, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, } } -function tiles_TileMap_offsetY__P274559(s) { +function control_EventContext_registerFrameHandler__P20399(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9473,59 +9100,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.fn___27433 = undefined; + s.i___27443 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_3 = tiles_TileMap_areaHeight__P274561_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 822; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + r0 = s.arg0.fields["frameCallbacks"]; s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 823; s.pc = 2; return s.tmp_1; - case 2: + r0 = (s.tmp_3).fields["frameCallbacks"] = (s.tmp_4); + s.tmp_0 = control_EventContext_registerFrameCallbacks__P20396_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 51; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 824; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; + case 2: + r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C20387_VT); + s.fn___27433 = (r0); + r0 = (s.fn___27433).fields["order"] = (s.arg1); + r0 = (s.fn___27433).fields["handler"] = (s.arg2); + s.i___27443 = (0); + case 3: + s.tmp_1 = r0 = s.i___27443; + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_6, s.i___27443); + r0 = r0.fields["order"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 > s.arg1); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 4; continue; } + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_7 = r0; + r0 = pxsim_Array_.insertAt(s.tmp_7, s.i___27443, s.fn___27433); + r0 = s.fn___27433; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___27443 + 1); + s.i___27443 = (r0); + { step = 3; continue; } + case 6: + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.fn___27433); + r0 = s.fn___27433; + case 7: return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetY__P274559.info = {"start":9630,"length":123,"line":329,"column":8,"endLine":331,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} +control_EventContext_registerFrameHandler__P20399.info = {"start":4862,"length":643,"line":147,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameHandler","argumentNames":["this","order","handler"]} -function tiles_TileMap_offsetY__P274559_mk(s) { +function control_EventContext_registerFrameHandler__P20399_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetY__P274559, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameHandler__P20399, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + fn___27433: undefined, + i___27443: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tiles_TileMap_areaHeight__P274561(s) { +function control_EventContext_registerFrameCallbacks__P20396(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9535,45 +9208,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.worker___26912 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["_map"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_height"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 << s.tmp_3); - { step = 2; continue; } + { step = 3; continue; } case 1: - r0 = 0; case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = s.arg0.fields["frameWorker"]; + s.worker___26912 = (r0); + r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P26918); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___26912); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_areaHeight__P274561.info = {"start":9864,"length":93,"line":337,"column":8,"endLine":339,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} +control_EventContext_registerFrameCallbacks__P20396.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} -function tiles_TileMap_areaHeight__P274561_mk(s) { +function control_EventContext_registerFrameCallbacks__P20396_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaHeight__P274561, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks__P20396, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + worker___26912: undefined, arg0: undefined, } } @@ -9581,7 +9256,7 @@ function tiles_TileMap_areaHeight__P274561_mk(s) { -function tiles_TileMap_scale__P274555(s) { +function control_EventContext_registerFrameCallbacks_inline__P26918(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9591,32 +9266,73 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) + s.delay___26949 = undefined; + r0 = s.caps[0].fields["runningCallbacks"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkAction(1, control_EventContext_registerFrameCallbacks_inline__P26924); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); + s.tmp_2 = pauseUntil__P20354_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 45; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = (s.caps[0]).fields["runningCallbacks"] = (true); + r0 = (s.caps[0]).fields["framesInSample"] = (0); + r0 = (s.caps[0]).fields["timeInSample"] = (0); + r0 = (s.caps[0]).fields["deltaTimeMillis"] = (0); + s.tmp_0 = r0 = s.caps[0]; + r0 = pxsim.control.millis(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["prevTimeMillis"] = (s.tmp_1); + case 3: + r0 = s.caps[0].fields["frameWorker"]; + s.tmp_1 = r0; + r0 = (s.caps[1] == s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_2 = control_EventContext_runCallbacks__P20395_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 46; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.delay___26949 = (r0); + s.tmp_0 = pause__P20415_mk(s); + s.tmp_0.arg0 = s.delay___26949; + s.callLocIdx = 47; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + { step = 3; continue; } + case 4: + r0 = (s.caps[0]).fields["runningCallbacks"] = (false); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_scale__P274555.info = {"start":9205,"length":55,"line":310,"column":8,"endLine":312,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} -tiles_TileMap_scale__P274555.isGetter = true; +control_EventContext_registerFrameCallbacks_inline__P26918.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMap_scale__P274555_mk(s) { +function control_EventContext_registerFrameCallbacks_inline__P26918_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_scale__P274555, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P26918, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + delay___26949: undefined, } } -function tiles_TileMapData_height__P274537(s) { +function control_EventContext_registerFrameCallbacks_inline__P26924(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9626,32 +9342,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; - return leaveAccessor(s, r0) + r0 = s.caps[0].fields["runningCallbacks"]; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leave(s, r0) default: oops() } } } -tiles_TileMapData_height__P274537.info = {"start":6489,"length":65,"line":218,"column":8,"endLine":220,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"height","argumentNames":["this"]} -tiles_TileMapData_height__P274537.isGetter = true; +control_EventContext_registerFrameCallbacks_inline__P26924.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function tiles_TileMapData_height__P274537_mk(s) { +function control_EventContext_registerFrameCallbacks_inline__P26924_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_height__P274537, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P26924, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, } } -function scene_Camera_offsetY__P274605(s) { +function control_EventContext_runCallbacks__P20395(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9661,106 +9375,255 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.loopStart___26958 = undefined; + s.f___26971 = undefined; + s.unnamed146___U2 = undefined; + s.unnamed147___U3 = undefined; + s.now___26977 = undefined; + s.runtime___26980 = undefined; + s.realTimeInSample___26999 = undefined; + s.fps___27008 = undefined; + s.delay___27077 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_offsetY__P274605.info = {"start":1084,"length":59,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this"]} -scene_Camera_offsetY__P274605.isGetter = true; - -function scene_Camera_offsetY__P274605_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_offsetY__P274605, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function scene_Camera_offsetX__P274604(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.scene___283612 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.loopStart___26958 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["prevTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.loopStart___26958 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); + r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___26958); + s.f___26971 = (undefined); + r0 = s.arg0.fields["frameCallbacks"]; + s.unnamed146___U2 = (r0); + s.unnamed147___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed147___U3; + r0 = pxsim_Array__length(s.unnamed146___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed146___U2, s.unnamed147___U3); + s.f___26971 = (r0); + s.tmp_2 = if_handler_1_mk(s); + s.tmp_2.arg0 = s.f___26971; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); + s.callLocIdx = 43; s.pc = 11; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["handler"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["handler"], 1); s.callLocIdx = 43; s.pc = 11; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 43; s.pc = 11; return s.tmp_2;; } + else { s.callLocIdx = 43; s.pc = 11; return s.tmp_2; } } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 880; s.pc = 5; return s.tmp_0; - case 5: + case 11: r0 = s.retval; - s.scene___283612 = (r0); - r0 = s.scene___283612.fields["tileMap"]; + r0 = (s.unnamed147___U3 + 1); + s.unnamed147___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed146___U2 = (undefined); + r0 = pxsim.control.millis(); + s.now___26977 = (r0); + r0 = (s.now___26977 - s.loopStart___26958); + s.runtime___26980 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["timeInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.runtime___26980); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["timeInSample"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["framesInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["framesInSample"] = (s.tmp_1); + r0 = s.arg0.fields["timeInSample"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 1000); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } + if (!r0) { step = 3; continue; } r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.scene___283612.fields["tileMap"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["_map"]; - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); + { step = 4; continue; } + case 3: + r0 = s.arg0.fields["framesInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 30); + case 4: + // jmp value (already in r0) s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 9; continue; } + r0 = s.arg0.fields["lastPerfDump"]; + s.tmp_4 = r0; + r0 = (s.now___26977 - s.tmp_4); + s.realTimeInSample___26999 = (r0); + r0 = (s.arg0).fields["lastPerfDump"] = (s.now___26977); + r0 = s.arg0.fields["framesInSample"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["timeInSample"]; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 3; continue; } - s.tmp_7 = r0 = s.arg0; - s.tmp_10 = tiles_TileMap_offsetX__P274558_mk(s); - r0 = s.scene___283612.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 882; s.pc = 6; return s.tmp_10; - case 6: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim.Math_.floor(s.tmp_9); - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["_offsetX"] = (s.tmp_8); - { step = 4; continue; } - case 3: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.Math_.floor(s.arg1); + r0 = (s.tmp_2 / 1000); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_offsetX"] = (s.tmp_1); - case 4: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Camera_offsetX__P274604.info = {"start":784,"length":291,"line":28,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} - -function scene_Camera_offsetX__P274604_mk(s) { - checkStack(s.depth); + r0 = (s.tmp_0 / s.tmp_1); + s.fps___27008 = (r0); + r0 = pxsim.Math_.round(s.fps___27008); + s.tmp_1 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 12); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 12: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String__concat("fps:", s.tmp_0); + globals.control_EventContext_lastStats___20405 = (r0); + r0 = (s.fps___27008 < 99); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + if ((globals.control_EventContext_lastStats___20405) && (globals.control_EventContext_lastStats___20405).vtable) { + setupResume(s, 13); + pxsim_String__stringConv(globals.control_EventContext_lastStats___20405); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___20405) + ""; } + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.fps___27008 * 10); + s.tmp_7 = r0; + r0 = pxsim.Math_.round(s.tmp_7); + s.tmp_6 = r0; + r0 = (s.tmp_6 % 10); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 14); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 14: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(".", s.tmp_4); + s.tmp_3 = r0; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } + case 15: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); + globals.control_EventContext_lastStats___20405 = (r0); + case 5: + case 6: + r0 = pxsim.control.profilingEnabled(); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = pxsim_String_.mkEmpty(); + s.tmp_9 = r0; + r0 = (s.fps___27008 * 100); + s.tmp_12 = r0; + r0 = (s.tmp_12 | 0); + s.tmp_11 = r0; + if ((s.tmp_11) && (s.tmp_11).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.tmp_11); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_11) + ""; } + case 16: + r0 = s.retval; + s.tmp_10 = r0; + r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_8, "/100 fps - "); + s.tmp_7 = r0; + r0 = s.arg0.fields["framesInSample"]; + s.tmp_14 = r0; + if ((s.tmp_14) && (s.tmp_14).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.tmp_14); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_14) + ""; } + case 17: + r0 = s.retval; + s.tmp_13 = r0; + r0 = pxsim_String__concat(s.tmp_7, s.tmp_13); + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_6, " frames ("); + s.tmp_5 = r0; + r0 = s.arg0.fields["timeInSample"]; + s.tmp_16 = r0; + if ((s.tmp_16) && (s.tmp_16).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.tmp_16); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_16) + ""; } + case 18: + r0 = s.retval; + s.tmp_15 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_4, "ms/"); + s.tmp_3 = r0; + if ((s.realTimeInSample___26999) && (s.realTimeInSample___26999).vtable) { + setupResume(s, 19); + pxsim_String__stringConv(s.realTimeInSample___26999); + checkResumeConsumed(); + return; + } else { s.retval = (s.realTimeInSample___26999) + ""; } + case 19: + r0 = s.retval; + s.tmp_17 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_17); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, "ms)"); + s.tmp_1 = r0; + r0 = pxsim.control.dmesg(s.tmp_1); + r0 = pxsim.control.gc(); + r0 = pxsim_pxtcore.dumpPerfCounters(); + case 7: + case 8: + r0 = (s.arg0).fields["timeInSample"] = (0); + r0 = (s.arg0).fields["framesInSample"] = (0); + case 9: + case 10: + s.tmp_0 = Math_max__P20176_mk(s); + s.tmp_0.arg0 = 1; + r0 = (20 - s.runtime___26980); + s.tmp_0.arg1 = r0; + s.callLocIdx = 44; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + s.delay___27077 = (r0); + r0 = s.delay___27077; + return leave(s, r0) + default: oops() +} } } +control_EventContext_runCallbacks__P20395.info = {"start":2220,"length":1395,"line":75,"column":8,"endLine":106,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} + +function control_EventContext_runCallbacks__P20395_mk(s) { + checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P274604, depth: s.depth + 1, + parent: s, fn: control_EventContext_runCallbacks__P20395, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -9773,16 +9636,30 @@ function scene_Camera_offsetX__P274604_mk(s) { tmp_8: undefined, tmp_9: undefined, tmp_10: undefined, - scene___283612: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + loopStart___26958: undefined, + f___26971: undefined, + unnamed146___U2: undefined, + unnamed147___U3: undefined, + now___26977: undefined, + runtime___26980: undefined, + realTimeInSample___26999: undefined, + fps___27008: undefined, + delay___27077: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_offsetX__P274558(s) { +function pauseUntil__P20354(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9797,45 +9674,63 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_3 = tiles_TileMap_areaWidth__P274560_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 819; s.pc = 3; return s.tmp_3; - case 3: + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + s.tmp_2 = lambda_1_mk(s); + s.tmp_2.argL = s.arg0; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 30; s.pc = 8; return s.tmp_2; + case 8: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 820; s.pc = 2; return s.tmp_1; case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 7; continue; } + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 5; continue; } + s.arg1 = (0); + case 5: + case 6: + s.tmp_0 = control___queuePollEvent__P20353_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 31; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 821; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetX__P274558.info = {"start":9499,"length":121,"line":325,"column":8,"endLine":327,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetX","argumentNames":["this","value"]} +pauseUntil__P20354.info = {"start":2224,"length":227,"line":73,"column":0,"endLine":77,"endColumn":1,"fileName":"pxt_modules/base/poll.ts","functionName":"pauseUntil","argumentNames":["condition","timeOut"]} -function tiles_TileMap_offsetX__P274558_mk(s) { +function pauseUntil__P20354_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetX__P274558, depth: s.depth + 1, + parent: s, fn: pauseUntil__P20354, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, arg0: undefined, arg1: undefined, } } @@ -9844,7 +9739,7 @@ function tiles_TileMap_offsetX__P274558_mk(s) { -function tiles_TileMap_areaWidth__P274560(s) { +function control___queuePollEvent__P20353(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9854,53 +9749,97 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ev___26425 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + r0 = pxsim_pxtcore_mkClassInstance(control_PollEvent__C20348_VT); + s.tmp_0 = r0; + s.tmp_1 = control_PollEvent_constructor__P20349_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = 1023; + r0 = pxsim.control.allocateNotifyEvent(); + s.tmp_1.arg2 = r0; + r0 = pxsim.control.millis(); + s.tmp_1.arg3 = r0; + s.tmp_1.arg4 = s.arg0; + s.tmp_1.arg5 = s.arg1; + r0 = pxsim_numops_toBoolDecr(s.arg2); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1.arg6 = r0; + s.callLocIdx = 28; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.ev___26425 = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___20351); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["_map"]; + r0 = pxsim_Array__mk(); s.tmp_2 = r0; - r0 = s.tmp_2.fields["_width"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 << s.tmp_3); + r0 = pxsim_Array__push(s.tmp_2, s.ev___26425); + globals._pollEventQueue___20351 = (s.tmp_2); + r0 = pxsim.control.runInParallel(control_pollEvents__P20352); { step = 2; continue; } case 1: - r0 = 0; + r0 = pxsim_Array__push(globals._pollEventQueue___20351, s.ev___26425); case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_onEvent__P20386_mk(s); + r0 = s.ev___26425.fields["eid"]; + s.tmp_0.arg0 = r0; + r0 = s.ev___26425.fields["vid"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = 16; + s.callLocIdx = 29; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + r0 = s.ev___26425.fields["eid"]; + s.tmp_0 = r0; + r0 = s.ev___26425.fields["vid"]; + s.tmp_1 = r0; + setupResume(s, 7); + pxsim.control.waitForEvent(s.tmp_0, s.tmp_1); + checkResumeConsumed(); + return; + case 7: + r0 = s.retval; + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_areaWidth__P274560.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} +control___queuePollEvent__P20353.info = {"start":1262,"length":758,"line":39,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"__queuePollEvent","argumentNames":["timeOut","condition","handler"]} -function tiles_TileMap_areaWidth__P274560_mk(s) { +function control___queuePollEvent__P20353_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaWidth__P274560, depth: s.depth + 1, + parent: s, fn: control___queuePollEvent__P20353, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + ev___26425: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function tiles_TileMapData_width__P274536(s) { +function control_pollEvents__P20352(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9910,32 +9849,139 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; + s.now___26553 = undefined; + s.i___26556 = undefined; + s.ev___26562 = undefined; + case 1: + r0 = pxsim_Array__length(globals._pollEventQueue___20351); + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = pxsim.control.millis(); + s.now___26553 = (r0); + s.i___26556 = (0); + case 2: + s.tmp_1 = r0 = s.i___26556; + r0 = pxsim_Array__length(globals._pollEventQueue___20351); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = pxsim_Array__getAt(globals._pollEventQueue___20351, s.i___26556); + s.ev___26562 = (r0); + s.tmp_1 = if_condition_1_mk(s); + s.tmp_1.arg0 = s.ev___26562; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); + s.callLocIdx = 25; s.pc = 13; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["condition"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["condition"], 1); s.callLocIdx = 25; s.pc = 13; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 25; s.pc = 13; return s.tmp_1;; } + else { s.callLocIdx = 25; s.pc = 13; return s.tmp_1; } } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; - return leaveAccessor(s, r0) + case 13: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 3: + r0 = s.ev___26562.fields["timeOut"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 > 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 4; continue; } + r0 = s.tmp_2; + { step = 5; continue; } + case 4: + r0 = s.ev___26562.fields["start"]; + s.tmp_5 = r0; + r0 = (s.now___26553 - s.tmp_5); + s.tmp_4 = r0; + r0 = s.ev___26562.fields["timeOut"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 > s.tmp_6); + case 5: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 6: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 9; continue; } + r0 = s.ev___26562.fields["eid"]; + s.tmp_9 = r0; + r0 = s.ev___26562.fields["vid"]; + s.tmp_10 = r0; + r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); + r0 = s.ev___26562.fields["once"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = helpers_arraySplice__P20143_mk(s); + s.tmp_1.arg0 = globals._pollEventQueue___20351; + s.tmp_1.arg1 = s.i___26556; + s.tmp_1.arg2 = 1; + s.callLocIdx = 26; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + r0 = (s.i___26556 - 1); + s.i___26556 = (r0); + case 7: + case 8: + case 9: + case 10: + r0 = (s.i___26556 + 1); + s.i___26556 = (r0); + { step = 2; continue; } + case 11: + s.tmp_0 = pause__P20415_mk(s); + s.tmp_0.arg0 = 50; + s.callLocIdx = 27; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + { step = 1; continue; } + case 12: + globals._pollEventQueue___20351 = (undefined); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_width__P274536.info = {"start":6416,"length":63,"line":214,"column":8,"endLine":216,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"width","argumentNames":["this"]} -tiles_TileMapData_width__P274536.isGetter = true; +control_pollEvents__P20352.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} -function tiles_TileMapData_width__P274536_mk(s) { +function control_pollEvents__P20352_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_width__P274536, depth: s.depth + 1, + parent: s, fn: control_pollEvents__P20352, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + now___26553: undefined, + i___26556: undefined, + ev___26562: undefined, } } -function scene_Camera_offsetX__P274603(s) { +function helpers_arraySplice__P20143(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9945,32 +9991,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___26611 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - return leaveAccessor(s, r0) + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 5; continue; } + case 1: + case 2: + s.i___26611 = (0); + case 3: + r0 = (s.i___26611 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array_.removeAt(s.arg0, s.arg1); + r0 = (s.i___26611 + 1); + s.i___26611 = (r0); + { step = 3; continue; } + case 4: + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P274603.info = {"start":716,"length":59,"line":25,"column":8,"endLine":27,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this"]} -scene_Camera_offsetX__P274603.isGetter = true; +helpers_arraySplice__P20143.info = {"start":3642,"length":213,"line":137,"column":4,"endLine":144,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySplice","argumentNames":["arr","start","len"]} -function scene_Camera_offsetX__P274603_mk(s) { +function helpers_arraySplice__P20143_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P274603, depth: s.depth + 1, + parent: s, fn: helpers_arraySplice__P20143, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + i___26611: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_y__P274173(s) { +function control_PollEvent_constructor__P20349(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9982,45 +10051,47 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_height"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, control_PollEvent__C20348_VT)) failedCast(r0); + r0 = (s.arg0).fields["eid"] = (s.arg1); + r0 = (s.arg0).fields["vid"] = (s.arg2); + r0 = (s.arg0).fields["start"] = (s.arg3); + r0 = (s.arg0).fields["timeOut"] = (s.arg4); + r0 = (s.arg0).fields["condition"] = (s.arg5); + r0 = (s.arg0).fields["once"] = (s.arg6); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_y__P274173.info = {"start":2893,"length":100,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this"]} -Sprite_y__P274173.isGetter = true; +control_PollEvent_constructor__P20349.info = {"start":239,"length":316,"line":8,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/base/poll.ts","functionName":"inline","argumentNames":["this","eid","vid","start","timeOut","condition","once"]} -function Sprite_y__P274173_mk(s) { +function control_PollEvent_constructor__P20349_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P274173, depth: s.depth + 1, + parent: s, fn: control_PollEvent_constructor__P20349, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function Fx_toFloat__P271989(s) { +function control_EventContext_deltaTime__P20394(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10034,17 +10105,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 / 256); - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + r0 = s.arg0.fields["deltaTimeMillis"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 1000); + return leaveAccessor(s, r0) default: oops() } } } -Fx_toFloat__P271989.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} +control_EventContext_deltaTime__P20394.info = {"start":2135,"length":75,"line":71,"column":8,"endLine":73,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]} +control_EventContext_deltaTime__P20394.isGetter = true; -function Fx_toFloat__P271989_mk(s) { +function control_EventContext_deltaTime__P20394_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toFloat__P271989, depth: s.depth + 1, + parent: s, fn: control_EventContext_deltaTime__P20394, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -10052,7 +10129,7 @@ function Fx_toFloat__P271989_mk(s) { -function Fx_div__P271978(s) { +function helpers_arrayForEach__P20154(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10062,25 +10139,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___26677 = undefined; + s.i___26680 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 << 8); + r0 = pxsim_Array__length(s.arg0); + s.len___26677 = (r0); + s.i___26680 = (0); + case 1: + r0 = (s.i___26680 < s.len___26677); s.tmp_0 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.i___26680); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___26680; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 6; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + r0 = (s.i___26680 + 1); + s.i___26680 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_div__P271978.info = {"start":1145,"length":129,"line":35,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"div","argumentNames":["a","b"]} +helpers_arrayForEach__P20154.info = {"start":7439,"length":250,"line":254,"column":4,"endLine":259,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayForEach","argumentNames":["arr","callbackfn"]} -function Fx_div__P271978_mk(s) { +function helpers_arrayForEach__P20154_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_div__P271978, depth: s.depth + 1, + parent: s, fn: helpers_arrayForEach__P20154, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + len___26677: undefined, + i___26680: undefined, arg0: undefined, arg1: undefined, } } @@ -10089,7 +10190,7 @@ function Fx_div__P271978_mk(s) { -function Fx_add__P271973(s) { +function control_pushEventContext__P20410(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10099,31 +10200,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 + s.arg1); + s.ctx___30489 = undefined; + s.n___30495 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___20408); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + globals.eventContexts___20408 = (r0); + case 1: + case 2: + s.tmp_0 = control_eventContext__P20409_mk(s); + s.callLocIdx = 54; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.ctx___30489 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___30489); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_EventContext_unregister__P20398_mk(s); + s.tmp_0.arg0 = s.ctx___30489; + s.callLocIdx = 55; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C20393_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventContext_constructor__P20407_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 56; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + s.n___30495 = (s.tmp_0); + r0 = pxsim_Array__push(globals.eventContexts___20408, s.n___30495); + r0 = s.n___30495; return leave(s, r0) default: oops() } } } -Fx_add__P271973.info = {"start":511,"length":118,"line":20,"column":4,"endLine":22,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"add","argumentNames":["a","b"]} +control_pushEventContext__P20410.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} -function Fx_add__P271973_mk(s) { +function control_pushEventContext__P20410_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_add__P271973, depth: s.depth + 1, + parent: s, fn: control_pushEventContext__P20410, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, + tmp_1: undefined, + ctx___30489: undefined, + n___30495: undefined, } } -function Sprite_x__P274171(s) { +function control_EventContext_constructor__P20407(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10138,34 +10271,39 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = s.arg0.fields["_width"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = (s.tmp_0).fields["handlers"] = (s.tmp_1); + r0 = (s.arg0).fields["framesInSample"] = (0); + r0 = (s.arg0).fields["timeInSample"] = (0); + r0 = (s.arg0).fields["deltaTimeMillis"] = (0); + r0 = (s.arg0).fields["frameWorker"] = (0); + r0 = (s.arg0).fields["idleCallbacks"] = (undefined); + r0 = pxsim_numops_toBoolDecr(globals.control_EventContext_lastStats___20405); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_String_.mkEmpty(); + globals.control_EventContext_lastStats___20405 = (r0); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_x__P274171.info = {"start":2537,"length":99,"line":110,"column":4,"endLine":112,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this"]} -Sprite_x__P274171.isGetter = true; +control_EventContext_constructor__P20407.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} -function Sprite_x__P274171_mk(s) { +function control_EventContext_constructor__P20407_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P274171, depth: s.depth + 1, + parent: s, fn: control_EventContext_constructor__P20407, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, } } @@ -10173,7 +10311,7 @@ function Sprite_x__P274171_mk(s) { -function PhysicsEngine_move__P274334(s) { +function control_EventContext_unregister__P20398(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10183,33 +10321,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___27085 = undefined; + s.unnamed150___U1 = undefined; + s.unnamed151___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + s.h___27085 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed150___U1 = (r0); + s.unnamed151___U2 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed151___U2; + r0 = pxsim_Array__length(s.unnamed150___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed150___U1, s.unnamed151___U2); + s.h___27085 = (r0); + s.tmp_2 = control_EventHandler_unregister__P20390_mk(s); + s.tmp_2.arg0 = s.h___27085; + s.callLocIdx = 50; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + r0 = (s.unnamed151___U2 + 1); + s.unnamed151___U2 = (r0); + { step = 1; continue; } + case 2: + s.unnamed150___U1 = (undefined); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["frameWorker"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["frameWorker"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_move__P274334.info = {"start":351,"length":20,"line":18,"column":4,"endLine":18,"endColumn":24,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +control_EventContext_unregister__P20398.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function PhysicsEngine_move__P274334_mk(s) { +function control_EventContext_unregister__P20398_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_move__P274334, depth: s.depth + 1, + parent: s, fn: control_EventContext_unregister__P20398, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + h___27085: undefined, + unnamed150___U1: undefined, + unnamed151___U2: undefined, arg0: undefined, - arg1: undefined, } } -function PhysicsEngine_draw__P274333(s) { +function control_EventHandler_unregister__P20390(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10224,18 +10397,28 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); + if (!checkSubtype(r0, control_EventHandler__C20388_VT)) failedCast(r0); + r0 = s.arg0.fields["src"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["value"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P20392, s.tmp_2); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_draw__P274333.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +control_EventHandler_unregister__P20390.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function PhysicsEngine_draw__P274333_mk(s) { +function control_EventHandler_unregister__P20390_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_draw__P274333, depth: s.depth + 1, + parent: s, fn: control_EventHandler_unregister__P20390, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -10243,7 +10426,7 @@ function PhysicsEngine_draw__P274333_mk(s) { -function controller___update__P273982(s) { +function control_doNothing__P20392(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10253,51 +10436,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtms___283903 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = (s.arg0 * 1000); - s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); - s.dtms___283903 = (r0); - r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P283910); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___283903); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_2 = controller_players__P273946_mk(s); - s.callLocIdx = 194; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 196; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update__P273982.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} +control_doNothing__P20392.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} -function controller___update__P273982_mk(s) { +function control_doNothing__P20392_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update__P273982, depth: s.depth + 1, + parent: s, fn: control_doNothing__P20392, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - dtms___283903: undefined, - arg0: undefined, } } -function controller___update_inline__P283910(s) { +function controller_pauseUntilAnyButtonIsPressed__P21174(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10307,36 +10463,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = controller_Controller___update__P273980_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.callLocIdx = 195; s.pc = 1; return s.tmp_0; + setupResume(s, 1); + pxsim.control.waitForEvent(2049, 0); + checkResumeConsumed(); + return; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update_inline__P283910.info = {"start":13835,"length":27,"line":416,"column":26,"endLine":416,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +controller_pauseUntilAnyButtonIsPressed__P21174.info = {"start":9968,"length":96,"line":287,"column":4,"endLine":289,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pauseUntilAnyButtonIsPressed","argumentNames":[]} -function controller___update_inline__P283910_mk(s) { +function controller_pauseUntilAnyButtonIsPressed__P21174_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update_inline__P283910, depth: s.depth + 1, + parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P21174, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, } } -function controller_Controller___update__P273980(s) { +function game_setWaitAnyButton__P21919(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10348,55 +10498,28 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = pxsim_pxtrt.mklocRef(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); - r0 = pxsim_pxtcore_mkAction(1, controller_Controller___update_inline__P283923); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - r0 = s.arg0.fields["buttons"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 193; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; + globals.__waitAnyButton___21915 = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___update__P273980.info = {"start":13211,"length":124,"line":396,"column":8,"endLine":399,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} +game_setWaitAnyButton__P21919.info = {"start":4236,"length":83,"line":127,"column":4,"endLine":129,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setWaitAnyButton","argumentNames":["f"]} -function controller_Controller___update__P273980_mk(s) { +function game_setWaitAnyButton__P21919_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___update__P273980, depth: s.depth + 1, + parent: s, fn: game_setWaitAnyButton__P21919, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Controller___update_inline__P283923(s) { +function Math_FastRandom_constructor__P22210(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10408,35 +10531,42 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = controller_Button___update__P274020_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_0.arg1 = r0; - s.callLocIdx = 192; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, Math_FastRandom__C22203_VT)) failedCast(r0); + r0 = (s.arg1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.Math_.randomRange(1, 65535); + s.arg1 = (r0); case 1: - r0 = s.retval; + case 2: + r0 = (s.arg0).fields["seed"] = (s.arg1); + r0 = (s.arg0).fields["lfsr"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___update_inline__P283923.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} +Math_FastRandom_constructor__P22210.info = {"start":1425,"length":175,"line":44,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"inline","argumentNames":["this","seed"]} -function controller_Controller___update_inline__P283923_mk(s) { +function Math_FastRandom_constructor__P22210_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___update_inline__P283923, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_constructor__P22210, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function controller_Button___update__P274020(s) { +function game_consoleOverlay_listener__P22327(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10446,105 +10576,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___283939 = undefined; - s.interval___283948 = undefined; - s.count___283961 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 11; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["_pressedElasped"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 + s.arg1); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_pressedElasped"] = (s.tmp_4); - r0 = s.arg0.fields["repeatDelay"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = globals.defaultRepeatDelay___276603; - { step = 4; continue; } + { step = 7; continue; } case 3: - r0 = s.arg0.fields["repeatDelay"]; case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.delay___283939 = (s.tmp_2); - r0 = s.arg0.fields["repeatInterval"]; + s.tmp_4 = helpers_arrayForEach__P20154_mk(s); + s.tmp_5 = helpers_arrayFilter__P20155_mk(s); + s.tmp_6 = helpers_stringSplit__P20168_mk(s); + s.tmp_6.arg0 = s.arg1; + s.tmp_6.arg1 = "\n"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1191; s.pc = 10; return s.tmp_6; + case 10: + r0 = s.retval; + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = forEach_inline__P30948; + s.callLocIdx = 1192; s.pc = 9; return s.tmp_5; + case 9: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P30953; + s.callLocIdx = 1194; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + r0 = pxsim_Array__length(globals.consoleStrings___22291); s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); + r0 = (s.tmp_1 > globals.consoleLines___22304); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = globals.defaultRepeatInterval___276605; - { step = 6; continue; } + s.tmp_2 = helpers_arraySplice__P20143_mk(s); + s.tmp_2.arg0 = globals.consoleStrings___22291; + s.tmp_2.arg1 = 0; + r0 = pxsim_Array__length(globals.consoleStrings___22291); + s.tmp_3 = r0; + r0 = (s.tmp_3 - globals.consoleLines___22304); + s.tmp_2.arg2 = r0; + s.callLocIdx = 1195; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; case 5: - r0 = s.arg0.fields["repeatInterval"]; case 6: - // jmp value (already in r0) - s.tmp_2 = r0; - s.interval___283948 = (s.tmp_2); - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < s.delay___283939); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - { step = 11; continue; } case 7: - case 8: - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.delay___283939); - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.interval___283948); - s.tmp_3 = r0; - r0 = (s.tmp_3 / s.interval___283948); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.count___283961 = (r0); - r0 = s.arg0.fields["_repeatCount"]; - s.tmp_1 = r0; - r0 = (s.count___283961 != s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_2 = controller_Button_raiseButtonRepeat__P276592_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 208; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - r0 = (s.arg0).fields["_repeatCount"] = (s.count___283961); - case 9: - case 10: - case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button___update__P274020.info = {"start":7291,"length":704,"line":217,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"__update","argumentNames":["this","dtms"]} +game_consoleOverlay_listener__P22327.info = {"start":787,"length":571,"line":26,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"listener","argumentNames":["priority","text"]} -function controller_Button___update__P274020_mk(s) { +function game_consoleOverlay_listener__P22327_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button___update__P274020, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener__P22327, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -10552,9 +10656,7 @@ function controller_Button___update__P274020_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - delay___283939: undefined, - interval___283948: undefined, - count___283961: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, } } @@ -10563,7 +10665,7 @@ function controller_Button___update__P274020_mk(s) { -function controller_Button_raiseButtonRepeat__P276592(s) { +function forEach_inline__P30948(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10577,31 +10679,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___276601); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2054, s.tmp_0); - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["id"]; + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2055, s.tmp_0); - case 2: - r0 = undefined; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -controller_Button_raiseButtonRepeat__P276592.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} +forEach_inline__P30948.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} -function controller_Button_raiseButtonRepeat__P276592_mk(s) { +function forEach_inline__P30948_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonRepeat__P276592, depth: s.depth + 1, + parent: s, fn: forEach_inline__P30948, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -10609,7 +10706,7 @@ function controller_Button_raiseButtonRepeat__P276592_mk(s) { -function controller_players__P273946(s) { +function game_consoleOverlay_listener_inline__P30953(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10619,34 +10716,61 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller__player1__P273945_mk(s); - s.callLocIdx = 153; s.pc = 1; return s.tmp_0; + s.j___30955 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.j___30955 = (0); case 1: + s.tmp_1 = r0 = s.j___30955; + r0 = pxsim_String_.length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_3 = r0 = globals.consoleStrings___22291; + s.tmp_5 = helpers_stringSlice__P20165_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_5.arg1 = s.j___30955; + r0 = (s.j___30955 + globals.consoleColumns___22315); + s.tmp_5.arg2 = r0; + s.callLocIdx = 1193; s.pc = 3; return s.tmp_5; + case 3: r0 = s.retval; - s.tmp_0 = helpers_arrayFilter__P271926_mk(s); - s.tmp_0.arg0 = globals._players___276521; - s.tmp_0.arg1 = controller_players_inline__P283893; - s.callLocIdx = 154; s.pc = 2; return s.tmp_0; + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = (s.j___30955 + globals.consoleColumns___22315); + s.j___30955 = (r0); + { step = 1; continue; } case 2: - r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_players__P273946.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} +game_consoleOverlay_listener_inline__P30953.info = {"start":1022,"length":189,"line":33,"column":21,"endLine":37,"endColumn":13,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} -function controller_players__P273946_mk(s) { +function game_consoleOverlay_listener_inline__P30953_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players__P273946, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener_inline__P30953, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + j___30955: undefined, + arg0: undefined, } } -function controller_players_inline__P283893(s) { +function console_addListener__P20367(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10661,25 +10785,42 @@ switch (step) { s.lambdaArgs = null; } r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = pxsim_Array_.indexOf(globals.listeners___20359, s.arg0, undefined); + s.tmp_2 = r0; + r0 = (s.tmp_2 > -1); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = pxsim_Array__push(globals.listeners___20359, s.arg0); + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_players_inline__P283893.info = {"start":1767,"length":14,"line":55,"column":31,"endLine":55,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +console_addListener__P20367.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} -function controller_players_inline__P283893_mk(s) { +function console_addListener__P20367_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players_inline__P283893, depth: s.depth + 1, + parent: s, fn: console_addListener__P20367, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, arg0: undefined, } } @@ -10687,7 +10828,7 @@ function controller_players_inline__P283893_mk(s) { -function helpers_arrayFilter__P271926(s) { +function listeners_inline__P20358(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10697,62 +10838,23 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___281129 = undefined; - s.len___281131 = undefined; - s.i___281134 = undefined; - s.v___281139 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___281129 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___281131 = (r0); - s.i___281134 = (0); - case 1: - r0 = (s.i___281134 < s.len___281131); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___281134); - s.v___281139 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___281139; - s.tmp_1.arg1 = s.i___281134; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 7; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__push(s.res___281129, s.v___281139); - case 2: - case 3: - r0 = (s.i___281134 + 1); - s.i___281134 = (r0); - { step = 1; continue; } - case 4: - r0 = s.res___281129; + r0 = pxsim.control.__log(s.arg0, s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayFilter__P271926.info = {"start":7695,"length":317,"line":261,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayFilter","argumentNames":["arr","callbackfn"]} +listeners_inline__P20358.info = {"start":534,"length":85,"line":25,"column":8,"endLine":25,"endColumn":93,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["priority","text"]} -function helpers_arrayFilter__P271926_mk(s) { +function listeners_inline__P20358_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayFilter__P271926, depth: s.depth + 1, + parent: s, fn: listeners_inline__P20358, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - res___281129: undefined, - len___281131: undefined, - i___281134: undefined, - v___281139: undefined, arg0: undefined, arg1: undefined, } } @@ -10761,7 +10863,7 @@ function helpers_arrayFilter__P271926_mk(s) { -function controller__moveSprites__P273950(s) { +function scene_systemMenu_register__P22245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10771,36 +10873,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1 = controller_players__P273946_mk(s); - s.callLocIdx = 155; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = controller__moveSprites_inline__P283692; - s.callLocIdx = 157; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.instance___22211); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: + case 2: + s.tmp_0 = controller_Button_onEvent__P21144_mk(s); + s.tmp_0.arg0 = globals.menu___21009; + s.tmp_0.arg1 = 2049; + s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P22246; + s.callLocIdx = 1178; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites__P273950.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} +scene_systemMenu_register__P22245.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} -function controller__moveSprites__P273950_mk(s) { +function scene_systemMenu_register__P22245_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites__P273950, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_register__P22245, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, } } -function controller__moveSprites_inline__P283692(s) { +function scene_systemMenu_showSystemMenu__P22246(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10810,35 +10914,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = controller_Controller___preUpdate__P273979_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 156; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.instance___22211); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: + case 2: + s.tmp_0 = game_pushScene__P21923_mk(s); + s.callLocIdx = 1179; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C22223_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P22230_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P22242; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1180; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + globals.instance___22211 = (s.tmp_0); + s.tmp_0 = scene_systemMenu_PauseMenu_show__P22224_mk(s); + s.tmp_0.arg0 = globals.instance___22211; + s.callLocIdx = 1181; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites_inline__P283692.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +scene_systemMenu_showSystemMenu__P22246.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} -function controller__moveSprites_inline__P283692_mk(s) { +function scene_systemMenu_showSystemMenu__P22246_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites_inline__P283692, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_showSystemMenu__P22246, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, } } -function controller_Controller___preUpdate__P273979(s) { +function scene_systemMenu_buildOptionList__P22242(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10848,334 +10968,230 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.deadSprites___283699 = undefined; - s.svx___283700 = undefined; - s.svy___283701 = undefined; - s.svxInCricle___283736 = undefined; - s.svyInCircle___283738 = undefined; - s.sq___283740 = undefined; - s.scale___283755 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - s.tmp_3 = controller_Controller__controlledSprites__P273956_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 167; s.pc = 18; return s.tmp_3; - case 18: + s.options___32116 = undefined; + r0 = pxsim_Array__mk(); + s.options___32116 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___22275; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32124; + s.tmp_1.arg3 = scene_systemMenu_volumeDown__P22233; + s.callLocIdx = 1161; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_UP_ICON___22266; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32138; + s.tmp_1.arg3 = scene_systemMenu_volumeUp__P22232; + s.callLocIdx = 1163; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = 0; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 17; continue; } + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_1 = r0; + s.tmp_2 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___22269; + s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P32153; + s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P22235; + s.callLocIdx = 1166; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___32116, s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___22284; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32169; + s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P22234; + s.callLocIdx = 1168; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); case 1: case 2: - r0 = pxsim_pxtrt.mklocRef(); - s.deadSprites___283699 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.deadSprites___283699, false); - r0 = pxsim_pxtrt.mklocRef(); - s.svx___283700 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svx___283700, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.svy___283701 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svy___283701, 0); - r0 = s.arg0.fields["analog"]; + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = r0 = s.svx___283700; - s.tmp_5 = controller_Button_pressureLevel__P274018_mk(s); - s.tmp_6 = controller_Controller_right__P273961_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 168; s.pc = 20; return s.tmp_6; - case 20: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.callLocIdx = 169; s.pc = 19; return s.tmp_5; - case 19: - r0 = s.retval; - s.tmp_4 = r0; - s.tmp_8 = controller_Button_pressureLevel__P274018_mk(s); - s.tmp_9 = controller_Controller_left__P273960_mk(s); - s.tmp_9.arg0 = s.arg0; - s.callLocIdx = 170; s.pc = 22; return s.tmp_9; - case 22: + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.STATS_ICON___22287; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32184; + s.tmp_1.arg3 = scene_systemMenu_toggleStats__P22237; + s.callLocIdx = 1169; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - s.tmp_8.arg0 = r0; - s.callLocIdx = 171; s.pc = 21; return s.tmp_8; - case 21: + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.CONSOLE_ICON___22281; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32193; + s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P22238; + s.callLocIdx = 1171; s.pc = 10; return s.tmp_1; + case 10: r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_4 - s.tmp_7); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); - s.tmp_0 = r0 = s.svy___283701; - s.tmp_4 = controller_Button_pressureLevel__P274018_mk(s); - s.tmp_5 = controller_Controller_down__P273963_mk(s); - s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 172; s.pc = 24; return s.tmp_5; - case 24: + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.SLEEP_ICON___22278; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32202; + s.tmp_1.arg3 = scene_systemMenu_sleep__P22239; + s.callLocIdx = 1172; s.pc = 11; return s.tmp_1; + case 11: r0 = s.retval; - s.tmp_4.arg0 = r0; - s.callLocIdx = 173; s.pc = 23; return s.tmp_4; - case 23: + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___22212); + if (!r0) { step = 3; continue; } + s.tmp_0 = helpers_arrayConcat__P20158_mk(s); + s.tmp_0.arg0 = s.options___32116; + s.tmp_0.arg1 = globals.customMenuOptions___22212; + s.callLocIdx = 1173; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; - s.tmp_3 = r0; - s.tmp_7 = controller_Button_pressureLevel__P274018_mk(s); - s.tmp_8 = controller_Controller_up__P273962_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 174; s.pc = 26; return s.tmp_8; - case 26: + s.options___32116 = (r0); + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C22214_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P22222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___22272; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P32216; + s.tmp_1.arg3 = scene_systemMenu_closeMenu__P22240; + s.callLocIdx = 1174; s.pc = 13; return s.tmp_1; + case 13: r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 175; s.pc = 25; return s.tmp_7; - case 25: + r0 = pxsim_Array__push(s.options___32116, s.tmp_0); + r0 = s.options___32116; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_buildOptionList__P22242.info = {"start":10499,"length":1149,"line":334,"column":4,"endLine":354,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildOptionList","argumentNames":[]} + +function scene_systemMenu_buildOptionList__P22242_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_buildOptionList__P22242, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + options___32116: undefined, +} } + + + + + +function scene_systemMenu_buildOptionList_inline__P32124(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_3 = music_volume__P20544_mk(s); + s.callLocIdx = 1160; s.pc = 1; return s.tmp_3; + case 1: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_3 - s.tmp_6); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 12; continue; } - case 3: - s.tmp_1 = controller_Button__C274006_v0_1_mk(s); - s.tmp_2 = controller_Controller_right__P273961_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 176; s.pc = 28; return s.tmp_2; - case 28: - r0 = s.retval; - s.tmp_1.arg0 = r0; - if (!checkSubtype(s.tmp_1.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; - s.pc = 27; return s.tmp_1; - case 27: + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 2: r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_String__concat("VOLUME DOWN (", s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = 256; - { step = 5; continue; } - case 4: - r0 = 0; - case 5: - // jmp value (already in r0) - s.tmp_3 = r0; - s.tmp_5 = controller_Button__C274006_v0_1_mk(s); - s.tmp_6 = controller_Controller_left__P273960_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 177; s.pc = 30; return s.tmp_6; - case 30: - r0 = s.retval; - s.tmp_5.arg0 = r0; - if (!checkSubtype(s.tmp_5.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_5.arg0); - s.tmp_5.fn = s.tmp_5.arg0.vtable.methods.isPressed; - s.pc = 29; return s.tmp_5; - case 29: + r0 = pxsim_String__concat(s.tmp_0, ")"); + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_buildOptionList_inline__P32124.info = {"start":10644,"length":39,"line":337,"column":54,"endLine":337,"endColumn":93,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} + +function scene_systemMenu_buildOptionList_inline__P32124_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32124, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, +} } + + + + + +function scene_systemMenu_buildOptionList_inline__P32138(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_3 = music_volume__P20544_mk(s); + s.callLocIdx = 1162; s.pc = 1; return s.tmp_3; + case 1: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 6; continue; } - r0 = 256; - { step = 7; continue; } - case 6: - r0 = 0; - case 7: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.svx___283700; - r0 = (s.tmp_3 - s.tmp_7); - s.tmp_9 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_8, s.tmp_9); - s.tmp_1 = controller_Button__C274006_v0_1_mk(s); - s.tmp_2 = controller_Controller_down__P273963_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 178; s.pc = 32; return s.tmp_2; - case 32: + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 2: r0 = s.retval; - s.tmp_1.arg0 = r0; - if (!checkSubtype(s.tmp_1.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.isPressed; - s.pc = 31; return s.tmp_1; - case 31: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - r0 = 256; - { step = 9; continue; } - case 8: - r0 = 0; - case 9: - // jmp value (already in r0) - s.tmp_3 = r0; - s.tmp_5 = controller_Button__C274006_v0_1_mk(s); - s.tmp_6 = controller_Controller_up__P273962_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 179; s.pc = 34; return s.tmp_6; - case 34: - r0 = s.retval; - s.tmp_5.arg0 = r0; - if (!checkSubtype(s.tmp_5.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_5.arg0); - s.tmp_5.fn = s.tmp_5.arg0.vtable.methods.isPressed; - s.pc = 33; return s.tmp_5; - case 33: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 10; continue; } - r0 = 256; - { step = 11; continue; } - case 10: - r0 = 0; - case 11: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.svy___283701; - r0 = (s.tmp_3 - s.tmp_7); - s.tmp_9 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_8, s.tmp_9); - case 12: - r0 = pxsim_pxtrt.mklocRef(); - s.svxInCricle___283736 = (r0); - s.tmp_0 = r0 = s.svxInCricle___283736; - r0 = pxsim_pxtrt_ldlocRef(s.svx___283700); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt.mklocRef(); - s.svyInCircle___283738 = (r0); - s.tmp_0 = r0 = s.svyInCircle___283738; - r0 = pxsim_pxtrt_ldlocRef(s.svy___283701); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_ldlocRef(s.svx___283700); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svx___283700); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___283701); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___283701); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_0 + s.tmp_3); - s.sq___283740 = (r0); - r0 = (s.sq___283740 > 65536); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (65536 / s.sq___283740); - s.tmp_1 = r0; - r0 = pxsim.Math_.sqrt(s.tmp_1); - s.scale___283755 = (r0); - s.tmp_0 = r0 = s.svxInCricle___283736; - s.tmp_3 = r0 = s.scale___283755; - r0 = pxsim_pxtrt_ldlocRef(s.svx___283700); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - s.tmp_0 = r0 = s.svyInCircle___283738; - s.tmp_3 = r0 = s.scale___283755; - r0 = pxsim_pxtrt_ldlocRef(s.svy___283701); - s.tmp_4 = r0; - r0 = (s.tmp_3 * s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - case 13: - case 14: - r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P283773); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___283699); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___283700); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___283701); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___283736); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___283738); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_2 = controller_Controller__controlledSprites__P273956_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 180; s.pc = 36; return s.tmp_2; - case 36: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 188; s.pc = 35; return s.tmp_1; - case 35: - r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___283699); + r0 = pxsim_String__concat("VOLUME UP (", s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_1 = controller_Controller__controlledSprites__P273957_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = helpers_arrayFilter__P271926_mk(s); - s.tmp_3 = controller_Controller__controlledSprites__P273956_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 189; s.pc = 39; return s.tmp_3; - case 39: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = controller_Controller___preUpdate_inline__P283830; - s.callLocIdx = 190; s.pc = 38; return s.tmp_2; - case 38: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 191; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; - case 15: - case 16: - case 17: - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate__P273979.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} +scene_systemMenu_buildOptionList_inline__P32138.info = {"start":10751,"length":37,"line":338,"column":52,"endLine":338,"endColumn":89,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Controller___preUpdate__P273979_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32138_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate__P273979, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32138, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - deadSprites___283699: undefined, - svx___283700: undefined, - svy___283701: undefined, - svxInCricle___283736: undefined, - svyInCircle___283738: undefined, - sq___283740: undefined, - scale___283755: undefined, - arg0: undefined, } } -function controller_Controller___preUpdate_inline__P283773(s) { +function scene_systemMenu_buildOptionList_inline__P32153(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11185,175 +11201,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___283776 = undefined; - s.vx___283777 = undefined; - s.vy___283778 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_s_1_mk(s); - s.tmp_1 = r0 = s.arg0; - s.tmp_0.arg0 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "s"); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["s"]; - if (s.tmp_0.fn == null) { s.retval = s.tmp_0.arg0.fields["s"]; } - else if (!s.tmp_0.fn.isGetter) { s.retval = bind(s.tmp_0); } - else { s.callLocIdx = 181; s.pc = 22; return s.tmp_0; } - } - case 22: - r0 = s.retval; - s.s___283776 = (r0); - s.tmp_2 = if_vx_1_mk(s); - s.tmp_2.arg0 = s.tmp_1; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "vx"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["vx"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["vx"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 182; s.pc = 23; return s.tmp_2; } - } - case 23: - r0 = s.retval; - s.vx___283777 = (r0); - s.tmp_3 = if_vy_1_mk(s); - s.tmp_3.arg0 = s.tmp_1; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "vy"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["vy"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["vy"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 183; s.pc = 24; return s.tmp_3; } - } - case 24: + r0 = globals.brightness___20826; + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 1: r0 = s.retval; - s.vy___283778 = (r0); - r0 = s.s___283776.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.caps[0], true); - { step = 21; continue; } - case 1: - case 2: - r0 = s.arg0.fields["_inputLastFrame"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.vx___283777); - if (!r0) { step = 3; continue; } - r0 = (s.s___283776).fields["_vx"] = (0); - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(s.vy___283778); - if (!r0) { step = 5; continue; } - r0 = (s.s___283776).fields["_vy"] = (0); - case 5: - case 6: - case 7: - case 8: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + r0 = pxsim_String__concat("BRIGHTNESS DOWN (", s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - case 10: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 19; continue; } - s.tmp_2 = r0 = s.vx___283777; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 11; continue; } - r0 = s.tmp_2; - { step = 12; continue; } - case 11: - r0 = s.vy___283778; - case 12: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 13; continue; } - s.tmp_4 = r0 = s.s___283776; - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.vx___283777); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); - s.tmp_0 = r0 = s.s___283776; - r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___283778); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - { step = 18; continue; } - case 13: - r0 = pxsim_numops_toBoolDecr(s.vx___283777); - if (!r0) { step = 14; continue; } - s.tmp_0 = r0 = s.s___283776; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vx___283777); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - { step = 17; continue; } - case 14: - r0 = pxsim_numops_toBoolDecr(s.vy___283778); - if (!r0) { step = 15; continue; } - s.tmp_0 = r0 = s.s___283776; - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___283778); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - case 15: - case 16: - case 17: - case 18: - r0 = (s.arg0).fields["_inputLastFrame"] = (true); - { step = 20; continue; } - case 19: - r0 = (s.arg0).fields["_inputLastFrame"] = (false); - case 20: - case 21: - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate_inline__P283773.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} +scene_systemMenu_buildOptionList_inline__P32153.info = {"start":10910,"length":48,"line":340,"column":62,"endLine":340,"endColumn":110,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Controller___preUpdate_inline__P283773_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32153_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P283773, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32153, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - s___283776: undefined, - vx___283777: undefined, - vy___283778: undefined, - arg0: undefined, } } -function controller_Controller___preUpdate_inline__P283830(s) { +function scene_systemMenu_buildOptionList_inline__P32169(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11363,39 +11244,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["s"]; - r0 = r0.fields["flags"]; + r0 = globals.brightness___20826; s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } + case 1: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = pxsim_String__concat("BRIGHTNESS UP (", s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate_inline__P283830.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} +scene_systemMenu_buildOptionList_inline__P32169.info = {"start":11038,"length":46,"line":341,"column":60,"endLine":341,"endColumn":106,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Controller___preUpdate_inline__P283830_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32169_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P283830, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32169, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - arg0: undefined, } } -function controller_Button_pressureLevel__P274018(s) { +function scene_systemMenu_buildOptionList_inline__P32184(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11405,70 +11287,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = pxsim.control.deviceDalVersion(); - s.tmp_1 = r0; - r0 = (s.tmp_1 == "sim"); + r0 = pxsim_numops_toBoolDecr(globals.stats___21890); + if (!r0) { step = 1; continue; } + r0 = "HIDE STATS"; + { step = 2; continue; } + case 1: + r0 = "SHOW STATS"; + case 2: + // jmp value (already in r0) s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = controller_Button__C274006_v0_1_mk(s); - s.tmp_3.arg0 = s.arg0; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_3.arg0); - s.tmp_3.fn = s.tmp_3.arg0.vtable.methods.isPressed; - s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; + r0 = s.tmp_0; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_buildOptionList_inline__P32184.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} + +function scene_systemMenu_buildOptionList_inline__P32184_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32184, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function scene_systemMenu_buildOptionList_inline__P32193(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = 512; + r0 = "HIDE CONSOLE"; { step = 2; continue; } case 1: - r0 = 0; + r0 = "SHOW CONSOLE"; case 2: // jmp value (already in r0) s.tmp_4 = r0; r0 = s.tmp_4; - { step = 5; continue; } - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["id"]; - s.tmp_5 = r0; - r0 = pxsim_pxtcore.pressureLevelByButtonId(s.tmp_5, -1); - { step = 5; continue; } - case 4: - r0 = undefined; - case 5: return leave(s, r0) default: oops() } } } -controller_Button_pressureLevel__P274018.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} +scene_systemMenu_buildOptionList_inline__P32193.info = {"start":11273,"length":71,"line":344,"column":50,"endLine":344,"endColumn":121,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Button_pressureLevel__P274018_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32193_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_pressureLevel__P274018, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32193, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - arg0: undefined, } } -function controller_Controller_down__P273963(s) { +function scene_systemMenu_buildOptionList_inline__P32202(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11478,38 +11373,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (4 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = "SLEEP"; + return leave(s, r0) default: oops() } } } -controller_Controller_down__P273963.info = {"start":4131,"length":77,"line":145,"column":8,"endLine":147,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"down","argumentNames":["this"]} -controller_Controller_down__P273963.isGetter = true; +scene_systemMenu_buildOptionList_inline__P32202.info = {"start":11411,"length":13,"line":345,"column":48,"endLine":345,"endColumn":61,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Controller_down__P273963_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32202_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_down__P273963, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32202, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, } } -function controller_Controller_button__P276586(s) { +function scene_systemMenu_buildOptionList_inline__P32216(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11519,39 +11400,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (s.arg1 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + r0 = "CLOSE"; return leave(s, r0) default: oops() } } } -controller_Controller_button__P276586.info = {"start":6666,"length":105,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} +scene_systemMenu_buildOptionList_inline__P32216.info = {"start":11590,"length":13,"line":351,"column":53,"endLine":351,"endColumn":66,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Controller_button__P276586_mk(s) { +function scene_systemMenu_buildOptionList_inline__P32216_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_button__P276586, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P32216, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, } } -function controller_Controller_up__P273962(s) { +function game_consoleOverlay_isVisible__P22328(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11561,38 +11427,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (2 - 1); + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leave(s, r0) default: oops() } } } -controller_Controller_up__P273962.info = {"start":3979,"length":73,"line":137,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"up","argumentNames":["this"]} -controller_Controller_up__P273962.isGetter = true; +game_consoleOverlay_isVisible__P22328.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} -function controller_Controller_up__P273962_mk(s) { +function game_consoleOverlay_isVisible__P22328_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_up__P273962, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_isVisible__P22328, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, + tmp_2: undefined, } } -function controller_Controller_right__P273961(s) { +function scene_systemMenu_setScreenBrightnessSupported__P22241(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11602,38 +11463,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (3 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = 0; + return leave(s, r0) default: oops() } } } -controller_Controller_right__P273961.info = {"start":3823,"length":79,"line":129,"column":8,"endLine":131,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"right","argumentNames":["this"]} -controller_Controller_right__P273961.isGetter = true; +scene_systemMenu_setScreenBrightnessSupported__P22241.info = {"start":10398,"length":95,"line":330,"column":4,"endLine":332,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightnessSupported","argumentNames":[]} -function controller_Controller_right__P273961_mk(s) { +function scene_systemMenu_setScreenBrightnessSupported__P22241_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_right__P273961, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P22241, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, } } -function controller_Controller_left__P273960(s) { +function scene_systemMenu_closeMenu__P22240(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11643,38 +11490,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (1 - 1); - s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(globals.instance___22211); + if (!r0) { step = 1; continue; } + s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P22228_mk(s); + s.tmp_0.arg0 = globals.instance___22211; + s.callLocIdx = 1157; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + globals.instance___22211 = (undefined); + s.tmp_0 = controller__setUserEventsEnabled__P21175_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1158; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = game_popScene__P21924_mk(s); + s.callLocIdx = 1159; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_left__P273960.info = {"start":3666,"length":77,"line":121,"column":8,"endLine":123,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"left","argumentNames":["this"]} -controller_Controller_left__P273960.isGetter = true; +scene_systemMenu_closeMenu__P22240.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} -function controller_Controller_left__P273960_mk(s) { +function scene_systemMenu_closeMenu__P22240_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_left__P273960, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_closeMenu__P22240, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, } } -function controller_Controller__controlledSprites__P273957(s) { +function scene_systemMenu_PauseMenu_dispose__P22228(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11686,43 +11539,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 161; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = r0.fields["controlledSprites"]; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_2, s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P31580; + s.callLocIdx = 1134; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + r0 = (s.arg0).fields["options"] = (undefined); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P273957.info = {"start":3300,"length":134,"line":105,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} +scene_systemMenu_PauseMenu_dispose__P22228.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function controller_Controller__controlledSprites__P273957_mk(s) { +function scene_systemMenu_PauseMenu_dispose__P22228_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P273957, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose__P22228, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Controller__controlledSprites__P273956(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P31580(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11736,31 +11591,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 160; s.pc = 1; return s.tmp_1; + s.tmp_0 = scene_systemMenu_MenuOption_dispose__P22220_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1133; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = r0.fields["controlledSprites"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["playerIndex"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - return leaveAccessor(s, r0) + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P273956.info = {"start":3158,"length":132,"line":101,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this"]} -controller_Controller__controlledSprites__P273956.isGetter = true; +scene_systemMenu_PauseMenu_dispose_inline__P31580.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} -function controller_Controller__controlledSprites__P273956_mk(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P31580_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P273956, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P31580, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, } } @@ -11768,7 +11615,7 @@ function controller_Controller__controlledSprites__P273956_mk(s) { -function Fx_imul__P271977(s) { +function scene_systemMenu_MenuOption_dispose__P22220(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11780,29 +11627,55 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.imul(s.arg0, s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = s.arg0.fields["card"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = Sprite_destroy__P21309_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1053; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_destroy__P21309_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 1054; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = (s.arg0).fields["card"] = (undefined); + r0 = (s.arg0).fields["icon"] = (undefined); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_imul__P271977.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} +scene_systemMenu_MenuOption_dispose__P22220.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function Fx_imul__P271977_mk(s) { +function scene_systemMenu_MenuOption_dispose__P22220_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_imul__P271977, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_dispose__P22220, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function power_checkDeepSleep__P273747(s) { +function Sprite_destroy__P21309(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11812,94 +11685,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___282441 = undefined; - s.to___282444 = undefined; - s.tmp_0 = power_init__P276430_mk(s); - s.callLocIdx = 76; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = r0 = globals._poked___276428; - r0 = pxsim_numops_toBool(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 5; continue; } case 1: - r0 = 0; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - s.p___282441 = (s.tmp_1); - s.tmp_0 = r0 = globals._timeout___276429; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = 0; - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.to___282444 = (s.tmp_1); - r0 = (s.to___282444 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = pxsim.control.millis(); - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.p___282441); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.to___282444); - case 6: - // jmp value (already in r0) + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 | 2); s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 7; continue; } - r0 = s.tmp_3; - { step = 8; continue; } + r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 3; continue; } + s.tmp_0 = effects_ParticleEffect_destroy__P22470_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = undefined; + s.callLocIdx = 432; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + s.tmp_0 = Sprite__destroyCore__P21310_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 433; s.pc = 7; return s.tmp_0; case 7: - r0 = pxsim.control.isUSBInitialized(); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - case 8: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore.deepSleep(); - case 9: - case 10: + r0 = s.retval; + case 4: + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -power_checkDeepSleep__P273747.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} +Sprite_destroy__P21309.info = {"start":26493,"length":293,"line":859,"column":4,"endLine":868,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"destroy","argumentNames":["this","effect","duration"]} -function power_checkDeepSleep__P273747_mk(s) { +function Sprite_destroy__P21309_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_checkDeepSleep__P273747, depth: s.depth + 1, + parent: s, fn: Sprite_destroy__P21309, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - p___282441: undefined, - to___282444: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function power_init__P276430(s) { +function effects_ParticleEffect_destroy__P22470(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11909,54 +11762,88 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals._timeout___276429 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, effects_ParticleEffect__C22468_VT)) failedCast(r0); + s.tmp_0 = Sprite_setFlag__P21300_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 7168; + s.tmp_0.arg2 = true; + s.callLocIdx = 1318; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = effects_ParticleEffect_start__P22469_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg3; + s.tmp_0.arg3 = null; + r0 = s.arg1.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 512); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0.arg4 = r0; + s.callLocIdx = 1319; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg2); if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = s.arg2; + { step = 2; continue; } case 1: - case 2: - r0 = pxsim_pxtcore.getConfig(212, -1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 1000); - globals._timeout___276429 = (r0); - r0 = (globals._timeout___276429 > 0); + r0 = s.arg0.fields["defaultLifespan"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = (globals._timeout___276429 < 300000); - case 4: + r0 = (s.tmp_0 >> 2); + case 2: // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - globals._timeout___276429 = (300000); + r0 = (s.arg1).fields["lifespan"] = (s.tmp_1); + s.tmp_0 = effects_ImageEffect_applyTo__P22522_mk(s); + s.tmp_0.arg0 = globals.dissolve___22527; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1320; s.pc = 5; return s.tmp_0; case 5: - case 6: - case 7: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -power_init__P276430.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} +effects_ParticleEffect_destroy__P22470.info = {"start":1736,"length":368,"line":41,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"destroy","argumentNames":["this","anchor","duration","particlesPerSecond"]} -function power_init__P276430_mk(s) { +function effects_ParticleEffect_destroy__P22470_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_init__P276430, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_destroy__P22470, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function power_poke__P273746(s) { +function dissolve_inline__P31707(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11966,31 +11853,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = power_init__P276430_mk(s); - s.callLocIdx = 75; s.pc = 1; return s.tmp_0; + s.i___31710 = undefined; + s.x___31721 = undefined; + s.y___31727 = undefined; + s.w___31733 = undefined; + s.h___31737 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 5); + s.i___31710 = (r0); case 1: + r0 = (s.i___31710 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = 0; + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1.arg2 = r0; + s.callLocIdx = 52; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = pxsim.control.millis(); - globals._poked___276428 = (r0); + s.x___31721 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 0; + r0 = pxsim_ImageMethods.height(s.arg0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 53; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.y___31727 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = 3; + s.callLocIdx = 54; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.w___31733 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = 3; + s.callLocIdx = 55; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.h___31737 = (r0); + s.tmp_0 = helpers_imageDrawRect__P20844_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.x___31721; + s.tmp_0.arg2 = s.y___31727; + s.tmp_0.arg3 = s.w___31733; + s.tmp_0.arg4 = s.h___31737; + s.tmp_0.arg5 = 0; + s.callLocIdx = 56; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = (s.i___31710 - 1); + s.i___31710 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -power_poke__P273746.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} +dissolve_inline__P31707.info = {"start":2199,"length":360,"line":60,"column":49,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} -function power_poke__P273746_mk(s) { +function dissolve_inline__P31707_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_poke__P273746, depth: s.depth + 1, + parent: s, fn: dissolve_inline__P31707, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + i___31710: undefined, + x___31721: undefined, + y___31727: undefined, + w___31733: undefined, + h___31737: undefined, + arg0: undefined, + arg1: undefined, } } -function control_EventContext_deltaTime__P272216(s) { +function helpers_imageDrawRect__P20844(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12002,33 +11963,108 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - r0 = s.arg0.fields["deltaTimeMillis"]; + r0 = (s.arg3 == 0); s.tmp_0 = r0; - r0 = (s.tmp_0 / 1000); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = (s.arg4 == 0); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = (s.arg3 - 1); + s.arg3 = (r0); + r0 = (s.arg4 - 1); + s.arg4 = (r0); + s.tmp_0 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + r0 = (s.arg1 + s.arg3); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg2; + s.tmp_0.arg5 = s.arg5; + s.callLocIdx = 84; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = s.arg1; + r0 = (s.arg2 + s.arg4); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg5; + s.callLocIdx = 85; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.arg1 + s.arg3); + s.tmp_0.arg1 = r0; + r0 = (s.arg2 + s.arg4); + s.tmp_0.arg2 = r0; + r0 = (s.arg1 + s.arg3); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg2; + s.tmp_0.arg5 = s.arg5; + s.callLocIdx = 86; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = (s.arg1 + s.arg3); + s.tmp_0.arg1 = r0; + r0 = (s.arg2 + s.arg4); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.arg1; + r0 = (s.arg2 + s.arg4); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg5; + s.callLocIdx = 87; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -control_EventContext_deltaTime__P272216.info = {"start":2135,"length":75,"line":71,"column":8,"endLine":73,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"deltaTime","argumentNames":["this"]} -control_EventContext_deltaTime__P272216.isGetter = true; +helpers_imageDrawRect__P20844.info = {"start":5945,"length":370,"line":185,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawRect","argumentNames":["img","x","y","w","h","c"]} -function control_EventContext_deltaTime__P272216_mk(s) { +function helpers_imageDrawRect__P20844_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_deltaTime__P272216, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawRect__P20844, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function scene_Scene_constructor__P274683(s) { +function helpers_imageDrawLine__P20843(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12042,114 +12078,56 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = (s.arg0).fields["previousScene"] = (s.arg2); - r0 = (s.arg0).fields["eventContext"] = (s.arg1); - r0 = (s.arg0).fields["flags"] = (0); - r0 = pxsim_pxtcore_mkClassInstance(ArcadePhysicsEngine__C274344_VT); - s.tmp_0 = r0; - s.tmp_1 = ArcadePhysicsEngine_constructor__P274345_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = 500; - s.tmp_1.arg2 = 2; - s.tmp_1.arg3 = 4; - s.callLocIdx = 905; s.pc = 1; return s.tmp_1; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = helpers_pack__P20836_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 82; s.pc = 1; return s.tmp_2; case 1: r0 = s.retval; - r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C274598_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Camera_constructor__P274602_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 906; s.pc = 2; return s.tmp_1; + s.tmp_1 = r0; + s.tmp_4 = helpers_pack__P20836_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 83; s.pc = 2; return s.tmp_4; case 2: r0 = s.retval; - r0 = (s.arg0).fields["camera"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_Background__C274486_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Background_constructor__P274490_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["camera"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 907; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.arg0).fields["background"] = (s.tmp_0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["destroyedHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["createdHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["overlapHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["overlapMap"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["tileOverlapHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["collisionHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["wallCollisionHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["gameForeverHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spritesByKind"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["controlledSprites"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buttonEventHandlers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_data"] = (s.tmp_1); - r0 = (s.arg0).fields["_millis"] = (0); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods._drawLine(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_constructor__P274683.info = {"start":3586,"length":836,"line":106,"column":8,"endLine":125,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["this","eventContext","previousScene"]} +helpers_imageDrawLine__P20843.info = {"start":5781,"length":159,"line":182,"column":4,"endLine":184,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawLine","argumentNames":["img","x","y","w","h","c"]} -function scene_Scene_constructor__P274683_mk(s) { +function helpers_imageDrawLine__P20843_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_constructor__P274683, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawLine__P20843, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function scene_Camera_constructor__P274602(s) { +function Math_FastRandom_randomRange__P22205(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12161,33 +12139,60 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = (s.arg0).fields["_offsetX"] = (0); - r0 = (s.arg0).fields["_offsetY"] = (0); - r0 = (s.arg0).fields["drawOffsetX"] = (0); - r0 = (s.arg0).fields["drawOffsetY"] = (0); - r0 = undefined; + if (!checkSubtype(r0, Math_FastRandom__C22203_VT)) failedCast(r0); + r0 = (s.arg2 > s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = Math_FastRandom_next__P22204_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1035; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.arg2 - s.arg1); + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_3 = r0; + r0 = (s.tmp_1 % s.tmp_3); + { step = 2; continue; } + case 1: + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = (s.arg1 + s.tmp_5); return leave(s, r0) default: oops() } } } -scene_Camera_constructor__P274602.info = {"start":550,"length":156,"line":17,"column":8,"endLine":23,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} +Math_FastRandom_randomRange__P22205.info = {"start":2079,"length":131,"line":62,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"randomRange","argumentNames":["this","min","max"]} -function scene_Camera_constructor__P274602_mk(s) { +function Math_FastRandom_randomRange__P22205_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_constructor__P274602, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_randomRange__P22205, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_Background_constructor__P274490(s) { +function Math_FastRandom_next__P22204(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12199,39 +12204,53 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C274486_VT)) failedCast(r0); - r0 = (s.arg0).fields["color"] = (0); - r0 = (s.arg0).fields["camera"] = (s.arg1); + if (!checkSubtype(r0, Math_FastRandom__C22203_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = s.arg0.fields["lfsr"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["lfsr"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 & 1); + s.tmp_6 = r0; + r0 = (0 - s.tmp_6); + s.tmp_5 = r0; + r0 = (s.tmp_5 & 46080); + s.tmp_4 = r0; + r0 = (s.tmp_2 ^ s.tmp_4); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); - r0 = undefined; + r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -scene_Background_constructor__P274490.info = {"start":367,"length":132,"line":20,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","camera"]} +Math_FastRandom_next__P22204.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} -function scene_Background_constructor__P274490_mk(s) { +function Math_FastRandom_next__P22204_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_constructor__P274490, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_next__P22204, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, - arg1: undefined, } } -function ArcadePhysicsEngine_constructor__P274345(s) { +function effects_ImageEffect_constructor__P22525(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12245,66 +12264,45 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = undefined; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteMap__C274263_VT); + if (!checkSubtype(r0, effects_ImageEffect__C22521_VT)) failedCast(r0); + r0 = (s.arg0).fields["effect"] = (s.arg2); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C22203_VT); s.tmp_0 = r0; - s.tmp_1 = sprites_SpriteMap_constructor__P274264_mk(s); + s.tmp_1 = Math_FastRandom_constructor__P22210_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 526; s.pc = 1; return s.tmp_1; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1328; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - r0 = (s.arg0).fields["map"] = (s.tmp_0); - s.tmp_0 = ArcadePhysicsEngine_maxSpeed__P274347_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 527; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_maxStep__P274351_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 528; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_minStep__P274349_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 529; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + r0 = (s.arg0).fields["fastRandom"] = (s.tmp_0); + r0 = (s.arg0).fields["preferredDelay"] = (s.arg1); + r0 = (s.arg0).fields["times"] = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_constructor__P274345.info = {"start":1601,"length":277,"line":58,"column":4,"endLine":65,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","maxVelocity","minSingleStep","maxSingleStep"]} +effects_ImageEffect_constructor__P22525.info = {"start":410,"length":290,"line":10,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["this","defaultRate","effectFactory"]} -function ArcadePhysicsEngine_constructor__P274345_mk(s) { +function effects_ImageEffect_constructor__P22525_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constructor__P274345, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_constructor__P22525, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_maxStep__P274351(s) { +function effects_ImageEffect_applyTo__P22522(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12314,33 +12312,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.clonedImage___31887 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + if (!checkSubtype(r0, effects_ImageEffect__C22521_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxSingleStep"] = (s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg1.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = s.arg1.fields["_image"]; + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.clone(s.tmp_5); + s.clonedImage___31887 = (r0); + s.tmp_0 = effects_ImageEffect_change__P22523_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.clonedImage___31887; + s.callLocIdx = 1331; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_setImage__P21270_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.clonedImage___31887; + s.callLocIdx = 1332; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxStep__P274351.info = {"start":2329,"length":67,"line":88,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} +effects_ImageEffect_applyTo__P22522.info = {"start":823,"length":218,"line":21,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"applyTo","argumentNames":["this","sprite"]} -function ArcadePhysicsEngine_maxStep__P274351_mk(s) { +function effects_ImageEffect_applyTo__P22522_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P274351, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_applyTo__P22522, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + clonedImage___31887: undefined, arg0: undefined, arg1: undefined, } } @@ -12349,7 +12385,7 @@ function ArcadePhysicsEngine_maxStep__P274351_mk(s) { -function ArcadePhysicsEngine_maxStep__P274350(s) { +function effects_ImageEffect_change__P22523(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12361,36 +12397,48 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg0.fields["maxSingleStep"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, effects_ImageEffect__C22521_VT)) failedCast(r0); + s.tmp_0 = if_effect_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + r0 = s.arg0.fields["fastRandom"]; + s.tmp_0.arg2 = r0; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "effect"), 3); + s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["effect"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["effect"], 3); s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1333; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxStep__P274350.info = {"start":2249,"length":74,"line":84,"column":4,"endLine":86,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this"]} -ArcadePhysicsEngine_maxStep__P274350.isGetter = true; +effects_ImageEffect_change__P22523.info = {"start":1151,"length":81,"line":32,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"change","argumentNames":["this","input"]} -function ArcadePhysicsEngine_maxStep__P274350_mk(s) { +function effects_ImageEffect_change__P22523_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P274350, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_change__P22523, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, + arg1: undefined, } } -function Fx_toInt__P271988(s) { +function Sprite_setImage__P21270(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12402,30 +12450,64 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 + 128); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["_image"]; + s.tmp_2 = r0; + r0 = (s.arg1 === s.tmp_2); + case 2: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = (s.arg0).fields["_image"] = (s.arg1); + s.tmp_0 = Sprite__C21242_v5_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C21242_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.recalcSize; + s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_toInt__P271988.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} +Sprite_setImage__P21270.info = {"start":9299,"length":131,"line":332,"column":4,"endLine":336,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setImage","argumentNames":["this","img"]} -function Fx_toInt__P271988_mk(s) { +function Sprite_setImage__P21270_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toInt__P271988, depth: s.depth + 1, + parent: s, fn: Sprite_setImage__P21270, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, + arg1: undefined, } } -function ArcadePhysicsEngine_minStep__P274349(s) { +function Sprite_recalcSize__P21276(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12437,40 +12519,78 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + r0 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_4); + s.tmp_3 = r0; + s.tmp_6 = Sprite_sx__P21260_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 344; s.pc = 1; return s.tmp_6; + case 1: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_3 * s.tmp_5); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_2 * 256); + s.tmp_7 = r0; + r0 = (s.tmp_7 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); + r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["_image"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_4); + s.tmp_3 = r0; + s.tmp_6 = Sprite_sy__P21262_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 346; s.pc = 2; return s.tmp_6; + case 2: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_3 * s.tmp_5); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_7 = r0; + r0 = (s.tmp_7 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); + s.tmp_0 = Sprite_resetHitbox__P21272_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 348; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_minStep__P274349.info = {"start":2176,"length":67,"line":80,"column":4,"endLine":82,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} +Sprite_recalcSize__P21276.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} -function ArcadePhysicsEngine_minStep__P274349_mk(s) { +function Sprite_recalcSize__P21276_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_minStep__P274349, depth: s.depth + 1, + parent: s, fn: Sprite_recalcSize__P21276, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, - arg1: undefined, } } -function ArcadePhysicsEngine_minStep__P274348(s) { +function Sprite_resetHitbox__P21272(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12485,25 +12605,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg0.fields["minSingleStep"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = (s.arg0).fields["_hitbox"] = (null); + s.tmp_0 = Sprite__C21242_v4_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C21242_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setHitbox; + s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_minStep__P274348.info = {"start":2096,"length":74,"line":76,"column":4,"endLine":78,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this"]} -ArcadePhysicsEngine_minStep__P274348.isGetter = true; +Sprite_resetHitbox__P21272.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} -function ArcadePhysicsEngine_minStep__P274348_mk(s) { +function Sprite_resetHitbox__P21272_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_minStep__P274348, depth: s.depth + 1, + parent: s, fn: Sprite_resetHitbox__P21272, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -12511,7 +12633,7 @@ function ArcadePhysicsEngine_minStep__P274348_mk(s) { -function ArcadePhysicsEngine_maxSpeed__P274347(s) { +function Sprite_setHitbox__P21273(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12523,46 +12645,53 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxVelocity"] = (s.tmp_1); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = game_Hitbox_updateIfInvalid__P21183_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 342; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + { step = 2; continue; } + case 1: s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); + s.tmp_2 = game_calculateHitBox__P21186_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 343; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxNegativeVelocity"] = (s.tmp_1); + r0 = (s.tmp_0).fields["_hitbox"] = (s.tmp_1); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P274347.info = {"start":1963,"length":127,"line":71,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} +Sprite_setHitbox__P21273.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} -function ArcadePhysicsEngine_maxSpeed__P274347_mk(s) { +function Sprite_setHitbox__P21273_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P274347, depth: s.depth + 1, + parent: s, fn: Sprite_setHitbox__P21273, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_neg__P271971(s) { +function game_calculateHitBox__P21186(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12572,21 +12701,207 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___27775 = undefined; + s.minX___27778 = undefined; + s.minY___27782 = undefined; + s.maxX___27786 = undefined; + s.maxY___27788 = undefined; + s.c___27790 = undefined; + s.fxc___27791 = undefined; + s.r___27798 = undefined; + s.fxr___27799 = undefined; + s.width___27863 = undefined; + s.height___27871 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (0 - s.arg0); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + s.tmp_1 = game_Hitbox_isValid__P21181_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 276; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = s.arg0.fields["_hitbox"]; + { step = 11; continue; } + case 3: + case 4: + r0 = s.arg0.fields["_image"]; + s.i___27775 = (r0); + r0 = pxsim_ImageMethods.width(s.i___27775); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minX___27778 = (r0); + r0 = pxsim_ImageMethods.height(s.i___27775); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minY___27782 = (r0); + s.maxX___27786 = (0); + s.maxY___27788 = (0); + s.c___27790 = (0); + s.fxc___27791 = (0); + case 5: + s.tmp_1 = r0 = s.c___27790; + r0 = pxsim_ImageMethods.width(s.i___27775); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.r___27798 = (0); + s.fxr___27799 = (0); + case 6: + s.tmp_1 = r0 = s.r___27798; + r0 = pxsim_ImageMethods.height(s.i___27775); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = pxsim_ImageMethods.getPixel(s.i___27775, s.c___27790, s.r___27798); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = Fx_min__P20221_mk(s); + s.tmp_4.arg0 = s.minX___27778; + s.tmp_4.arg1 = s.fxc___27791; + s.callLocIdx = 280; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + s.minX___27778 = (r0); + s.tmp_0 = Fx_min__P20221_mk(s); + s.tmp_0.arg0 = s.minY___27782; + s.tmp_0.arg1 = s.fxr___27799; + s.callLocIdx = 281; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.minY___27782 = (r0); + s.tmp_0 = Fx_max__P20222_mk(s); + s.tmp_0.arg0 = s.maxX___27786; + s.tmp_0.arg1 = s.fxc___27791; + s.callLocIdx = 282; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.maxX___27786 = (r0); + s.tmp_0 = Fx_max__P20222_mk(s); + s.tmp_0.arg0 = s.maxY___27788; + s.tmp_0.arg1 = s.fxr___27799; + s.callLocIdx = 283; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.maxY___27788 = (r0); + case 7: + case 8: + r0 = (s.r___27798 + 1); + s.r___27798 = (r0); + r0 = (s.fxr___27799 + 256); + s.tmp_0 = r0; + s.fxr___27799 = (r0); + r0 = s.tmp_0; + { step = 6; continue; } + case 9: + r0 = (s.c___27790 + 1); + s.c___27790 = (r0); + r0 = (s.fxc___27791 + 256); + s.tmp_0 = r0; + s.fxc___27791 = (r0); + r0 = s.tmp_0; + { step = 5; continue; } + case 10: + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.minX___27778, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.minX___27778 = (r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.minY___27782, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.minY___27782 = (r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.maxX___27786, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.maxX___27786 = (r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.maxY___27788, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.maxY___27788 = (r0); + r0 = (s.maxX___27786 - s.minX___27778); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sx"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.width___27863 = (r0); + r0 = (s.maxY___27788 - s.minY___27782); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sy"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.height___27871 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C21176_VT); + s.tmp_0 = r0; + s.tmp_1 = game_Hitbox_constructor__P21185_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.width___27863; + s.tmp_1.arg3 = s.height___27871; + r0 = (s.minX___27778 & -256); + s.tmp_1.arg4 = r0; + r0 = (s.minY___27782 & -256); + s.tmp_1.arg5 = r0; + s.callLocIdx = 296; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + r0 = s.tmp_0; + case 11: return leave(s, r0) default: oops() } } } -Fx_neg__P271971.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} +game_calculateHitBox__P21186.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} -function Fx_neg__P271971_mk(s) { +function game_calculateHitBox__P21186_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_neg__P271971, depth: s.depth + 1, + parent: s, fn: game_calculateHitBox__P21186, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + i___27775: undefined, + minX___27778: undefined, + minY___27782: undefined, + maxX___27786: undefined, + maxY___27788: undefined, + c___27790: undefined, + fxc___27791: undefined, + r___27798: undefined, + fxr___27799: undefined, + width___27863: undefined, + height___27871: undefined, arg0: undefined, } } @@ -12594,7 +12909,7 @@ function Fx_neg__P271971_mk(s) { -function ArcadePhysicsEngine_maxSpeed__P274346(s) { +function game_Hitbox_constructor__P21185(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12606,36 +12921,55 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_calcDimensionalHash__P21271_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 220; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) + r0 = (s.tmp_0).fields["hash"] = (s.tmp_1); + r0 = (s.arg0).fields["parent"] = (s.arg1); + r0 = (s.arg0).fields["width"] = (s.arg2); + r0 = (s.arg0).fields["height"] = (s.arg3); + r0 = (s.arg0).fields["ox"] = (s.arg4); + r0 = (s.arg0).fields["oy"] = (s.arg5); + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P274346.info = {"start":1884,"length":73,"line":67,"column":4,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this"]} -ArcadePhysicsEngine_maxSpeed__P274346.isGetter = true; +game_Hitbox_constructor__P21185.info = {"start":173,"length":288,"line":9,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"inline","argumentNames":["this","parent","width","height","ox","oy"]} -function ArcadePhysicsEngine_maxSpeed__P274346_mk(s) { +function game_Hitbox_constructor__P21185_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P274346, depth: s.depth + 1, + parent: s, fn: game_Hitbox_constructor__P21185, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function PhysicsEngine_constructor__P274329(s) { +function Sprite_calcDimensionalHash__P21271(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12650,18 +12984,45 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); - r0 = undefined; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.revision(s.tmp_2); + s.tmp_1 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_4 = r0; + r0 = (8 + 8); + s.tmp_5 = r0; + r0 = (s.tmp_4 >> s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0 = r0; + r0 = s.arg0.fields["_height"]; + s.tmp_7 = r0; + r0 = (16 + 8); + s.tmp_8 = r0; + r0 = (s.tmp_7 >> s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_0 + s.tmp_6); return leave(s, r0) default: oops() } } } -PhysicsEngine_constructor__P274329.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} +Sprite_calcDimensionalHash__P21271.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} -function PhysicsEngine_constructor__P274329_mk(s) { +function Sprite_calcDimensionalHash__P21271_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_constructor__P274329, depth: s.depth + 1, + parent: s, fn: Sprite_calcDimensionalHash__P21271, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, } } @@ -12669,7 +13030,7 @@ function PhysicsEngine_constructor__P274329_mk(s) { -function sprites_SpriteMap_constructor__P274264(s) { +function Fx_toIntShifted__P20211(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12681,35 +13042,34 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = (s.arg1 + 8); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); - r0 = undefined; + r0 = (s.tmp_0 >> s.tmp_1); return leave(s, r0) default: oops() } } } -sprites_SpriteMap_constructor__P274264.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} +Fx_toIntShifted__P20211.info = {"start":404,"length":102,"line":17,"column":4,"endLine":19,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toIntShifted","argumentNames":["a","n"]} -function sprites_SpriteMap_constructor__P274264_mk(s) { +function Fx_toIntShifted__P20211_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_constructor__P274264, depth: s.depth + 1, + parent: s, fn: Fx_toIntShifted__P20211, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, arg0: undefined, + arg1: undefined, } } -function control_pushEventContext__P272225(s) { +function game_Hitbox_isValid__P21181(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12719,63 +13079,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___284002 = undefined; - s.n___284008 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___276305); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + r0 = s.arg0.fields["hash"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals.eventContexts___276305 = (r0); + s.tmp_2 = Sprite_calcDimensionalHash__P21271_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 229; s.pc = 1; return s.tmp_2; case 1: - case 2: - s.tmp_0 = control_eventContext__P272224_mk(s); - s.callLocIdx = 54; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.ctx___284002 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___284002); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_EventContext_unregister__P272218_mk(s); - s.tmp_0.arg0 = s.ctx___284002; - s.callLocIdx = 55; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C272211_VT); - s.tmp_0 = r0; - s.tmp_1 = control_EventContext_constructor__P272215_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 56; s.pc = 7; return s.tmp_1; - case 7: r0 = s.retval; - s.n___284008 = (s.tmp_0); - r0 = pxsim_Array__push(globals.eventContexts___276305, s.n___284008); - r0 = s.n___284008; + s.tmp_1 = r0; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -control_pushEventContext__P272225.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} +game_Hitbox_isValid__P21181.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} -function control_pushEventContext__P272225_mk(s) { +function game_Hitbox_isValid__P21181_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pushEventContext__P272225, depth: s.depth + 1, + parent: s, fn: game_Hitbox_isValid__P21181, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - ctx___284002: undefined, - n___284008: undefined, + tmp_2: undefined, + arg0: undefined, } } -function control_EventContext_constructor__P272215(s) { +function Fx_floor__P20223(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12789,40 +13129,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C272211_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["handlers"] = (s.tmp_1); - r0 = (s.arg0).fields["framesInSample"] = (0); - r0 = (s.arg0).fields["timeInSample"] = (0); - r0 = (s.arg0).fields["deltaTimeMillis"] = (0); - r0 = (s.arg0).fields["frameWorker"] = (0); - r0 = (s.arg0).fields["idleCallbacks"] = (undefined); - r0 = pxsim_numops_toBoolDecr(globals.control_EventContext_lastStats___272213); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_String_.mkEmpty(); - globals.control_EventContext_lastStats___272213 = (r0); - case 1: - case 2: - r0 = undefined; + r0 = (s.arg0 & -256); return leave(s, r0) default: oops() } } } -control_EventContext_constructor__P272215.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} +Fx_floor__P20223.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} -function control_EventContext_constructor__P272215_mk(s) { +function Fx_floor__P20223_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_constructor__P272215, depth: s.depth + 1, + parent: s, fn: Fx_floor__P20223, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -12830,7 +13147,7 @@ function control_EventContext_constructor__P272215_mk(s) { -function particles_disableAll__P274999(s) { +function Fx_max__P20222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12840,46 +13157,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___284187 = undefined; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1258; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___284187 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___284187); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 > s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - s.tmp_0.arg0 = s.sources___284187; - s.tmp_0.arg1 = particles_disableAll_inline__P284193; - s.callLocIdx = 1260; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P277152_mk(s); - s.callLocIdx = 1261; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: + r0 = s.arg1; + { step = 3; continue; } case 2: r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -particles_disableAll__P274999.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} +Fx_max__P20222.info = {"start":1797,"length":117,"line":56,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"max","argumentNames":["a","b"]} -function particles_disableAll__P274999_mk(s) { +function Fx_max__P20222_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll__P274999, depth: s.depth + 1, + parent: s, fn: Fx_max__P20222, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___284187: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_disableAll_inline__P284193(s) { +function Fx_min__P20221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12891,34 +13206,42 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_enabled__P274981_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1259; s.pc = 1; return s.tmp_0; + r0 = (s.arg0 < s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = false; + r0 = s.arg1; + { step = 3; continue; } + case 2: + r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -particles_disableAll_inline__P284193.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +Fx_min__P20221.info = {"start":1675,"length":117,"line":50,"column":4,"endLine":55,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"min","argumentNames":["a","b"]} -function particles_disableAll_inline__P284193_mk(s) { +function Fx_min__P20221_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll_inline__P284193, depth: s.depth + 1, + parent: s, fn: Fx_min__P20221, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function particles_clearAll__P274998(s) { +function Fx_mul__P20215(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12928,46 +13251,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___284198 = undefined; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1254; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___284198 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___284198); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - s.tmp_0.arg0 = s.sources___284198; - s.tmp_0.arg1 = particles_clearAll_inline__P284204; - s.callLocIdx = 1256; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P277152_mk(s); - s.callLocIdx = 1257; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim.Math_.imul(s.arg0, s.arg1); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -particles_clearAll__P274998.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} +Fx_mul__P20215.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} -function particles_clearAll__P274998_mk(s) { +function Fx_mul__P20215_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_clearAll__P274998, depth: s.depth + 1, + parent: s, fn: Fx_mul__P20215, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___284198: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_clearAll_inline__P284204(s) { +function Fx_sub__P20214(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12979,33 +13290,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_clear__P274983_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1255; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -particles_clearAll_inline__P284204.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +Fx_sub__P20214.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} -function particles_clearAll_inline__P284204_mk(s) { +function Fx_sub__P20214_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_clearAll_inline__P284204, depth: s.depth + 1, + parent: s, fn: Fx_sub__P20214, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource_clear__P274983(s) { +function game_Hitbox_updateIfInvalid__P21183(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13015,24 +13322,147 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.newHitBox___27995 = undefined; + s.oMinX___28000 = undefined; + s.oMinY___28003 = undefined; + s.oMaxX___28006 = undefined; + s.oMaxY___28012 = undefined; + s.nMinX___28018 = undefined; + s.nMinY___28021 = undefined; + s.nMaxX___28024 = undefined; + s.nMaxY___28030 = undefined; + s.xDiff___28036 = undefined; + s.yDiff___28047 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = (s.arg0).fields["head"] = (undefined); + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + s.tmp_1 = game_Hitbox_isValid__P21181_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 234; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } + case 1: + case 2: + s.tmp_2 = game_calculateHitBox__P21186_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 235; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.newHitBox___27995 = (r0); + r0 = s.arg0.fields["ox"]; + s.oMinX___28000 = (r0); + r0 = s.arg0.fields["oy"]; + s.oMinY___28003 = (r0); + r0 = s.arg0.fields["width"]; + s.tmp_0 = r0; + r0 = (s.oMinX___28000 + s.tmp_0); + s.oMaxX___28006 = (r0); + r0 = s.arg0.fields["height"]; + s.tmp_0 = r0; + r0 = (s.oMinY___28003 + s.tmp_0); + s.oMaxY___28012 = (r0); + r0 = s.newHitBox___27995.fields["ox"]; + s.nMinX___28018 = (r0); + r0 = s.newHitBox___27995.fields["oy"]; + s.nMinY___28021 = (r0); + r0 = s.newHitBox___27995.fields["width"]; + s.tmp_0 = r0; + r0 = (s.nMinX___28018 + s.tmp_0); + s.nMaxX___28024 = (r0); + r0 = s.newHitBox___27995.fields["height"]; + s.tmp_0 = r0; + r0 = (s.nMinY___28021 + s.tmp_0); + s.nMaxY___28030 = (r0); + s.tmp_1 = Fx_abs__P20220_mk(s); + r0 = (s.oMinX___28000 - s.nMinX___28018); + s.tmp_1.arg0 = r0; + s.callLocIdx = 241; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Fx_abs__P20220_mk(s); + r0 = (s.oMaxX___28006 - s.nMaxX___28024); + s.tmp_3.arg0 = r0; + s.callLocIdx = 243; s.pc = 11; return s.tmp_3; + case 11: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.xDiff___28036 = (r0); + s.tmp_1 = Fx_abs__P20220_mk(s); + r0 = (s.oMinY___28003 - s.nMinY___28021); + s.tmp_1.arg0 = r0; + s.callLocIdx = 246; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Fx_abs__P20220_mk(s); + r0 = (s.oMaxY___28012 - s.nMaxY___28030); + s.tmp_3.arg0 = r0; + s.callLocIdx = 248; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.yDiff___28047 = (r0); + r0 = (s.xDiff___28036 > 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = (s.arg0).fields["ox"] = (s.nMinX___28018); + r0 = s.newHitBox___27995.fields["width"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["width"] = (s.tmp_0); + case 3: + case 4: + r0 = (s.yDiff___28047 > 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = (s.arg0).fields["oy"] = (s.nMinY___28021); + r0 = s.newHitBox___27995.fields["height"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["height"] = (s.tmp_0); + case 5: + case 6: + r0 = s.newHitBox___27995.fields["hash"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["hash"] = (s.tmp_0); + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_clear__P274983.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} +game_Hitbox_updateIfInvalid__P21183.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} -function particles_ParticleSource_clear__P274983_mk(s) { +function game_Hitbox_updateIfInvalid__P21183_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_clear__P274983, depth: s.depth + 1, + parent: s, fn: game_Hitbox_updateIfInvalid__P21183, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + newHitBox___27995: undefined, + oMinX___28000: undefined, + oMinY___28003: undefined, + oMaxX___28006: undefined, + oMaxY___28012: undefined, + nMinX___28018: undefined, + nMinY___28021: undefined, + nMaxX___28024: undefined, + nMaxY___28030: undefined, + xDiff___28036: undefined, + yDiff___28047: undefined, arg0: undefined, } } @@ -13040,7 +13470,7 @@ function particles_ParticleSource_clear__P274983_mk(s) { -function game_SplashDialog_setSubtext__P274758(s) { +function Fx_abs__P20220(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13052,77 +13482,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_SplashDialog__C274749_VT)) failedCast(r0); - r0 = (s.arg0).fields["subtext"] = (s.arg1); - s.tmp_0 = game_SplashDialog_updateFont__P276778_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 978; s.pc = 1; return s.tmp_0; + r0 = (s.arg0 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (0 - s.arg0); + { step = 3; continue; } + { step = 2; continue; } case 1: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_String_.length(s.arg1); - s.tmp_4 = r0; - s.tmp_6 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "charWidth"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["charWidth"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["charWidth"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 979; s.pc = 2; return s.tmp_6; } - } + r0 = s.arg0; + { step = 3; continue; } case 2: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_7 = r0; - r0 = (s.tmp_3 - s.tmp_7); - s.tmp_2 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 << 1); - s.tmp_8 = r0; - r0 = (s.tmp_2 + s.tmp_8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxSubOffset"] = (s.tmp_1); r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -game_SplashDialog_setSubtext__P274758.info = {"start":9748,"length":200,"line":300,"column":8,"endLine":304,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setSubtext","argumentNames":["this","sub"]} +Fx_abs__P20220.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} -function game_SplashDialog_setSubtext__P274758_mk(s) { +function Fx_abs__P20220_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_SplashDialog_setSubtext__P274758, depth: s.depth + 1, + parent: s, fn: Fx_abs__P20220, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, arg0: undefined, - arg1: undefined, } } -function game_SplashDialog_updateFont__P276778(s) { +function Sprite_sy__P21262(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13137,78 +13530,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_SplashDialog__C274749_VT)) failedCast(r0); - r0 = s.arg0.fields["text"]; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_sy"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = pxsim_String_.mkEmpty(); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.arg0.fields["subtext"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = s.tmp_2; - { step = 4; continue; } - case 3: - r0 = pxsim_String_.mkEmpty(); - case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - s.tmp_4 = game_BaseDialog_setFont__P276775_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_5 = image_getFontForText__P273794_mk(s); - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 7: - r0 = s.retval; - s.tmp_6 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 8); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 8: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_String__concat(s.tmp_6, s.tmp_7); - s.tmp_5.arg0 = r0; - s.callLocIdx = 974; s.pc = 6; return s.tmp_5; - case 6: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 975; s.pc = 5; return s.tmp_4; - case 5: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -game_SplashDialog_updateFont__P276778.info = {"start":9357,"length":122,"line":288,"column":8,"endLine":290,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"updateFont","argumentNames":["this"]} +Sprite_sy__P21262.info = {"start":5719,"length":61,"line":209,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"sy","argumentNames":["this"]} +Sprite_sy__P21262.isGetter = true; -function game_SplashDialog_updateFont__P276778_mk(s) { +function Sprite_sy__P21262_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_SplashDialog_updateFont__P276778, depth: s.depth + 1, + parent: s, fn: Sprite_sy__P21262, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, arg0: undefined, } } @@ -13216,7 +13553,7 @@ function game_SplashDialog_updateFont__P276778_mk(s) { -function game_BaseDialog_setFont__P276775(s) { +function Sprite_sx__P21260(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13228,32 +13565,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = (s.arg0).fields["font"] = (s.arg1); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -game_BaseDialog_setFont__P276775.info = {"start":5994,"length":77,"line":190,"column":8,"endLine":192,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setFont","argumentNames":["this","font"]} +Sprite_sx__P21260.info = {"start":5287,"length":61,"line":196,"column":4,"endLine":198,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"sx","argumentNames":["this"]} +Sprite_sx__P21260.isGetter = true; -function game_BaseDialog_setFont__P276775_mk(s) { +function Sprite_sx__P21260_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_setFont__P276775, depth: s.depth + 1, + parent: s, fn: Sprite_sx__P21260, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function game_SplashDialog_setText__P274757(s) { +function Sprite_image__P21269(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13265,79 +13603,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_SplashDialog__C274749_VT)) failedCast(r0); - r0 = (s.arg0).fields["text"] = (s.arg1); - s.tmp_0 = game_SplashDialog_updateFont__P276778_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 976; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = (s.arg0).fields["offset"] = (0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_String_.length(s.arg1); - s.tmp_4 = r0; - s.tmp_6 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "charWidth"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["charWidth"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["charWidth"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 977; s.pc = 2; return s.tmp_6; } - } - case 2: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_7 = r0; - r0 = (s.tmp_3 - s.tmp_7); - s.tmp_2 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 << 1); - s.tmp_8 = r0; - r0 = (s.tmp_2 + s.tmp_8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxOffset"] = (s.tmp_1); - r0 = (s.arg0).fields["timer"] = (2); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) default: oops() } } } -game_SplashDialog_setText__P274757.info = {"start":9489,"length":249,"line":292,"column":8,"endLine":298,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","text"]} +Sprite_image__P21269.info = {"start":9023,"length":54,"line":322,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"image","argumentNames":["this"]} +Sprite_image__P21269.isGetter = true; -function game_SplashDialog_setText__P274757_mk(s) { +function Sprite_image__P21269_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_SplashDialog_setText__P274757, depth: s.depth + 1, + parent: s, fn: Sprite_image__P21269, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, arg0: undefined, - arg1: undefined, } } -function game_SplashDialog_constructor__P274756(s) { +function effects_ParticleEffect_start__P22469(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13347,54 +13636,112 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.src___31913 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_SplashDialog__C274749_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_constructor__P274732_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.tmp_1 = game_defaultSplashFrame__P276790_mk(s); - s.callLocIdx = 972; s.pc = 2; return s.tmp_1; + if (!checkSubtype(r0, effects_ParticleEffect__C22468_VT)) failedCast(r0); + r0 = s.arg0.fields["sourceFactory"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 9; continue; } + case 1: case 2: + r0 = pxsim_numops_toBoolDecr(s.arg3); + if (!r0) { step = 3; continue; } + r0 = s.arg3; + { step = 4; continue; } + case 3: + r0 = s.arg0.fields["defaultRate"]; + case 4: + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_4 = if_sourceFactory_3_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.arg1; + s.tmp_4.arg2 = s.tmp_3; + if (!s.tmp_4.arg0.vtable.iface) { + setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "sourceFactory"), 3); + s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["sourceFactory"]; + if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["sourceFactory"], 3); s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; } + else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1316; s.pc = 10; return s.tmp_4;; } + else { s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; } + } + case 10: r0 = s.retval; - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = undefined; - s.tmp_0.arg5 = undefined; - s.callLocIdx = 973; s.pc = 1; return s.tmp_0; - case 1: + s.src___31913 = (r0); + s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P22348_mk(s); + s.tmp_0.arg0 = s.src___31913; + r0 = pxsim_numops_toBoolDecr(s.arg4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1317; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - r0 = (s.arg0).fields["maxOffset"] = (-1); - r0 = (s.arg0).fields["maxSubOffset"] = (-1); - r0 = (s.arg0).fields["textColor"] = (1); + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 7; continue; } + r0 = (s.arg2 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.arg2; + { step = 6; continue; } + case 5: + r0 = s.arg0.fields["defaultLifespan"]; + case 6: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.src___31913).fields["lifespan"] = (s.tmp_1); + case 7: + case 8: + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -game_SplashDialog_constructor__P274756.info = {"start":9137,"length":210,"line":281,"column":8,"endLine":286,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","width","height"]} +effects_ParticleEffect_start__P22469.info = {"start":967,"length":452,"line":26,"column":8,"endLine":32,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"start","argumentNames":["this","anchor","duration","particlesPerSecond","relativeToCamera"]} -function game_SplashDialog_constructor__P274756_mk(s) { +function effects_ParticleEffect_start__P22469_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_SplashDialog_constructor__P274756, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_start__P22469, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + src___31913: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function game_defaultSplashFrame__P276790(s) { +function particles_ParticleSource_setRelativeToCamera__P22348(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13404,39 +13751,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___273849); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex281903); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["pFlags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 4); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); { step = 2; continue; } case 1: - r0 = pxsim.image.ofBuffer(_hex281905); - case 2: - // jmp value (already in r0) + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["pFlags"]; + s.tmp_4 = r0; + r0 = (~ s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 4); + s.tmp_2 = r0; + r0 = (~ s.tmp_2); s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_defaultSplashFrame__P276790.info = {"start":27877,"length":220,"line":768,"column":4,"endLine":781,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultSplashFrame","argumentNames":[]} +particles_ParticleSource_setRelativeToCamera__P22348.info = {"start":6439,"length":173,"line":211,"column":8,"endLine":214,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRelativeToCamera","argumentNames":["this","on"]} -function game_defaultSplashFrame__P276790_mk(s) { +function particles_ParticleSource_setRelativeToCamera__P22348_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultSplashFrame__P276790, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRelativeToCamera__P22348, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -const _hex281903 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100000101000001010000") -const _hex281905 = pxsim.BufferMethods.createBufferFromHex("8704030003000000f1010000f1010000f1010000") -function game_BaseDialog_constructor__P274732(s) { +function Sprite_setFlag__P21300(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13450,49 +13817,57 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = (s.arg0).fields["cursorCount"] = (0); - s.tmp_0 = game_BaseDialog_resize__P274733_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = s.arg3; - s.tmp_0.arg4 = s.arg4; - s.tmp_0.arg5 = s.arg5; - s.callLocIdx = 941; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 1; continue; } + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + { step = 2; continue; } case 1: - r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["flags"]; + s.tmp_4 = r0; + r0 = (~ s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 | s.arg1); + s.tmp_2 = r0; + r0 = (~ s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_constructor__P274732.info = {"start":1103,"length":199,"line":53,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":["this","width","height","frame","font","cursor"]} +Sprite_setFlag__P21300.info = {"start":20205,"length":130,"line":676,"column":4,"endLine":679,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setFlag","argumentNames":["this","flag","on"]} -function game_BaseDialog_constructor__P274732_mk(s) { +function Sprite_setFlag__P21300_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_constructor__P274732, depth: s.depth + 1, + parent: s, fn: Sprite_setFlag__P21300, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function game_BaseDialog_resize__P274733(s) { +function Sprite__destroyCore__P21310(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13502,169 +13877,116 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___31630 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg3; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 434; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.scene___31630 = (r0); + r0 = s.scene___31630.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); + r0 = s.arg0.fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 >= 0); + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = globals.dialogFrame___276762; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = s.tmp_1; - { step = 4; continue; } - case 3: - s.tmp_3 = game_defaultFrame__P276789_mk(s); - s.callLocIdx = 942; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; - s.tmp_2 = r0; - globals.dialogFrame___276762 = (r0); - r0 = s.tmp_2; - case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.arg0).fields["frame"] = (s.tmp_4); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["frame"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 / 3); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["unit"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["unit"]; - s.tmp_3 = r0; - r0 = (s.arg1 / s.tmp_3); + r0 = s.scene___31630.fields["spritesByKind"]; s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["unit"]; + r0 = s.arg0.fields["_kind"]; s.tmp_3 = r0; - r0 = (s.arg2 / s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["rows"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = r0 = s.arg1; - r0 = s.arg0.fields["columns"]; - s.tmp_5 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_6 = r0; - r0 = (s.tmp_5 * s.tmp_6); + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_2, s.tmp_3); + case 2: + // jmp value (already in r0) s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["innerLeft"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = r0 = s.arg2; - r0 = s.arg0.fields["rows"]; - s.tmp_5 = r0; - r0 = s.arg0.fields["unit"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + s.tmp_5 = sprites_SpriteSet_remove__P21354_mk(s); + r0 = s.scene___31630.fields["spritesByKind"]; s.tmp_6 = r0; - r0 = (s.tmp_5 * s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["innerTop"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.image.create(s.arg1, s.arg2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["image"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg4; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = globals.font8___273792; - case 6: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.arg0).fields["font"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg5; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.tmp_0; - { step = 8; continue; } - case 7: - r0 = globals.dialogCursor___276763; + r0 = s.arg0.fields["_kind"]; + s.tmp_7 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_6, s.tmp_7); + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = s.arg0; + s.callLocIdx = 438; s.pc = 8; return s.tmp_5; case 8: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 9; continue; } - r0 = s.tmp_1; - { step = 10; continue; } + r0 = s.retval; + case 3: + case 4: + s.tmp_0 = PhysicsEngine__C21384_v1_2_mk(s); + r0 = s.scene___31630.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.removeSprite; + s.pc = 9; return s.tmp_0; case 9: - s.tmp_3 = game_defaultCursorImage__P276791_mk(s); - s.callLocIdx = 943; s.pc = 14; return s.tmp_3; - case 14: r0 = s.retval; - s.tmp_2 = r0; - globals.dialogCursor___276763 = (r0); - r0 = s.tmp_2; - case 10: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.arg0).fields["cursor"] = (s.tmp_4); - r0 = (globals.dialogTextColor___276764 == undefined); + r0 = s.arg0.fields["destroyHandler"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - globals.dialogTextColor___276764 = (15); - r0 = 15; - { step = 12; continue; } - case 11: - r0 = globals.dialogTextColor___276764; - case 12: - // jmp value (already in r0) + if (!r0) { step = 5; continue; } + s.tmp_1 = if_destroyHandler_1_mk(s); + s.tmp_1.arg0 = s.arg0; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "destroyHandler"), 1); + s.callLocIdx = 439; s.pc = 10; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["destroyHandler"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["destroyHandler"], 1); s.callLocIdx = 439; s.pc = 10; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 439; s.pc = 10; return s.tmp_1;; } + else { s.callLocIdx = 439; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + case 5: + case 6: + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P31659); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P31665); s.tmp_1 = r0; - r0 = (s.arg0).fields["textColor"] = (s.tmp_1); - s.tmp_0 = game_BaseDialog_drawBorder__P276767_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 944; s.pc = 15; return s.tmp_0; - case 15: + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P20154_mk(s); + s.tmp_3 = helpers_arrayFilter__P20155_mk(s); + r0 = s.scene___31630.fields["destroyedHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 441; s.pc = 12; return s.tmp_3; + case 12: r0 = s.retval; - s.tmp_0 = game_BaseDialog_clearInterior__P276769_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 945; s.pc = 16; return s.tmp_0; - case 16: + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 443; s.pc = 11; return s.tmp_2; + case 11: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_resize__P274733.info = {"start":1312,"length":849,"line":58,"column":8,"endLine":72,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"resize","argumentNames":["this","width","height","frame","font","cursor"]} +Sprite__destroyCore__P21310.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} -function game_BaseDialog_resize__P274733_mk(s) { +function Sprite__destroyCore__P21310_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_resize__P274733, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore__P21310, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -13673,19 +13995,16 @@ function game_BaseDialog_resize__P274733_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + scene___31630: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function game_defaultCursorImage__P276791(s) { +function forEach_inline__P31659(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13695,39 +14014,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___273849); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["kind"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex282101); - { step = 2; continue; } - case 1: - r0 = pxsim.image.ofBuffer(_hex282103); - case 2: - // jmp value (already in r0) + r0 = s.caps[0].fields["_kind"]; s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -game_defaultCursorImage__P276791.info = {"start":28103,"length":690,"line":783,"column":4,"endLine":809,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultCursorImage","argumentNames":[]} +forEach_inline__P31659.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function game_defaultCursorImage__P276791_mk(s) { +function forEach_inline__P31659_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultCursorImage__P276791, depth: s.depth + 1, + parent: s, fn: forEach_inline__P31659, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + arg0: undefined, } } -const _hex282101 = pxsim.BufferMethods.createBufferFromHex("87040a000800000011111101010000010111010111100001011101010100000101000001100010000001010000100000") -const _hex282103 = pxsim.BufferMethods.createBufferFromHex("87040b000b00000000606686080000006076776686000000607777676608000076171111670800007671177766080000767117776608000076711777660800007617111167080000607777676608000060767766860000000060668608000000") -function game_defaultFrame__P276789(s) { +function Sprite__destroyCore_inline__P31665(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13737,39 +14052,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_ImageMethods.isMono(globals.screen___273849); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.image.ofBuffer(_hex282107); - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = if_handler_2_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); + s.callLocIdx = 442; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 442; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 442; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 442; s.pc = 1; return s.tmp_0; } + } case 1: - r0 = pxsim.image.ofBuffer(_hex282109); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -game_defaultFrame__P276789.info = {"start":27315,"length":556,"line":744,"column":4,"endLine":766,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultFrame","argumentNames":[]} +Sprite__destroyCore_inline__P31665.info = {"start":27286,"length":20,"line":881,"column":21,"endLine":881,"endColumn":41,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function game_defaultFrame__P276789_mk(s) { +function Sprite__destroyCore_inline__P31665_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_defaultFrame__P276789, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore_inline__P31665, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, } } -const _hex282107 = pxsim.BufferMethods.createBufferFromHex("8704030003000000110100000101000011010000") -const _hex282109 = pxsim.BufferMethods.createBufferFromHex("87040c000c0000000000000000000000b0bbbbbbbb0b0000b0bbbbbbbbcb0000b0db1111bdcb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b0db1111bdcb0000b0bbbbbbbbcb0000b0bbbbbbbbcb000000cccccccccc0000") -function game_BaseDialog_clearInterior__P276769(s) { +function PhysicsEngine_removeSprite__P21386(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13779,104 +14099,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.d___280874 = undefined; - s.s___280881 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = 4; - s.tmp_2.arg2 = 1; - s.tmp_2.arg3 = 1; - r0 = s.arg0.fields["columns"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 2); - s.tmp_2.arg4 = r0; - r0 = s.arg0.fields["rows"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - 2); - s.tmp_2.arg5 = r0; - s.callLocIdx = 968; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - { step = 7; continue; } - case 1: - case 2: - s.d___280874 = (1); - case 3: - s.tmp_1 = r0 = s.d___280874; - r0 = s.arg0.fields["columns"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.s___280881 = (1); - case 4: - s.tmp_1 = r0 = s.s___280881; - r0 = s.arg0.fields["rows"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 4; - s.tmp_4.arg2 = s.d___280874; - s.tmp_4.arg3 = s.s___280881; - s.callLocIdx = 969; s.pc = 9; return s.tmp_4; - case 9: - r0 = s.retval; - r0 = (s.s___280881 + 1); - s.s___280881 = (r0); - { step = 4; continue; } - case 5: - r0 = (s.d___280874 + 1); - s.d___280874 = (r0); - { step = 3; continue; } - case 6: - case 7: + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_clearInterior__P276769.info = {"start":4543,"length":342,"line":146,"column":8,"endLine":155,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"clearInterior","argumentNames":["this"]} +PhysicsEngine_removeSprite__P21386.info = {"start":159,"length":32,"line":10,"column":4,"endLine":10,"endColumn":36,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} -function game_BaseDialog_clearInterior__P276769_mk(s) { +function PhysicsEngine_removeSprite__P21386_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_clearInterior__P276769, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_removeSprite__P21386, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - d___280874: undefined, - s___280881: undefined, arg0: undefined, + arg1: undefined, } } -function game_BaseDialog_drawPartial__P276770(s) { +function sprites_SpriteSet_remove__P21354(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13886,125 +14135,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___280899 = undefined; - s.y0___280907 = undefined; - s.xf___280915 = undefined; - s.yf___280922 = undefined; - s.e___280929 = undefined; - s.t___280935 = undefined; + s.i___27631 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["innerLeft"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_2 = r0; - r0 = (s.arg2 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.x0___280899 = (r0); - r0 = s.arg0.fields["innerTop"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_2 = r0; - r0 = (s.arg3 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.y0___280907 = (r0); - r0 = (s.arg1 % 3); - s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.xf___280915 = (r0); - r0 = pxsim.Math_.idiv(s.arg1, 3); + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; s.tmp_0 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.yf___280922 = (r0); - s.e___280929 = (0); - case 1: - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.e___280929 < s.tmp_1); + r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); + s.i___27631 = (r0); + r0 = (s.i___27631 > -1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.t___280935 = (0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_arraySplice__P20143_mk(s); + r0 = s.arg0.fields["_sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___27631; + s.tmp_1.arg2 = 1; + s.callLocIdx = 517; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + r0 = true; + { step = 3; continue; } + case 1: case 2: - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.t___280935 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.arg0.fields["image"]; - s.tmp_2 = r0; - r0 = (s.x0___280899 + s.e___280929); - s.tmp_3 = r0; - r0 = (s.y0___280907 + s.t___280935); - s.tmp_4 = r0; - r0 = s.arg0.fields["frame"]; - s.tmp_6 = r0; - r0 = (s.xf___280915 + s.e___280929); - s.tmp_7 = r0; - r0 = (s.yf___280922 + s.t___280935); - s.tmp_8 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_6, s.tmp_7, s.tmp_8); - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_2, s.tmp_3, s.tmp_4, s.tmp_5); - r0 = (s.t___280935 + 1); - s.t___280935 = (r0); - { step = 2; continue; } + r0 = false; case 3: - r0 = (s.e___280929 + 1); - s.e___280929 = (r0); - { step = 1; continue; } - case 4: - r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawPartial__P276770.info = {"start":4895,"length":604,"line":157,"column":8,"endLine":172,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawPartial","argumentNames":["this","index","colTo","rowTo"]} +sprites_SpriteSet_remove__P21354.info = {"start":1827,"length":235,"line":66,"column":8,"endLine":73,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"remove","argumentNames":["this","sprite"]} -function game_BaseDialog_drawPartial__P276770_mk(s) { +function sprites_SpriteSet_remove__P21354_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawPartial__P276770, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_remove__P21354, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - x0___280899: undefined, - y0___280907: undefined, - xf___280915: undefined, - yf___280922: undefined, - e___280929: undefined, - t___280935: undefined, + i___27631: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function game_BaseDialog_fastFill__P276768(s) { +function Sprite_kind__P21288(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14014,71 +14196,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.color___280971 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["frame"]; - s.tmp_0 = r0; - r0 = (s.arg1 % 3); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.arg1, 3); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_0, s.tmp_1, s.tmp_2); - s.color___280971 = (r0); - s.tmp_0 = helpers_imageFillRect__P273773_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["innerLeft"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 + s.arg2); - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["innerTop"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.arg3); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.arg4; - s.tmp_0.arg4 = s.arg5; - s.tmp_0.arg5 = s.color___280971; - s.callLocIdx = 967; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_kind"]; return leave(s, r0) default: oops() } } } -game_BaseDialog_fastFill__P276768.info = {"start":4284,"length":249,"line":141,"column":8,"endLine":144,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"fastFill","argumentNames":["this","index","x","y","w","h"]} +Sprite_kind__P21288.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} -function game_BaseDialog_fastFill__P276768_mk(s) { +function Sprite_kind__P21288_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_fastFill__P276768, depth: s.depth + 1, + parent: s, fn: Sprite_kind__P21288, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - color___280971: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function game_BaseDialog_drawBorder__P276767(s) { +function game_popScene__P21924(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14088,279 +14230,84 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.y___282032 = undefined; - s.c___282048 = undefined; - s.r___282082 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = 0; - s.tmp_2.arg2 = 0; - s.tmp_2.arg3 = 0; - s.tmp_2.arg4 = 1; - s.tmp_2.arg5 = 1; - s.callLocIdx = 951; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = 1; - s.tmp_0.arg3 = 0; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 2); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 1; - s.callLocIdx = 952; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 2; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 0; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = 1; - s.callLocIdx = 953; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 3; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = 1; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 2); - s.tmp_0.arg5 = r0; - s.callLocIdx = 954; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 5; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 1; - s.tmp_0.arg4 = 1; - r0 = s.arg0.fields["rows"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 2); - s.tmp_0.arg5 = r0; - s.callLocIdx = 955; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - r0 = s.arg0.fields["rows"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.y___282032 = (r0); - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 6; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = s.y___282032; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = 1; - s.callLocIdx = 956; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 7; - s.tmp_0.arg2 = 1; - s.tmp_0.arg3 = s.y___282032; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 2); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 1; - s.callLocIdx = 957; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_fastFill__P276768_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 8; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.y___282032; - s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = 1; - s.callLocIdx = 958; s.pc = 19; return s.tmp_0; - case 19: + s.oldScene___26649 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1020; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - { step = 11; continue; } + s.oldScene___26649 = (r0); + s.tmp_0 = r0 = globals._sceneStack___21912; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_Array__length(globals._sceneStack___21912); case 2: - s.c___282048 = (0); - case 3: - r0 = s.arg0.fields["columns"]; + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.c___282048 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - r0 = (s.c___282048 == 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - s.tmp_3 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = 0; - s.tmp_3.arg2 = 0; - s.tmp_3.arg3 = 0; - s.callLocIdx = 959; s.pc = 20; return s.tmp_3; - case 20: + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array_.pop(globals._sceneStack___21912); + globals._scene___21911 = (r0); + s.tmp_0 = control_popEventContext__P20411_mk(s); + s.callLocIdx = 1021; s.pc = 12; return s.tmp_0; + case 12: r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 6; - s.tmp_0.arg2 = 0; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 960; s.pc = 21; return s.tmp_0; - case 21: + { step = 6; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(globals._scene___21911); + if (!r0) { step = 4; continue; } + s.tmp_0 = control_popEventContext__P20411_mk(s); + s.callLocIdx = 1022; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; - { step = 7; continue; } + globals._scene___21911 = (undefined); case 4: - s.tmp_1 = r0 = s.c___282048; - r0 = s.arg0.fields["columns"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 2; - s.tmp_4.arg2 = s.c___282048; - s.tmp_4.arg3 = 0; - s.callLocIdx = 961; s.pc = 22; return s.tmp_4; - case 22: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 8; - s.tmp_0.arg2 = s.c___282048; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 962; s.pc = 23; return s.tmp_0; - case 23: - r0 = s.retval; - { step = 6; continue; } case 5: - s.tmp_0 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = s.c___282048; - s.tmp_0.arg3 = 0; - s.callLocIdx = 963; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 7; - s.tmp_0.arg2 = s.c___282048; - r0 = s.arg0.fields["rows"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg3 = r0; - s.callLocIdx = 964; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; case 6: + r0 = pxsim_numops_toBoolDecr(globals._scene___21911); + if (!r0) { step = 7; continue; } + s.tmp_0 = particles_enableAll__P22377_mk(s); + s.callLocIdx = 1023; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; case 7: - r0 = (s.c___282048 + 1); - s.c___282048 = (r0); - { step = 3; continue; } case 8: - s.r___282082 = (1); - case 9: - s.tmp_1 = r0 = s.r___282082; - r0 = s.arg0.fields["rows"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 - 1); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___21914); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P26671); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.tmp_4 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = 3; - s.tmp_4.arg2 = 0; - s.tmp_4.arg3 = s.r___282082; - s.callLocIdx = 965; s.pc = 26; return s.tmp_4; - case 26: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawPartial__P276770_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 5; - r0 = s.arg0.fields["columns"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.r___282082; - s.callLocIdx = 966; s.pc = 27; return s.tmp_0; - case 27: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___26649); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1.arg0 = globals._scenePopHandlers___21914; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1025; s.pc = 15; return s.tmp_1; + case 15: r0 = s.retval; - r0 = (s.r___282082 + 1); - s.r___282082 = (r0); - { step = 9; continue; } + case 9: case 10: - case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawBorder__P276767.info = {"start":2953,"length":1321,"line":103,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBorder","argumentNames":["this"]} +game_popScene__P21924.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} -function game_BaseDialog_drawBorder__P276767_mk(s) { +function game_popScene__P21924_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawBorder__P276767, depth: s.depth + 1, + parent: s, fn: game_popScene__P21924, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - y___282032: undefined, - c___282048: undefined, - r___282082: undefined, - arg0: undefined, + oldScene___26649: undefined, } } -function game_BaseDialog_update__P274734(s) { +function game_popScene_inline__P26671(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14374,35 +14321,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - s.tmp_0 = game_BaseDialog_clearInterior__P276769_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 946; s.pc = 1; return s.tmp_0; + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = s.arg0; + s.tmp_0.arg0 = s.caps[0]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1024; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; - s.tmp_0 = game_BaseDialog__C274720_v2_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C274720_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawTextCore; - s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = game_BaseDialog_drawCursorRow__P274737_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 947; s.pc = 3; return s.tmp_0; - case 3: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_update__P274734.info = {"start":2171,"length":121,"line":74,"column":8,"endLine":78,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} +game_popScene_inline__P26671.info = {"start":5645,"length":18,"line":177,"column":38,"endLine":177,"endColumn":56,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} -function game_BaseDialog_update__P274734_mk(s) { +function game_popScene_inline__P26671_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_update__P274734, depth: s.depth + 1, + parent: s, fn: game_popScene_inline__P26671, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -14412,7 +14347,7 @@ function game_BaseDialog_update__P274734_mk(s) { -function game_BaseDialog_drawCursorRow__P274737(s) { +function particles_enableAll__P22377(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14422,125 +14357,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.offset___280772 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - s.offset___280772 = (0); - r0 = s.arg0.fields["cursorCount"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 20); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.offset___280772 = (1); - case 1: - case 2: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["cursorCount"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 % 40); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cursorCount"] = (s.tmp_1); - r0 = s.arg0.fields["image"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["cursor"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["innerLeft"]; - s.tmp_6 = r0; - s.tmp_8 = game_BaseDialog_textAreaWidth__P276773_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 948; s.pc = 3; return s.tmp_8; + s.sources___26692 = undefined; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1262; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_6 + s.tmp_7); - s.tmp_5 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_9 = r0; - r0 = (s.tmp_5 + s.tmp_9); - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.offset___280772); - s.tmp_3 = r0; - r0 = s.arg0.fields["cursor"]; - s.tmp_11 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_11); - s.tmp_10 = r0; - r0 = (s.tmp_3 - s.tmp_10); - s.tmp_2 = r0; - r0 = s.arg0.fields["innerTop"]; - s.tmp_16 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_17 = r0; - r0 = (s.tmp_16 + s.tmp_17); - s.tmp_15 = r0; - s.tmp_19 = game_BaseDialog_textAreaHeight__P276774_mk(s); - s.tmp_19.arg0 = s.arg0; - s.callLocIdx = 949; s.pc = 4; return s.tmp_19; + s.sources___26692 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___26692); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + s.tmp_0.arg0 = s.sources___26692; + s.tmp_0.arg1 = particles_enableAll_inline__P26698; + s.callLocIdx = 1264; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - s.tmp_18 = r0; - r0 = (s.tmp_15 + s.tmp_18); - s.tmp_14 = r0; - r0 = (s.tmp_14 + 1); - s.tmp_13 = r0; - r0 = s.arg0.fields["cursor"]; - s.tmp_22 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_22); - s.tmp_21 = r0; - r0 = (s.tmp_21 + 1); - s.tmp_20 = r0; - r0 = (s.tmp_13 - s.tmp_20); - s.tmp_12 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_12); + s.tmp_0 = particles_pruneParticles__P22365_mk(s); + s.callLocIdx = 1265; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawCursorRow__P274737.info = {"start":2464,"length":479,"line":88,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawCursorRow","argumentNames":["this"]} +particles_enableAll__P22377.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} -function game_BaseDialog_drawCursorRow__P274737_mk(s) { +function particles_enableAll__P22377_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawCursorRow__P274737, depth: s.depth + 1, + parent: s, fn: particles_enableAll__P22377, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - offset___280772: undefined, - arg0: undefined, + sources___26692: undefined, } } -function game_BaseDialog_textAreaHeight__P276774(s) { +function particles_enableAll_inline__P26698(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14554,47 +14410,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_2); - s.tmp_1 = r0; - r0 = s.arg0.fields["innerTop"]; - s.tmp_5 = r0; - s.tmp_7 = Math_min__P271947_mk(s); - r0 = s.arg0.fields["unit"]; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = 12; - s.callLocIdx = 971; s.pc = 1; return s.tmp_7; + s.tmp_0 = particles_ParticleSource_enabled__P22350_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1263; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 << 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); + r0 = true; return leave(s, r0) default: oops() } } } -game_BaseDialog_textAreaHeight__P276774.info = {"start":5841,"length":143,"line":186,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaHeight","argumentNames":["this"]} +particles_enableAll_inline__P26698.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function game_BaseDialog_textAreaHeight__P276774_mk(s) { +function particles_enableAll_inline__P26698_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_textAreaHeight__P276774, depth: s.depth + 1, + parent: s, fn: particles_enableAll_inline__P26698, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, arg0: undefined, } } @@ -14602,7 +14435,7 @@ function game_BaseDialog_textAreaHeight__P276774_mk(s) { -function game_BaseDialog_textAreaWidth__P276773(s) { +function particles_particleSources__P22378(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14612,59 +14445,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_2); - s.tmp_1 = r0; - r0 = s.arg0.fields["innerLeft"]; - s.tmp_5 = r0; - s.tmp_7 = Math_min__P271947_mk(s); - r0 = s.arg0.fields["unit"]; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = 12; - s.callLocIdx = 970; s.pc = 1; return s.tmp_7; + s.sources___26872 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1266; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 << 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 2); + r0 = r0.fields["particleSources"]; + s.sources___26872 = (r0); + r0 = s.sources___26872; return leave(s, r0) default: oops() } } } -game_BaseDialog_textAreaWidth__P276773.info = {"start":5689,"length":142,"line":182,"column":8,"endLine":184,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaWidth","argumentNames":["this"]} +particles_particleSources__P22378.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} -function game_BaseDialog_textAreaWidth__P276773_mk(s) { +function particles_particleSources__P22378_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_textAreaWidth__P276773, depth: s.depth + 1, + parent: s, fn: particles_particleSources__P22378, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - arg0: undefined, + sources___26872: undefined, } } -function game_BaseDialog_cursorRowHeight__P276771(s) { +function particles_pruneParticles__P22365(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14674,37 +14481,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = s.arg0.fields["cursor"]; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_1); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); + s.sources___26703 = undefined; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1249; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___26703 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___26703); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1 = helpers_arraySlice__P20160_mk(s); + s.tmp_1.arg0 = s.sources___26703; + s.tmp_1.arg1 = 0; + r0 = pxsim_Array__length(s.sources___26703); + s.tmp_1.arg2 = r0; + s.callLocIdx = 1250; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = particles_pruneParticles_inline__P26713; + s.callLocIdx = 1252; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_cursorRowHeight__P276771.info = {"start":5509,"length":82,"line":174,"column":8,"endLine":176,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"cursorRowHeight","argumentNames":["this"]} +particles_pruneParticles__P22365.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} -function game_BaseDialog_cursorRowHeight__P276771_mk(s) { +function particles_pruneParticles__P22365_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_cursorRowHeight__P276771, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles__P22365, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, + sources___26703: undefined, } } -function game_BaseDialog_drawTextCore__P274736(s) { +function particles_pruneParticles_inline__P26713(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14718,19 +14539,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleSource__prune__P22345_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1251; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_BaseDialog_drawTextCore__P274736.info = {"start":2389,"length":65,"line":84,"column":8,"endLine":86,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} +particles_pruneParticles_inline__P26713.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function game_BaseDialog_drawTextCore__P274736_mk(s) { +function particles_pruneParticles_inline__P26713_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_drawTextCore__P274736, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles_inline__P26713, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -14738,7 +14563,7 @@ function game_BaseDialog_drawTextCore__P274736_mk(s) { -function scene_setBackgroundImage__P274702(s) { +function particles_ParticleSource__prune__P22345(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14748,44 +14573,155 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___280734 = undefined; + s.scene___26745 = undefined; + s.sources___26755 = undefined; + s.current___26770 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 939; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); case 1: - r0 = s.retval; - s.scene___280734 = (r0); - s.tmp_0 = scene_Background_image__P274493_mk(s); - r0 = s.scene___280734.fields["background"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 940; s.pc = 2; return s.tmp_0; + r0 = s.arg0.fields["head"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } case 2: + r0 = s.arg0.fields["head"]; + r0 = r0.fields["lifespan"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= 0); + case 3: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = s.arg0.fields["head"]; + r0 = r0.fields["next"]; + s.tmp_3 = r0; + r0 = (s.arg0).fields["head"] = (s.tmp_3); + { step = 1; continue; } + case 4: + r0 = s.arg0.fields["pFlags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + r0 = s.arg0.fields["head"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 6: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 13; continue; } + s.tmp_5 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1224; s.pc = 21; return s.tmp_5; + case 21: + r0 = s.retval; + s.scene___26745 = (r0); + r0 = pxsim_numops_toBoolDecr(s.scene___26745); + if (!r0) { step = 7; continue; } + r0 = s.scene___26745.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); + case 7: + case 8: + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1225; s.pc = 22; return s.tmp_0; + case 22: r0 = s.retval; + s.sources___26755 = (r0); + s.tmp_0 = r0 = s.sources___26755; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 9: + r0 = pxsim_Array__length(s.sources___26755); + case 10: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 11; continue; } + r0 = pxsim_Array_.removeElement(s.sources___26755, s.arg0); + case 11: + case 12: + r0 = s.arg0.fields["anchor"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 == undefined); + case 13: + case 14: + r0 = s.arg0.fields["head"]; + s.current___26770 = (r0); + case 15: + s.tmp_0 = r0 = s.current___26770; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } + case 16: + r0 = s.current___26770.fields["next"]; + case 17: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 20; continue; } + r0 = s.current___26770.fields["next"]; + r0 = r0.fields["lifespan"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 <= 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 18; continue; } + r0 = s.current___26770.fields["next"]; + r0 = r0.fields["next"]; + s.tmp_4 = r0; + r0 = (s.current___26770).fields["next"] = (s.tmp_4); + { step = 19; continue; } + case 18: + r0 = s.current___26770.fields["next"]; + s.current___26770 = (r0); + case 19: + { step = 15; continue; } + case 20: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_setBackgroundImage__P274702.info = {"start":1962,"length":135,"line":78,"column":4,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundImage","argumentNames":["img"]} +particles_ParticleSource__prune__P22345.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} -function scene_setBackgroundImage__P274702_mk(s) { +function particles_ParticleSource__prune__P22345_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_setBackgroundImage__P274702, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__prune__P22345, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - scene___280734: undefined, - arg0: undefined, -} } + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + scene___26745: undefined, + sources___26755: undefined, + current___26770: undefined, + arg0: undefined, +} } -function scene_Background_image__P274493(s) { +function helpers_arraySlice__P20160(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14795,34 +14731,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___26793 = undefined; + s.len___26795 = undefined; + s.i___26829 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C274486_VT)) failedCast(r0); - r0 = (s.arg0).fields["_image"] = (s.arg1); - r0 = undefined; + r0 = pxsim_Array__mk(); + s.res___26793 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___26795 = (r0); + r0 = (s.arg1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.arg1 = (0); + { step = 4; continue; } + case 1: + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_max__P20176_mk(s); + r0 = (s.len___26795 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 9; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + s.arg1 = (r0); + case 2: + case 3: + case 4: + r0 = (s.arg1 > s.len___26795); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.res___26793; + { step = 15; continue; } + case 5: + case 6: + r0 = (s.arg2 === undefined); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 7; continue; } + s.arg2 = (s.len___26795); + { step = 10; continue; } + case 7: + r0 = (s.arg2 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = (s.len___26795 + s.arg2); + s.arg2 = (r0); + case 8: + case 9: + case 10: + r0 = (s.arg2 > s.len___26795); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.arg2 = (s.len___26795); + case 11: + case 12: + s.i___26829 = (s.arg1); + case 13: + r0 = (s.i___26829 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tmp_1 = r0 = s.res___26793; + r0 = pxsim_Array__getAt(s.arg0, s.i___26829); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___26829 + 1); + s.i___26829 = (r0); + { step = 13; continue; } + case 14: + r0 = s.res___26793; + case 15: return leave(s, r0) default: oops() } } } -scene_Background_image__P274493.info = {"start":1003,"length":68,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"image","argumentNames":["this","image"]} +helpers_arraySlice__P20160.info = {"start":9027,"length":690,"line":303,"column":4,"endLine":328,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySlice","argumentNames":["arr","start","end"]} -function scene_Background_image__P274493_mk(s) { +function helpers_arraySlice__P20160_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_image__P274493, depth: s.depth + 1, + parent: s, fn: helpers_arraySlice__P20160, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + res___26793: undefined, + len___26795: undefined, + i___26829: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function scene_Background_image__P274492(s) { +function particles_ParticleSource_enabled__P22350(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14834,39 +14850,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Background__C274486_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = particles_ParticleSource_enabled__P22349_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1228; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 !== s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg1); if (!r0) { step = 1; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_6 = r0; - r0 = pxsim.image.create(s.tmp_5, s.tmp_6); + r0 = s.arg0.fields["pFlags"]; s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_image"] = (s.tmp_4); + r0 = (s.tmp_4 | 1); + { step = 2; continue; } case 1: + r0 = s.arg0.fields["pFlags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 ^ 1); case 2: - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = (s.arg0).fields["pFlags"] = (s.tmp_6); + r0 = (s.arg0).fields["timer"] = (0); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Background_image__P274492.info = {"start":811,"length":174,"line":33,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"image","argumentNames":["this"]} -scene_Background_image__P274492.isGetter = true; +particles_ParticleSource_enabled__P22350.info = {"start":6816,"length":214,"line":223,"column":8,"endLine":228,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} -function scene_Background_image__P274492_mk(s) { +function particles_ParticleSource_enabled__P22350_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_image__P274492, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P22350, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -14876,13 +14902,14 @@ function scene_Background_image__P274492_mk(s) { tmp_5: undefined, tmp_6: undefined, arg0: undefined, + arg1: undefined, } } -function sprites_create__P274092(s) { +function particles_ParticleSource_enabled__P22349(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14892,87 +14919,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___281095 = undefined; - s.sprite___281098 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 297; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.scene___281095 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(Sprite__C274158_VT); - s.tmp_0 = r0; - s.tmp_1 = Sprite_constructor__P274205_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 298; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.sprite___281098 = (s.tmp_0); - s.tmp_0 = Sprite_setKind__P274225_mk(s); - s.tmp_0.arg0 = s.sprite___281098; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 299; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = PhysicsEngine__C274328_v0_2_mk(s); - r0 = s.scene___281095.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.sprite___281098; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.addSprite; - s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P281113); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P281120); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = s.arg0.fields["pFlags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 1); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___281098); - s.tmp_2 = helpers_arrayForEach__P271925_mk(s); - s.tmp_3 = helpers_arrayFilter__P271926_mk(s); - r0 = s.scene___281095.fields["createdHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 300; s.pc = 6; return s.tmp_3; - case 6: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 302; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - r0 = s.sprite___281098; - return leave(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -sprites_create__P274092.info = {"start":890,"length":400,"line":35,"column":4,"endLine":47,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"create","argumentNames":["img","kind"]} +particles_ParticleSource_enabled__P22349.info = {"start":6622,"length":76,"line":216,"column":8,"endLine":218,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this"]} +particles_ParticleSource_enabled__P22349.isGetter = true; -function sprites_create__P274092_mk(s) { +function particles_ParticleSource_enabled__P22349_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create__P274092, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P22349, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - scene___281095: undefined, - sprite___281098: undefined, + tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function forEach_inline__P281113(s) { +function control_popEventContext__P20411(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14982,32 +14969,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["kind"]; + s.ctx___26880 = undefined; + s.context___26888 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___20408); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 == s.caps[0]); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 7; continue; } + case 1: + case 2: + r0 = pxsim_Array_.pop(globals.eventContexts___20408); + s.ctx___26880 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___26880); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + { step = 7; continue; } + case 3: + case 4: + s.tmp_2 = control_EventContext_unregister__P20398_mk(s); + s.tmp_2.arg0 = s.ctx___26880; + s.callLocIdx = 57; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_0 = r0 = globals.eventContexts___20408; + r0 = pxsim_Array__length(globals.eventContexts___20408); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + s.context___26888 = (r0); + r0 = pxsim_numops_toBoolDecr(s.context___26888); + if (!r0) { step = 5; continue; } + s.tmp_0 = control_EventContext_register__P20397_mk(s); + s.tmp_0.arg0 = s.context___26888; + s.callLocIdx = 58; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + { step = 6; continue; } + case 5: + globals.eventContexts___20408 = (undefined); + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P281113.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +control_popEventContext__P20411.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} -function forEach_inline__P281113_mk(s) { +function control_popEventContext__P20411_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P281113, depth: s.depth + 1, + parent: s, fn: control_popEventContext__P20411, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, + tmp_2: undefined, + ctx___26880: undefined, + context___26888: undefined, } } -function sprites_create_inline__P281120(s) { +function control_EventContext_register__P20397(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15017,36 +15047,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___26901 = undefined; + s.unnamed148___U1 = undefined; + s.unnamed149___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = if_handler_2_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); - s.callLocIdx = 301; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 301; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 301; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 301; s.pc = 1; return s.tmp_0; } - } + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C20393_VT)) failedCast(r0); + s.h___26901 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed148___U1 = (r0); + s.unnamed149___U2 = (0); case 1: + s.tmp_0 = r0 = s.unnamed149___U2; + r0 = pxsim_Array__length(s.unnamed148___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed148___U1, s.unnamed149___U2); + s.h___26901 = (r0); + s.tmp_2 = control_EventHandler_register__P20389_mk(s); + s.tmp_2.arg0 = s.h___26901; + s.callLocIdx = 48; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + r0 = (s.unnamed149___U2 + 1); + s.unnamed149___U2 = (r0); + { step = 1; continue; } + case 2: + s.unnamed148___U1 = (undefined); + s.tmp_0 = control_EventContext_registerFrameCallbacks__P20396_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 49; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_create_inline__P281120.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +control_EventContext_register__P20397.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function sprites_create_inline__P281120_mk(s) { +function control_EventContext_register__P20397_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create_inline__P281120, depth: s.depth + 1, + parent: s, fn: control_EventContext_register__P20397, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + h___26901: undefined, + unnamed148___U1: undefined, + unnamed149___U2: undefined, arg0: undefined, } } @@ -15054,7 +15107,7 @@ function sprites_create_inline__P281120_mk(s) { -function PhysicsEngine_addSprite__P274330(s) { +function controller__setUserEventsEnabled__P21175(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15066,31 +15119,28 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); + globals._userEventsEnabled___21162 = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_addSprite__P274330.info = {"start":124,"length":29,"line":8,"column":4,"endLine":8,"endColumn":33,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +controller__setUserEventsEnabled__P21175.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} -function PhysicsEngine_addSprite__P274330_mk(s) { +function controller__setUserEventsEnabled__P21175_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_addSprite__P274330, depth: s.depth + 1, + parent: s, fn: controller__setUserEventsEnabled__P21175, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, } } -function Sprite_setKind__P274225(s) { +function scene_systemMenu_sleep__P22239(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15100,153 +15150,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.spritesByKind___281165 = undefined; - s.overlapMap___281194 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = (s.arg1 == undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === s.arg1); - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - { step = 15; continue; } - case 3: - case 4: - s.tmp_3 = game_currentScene__P274816_mk(s); - s.callLocIdx = 367; s.pc = 16; return s.tmp_3; - case 16: - r0 = s.retval; - r0 = r0.fields["spritesByKind"]; - s.spritesByKind___281165 = (r0); - r0 = s.arg0.fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } - case 5: - r0 = s.arg0.fields["_kind"]; - s.tmp_2 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___281165, s.tmp_2); - case 6: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = sprites_SpriteSet_remove__P274287_mk(s); - r0 = s.arg0.fields["_kind"]; - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___281165, s.tmp_5); - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.arg0; - s.callLocIdx = 368; s.pc = 17; return s.tmp_4; - case 17: - r0 = s.retval; - case 7: - case 8: - r0 = (s.arg1 >= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___281165, s.arg1); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteSet__C274280_VT); - s.tmp_4 = r0; - s.tmp_5 = sprites_SpriteSet_constructor__P274282_mk(s); - s.tmp_5.arg0 = s.tmp_4; - s.callLocIdx = 369; s.pc = 18; return s.tmp_5; - case 18: - r0 = s.retval; - r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___281165, s.arg1, s.tmp_4); - case 9: - case 10: - s.tmp_0 = sprites_SpriteSet_add__P274285_mk(s); - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___281165, s.arg1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 370; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - case 11: - case 12: - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 371; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - r0 = r0.fields["overlapMap"]; - s.overlapMap___281194 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___281194, s.arg1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.tmp_3 = r0 = s.overlapMap___281194; - s.tmp_4 = r0 = s.arg1; - r0 = pxsim_Array__mk(); - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_3, s.tmp_4, s.tmp_5); - case 13: - case 14: - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___281194, s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_kindsOverlappedWith"] = (s.tmp_1); - r0 = (s.arg0).fields["_kind"] = (s.arg1); - case 15: + r0 = pxsim_pxtcore.deepSleep(); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_setKind__P274225.info = {"start":12841,"length":663,"line":464,"column":4,"endLine":484,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setKind","argumentNames":["this","value"]} +scene_systemMenu_sleep__P22239.info = {"start":10072,"length":51,"line":316,"column":4,"endLine":318,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"sleep","argumentNames":[]} -function Sprite_setKind__P274225_mk(s) { +function scene_systemMenu_sleep__P22239_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setKind__P274225, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_sleep__P22239, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - spritesByKind___281165: undefined, - overlapMap___281194: undefined, - arg0: undefined, - arg1: undefined, } } -function sprites_SpriteSet_remove__P274287(s) { +function scene_systemMenu_toggleConsole__P22238(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15256,58 +15178,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___281242 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); - s.i___281242 = (r0); - r0 = (s.i___281242 > -1); + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arraySplice__P271916_mk(s); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___281242; - s.tmp_1.arg2 = 1; - s.callLocIdx = 517; s.pc = 4; return s.tmp_1; - case 4: + s.tmp_4 = game_consoleOverlay_setVisible__P22330_mk(s); + s.tmp_4.arg0 = false; + s.tmp_4.arg1 = undefined; + s.callLocIdx = 1154; s.pc = 3; return s.tmp_4; + case 3: r0 = s.retval; - r0 = true; - { step = 3; continue; } + { step = 2; continue; } case 1: + s.tmp_0 = game_consoleOverlay_setVisible__P22330_mk(s); + s.tmp_0.arg0 = true; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 1155; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = console_log__P20364_mk(s); + s.tmp_0.arg0 = "console"; + s.callLocIdx = 1156; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; case 2: - r0 = false; - case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_remove__P274287.info = {"start":1827,"length":235,"line":66,"column":8,"endLine":73,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"remove","argumentNames":["this","sprite"]} +scene_systemMenu_toggleConsole__P22238.info = {"start":9827,"length":239,"line":307,"column":4,"endLine":314,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleConsole","argumentNames":[]} -function sprites_SpriteSet_remove__P274287_mk(s) { +function scene_systemMenu_toggleConsole__P22238_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_remove__P274287, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_toggleConsole__P22238, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - i___281242: undefined, - arg0: undefined, - arg1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, } } -function helpers_arraySplice__P271916(s) { +function game_consoleOverlay_setVisible__P22330(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15317,55 +15240,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___280245 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = (s.arg1 < 0); + s.tmp_1 = r0 = s.arg0; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___22291); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 != s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg0); if (!r0) { step = 1; continue; } - { step = 5; continue; } + r0 = pxsim_Array__mk(); + { step = 2; continue; } case 1: + r0 = undefined; case 2: - s.i___280245 = (0); + // jmp value (already in r0) + s.tmp_6 = r0; + globals.consoleStrings___22291 = (s.tmp_6); case 3: - r0 = (s.i___280245 < s.arg2); + case 4: + r0 = (s.arg1 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array_.removeAt(s.arg0, s.arg1); - r0 = (s.i___280245 + 1); - s.i___280245 = (r0); - { step = 3; continue; } - case 4: + if (!r0) { step = 5; continue; } + globals.consoleColor___22290 = (s.arg1); case 5: + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySplice__P271916.info = {"start":3642,"length":213,"line":137,"column":4,"endLine":144,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySplice","argumentNames":["arr","start","len"]} +game_consoleOverlay_setVisible__P22330.info = {"start":562,"length":219,"line":19,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"setVisible","argumentNames":["value","col"]} -function helpers_arraySplice__P271916_mk(s) { +function game_consoleOverlay_setVisible__P22330_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySplice__P271916, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_setVisible__P22330, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - i___280245: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function sprites_SpriteSet_add__P274285(s) { +function console_log__P20364(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15377,63 +15315,34 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } + s.tmp_0 = console_add__P20360_mk(s); + s.tmp_0.arg0 = 1; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 34; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = s.arg0.fields["_sprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_4, s.arg1, undefined); - s.tmp_3 = r0; - r0 = (s.tmp_3 > -1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = false; - { step = 5; continue; } - case 3: - case 4: - r0 = s.arg0.fields["_sprites"]; - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_5, s.arg1); - r0 = true; - case 5: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_add__P274285.info = {"start":1041,"length":263,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"add","argumentNames":["this","sprite"]} +console_log__P20364.info = {"start":1450,"length":86,"line":58,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]} -function sprites_SpriteSet_add__P274285_mk(s) { +function console_log__P20364_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_add__P274285, depth: s.depth + 1, + parent: s, fn: console_log__P20364, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_SpriteSet_contains__P274288(s) { +function console_add__P20360(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15443,30 +15352,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.text___32255 = undefined; + s.i___32264 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); + r0 = (s.arg0 < globals.minPriority___20357); s.tmp_0 = r0; - r0 = (s.tmp_0 > -1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 5; continue; } + case 1: + case 2: + s.tmp_1 = console_inspect__P20366_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = 20; + s.callLocIdx = 32; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.text___32255 = (r0); + if ((s.text___32255) && (s.text___32255).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.text___32255); + checkResumeConsumed(); + return; + } else { s.retval = (s.text___32255) + ""; } + case 7: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, "\n"); + s.text___32255 = (r0); + s.i___32264 = (0); + case 3: + s.tmp_1 = r0 = s.i___32264; + r0 = pxsim_Array__length(globals.listeners___20359); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_3 = lambda_3_mk(s); + r0 = pxsim_Array__getAt(globals.listeners___20359, s.i___32264); + s.tmp_3.argL = r0; + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.text___32255; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 33; s.pc = 8; return s.tmp_3; + case 8: + r0 = s.retval; + r0 = (s.i___32264 + 1); + s.i___32264 = (r0); + { step = 3; continue; } + case 4: + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_contains__P274288.info = {"start":2172,"length":100,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"contains","argumentNames":["this","sprite"]} +console_add__P20360.info = {"start":632,"length":317,"line":28,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"add","argumentNames":["priority","message"]} -function sprites_SpriteSet_contains__P274288_mk(s) { +function console_add__P20360_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_contains__P274288, depth: s.depth + 1, + parent: s, fn: console_add__P20360, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + text___32255: undefined, + i___32264: undefined, arg0: undefined, arg1: undefined, } } @@ -15475,7 +15432,7 @@ function sprites_SpriteSet_contains__P274288_mk(s) { -function sprites_SpriteSet_constructor__P274282(s) { +function console_inspect__P20366(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15485,164 +15442,214 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.asArr___30727 = undefined; + s.asString___30746 = undefined; + s.keys___30758 = undefined; + s.snipped___30762 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = pxsim_pxtcore.typeOf(s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_sprites"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_SpriteSet_constructor__P274282.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} - -function sprites_SpriteSet_constructor__P274282_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_SpriteSet_constructor__P274282, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function Sprite_constructor__P274205(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } + r0 = (s.tmp_1 == "string"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P273913_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 329; s.pc = 1; return s.tmp_0; + { step = 17; continue; } + { step = 16; continue; } case 1: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); + r0 = pxsim_pxtcore.typeOf(s.arg0); s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); + r0 = (s.tmp_3 == "number"); s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + r0 = pxsim_String_.mkEmpty(); s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.arg1); + if ((s.arg0) && (s.arg0).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.arg0); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg0) + ""; } + case 18: + r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); + { step = 17; continue; } + { step = 15; continue; } + case 2: + r0 = pxsim_Array_.isArray(s.arg0); s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 5; continue; } + s.asArr___30727 = (s.arg0); + r0 = pxsim_Array__length(s.asArr___30727); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - r0 = s.arg0.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["_lastX"] = (s.tmp_0); - r0 = s.arg0.fields["_y"]; + r0 = (s.tmp_1 <= s.arg1); s.tmp_0 = r0; - r0 = (s.arg0).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = Sprite_vx__P274176_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 332; s.pc = 2; return s.tmp_0; - case 2: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = helpers_arrayJoin__P20146_mk(s); + s.tmp_2.arg0 = s.asArr___30727; + s.tmp_2.arg1 = ","; + s.callLocIdx = 35; s.pc = 19; return s.tmp_2; + case 19: r0 = s.retval; - s.tmp_0 = Sprite_vy__P274178_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 333; s.pc = 3; return s.tmp_0; + { step = 17; continue; } + { step = 4; continue; } case 3: + r0 = pxsim_String_.mkEmpty(); + s.tmp_4 = r0; + s.tmp_7 = helpers_arrayJoin__P20146_mk(s); + s.tmp_8 = helpers_arraySlice__P20160_mk(s); + s.tmp_8.arg0 = s.asArr___30727; + s.tmp_8.arg1 = 0; + s.tmp_8.arg2 = s.arg1; + s.callLocIdx = 36; s.pc = 21; return s.tmp_8; + case 21: r0 = s.retval; - s.tmp_0 = Sprite_ax__P274180_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 334; s.pc = 4; return s.tmp_0; - case 4: + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = ","; + s.callLocIdx = 37; s.pc = 20; return s.tmp_7; + case 20: r0 = s.retval; - s.tmp_0 = Sprite_ay__P274182_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 335; s.pc = 5; return s.tmp_0; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 22); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 22: + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); + s.tmp_3 = r0; + r0 = pxsim_String__concat(s.tmp_3, "..."); + { step = 17; continue; } + case 4: + { step = 14; continue; } case 5: + if ((s.arg0) && (s.arg0).vtable) { + setupResume(s, 23); + pxsim_String__stringConv(s.arg0); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg0) + ""; } + case 23: r0 = s.retval; - s.tmp_0 = Sprite_fx__P274184_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 336; s.pc = 6; return s.tmp_0; + s.tmp_9 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_10 = r0; + r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); + s.asString___30746 = (r0); + r0 = (s.asString___30746 != "[object Object]"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } case 6: - r0 = s.retval; - s.tmp_0 = Sprite_fy__P274186_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 337; s.pc = 7; return s.tmp_0; + r0 = (s.asString___30746 != "[Object]"); case 7: - r0 = s.retval; - r0 = (s.arg0).fields["_sx"] = (256); - r0 = (s.arg0).fields["_sy"] = (256); - r0 = (s.arg0).fields["flags"] = (0); - s.tmp_0 = Sprite_setImage__P274208_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 338; s.pc = 8; return s.tmp_0; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 8; continue; } + r0 = s.asString___30746; + { step = 17; continue; } case 8: - r0 = s.retval; - s.tmp_0 = Sprite_setKind__P274225_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 339; s.pc = 9; return s.tmp_0; case 9: + r0 = pxsim_pxtrt.keysOf(s.arg0); + s.keys___30758 = (r0); + r0 = pxsim_Array__length(s.keys___30758); + s.tmp_0 = r0; + r0 = (s.tmp_0 > s.arg1); + s.snipped___30762 = (r0); + r0 = pxsim_numops_toBoolDecr(s.snipped___30762); + if (!r0) { step = 10; continue; } + s.tmp_0 = helpers_arraySlice__P20160_mk(s); + s.tmp_0.arg0 = s.keys___30758; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 38; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - r0 = (s.arg0).fields["layer"] = (1); - r0 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_overlappers"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + s.keys___30758 = (r0); + case 10: + case 11: + r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P30780); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_numops_toBoolDecr(s.snipped___30762); + if (!r0) { step = 12; continue; } + r0 = "\n ..."; + { step = 13; continue; } + case 12: + r0 = pxsim_String_.mkEmpty(); + case 13: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_obstacles"] = (s.tmp_1); + s.tmp_7 = helpers_arrayReduce__P20157_mk(s); + s.tmp_7.arg0 = s.keys___30758; + s.tmp_7.arg1 = s.tmp_0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_7.arg2 = r0; + s.callLocIdx = 39; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_6 = r0; + if ((s.tmp_6) && (s.tmp_6).vtable) { + setupResume(s, 26); + pxsim_String__stringConv(s.tmp_6); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_6) + ""; } + case 26: + r0 = s.retval; + s.tmp_5 = r0; + if ((s.tmp_1) && (s.tmp_1).vtable) { + setupResume(s, 27); + pxsim_String__stringConv(s.tmp_1); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_1) + ""; } + case 27: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_8); + s.tmp_4 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 28); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 28: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_String__concat("{", s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, "\n}"); + { step = 17; continue; } + case 14: + case 15: + case 16: r0 = undefined; + case 17: return leave(s, r0) default: oops() } } } -Sprite_constructor__P274205.info = {"start":7406,"length":678,"line":278,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} +console_inspect__P20366.info = {"start":2271,"length":1190,"line":81,"column":4,"endLine":114,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]} -function Sprite_constructor__P274205_mk(s) { +function console_inspect__P20366_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_constructor__P274205, depth: s.depth + 1, + parent: s, fn: console_inspect__P20366, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -15651,6 +15658,14 @@ function Sprite_constructor__P274205_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + asArr___30727: undefined, + asString___30746: undefined, + keys___30758: undefined, + snipped___30762: undefined, arg0: undefined, arg1: undefined, } } @@ -15659,7 +15674,7 @@ function Sprite_constructor__P274205_mk(s) { -function Sprite_setImage__P274208(s) { +function console_inspect_inline__P30780(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15674,52 +15689,69 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + if ((s.arg0) && (s.arg0).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.arg0); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg0) + ""; } case 1: - r0 = s.arg0.fields["_image"]; - s.tmp_2 = r0; - r0 = (s.arg1 === s.tmp_2); + r0 = s.retval; + s.tmp_0 = r0; + if ((s.arg1) && (s.arg1).vtable) { + setupResume(s, 2); + pxsim_String__stringConv(s.arg1); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg1) + ""; } case 2: - // jmp value (already in r0) + r0 = s.retval; + s.tmp_5 = r0; + r0 = pxsim_String__concat("\n ", s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_4, ": "); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 5; continue; } + r0 = pxsim_pxtrt.mapGetGeneric(s.caps[0], s.arg1); + s.tmp_7 = r0; + if ((s.tmp_7) && (s.tmp_7).vtable) { + setupResume(s, 3); + pxsim_String__stringConv(s.tmp_7); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_7) + ""; } case 3: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_6); + s.tmp_2 = r0; + if ((s.tmp_2) && (s.tmp_2).vtable) { + setupResume(s, 4); + pxsim_String__stringConv(s.tmp_2); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_2) + ""; } case 4: - r0 = (s.arg0).fields["_image"] = (s.arg1); - s.tmp_0 = Sprite__C274158_v5_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C274158_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.recalcSize; - s.pc = 6; return s.tmp_0; - case 6: r0 = s.retval; - case 5: - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -Sprite_setImage__P274208.info = {"start":9299,"length":131,"line":332,"column":4,"endLine":336,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setImage","argumentNames":["this","img"]} +console_inspect_inline__P30780.info = {"start":3293,"length":61,"line":108,"column":20,"endLine":108,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]} -function Sprite_setImage__P274208_mk(s) { +function console_inspect_inline__P30780_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setImage__P274208, depth: s.depth + 1, + parent: s, fn: console_inspect_inline__P30780, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, arg1: undefined, } } @@ -15728,7 +15760,7 @@ function Sprite_setImage__P274208_mk(s) { -function Sprite_recalcSize__P276613(s) { +function helpers_arrayReduce__P20157(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15738,80 +15770,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___30807 = undefined; + s.i___30810 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - s.tmp_6 = Sprite_sx__P274187_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 344; s.pc = 1; return s.tmp_6; + r0 = pxsim_Array__length(s.arg0); + s.len___30807 = (r0); + s.i___30810 = (0); case 1: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_3 * s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_7 = r0; - r0 = (s.tmp_7 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["_image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_4); - s.tmp_3 = r0; - s.tmp_6 = Sprite_sy__P274189_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 346; s.pc = 2; return s.tmp_6; - case 2: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_3 * s.tmp_5); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_7 = r0; - r0 = (s.tmp_7 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); - s.tmp_0 = Sprite_resetHitbox__P274210_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 348; s.pc = 3; return s.tmp_0; + r0 = (s.i___30810 < s.len___30807); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = lambda_4_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.arg2; + r0 = pxsim_Array__getAt(s.arg0, s.i___30810); + s.tmp_1.arg1 = r0; + s.tmp_1.arg2 = s.i___30810; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 8; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - r0 = undefined; + s.arg2 = (r0); + r0 = (s.i___30810 + 1); + s.i___30810 = (r0); + { step = 1; continue; } + case 2: + r0 = s.arg2; return leave(s, r0) default: oops() } } } -Sprite_recalcSize__P276613.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} +helpers_arrayReduce__P20157.info = {"start":8316,"length":317,"line":280,"column":4,"endLine":286,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayReduce","argumentNames":["arr","callbackfn","initialValue"]} -function Sprite_recalcSize__P276613_mk(s) { +function helpers_arrayReduce__P20157_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_recalcSize__P276613, depth: s.depth + 1, + parent: s, fn: helpers_arrayReduce__P20157, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, + len___30807: undefined, + i___30810: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_resetHitbox__P274210(s) { +function helpers_arrayJoin__P20146(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15821,40 +15835,153 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___30835 = undefined; + s.len___30836 = undefined; + s.i___30839 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = (s.arg0).fields["_hitbox"] = (null); - s.tmp_0 = Sprite__C274158_v4_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C274158_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.setHitbox; - s.pc = 1; return s.tmp_0; + r0 = (s.arg1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.arg1 === null); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + s.arg1 = (","); + case 3: + case 4: + r0 = pxsim_String_.mkEmpty(); + s.r___30835 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___30836 = (r0); + s.i___30839 = (0); + case 5: + r0 = (s.i___30839 < s.len___30836); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.i___30839 > 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); + if (r0) { step = 6; continue; } + r0 = s.tmp_1; + { step = 7; continue; } + case 6: + r0 = s.arg1; + case 7: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 8; continue; } + if ((s.r___30835) && (s.r___30835).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.r___30835); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___30835) + ""; } + case 15: r0 = s.retval; - r0 = undefined; + s.tmp_3 = r0; + if ((s.arg1) && (s.arg1).vtable) { + setupResume(s, 16); + pxsim_String__stringConv(s.arg1); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg1) + ""; } + case 16: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.r___30835 = (r0); + case 8: + case 9: + r0 = pxsim_Array__getAt(s.arg0, s.i___30839); + s.tmp_1 = r0; + r0 = (s.tmp_1 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 10; continue; } + r0 = s.tmp_0; + { step = 11; continue; } + case 10: + r0 = pxsim_Array__getAt(s.arg0, s.i___30839); + s.tmp_2 = r0; + r0 = (s.tmp_2 === null); + case 11: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 12; continue; } + r0 = pxsim_String_.mkEmpty(); + { step = 13; continue; } + case 12: + r0 = pxsim_Array__getAt(s.arg0, s.i___30839); + case 13: + // jmp value (already in r0) + s.tmp_4 = r0; + if ((s.r___30835) && (s.r___30835).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.r___30835); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___30835) + ""; } + case 17: + r0 = s.retval; + s.tmp_5 = r0; + if ((s.tmp_4) && (s.tmp_4).vtable) { + setupResume(s, 18); + pxsim_String__stringConv(s.tmp_4); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_4) + ""; } + case 18: + r0 = s.retval; + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); + s.r___30835 = (r0); + r0 = (s.i___30839 + 1); + s.i___30839 = (r0); + { step = 5; continue; } + case 14: + r0 = s.r___30835; return leave(s, r0) default: oops() } } } -Sprite_resetHitbox__P274210.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} +helpers_arrayJoin__P20146.info = {"start":4133,"length":432,"line":157,"column":4,"endLine":170,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayJoin","argumentNames":["arr","sep"]} -function Sprite_resetHitbox__P274210_mk(s) { +function helpers_arrayJoin__P20146_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_resetHitbox__P274210, depth: s.depth + 1, + parent: s, fn: helpers_arrayJoin__P20146, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + r___30835: undefined, + len___30836: undefined, + i___30839: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_setHitbox__P274211(s) { +function scene_systemMenu_toggleStats__P22237(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15864,55 +15991,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_hitbox"]; + r0 = pxsim_numops_toBoolDecr(globals.stats___21890); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = game_Hitbox_updateIfInvalid__P274039_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 342; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + r0 = pxsim_Boolean__bang(s.tmp_0); + globals.stats___21890 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21890); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = game_calculateHitBox__P274041_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 343; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_hitbox"] = (s.tmp_1); + r0 = globals.control_EventContext_onStats___20406; case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + s.tmp_3 = lambda_2_mk(s); + s.tmp_3.argL = globals.control_EventContext_onStats___20406; + r0 = pxsim_String_.mkEmpty(); + s.tmp_3.arg0 = r0; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 1152; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_setHitbox__P274211.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} +scene_systemMenu_toggleStats__P22237.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} -function Sprite_setHitbox__P274211_mk(s) { +function scene_systemMenu_toggleStats__P22237_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setHitbox__P274211, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_toggleStats__P22237, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - arg0: undefined, + tmp_3: undefined, } } -function game_calculateHitBox__P274041(s) { +function scene_systemMenu_brightnessDown__P22235(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15922,215 +16051,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___281373 = undefined; - s.minX___281376 = undefined; - s.minY___281380 = undefined; - s.maxX___281384 = undefined; - s.maxY___281386 = undefined; - s.c___281388 = undefined; - s.fxc___281389 = undefined; - s.r___281396 = undefined; - s.fxr___281397 = undefined; - s.width___281461 = undefined; - s.height___281469 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["_hitbox"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_1 = game_Hitbox_isValid__P274037_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 276; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - r0 = s.arg0.fields["_hitbox"]; - { step = 11; continue; } - case 3: - case 4: - r0 = s.arg0.fields["_image"]; - s.i___281373 = (r0); - r0 = pxsim_ImageMethods.width(s.i___281373); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.minX___281376 = (r0); - r0 = pxsim_ImageMethods.height(s.i___281373); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.minY___281380 = (r0); - s.maxX___281384 = (0); - s.maxY___281386 = (0); - s.c___281388 = (0); - s.fxc___281389 = (0); - case 5: - s.tmp_1 = r0 = s.c___281388; - r0 = pxsim_ImageMethods.width(s.i___281373); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.r___281396 = (0); - s.fxr___281397 = (0); - case 6: - s.tmp_1 = r0 = s.r___281396; - r0 = pxsim_ImageMethods.height(s.i___281373); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = pxsim_ImageMethods.getPixel(s.i___281373, s.c___281388, s.r___281396); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = Fx_min__P271982_mk(s); - s.tmp_4.arg0 = s.minX___281376; - s.tmp_4.arg1 = s.fxc___281389; - s.callLocIdx = 280; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - s.minX___281376 = (r0); - s.tmp_0 = Fx_min__P271982_mk(s); - s.tmp_0.arg0 = s.minY___281380; - s.tmp_0.arg1 = s.fxr___281397; - s.callLocIdx = 281; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.minY___281380 = (r0); - s.tmp_0 = Fx_max__P271983_mk(s); - s.tmp_0.arg0 = s.maxX___281384; - s.tmp_0.arg1 = s.fxc___281389; - s.callLocIdx = 282; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.maxX___281384 = (r0); - s.tmp_0 = Fx_max__P271983_mk(s); - s.tmp_0.arg0 = s.maxY___281386; - s.tmp_0.arg1 = s.fxr___281397; - s.callLocIdx = 283; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.maxY___281386 = (r0); - case 7: - case 8: - r0 = (s.r___281396 + 1); - s.r___281396 = (r0); - r0 = (s.fxr___281397 + 256); - s.tmp_0 = r0; - s.fxr___281397 = (r0); - r0 = s.tmp_0; - { step = 6; continue; } - case 9: - r0 = (s.c___281388 + 1); - s.c___281388 = (r0); - r0 = (s.fxc___281389 + 256); - s.tmp_0 = r0; - s.fxc___281389 = (r0); - r0 = s.tmp_0; - { step = 5; continue; } - case 10: - r0 = s.arg0.fields["_sx"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.minX___281376, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minX___281376 = (r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.minY___281380, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minY___281380 = (r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxX___281384, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.maxX___281384 = (r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxY___281386, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.maxY___281386 = (r0); - r0 = (s.maxX___281384 - s.minX___281376); - s.tmp_0 = r0; - r0 = s.arg0.fields["_sx"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.width___281461 = (r0); - r0 = (s.maxY___281386 - s.minY___281380); - s.tmp_0 = r0; - r0 = s.arg0.fields["_sy"]; + s.tmp_0 = scene_systemMenu_setScreenBrightness__P22236_mk(s); + r0 = globals.brightness___20826; s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___281469 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C274025_VT); - s.tmp_0 = r0; - s.tmp_1 = game_Hitbox_constructor__P274032_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.width___281461; - s.tmp_1.arg3 = s.height___281469; - r0 = (s.minX___281376 & -256); - s.tmp_1.arg4 = r0; - r0 = (s.minY___281380 & -256); - s.tmp_1.arg5 = r0; - s.callLocIdx = 296; s.pc = 17; return s.tmp_1; - case 17: + r0 = (s.tmp_1 - 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1148; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = s.tmp_0; - case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_calculateHitBox__P274041.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} +scene_systemMenu_brightnessDown__P22235.info = {"start":9198,"length":87,"line":289,"column":4,"endLine":291,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessDown","argumentNames":[]} -function game_calculateHitBox__P274041_mk(s) { +function scene_systemMenu_brightnessDown__P22235_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_calculateHitBox__P274041, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessDown__P22235, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - i___281373: undefined, - minX___281376: undefined, - minY___281380: undefined, - maxX___281384: undefined, - maxY___281386: undefined, - c___281388: undefined, - fxc___281389: undefined, - r___281396: undefined, - fxr___281397: undefined, - width___281461: undefined, - height___281469: undefined, - arg0: undefined, } } -function Sprite_image__P274207(s) { +function scene_systemMenu_setScreenBrightness__P22236(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16144,20 +16092,31 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) + s.tmp_0 = helpers_setScreenBrightness__P20851_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1149; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = settings_writeNumber__P20944_mk(s); + s.tmp_0.arg0 = "#brightness"; + r0 = globals.brightness___20826; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1151; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_image__P274207.info = {"start":9023,"length":54,"line":322,"column":4,"endLine":324,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"image","argumentNames":["this"]} -Sprite_image__P274207.isGetter = true; +scene_systemMenu_setScreenBrightness__P22236.info = {"start":9291,"length":345,"line":293,"column":4,"endLine":298,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightness","argumentNames":["b"]} -function Sprite_image__P274207_mk(s) { +function scene_systemMenu_setScreenBrightness__P22236_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_image__P274207, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setScreenBrightness__P22236, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -16165,7 +16124,7 @@ function Sprite_image__P274207_mk(s) { -function game_Hitbox_isValid__P274037(s) { +function settings_writeNumber__P20944(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16177,41 +16136,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - r0 = s.arg0.fields["hash"]; + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - s.tmp_2 = Sprite_calcDimensionalHash__P274209_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 229; s.pc = 1; return s.tmp_2; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_1 = settings_writeBuffer__P20941_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = msgpack_packNumberArray__P20239_mk(s); + s.tmp_2.arg0 = s.tmp_0; + s.callLocIdx = 125; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 126; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_isValid__P274037.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} +settings_writeNumber__P20944.info = {"start":2265,"length":122,"line":89,"column":4,"endLine":91,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeNumber","argumentNames":["key","value"]} -function game_Hitbox_isValid__P274037_mk(s) { +function settings_writeNumber__P20944_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_isValid__P274037, depth: s.depth + 1, + parent: s, fn: settings_writeNumber__P20944, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_calcDimensionalHash__P274209(s) { +function settings_writeBuffer__P20941(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16223,56 +16187,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.revision(s.tmp_2); - s.tmp_1 = r0; - r0 = s.arg0.fields["_width"]; - s.tmp_4 = r0; - r0 = (8 + 8); - s.tmp_5 = r0; - r0 = (s.tmp_4 >> s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); + r0 = pxsim.settings._set(s.arg0, s.arg1); s.tmp_0 = r0; - r0 = s.arg0.fields["_height"]; - s.tmp_7 = r0; - r0 = (16 + 8); - s.tmp_8 = r0; - r0 = (s.tmp_7 >> s.tmp_8); - s.tmp_6 = r0; - r0 = (s.tmp_0 + s.tmp_6); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.settings._userClean(); + r0 = pxsim_pxtrt.panic(920); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_calcDimensionalHash__P274209.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} +settings_writeBuffer__P20941.info = {"start":1538,"length":290,"line":63,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeBuffer","argumentNames":["key","value"]} -function Sprite_calcDimensionalHash__P274209_mk(s) { +function settings_writeBuffer__P20941_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_calcDimensionalHash__P274209, depth: s.depth + 1, + parent: s, fn: settings_writeBuffer__P20941, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, arg0: undefined, + arg1: undefined, } } -function Fx_toIntShifted__P271972(s) { +function msgpack_packNumberArray__P20239(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16282,36 +16228,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.off___32327 = undefined; + s.n___32329 = undefined; + s.unnamed142___U2 = undefined; + s.unnamed143___U3 = undefined; + s.buf___32339 = undefined; + s.n___32345 = undefined; + s.unnamed144___U6 = undefined; + s.unnamed145___U7 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 8); + s.off___32327 = (0); + s.n___32329 = (undefined); + s.unnamed142___U2 = (s.arg0); + s.unnamed143___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed143___U3; + r0 = pxsim_Array__length(s.unnamed142___U2); s.tmp_1 = r0; - r0 = (s.tmp_0 >> s.tmp_1); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed142___U2, s.unnamed143___U3); + s.n___32329 = (r0); + s.tmp_2 = r0 = s.off___32327; + s.tmp_4 = msgpack_packNumberCore__P20237_mk(s); + s.tmp_4.arg0 = null; + s.tmp_4.arg1 = s.off___32327; + s.tmp_4.arg2 = s.n___32329; + s.callLocIdx = 22; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.off___32327 = (r0); + r0 = (s.unnamed143___U3 + 1); + s.unnamed143___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed142___U2 = (undefined); + r0 = pxsim.control.createBuffer(s.off___32327); + s.buf___32339 = (r0); + s.off___32327 = (0); + s.n___32345 = (undefined); + s.unnamed144___U6 = (s.arg0); + s.unnamed145___U7 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed145___U7; + r0 = pxsim_Array__length(s.unnamed144___U6); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed144___U6, s.unnamed145___U7); + s.n___32345 = (r0); + s.tmp_2 = r0 = s.off___32327; + s.tmp_4 = msgpack_packNumberCore__P20237_mk(s); + s.tmp_4.arg0 = s.buf___32339; + s.tmp_4.arg1 = s.off___32327; + s.tmp_4.arg2 = s.n___32345; + s.callLocIdx = 23; s.pc = 6; return s.tmp_4; + case 6: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.off___32327 = (r0); + r0 = (s.unnamed145___U7 + 1); + s.unnamed145___U7 = (r0); + { step = 3; continue; } + case 4: + s.unnamed144___U6 = (undefined); + r0 = s.buf___32339; return leave(s, r0) default: oops() } } } -Fx_toIntShifted__P271972.info = {"start":404,"length":102,"line":17,"column":4,"endLine":19,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toIntShifted","argumentNames":["a","n"]} +msgpack_packNumberArray__P20239.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} -function Fx_toIntShifted__P271972_mk(s) { +function msgpack_packNumberArray__P20239_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toIntShifted__P271972, depth: s.depth + 1, + parent: s, fn: msgpack_packNumberArray__P20239, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + off___32327: undefined, + n___32329: undefined, + unnamed142___U2: undefined, + unnamed143___U3: undefined, + buf___32339: undefined, + n___32345: undefined, + unnamed144___U6: undefined, + unnamed145___U7: undefined, arg0: undefined, - arg1: undefined, } } -function game_Hitbox_constructor__P274032(s) { +function msgpack_packNumberCore__P20237(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16321,57 +16339,154 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tag___32359 = undefined; + s.fmt___32402 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Sprite_calcDimensionalHash__P274209_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 220; s.pc = 1; return s.tmp_2; + s.tag___32359 = (203); + s.tmp_1 = r0 = s.arg2; + r0 = (s.arg2 << 0); + s.tmp_2 = r0; + r0 = (s.tmp_1 == s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; + s.tmp_3 = r0 = s.arg2; + r0 = (s.arg2 >>> 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 == s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 19; continue; } + r0 = (-31 <= s.arg2); + s.tmp_6 = r0; + r0 = pxsim_numops_toBool(s.tmp_6); + if (r0) { step = 3; continue; } + r0 = s.tmp_6; + { step = 4; continue; } + case 3: + r0 = (s.arg2 <= 127); + case 4: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 7; continue; } + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 5; continue; } + r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); + case 5: + case 6: + r0 = 1; + { step = 23; continue; } + { step = 18; continue; } + case 7: + r0 = (0 <= s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + r0 = (s.arg2 <= 255); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["hash"] = (s.tmp_1); - r0 = (s.arg0).fields["parent"] = (s.arg1); - r0 = (s.arg0).fields["width"] = (s.arg2); - r0 = (s.arg0).fields["height"] = (s.arg3); - r0 = (s.arg0).fields["ox"] = (s.arg4); - r0 = (s.arg0).fields["oy"] = (s.arg5); - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 8; continue; } + s.tag___32359 = (204); + { step = 11; continue; } + case 8: + r0 = (s.arg2 <= 65535); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + s.tag___32359 = (205); + { step = 10; continue; } + case 9: + s.tag___32359 = (206); + case 10: + case 11: + { step = 17; continue; } + case 12: + r0 = (-127 <= s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + s.tag___32359 = (208); + { step = 16; continue; } + case 13: + r0 = (-32767 <= s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + s.tag___32359 = (209); + { step = 15; continue; } + case 14: + s.tag___32359 = (210); + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + s.tmp_0 = msgpack_tagFormat__P20236_mk(s); + s.tmp_0.arg0 = s.tag___32359; + s.callLocIdx = 18; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.fmt___32402 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 21; continue; } + r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___32359); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.fmt___32402; + r0 = (s.arg1 + 1); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, s.tmp_1, s.tmp_2, s.arg2); + case 21: + case 22: + s.tmp_1 = pins_sizeOf__P20229_mk(s); + s.tmp_1.arg0 = s.fmt___32402; + s.callLocIdx = 19; s.pc = 25; return s.tmp_1; + case 25: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + case 23: return leave(s, r0) default: oops() } } } -game_Hitbox_constructor__P274032.info = {"start":173,"length":288,"line":9,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"inline","argumentNames":["this","parent","width","height","ox","oy"]} +msgpack_packNumberCore__P20237.info = {"start":1632,"length":951,"line":56,"column":4,"endLine":86,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberCore","argumentNames":["buf","offset","num"]} -function game_Hitbox_constructor__P274032_mk(s) { +function msgpack_packNumberCore__P20237_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_constructor__P274032, depth: s.depth + 1, + parent: s, fn: msgpack_packNumberCore__P20237, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tag___32359: undefined, + fmt___32402: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function Fx_floor__P271984(s) { +function msgpack_tagFormat__P20236(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16385,17 +16500,60 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 & -256); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtcore.switch_eq(203, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(204, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(205, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(206, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(208, s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq(209, s.tmp_0); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq(210, s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } + case 1: + r0 = 16; + { step = 9; continue; } + case 2: + r0 = 7; + { step = 9; continue; } + case 3: + r0 = 9; + { step = 9; continue; } + case 4: + r0 = 12; + { step = 9; continue; } + case 5: + r0 = 6; + { step = 9; continue; } + case 6: + r0 = 8; + { step = 9; continue; } + case 7: + r0 = 10; + { step = 9; continue; } + case 8: + r0 = null; + { step = 9; continue; } + r0 = undefined; + case 9: return leave(s, r0) default: oops() } } } -Fx_floor__P271984.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} +msgpack_tagFormat__P20236.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} -function Fx_floor__P271984_mk(s) { +function msgpack_tagFormat__P20236_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_floor__P271984, depth: s.depth + 1, + parent: s, fn: msgpack_tagFormat__P20236, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -16403,7 +16561,7 @@ function Fx_floor__P271984_mk(s) { -function Fx_max__P271983(s) { +function pins_sizeOf__P20229(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16415,42 +16573,32 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 > s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } - { step = 2; continue; } + s.tmp_0 = Buffer_sizeOfNumberFormat__P20265_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 17; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg1; - { step = 3; continue; } - case 2: - r0 = undefined; - case 3: + r0 = s.retval; return leave(s, r0) default: oops() } } } -Fx_max__P271983.info = {"start":1797,"length":117,"line":56,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"max","argumentNames":["a","b"]} +pins_sizeOf__P20229.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} -function Fx_max__P271983_mk(s) { +function pins_sizeOf__P20229_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_max__P271983, depth: s.depth + 1, + parent: s, fn: pins_sizeOf__P20229, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_min__P271982(s) { +function Buffer_sizeOfNumberFormat__P20265(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16462,42 +16610,89 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } - { step = 2; continue; } + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(6, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(7, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); + if (r0) { step = 6; continue; } + r0 = pxsim_pxtcore.switch_eq(8, s.tmp_0); + if (r0) { step = 7; continue; } + r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); + if (r0) { step = 9; continue; } + r0 = pxsim_pxtcore.switch_eq(10, s.tmp_0); + if (r0) { step = 10; continue; } + r0 = pxsim_pxtcore.switch_eq(12, s.tmp_0); + if (r0) { step = 11; continue; } + r0 = pxsim_pxtcore.switch_eq(11, s.tmp_0); + if (r0) { step = 12; continue; } + r0 = pxsim_pxtcore.switch_eq(15, s.tmp_0); + if (r0) { step = 13; continue; } + r0 = pxsim_pxtcore.switch_eq(13, s.tmp_0); + if (r0) { step = 14; continue; } + r0 = pxsim_pxtcore.switch_eq(16, s.tmp_0); + if (r0) { step = 15; continue; } + r0 = pxsim_pxtcore.switch_eq(14, s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } case 1: - r0 = s.arg1; - { step = 3; continue; } case 2: - r0 = undefined; case 3: + case 4: + r0 = 1; + { step = 18; continue; } + case 5: + case 6: + case 7: + case 8: + r0 = 2; + { step = 18; continue; } + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + r0 = 4; + { step = 18; continue; } + case 15: + case 16: + r0 = 8; + { step = 18; continue; } + case 17: + r0 = 0; + case 18: return leave(s, r0) default: oops() } } } -Fx_min__P271982.info = {"start":1675,"length":117,"line":50,"column":4,"endLine":55,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"min","argumentNames":["a","b"]} +Buffer_sizeOfNumberFormat__P20265.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} -function Fx_min__P271982_mk(s) { +function Buffer_sizeOfNumberFormat__P20265_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_min__P271982, depth: s.depth + 1, + parent: s, fn: Buffer_sizeOfNumberFormat__P20265, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_mul__P271976(s) { +function helpers_setScreenBrightness__P20851(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16512,18 +16707,27 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.imul(s.arg0, s.arg1); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 10; + s.tmp_0.arg1 = 100; + r0 = (s.arg1 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 88; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.arg1 = (r0); + globals.brightness___20826 = (s.arg1); + r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___20826); + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_mul__P271976.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} +helpers_setScreenBrightness__P20851.info = {"start":8945,"length":210,"line":282,"column":4,"endLine":286,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"setScreenBrightness","argumentNames":["img","b"]} -function Fx_mul__P271976_mk(s) { +function helpers_setScreenBrightness__P20851_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_mul__P271976, depth: s.depth + 1, + parent: s, fn: helpers_setScreenBrightness__P20851, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -16534,7 +16738,7 @@ function Fx_mul__P271976_mk(s) { -function Fx_sub__P271975(s) { +function scene_systemMenu_brightnessUp__P22234(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16544,31 +16748,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 - s.arg1); + s.tmp_0 = scene_systemMenu_setScreenBrightness__P22236_mk(s); + r0 = globals.brightness___20826; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1146; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_sub__P271975.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} +scene_systemMenu_brightnessUp__P22234.info = {"start":9107,"length":85,"line":285,"column":4,"endLine":287,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessUp","argumentNames":[]} -function Fx_sub__P271975_mk(s) { +function scene_systemMenu_brightnessUp__P22234_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_sub__P271975, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessUp__P22234, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, + tmp_1: undefined, } } -function game_Hitbox_updateIfInvalid__P274039(s) { +function scene_systemMenu_volumeDown__P22233(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16578,155 +16785,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.newHitBox___281586 = undefined; - s.oMinX___281591 = undefined; - s.oMinY___281594 = undefined; - s.oMaxX___281597 = undefined; - s.oMaxY___281603 = undefined; - s.nMinX___281609 = undefined; - s.nMinY___281612 = undefined; - s.nMaxX___281615 = undefined; - s.nMaxY___281621 = undefined; - s.xDiff___281627 = undefined; - s.yDiff___281638 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - s.tmp_1 = game_Hitbox_isValid__P274037_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 234; s.pc = 8; return s.tmp_1; - case 8: + s.v___32691 = undefined; + s.remainder___32694 = undefined; + s.newVolume___32697 = undefined; + s.tmp_0 = music_volume__P20544_mk(s); + s.callLocIdx = 1143; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.v___32691 = (r0); + r0 = (s.v___32691 % 32); + s.remainder___32694 = (r0); + r0 = pxsim_numops_toBoolDecr(s.remainder___32694); if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = s.remainder___32694; + { step = 2; continue; } case 1: + r0 = 32; case 2: - s.tmp_2 = game_calculateHitBox__P274041_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 235; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.newHitBox___281586 = (r0); - r0 = s.arg0.fields["ox"]; - s.oMinX___281591 = (r0); - r0 = s.arg0.fields["oy"]; - s.oMinY___281594 = (r0); - r0 = s.arg0.fields["width"]; - s.tmp_0 = r0; - r0 = (s.oMinX___281591 + s.tmp_0); - s.oMaxX___281597 = (r0); - r0 = s.arg0.fields["height"]; + // jmp value (already in r0) s.tmp_0 = r0; - r0 = (s.oMinY___281594 + s.tmp_0); - s.oMaxY___281603 = (r0); - r0 = s.newHitBox___281586.fields["ox"]; - s.nMinX___281609 = (r0); - r0 = s.newHitBox___281586.fields["oy"]; - s.nMinY___281612 = (r0); - r0 = s.newHitBox___281586.fields["width"]; - s.tmp_0 = r0; - r0 = (s.nMinX___281609 + s.tmp_0); - s.nMaxX___281615 = (r0); - r0 = s.newHitBox___281586.fields["height"]; - s.tmp_0 = r0; - r0 = (s.nMinY___281612 + s.tmp_0); - s.nMaxY___281621 = (r0); - s.tmp_1 = Fx_abs__P271981_mk(s); - r0 = (s.oMinX___281591 - s.nMinX___281609); - s.tmp_1.arg0 = r0; - s.callLocIdx = 241; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P271981_mk(s); - r0 = (s.oMaxX___281597 - s.nMaxX___281615); - s.tmp_3.arg0 = r0; - s.callLocIdx = 243; s.pc = 11; return s.tmp_3; - case 11: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.xDiff___281627 = (r0); - s.tmp_1 = Fx_abs__P271981_mk(s); - r0 = (s.oMinY___281594 - s.nMinY___281612); - s.tmp_1.arg0 = r0; - s.callLocIdx = 246; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P271981_mk(s); - r0 = (s.oMaxY___281603 - s.nMaxY___281621); - s.tmp_3.arg0 = r0; - s.callLocIdx = 248; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.yDiff___281638 = (r0); - r0 = (s.xDiff___281627 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["ox"] = (s.nMinX___281609); - r0 = s.newHitBox___281586.fields["width"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["width"] = (s.tmp_0); - case 3: + r0 = (s.v___32691 - s.tmp_0); + s.newVolume___32697 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P22231_mk(s); + s.tmp_0.arg0 = s.newVolume___32697; + s.callLocIdx = 1144; s.pc = 4; return s.tmp_0; case 4: - r0 = (s.yDiff___281638 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["oy"] = (s.nMinY___281612); - r0 = s.newHitBox___281586.fields["height"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["height"] = (s.tmp_0); - case 5: - case 6: - r0 = s.newHitBox___281586.fields["hash"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["hash"] = (s.tmp_0); - case 7: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_updateIfInvalid__P274039.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} +scene_systemMenu_volumeDown__P22233.info = {"start":8914,"length":187,"line":278,"column":4,"endLine":283,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeDown","argumentNames":[]} -function game_Hitbox_updateIfInvalid__P274039_mk(s) { +function scene_systemMenu_volumeDown__P22233_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_updateIfInvalid__P274039, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_volumeDown__P22233, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - newHitBox___281586: undefined, - oMinX___281591: undefined, - oMinY___281594: undefined, - oMaxX___281597: undefined, - oMaxY___281603: undefined, - nMinX___281609: undefined, - nMinY___281612: undefined, - nMaxX___281615: undefined, - nMaxY___281621: undefined, - xDiff___281627: undefined, - yDiff___281638: undefined, - arg0: undefined, + v___32691: undefined, + remainder___32694: undefined, + newVolume___32697: undefined, } } -function Fx_abs__P271981(s) { +function scene_systemMenu_setVolume__P22231(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16740,28 +16846,33 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (0 - s.arg0); - { step = 3; continue; } - { step = 2; continue; } + s.tmp_0 = music_setVolume__P20543_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1138; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg0; - { step = 3; continue; } + r0 = s.retval; + s.tmp_0 = music_playTone__P20546_mk(s); + s.tmp_0.arg0 = 440; + s.tmp_0.arg1 = 500; + s.callLocIdx = 1139; s.pc = 2; return s.tmp_0; case 2: - r0 = undefined; + r0 = s.retval; + s.tmp_0 = settings_writeNumber__P20944_mk(s); + s.tmp_0.arg0 = "#volume"; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1140; s.pc = 3; return s.tmp_0; case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_abs__P271981.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} +scene_systemMenu_setVolume__P22231.info = {"start":8565,"length":166,"line":265,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setVolume","argumentNames":["newVolume"]} -function Fx_abs__P271981_mk(s) { +function scene_systemMenu_setVolume__P22231_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_abs__P271981, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setVolume__P22231, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -16771,7 +16882,7 @@ function Fx_abs__P271981_mk(s) { -function Sprite_sy__P274189(s) { +function music_playTone__P20546(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16781,73 +16892,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.id___32532 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_sy"]; + r0 = pxsim_pxtrt.mklocRef(); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_sy__P274189.info = {"start":5719,"length":61,"line":209,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"sy","argumentNames":["this"]} -Sprite_sy__P274189.isGetter = true; - -function Sprite_sy__P274189_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_sy__P274189, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Sprite_sx__P274187(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); + s.arg1 = (s.tmp_0); + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_2 = r0; + r0 = (s.tmp_2 == 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtrt_stlocRef(s.arg1, 86400000); + case 1: + case 2: + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= 2000); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = music_playNoteCore__P20545_mk(s); + s.tmp_2.arg0 = 0; + s.tmp_2.arg1 = s.arg0; + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_2.arg2 = r0; + s.callLocIdx = 65; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + s.tmp_0 = pause__P20415_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_0.arg0 = r0; + s.callLocIdx = 66; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + r0 = (globals.playToneID___20548 + 1); + s.tmp_0 = r0; + globals.playToneID___20548 = (r0); + s.id___32532 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P32538); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___32532); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg0); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_sx__P274187.info = {"start":5287,"length":61,"line":196,"column":4,"endLine":198,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"sx","argumentNames":["this"]} -Sprite_sx__P274187.isGetter = true; +music_playTone__P20546.info = {"start":2612,"length":831,"line":84,"column":4,"endLine":109,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playTone","argumentNames":["frequency","ms"]} -function Sprite_sx__P274187_mk(s) { +function music_playTone__P20546_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_sx__P274187, depth: s.depth + 1, + parent: s, fn: music_playTone__P20546, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + id___32532: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_fy__P274186(s) { +function music_playTone_inline__P32538(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16857,51 +16977,106 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P271946_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 325; s.pc = 1; return s.tmp_3; + s.pos___32539 = undefined; + s.now___32549 = undefined; + s.d___32552 = undefined; + s.t___32556 = undefined; + r0 = pxsim.control.millis(); + s.pos___32539 = (r0); case 1: + r0 = (s.caps[0] == globals.playToneID___20548); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } + case 2: + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + case 3: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 6; continue; } + r0 = pxsim.control.millis(); + s.now___32549 = (r0); + r0 = (s.pos___32539 - s.now___32549); + s.d___32552 = (r0); + s.tmp_0 = Math_min__P20177_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 500; + s.callLocIdx = 67; s.pc = 7; return s.tmp_0; + case 7: r0 = s.retval; + s.t___32556 = (r0); + s.tmp_0 = r0 = s.caps[1]; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); + r0 = (s.tmp_2 - s.t___32556); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = (s.pos___32539 + s.t___32556); + s.pos___32539 = (r0); + s.tmp_0 = music_playNoteCore__P20545_mk(s); + r0 = (s.d___32552 - 1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.caps[2]; + s.tmp_0.arg2 = s.t___32556; + s.callLocIdx = 68; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0; + r0 = (s.tmp_1 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_2 = pause__P20415_mk(s); + r0 = (s.d___32552 + s.t___32556); + s.tmp_2.arg0 = r0; + s.callLocIdx = 69; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + { step = 5; continue; } + case 4: + s.tmp_0 = pause__P20415_mk(s); + r0 = (s.d___32552 + s.t___32556); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 100); + s.tmp_0.arg0 = r0; + s.callLocIdx = 70; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + case 5: + { step = 1; continue; } + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_fy__P274186.info = {"start":5109,"length":64,"line":191,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this","v"]} +music_playTone_inline__P32538.info = {"start":2911,"length":515,"line":93,"column":34,"endLine":107,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} -function Sprite_fy__P274186_mk(s) { +function music_playTone_inline__P32538_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P274186, depth: s.depth + 1, + parent: s, fn: music_playTone_inline__P32538, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, + pos___32539: undefined, + now___32549: undefined, + d___32552: undefined, + t___32556: undefined, } } -function Sprite_fy__P274185(s) { +function music_playNoteCore__P20545(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16911,35 +17086,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.buf___32586 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_fy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim.control.createBuffer(12); + s.buf___32586 = (r0); + s.tmp_0 = music_addNote__P20565_mk(s); + s.tmp_0.arg0 = s.buf___32586; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = 255; + s.tmp_0.arg4 = 255; + s.tmp_0.arg5 = 3; + s.tmp_0.arg6 = s.arg1; + s.tmp_1 = music_volume__P20544_mk(s); + s.callLocIdx = 63; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg7 = r0; + s.tmp_0.arg8 = s.arg1; + s.callLocIdx = 64; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___32586); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_fy__P274185.info = {"start":4947,"length":60,"line":186,"column":4,"endLine":188,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this"]} -Sprite_fy__P274185.isGetter = true; +music_playNoteCore__P20545.info = {"start":1877,"length":240,"line":66,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playNoteCore","argumentNames":["when","frequency","ms"]} -function Sprite_fy__P274185_mk(s) { +function music_playNoteCore__P20545_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P274185, depth: s.depth + 1, + parent: s, fn: music_playNoteCore__P20545, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + buf___32586: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_fx__P274184(s) { +function music_addNote__P20565(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16952,48 +17149,88 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); + s.arg7 = (s.lambdaArgs[7]); + s.arg8 = (s.lambdaArgs[8]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); + r0 = (s.arg2 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.BufferMethods.setNumber(s.arg0, 2, s.arg1, s.arg5); s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P271946_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 322; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; + r0 = (s.arg1 + 1); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 2, s.tmp_1, 0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 2); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg6); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 4); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg2); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 6); + s.tmp_1 = r0; + r0 = (s.arg3 * s.arg7); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 6); s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 8); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_fx"] = (s.tmp_1); - r0 = undefined; + r0 = (s.arg4 * s.arg7); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 6); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.tmp_2); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 10); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg8); + r0 = (s.arg1 + 12); + s.arg1 = (r0); + case 1: + case 2: + r0 = pxsim.BufferMethods.setNumber(s.arg0, 2, s.arg1, 0); + r0 = s.arg1; return leave(s, r0) default: oops() } } } -Sprite_fx__P274184.info = {"start":4766,"length":64,"line":181,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} +music_addNote__P20565.info = {"start":10288,"length":911,"line":323,"column":4,"endLine":336,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"addNote","argumentNames":["sndInstr","sndInstrPtr","ms","beg","end","soundWave","hz","volume","endHz"]} -function Sprite_fx__P274184_mk(s) { +function music_addNote__P20565_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P274184, depth: s.depth + 1, + parent: s, fn: music_addNote__P20565, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, + arg8: undefined, } } -function Sprite_fx__P274183(s) { +function music_setVolume__P20543(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17007,23 +17244,40 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_fx"]; + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_0.arg1 = 255; + r0 = (s.arg0 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 60; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + globals.globalVolume___20538 = (r0); + r0 = (globals.globalVolume___20538 > 0); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 1; + { step = 2; continue; } + case 1: + r0 = 0; + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = undefined; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_fx__P274183.info = {"start":4604,"length":60,"line":176,"column":4,"endLine":178,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this"]} -Sprite_fx__P274183.isGetter = true; +music_setVolume__P20543.info = {"start":1533,"length":153,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"setVolume","argumentNames":["volume"]} -function Sprite_fx__P274183_mk(s) { +function music_setVolume__P20543_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P274183, depth: s.depth + 1, + parent: s, fn: music_setVolume__P20543, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -17031,7 +17285,7 @@ function Sprite_fx__P274183_mk(s) { -function Sprite_ay__P274182(s) { +function music_enableAmp__P20541(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17043,40 +17297,27 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_ay__P274182.info = {"start":4435,"length":51,"line":170,"column":4,"endLine":172,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this","v"]} +music_enableAmp__P20541.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} -function Sprite_ay__P274182_mk(s) { +function music_enableAmp__P20541_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P274182, depth: s.depth + 1, + parent: s, fn: music_enableAmp__P20541, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_ay__P274181(s) { +function scene_systemMenu_volumeUp__P22232(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17086,35 +17327,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_ay"]; + s.v___32500 = undefined; + s.remainder___32503 = undefined; + s.newVolume___32506 = undefined; + s.tmp_0 = music_volume__P20544_mk(s); + s.callLocIdx = 1141; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.v___32500 = (r0); + r0 = (s.v___32500 % 32); + s.remainder___32503 = (r0); + r0 = (s.v___32500 + 32); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = (s.tmp_0 - s.remainder___32503); + s.newVolume___32506 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P22231_mk(s); + s.tmp_0.arg0 = s.newVolume___32506; + s.callLocIdx = 1142; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_ay__P274181.info = {"start":4269,"length":60,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this"]} -Sprite_ay__P274181.isGetter = true; +scene_systemMenu_volumeUp__P22232.info = {"start":8737,"length":171,"line":271,"column":4,"endLine":276,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeUp","argumentNames":[]} -function Sprite_ay__P274181_mk(s) { +function scene_systemMenu_volumeUp__P22232_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P274181, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_volumeUp__P22232, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + v___32500: undefined, + remainder___32503: undefined, + newVolume___32506: undefined, } } -function Sprite_ax__P274180(s) { +function scene_systemMenu_MenuOption_constructor__P22222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17127,39 +17380,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ax"] = (s.tmp_1); + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = (s.arg0).fields["iconImage"] = (s.arg1); + r0 = (s.arg0).fields["getText"] = (s.arg2); + r0 = (s.arg0).fields["action"] = (s.arg3); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_ax__P274180.info = {"start":4096,"length":51,"line":159,"column":4,"endLine":161,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} +scene_systemMenu_MenuOption_constructor__P22222.info = {"start":786,"length":108,"line":38,"column":8,"endLine":39,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["this","iconImage","getText","action"]} -function Sprite_ax__P274180_mk(s) { +function scene_systemMenu_MenuOption_constructor__P22222_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P274180, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_constructor__P22222, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_ax__P274179(s) { +function helpers_screenBrightness__P20852(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17173,23 +17424,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_ax"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = globals.brightness___20826; + return leave(s, r0) default: oops() } } } -Sprite_ax__P274179.info = {"start":3930,"length":60,"line":154,"column":4,"endLine":156,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this"]} -Sprite_ax__P274179.isGetter = true; +helpers_screenBrightness__P20852.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} -function Sprite_ax__P274179_mk(s) { +function helpers_screenBrightness__P20852_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P274179, depth: s.depth + 1, + parent: s, fn: helpers_screenBrightness__P20852, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -17197,7 +17442,7 @@ function Sprite_ax__P274179_mk(s) { -function Sprite_vy__P274178(s) { +function music_volume__P20544(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17207,42 +17452,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - r0 = undefined; + s.tmp_0 = music_initVolume__P20542_mk(s); + s.callLocIdx = 62; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals.globalVolume___20538; return leave(s, r0) default: oops() } } } -Sprite_vy__P274178.info = {"start":3757,"length":51,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} +music_volume__P20544.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} -function Sprite_vy__P274178_mk(s) { +function music_volume__P20544_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P274178, depth: s.depth + 1, + parent: s, fn: music_volume__P20544, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, - arg1: undefined, } } -function Sprite_vy__P274177(s) { +function music_initVolume__P20542(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17252,35 +17484,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_vy"]; + r0 = (globals.globalVolume___20538 === null); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + globals.globalVolume___20538 = (0); + s.tmp_0 = music_setVolume__P20543_mk(s); + r0 = pxsim_pxtcore.getConfig(59, 128); + s.tmp_0.arg0 = r0; + s.callLocIdx = 59; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_vy__P274177.info = {"start":3595,"length":60,"line":143,"column":4,"endLine":145,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this"]} -Sprite_vy__P274177.isGetter = true; +music_initVolume__P20542.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} -function Sprite_vy__P274177_mk(s) { +function music_initVolume__P20542_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P274177, depth: s.depth + 1, + parent: s, fn: music_initVolume__P20542, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function Sprite_vx__P274176(s) { +function helpers_arrayConcat__P20158(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17290,33 +17525,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.out___32221 = undefined; + s.value___32224 = undefined; + s.unnamed138___U2 = undefined; + s.unnamed139___U3 = undefined; + s.value___32231 = undefined; + s.unnamed140___U5 = undefined; + s.unnamed141___U6 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_Array__mk(); + s.out___32221 = (r0); + s.value___32224 = (undefined); + s.unnamed138___U2 = (s.arg0); + s.unnamed139___U3 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed139___U3; + r0 = pxsim_Array__length(s.unnamed138___U2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - r0 = undefined; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed138___U2, s.unnamed139___U3); + s.value___32224 = (r0); + r0 = pxsim_Array__push(s.out___32221, s.value___32224); + r0 = (s.unnamed139___U3 + 1); + s.unnamed139___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed138___U2 = (undefined); + s.value___32231 = (undefined); + s.unnamed140___U5 = (s.arg1); + s.unnamed141___U6 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed141___U6; + r0 = pxsim_Array__length(s.unnamed140___U5); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed140___U5, s.unnamed141___U6); + s.value___32231 = (r0); + r0 = pxsim_Array__push(s.out___32221, s.value___32231); + r0 = (s.unnamed141___U6 + 1); + s.unnamed141___U6 = (r0); + { step = 3; continue; } + case 4: + s.unnamed140___U5 = (undefined); + r0 = s.out___32221; return leave(s, r0) default: oops() } } } -Sprite_vx__P274176.info = {"start":3426,"length":51,"line":137,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this","v"]} +helpers_arrayConcat__P20158.info = {"start":8639,"length":264,"line":288,"column":4,"endLine":297,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayConcat","argumentNames":["arr","otherArr"]} -function Sprite_vx__P274176_mk(s) { +function helpers_arrayConcat__P20158_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P274176, depth: s.depth + 1, + parent: s, fn: helpers_arrayConcat__P20158, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + out___32221: undefined, + value___32224: undefined, + unnamed138___U2: undefined, + unnamed139___U3: undefined, + value___32231: undefined, + unnamed140___U5: undefined, + unnamed141___U6: undefined, arg0: undefined, arg1: undefined, } } @@ -17325,45 +17601,7 @@ function Sprite_vx__P274176_mk(s) { -function Sprite_vx__P274175(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_vx__P274175.info = {"start":3264,"length":60,"line":132,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this"]} -Sprite_vx__P274175.isGetter = true; - -function Sprite_vx__P274175_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_vx__P274175, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function sprites_BaseSprite_constructor__P273913(s) { +function scene_systemMenu_PauseMenu_constructor__P22230(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17376,48 +17614,58 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_z__P273916_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 130; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = (s.arg0).fields["generator"] = (s.arg1); + s.tmp_0 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - s.tmp_0 = scene_Scene_addSprite__P274687_mk(s); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 131; s.pc = 3; return s.tmp_1; + s.tmp_1 = scene_systemMenu_buildMenuTheme__P22243_mk(s); + r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___22257); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 3; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.callLocIdx = 1065; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 132; s.pc = 2; return s.tmp_0; case 2: - r0 = s.retval; + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = (s.arg0).fields["theme"] = (s.tmp_2); + r0 = (s.arg0).fields["scrollRow"] = (0); + r0 = (s.arg0).fields["scrollOffset"] = (0); + r0 = (s.arg0).fields["scrollTarget"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite_constructor__P273913.info = {"start":344,"length":170,"line":15,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"inline","argumentNames":["this","z"]} +scene_systemMenu_PauseMenu_constructor__P22230.info = {"start":3029,"length":257,"line":116,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["this","generator","theme"]} -function sprites_BaseSprite_constructor__P273913_mk(s) { +function scene_systemMenu_PauseMenu_constructor__P22230_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_constructor__P273913, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_constructor__P22230, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function scene_Scene_addSprite__P274687(s) { +function scene_systemMenu_buildMenuTheme__P22243(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17427,186 +17675,150 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.cardsPerRow___32737 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + r0 = pxsim_ImageMethods.width(globals.screen___20904); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["spriteNextId"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = (s.arg0 + s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spriteNextId"] = (s.tmp_1); - s.tmp_3 = if_id_2_mk(s); - s.tmp_3.arg0 = s.arg1; - s.tmp_3.arg1 = s.tmp_2; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_3.arg0, "id", s.tmp_3.arg1); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["set/id"]; - if (s.tmp_3.fn === null) { s.tmp_3.arg0.fields["id"] = s.tmp_3.arg1; } - else if (s.tmp_3.fn === undefined) { failedCast(s.tmp_3.arg0) } - else { s.callLocIdx = 930; s.pc = 1; return s.tmp_3; } - } + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); + s.cardsPerRow___32737 = (r0); + s.tmp_0 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Scene_addSprite__P274687.info = {"start":7218,"length":128,"line":200,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} - -function scene_Scene_addSprite__P274687_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Scene_addSprite__P274687, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function sprites_BaseSprite_z__P273916(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; + r0 = globals.font8___20856; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.tmp_1 !== s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["_z"] = (s.arg1); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 133; s.pc = 3; return s.tmp_1; + s.arg2 = (s.tmp_1); + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } case 3: + s.tmp_1 = image_doubledFont__P20860_mk(s); + s.tmp_1.arg0 = s.arg2; + s.callLocIdx = 1175; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + s.arg3 = (s.tmp_2); + r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; - r0 = s.tmp_0.fields["flags"]; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardSpacing", s.arg1); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardWidth", s.arg0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardsPerRow", s.cardsPerRow___32737); + r0 = pxsim_ImageMethods.width(globals.screen___20904); s.tmp_3 = r0; - r0 = (s.tmp_3 | 1); + r0 = (s.cardsPerRow___32737 * s.arg0); + s.tmp_5 = r0; + r0 = (s.cardsPerRow___32737 - 1); + s.tmp_7 = r0; + r0 = (s.tmp_7 * s.arg1); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); - case 1: - case 2: - r0 = undefined; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "padding", s.tmp_1); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "infoFont", s.arg2); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "headerFont", s.arg3); + s.tmp_11 = if_charHeight_1_mk(s); + s.tmp_11.arg0 = s.arg3; + if (!s.tmp_11.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "charHeight"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["charHeight"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["charHeight"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 1176; s.pc = 6; return s.tmp_11; } + } + case 6: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 + 2); + s.tmp_9 = r0; + r0 = (s.tmp_9 + s.arg1); + s.tmp_8 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardsTop", s.tmp_8); + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_14 = r0; + s.tmp_16 = if_charHeight_1_mk(s); + s.tmp_16.arg0 = s.arg2; + if (!s.tmp_16.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_16.arg0, "charHeight"); + } else { + s.tmp_16.fn = s.tmp_16.arg0.vtable.iface["charHeight"]; + if (s.tmp_16.fn == null) { s.retval = s.tmp_16.arg0.fields["charHeight"]; } + else if (!s.tmp_16.fn.isGetter) { s.retval = bind(s.tmp_16); } + else { s.callLocIdx = 1177; s.pc = 7; return s.tmp_16; } + } + case 7: + r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_14 - s.tmp_15); + s.tmp_13 = r0; + r0 = (s.tmp_13 - 2); + s.tmp_12 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "infoTop", s.tmp_12); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "headerText", "PAUSED"); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "selectedCard", globals.CARD_SELECTED___22260); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___22263); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___22257); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -sprites_BaseSprite_z__P273916.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} +scene_systemMenu_buildMenuTheme__P22243.info = {"start":11654,"length":906,"line":356,"column":4,"endLine":375,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildMenuTheme","argumentNames":["cardWidth","cardSpacing","infoFont","headerFont"]} -function sprites_BaseSprite_z__P273916_mk(s) { +function scene_systemMenu_buildMenuTheme__P22243_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P273916, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildMenuTheme__P22243, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + cardsPerRow___32737: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function sprites_BaseSprite_z__P273915(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; - return leaveAccessor(s, r0) - default: oops() -} } } -sprites_BaseSprite_z__P273915.info = {"start":591,"length":55,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this"]} -sprites_BaseSprite_z__P273915.isGetter = true; - -function sprites_BaseSprite_z__P273915_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSprite_z__P273915, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function controller__setUserEventsEnabled__P274023(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - globals._userEventsEnabled___276601 = (s.arg0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller__setUserEventsEnabled__P274023.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} - -function controller__setUserEventsEnabled__P274023_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller__setUserEventsEnabled__P274023, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function controller_Button_isPressed__P274017(s) { +function image_doubledFont__P20860(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17620,19 +17832,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + s.tmp_0 = image_scaledFont__P20861_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 2; + s.callLocIdx = 89; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -controller_Button_isPressed__P274017.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} +image_doubledFont__P20860.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} -function controller_Button_isPressed__P274017_mk(s) { +function image_doubledFont__P20860_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_isPressed__P274017, depth: s.depth + 1, + parent: s, fn: image_doubledFont__P20860, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -17640,7 +17856,7 @@ function controller_Button_isPressed__P274017_mk(s) { -function console_inspect__P272198(s) { +function image_scaledFont__P20861(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17650,214 +17866,117 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.asArr___284233 = undefined; - s.asString___284251 = undefined; - s.keys___284263 = undefined; - s.snipped___284267 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore.typeOf(s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_1 == "string"); + r0 = (s.arg1 | 0); + s.arg1 = (r0); + r0 = (s.arg1 < 2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.arg0; - { step = 17; continue; } - { step = 16; continue; } + { step = 5; continue; } case 1: - r0 = pxsim_pxtcore.typeOf(s.arg0); - s.tmp_3 = r0; - r0 = (s.tmp_3 == "number"); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = pxsim_String_.mkEmpty(); - s.tmp_4 = r0; - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 18: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); - { step = 17; continue; } - { step = 15; continue; } case 2: - r0 = pxsim_Array_.isArray(s.arg0); - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 5; continue; } - s.asArr___284233 = (s.arg0); - r0 = pxsim_Array__length(s.asArr___284233); + r0 = pxsim_pxtrt.mkMap(); s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = helpers_arrayJoin__P271919_mk(s); - s.tmp_2.arg0 = s.asArr___284233; - s.tmp_2.arg1 = ","; - s.callLocIdx = 35; s.pc = 19; return s.tmp_2; - case 19: - r0 = s.retval; - { step = 17; continue; } - { step = 4; continue; } - case 3: - r0 = pxsim_String_.mkEmpty(); - s.tmp_4 = r0; - s.tmp_7 = helpers_arrayJoin__P271919_mk(s); - s.tmp_8 = helpers_arraySlice__P271931_mk(s); - s.tmp_8.arg0 = s.asArr___284233; - s.tmp_8.arg1 = 0; - s.tmp_8.arg2 = s.arg1; - s.callLocIdx = 36; s.pc = 21; return s.tmp_8; - case 21: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = ","; - s.callLocIdx = 37; s.pc = 20; return s.tmp_7; - case 20: - r0 = s.retval; - s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 22); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 22: + s.tmp_4 = if_charWidth_1_mk(s); + s.tmp_4.arg0 = s.arg0; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charWidth"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charWidth"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 90; s.pc = 6; return s.tmp_4; } + } + case 6: r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat(s.tmp_4, s.tmp_5); s.tmp_3 = r0; - r0 = pxsim_String__concat(s.tmp_3, "..."); - { step = 17; continue; } - case 4: - { step = 14; continue; } - case 5: - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 23); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 23: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_10 = r0; - r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); - s.asString___284251 = (r0); - r0 = (s.asString___284251 != "[object Object]"); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - r0 = (s.asString___284251 != "[Object]"); + r0 = (s.tmp_3 * s.arg1); + s.tmp_2 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charWidth", s.tmp_2); + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = s.arg0; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); + } else { + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 91; s.pc = 7; return s.tmp_7; } + } case 7: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = s.asString___284251; - { step = 17; continue; } - case 8: - case 9: - r0 = pxsim_pxtrt.keysOf(s.arg0); - s.keys___284263 = (r0); - r0 = pxsim_Array__length(s.keys___284263); - s.tmp_0 = r0; - r0 = (s.tmp_0 > s.arg1); - s.snipped___284267 = (r0); - r0 = pxsim_numops_toBoolDecr(s.snipped___284267); - if (!r0) { step = 10; continue; } - s.tmp_0 = helpers_arraySlice__P271931_mk(s); - s.tmp_0.arg0 = s.keys___284263; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 38; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.keys___284263 = (r0); - case 10: - case 11: - r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P284284); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_numops_toBoolDecr(s.snipped___284267); - if (!r0) { step = 12; continue; } - r0 = "\n ..."; - { step = 13; continue; } - case 12: - r0 = pxsim_String_.mkEmpty(); - case 13: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_7 = helpers_arrayReduce__P271928_mk(s); - s.tmp_7.arg0 = s.keys___284263; - s.tmp_7.arg1 = s.tmp_0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_7.arg2 = r0; - s.callLocIdx = 39; s.pc = 25; return s.tmp_7; - case 25: r0 = s.retval; s.tmp_6 = r0; - if ((s.tmp_6) && (s.tmp_6).vtable) { - setupResume(s, 26); - pxsim_String__stringConv(s.tmp_6); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_6) + ""; } - case 26: - r0 = s.retval; + r0 = (s.tmp_6 * s.arg1); s.tmp_5 = r0; - if ((s.tmp_1) && (s.tmp_1).vtable) { - setupResume(s, 27); - pxsim_String__stringConv(s.tmp_1); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_1) + ""; } - case 27: + r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charHeight", s.tmp_5); + s.tmp_9 = if_data_1_mk(s); + s.tmp_9.arg0 = s.arg0; + if (!s.tmp_9.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "data"); + } else { + s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["data"]; + if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["data"]; } + else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } + else { s.callLocIdx = 92; s.pc = 8; return s.tmp_9; } + } + case 8: r0 = s.retval; s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_8); - s.tmp_4 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 28); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 28: + r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "data", s.tmp_8); + s.tmp_11 = if_multiplier_1_mk(s); + s.tmp_11.arg0 = s.arg0; + if (!s.tmp_11.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "multiplier"); + } else { + s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["multiplier"]; + if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["multiplier"]; } + else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } + else { s.callLocIdx = 93; s.pc = 9; return s.tmp_11; } + } + case 9: r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_String__concat("{", s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, "\n}"); - { step = 17; continue; } - case 14: - case 15: - case 16: - r0 = undefined; - case 17: + s.tmp_10 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_10); + if (!r0) { step = 3; continue; } + s.tmp_12 = r0 = s.arg1; + s.tmp_14 = if_multiplier_1_mk(s); + s.tmp_14.arg0 = s.arg0; + if (!s.tmp_14.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "multiplier"); + } else { + s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["multiplier"]; + if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["multiplier"]; } + else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } + else { s.callLocIdx = 94; s.pc = 10; return s.tmp_14; } + } + case 10: + r0 = s.retval; + s.tmp_13 = r0; + r0 = (s.tmp_12 * s.tmp_13); + { step = 4; continue; } + case 3: + r0 = s.arg1; + case 4: + // jmp value (already in r0) + s.tmp_15 = r0; + r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "multiplier", s.tmp_15); + r0 = s.tmp_1; + case 5: return leave(s, r0) default: oops() } } } -console_inspect__P272198.info = {"start":2271,"length":1190,"line":81,"column":4,"endLine":114,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]} +image_scaledFont__P20861.info = {"start":12096,"length":331,"line":150,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"scaledFont","argumentNames":["f","size"]} -function console_inspect__P272198_mk(s) { +function image_scaledFont__P20861_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect__P272198, depth: s.depth + 1, + parent: s, fn: image_scaledFont__P20861, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17870,10 +17989,11 @@ function console_inspect__P272198_mk(s) { tmp_8: undefined, tmp_9: undefined, tmp_10: undefined, - asArr___284233: undefined, - asString___284251: undefined, - keys___284263: undefined, - snipped___284267: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, arg0: undefined, arg1: undefined, } } @@ -17882,7 +18002,7 @@ function console_inspect__P272198_mk(s) { -function console_inspect_inline__P284284(s) { +function scene_systemMenu_PauseMenu_show__P22224(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17892,65 +18012,300 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.current___31035 = undefined; + s.i___31036 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - if ((s.arg0) && (s.arg0).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.arg0); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg0) + ""; } - case 1: + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = if_generator_1_mk(s); + s.tmp_2.arg0 = s.arg0; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "generator"), 1); + s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["generator"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["generator"], 1); s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1066; s.pc = 3; return s.tmp_2;; } + else { s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; } + } + case 3: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["options"] = (s.tmp_1); + r0 = (s.arg0).fields["selection"] = (0); + s.i___31036 = (0); + case 1: + s.tmp_1 = r0 = s.i___31036; + r0 = s.arg0.fields["options"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - if ((s.arg1) && (s.arg1).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.arg1); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg1) + ""; } - case 2: - r0 = s.retval; - s.tmp_5 = r0; - r0 = pxsim_String__concat("\n ", s.tmp_5); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + r0 = s.arg0.fields["options"]; s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ": "); - s.tmp_3 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.caps[0], s.arg1); - s.tmp_7 = r0; - if ((s.tmp_7) && (s.tmp_7).vtable) { - setupResume(s, 3); - pxsim_String__stringConv(s.tmp_7); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_7) + ""; } - case 3: + r0 = pxsim_Array__getAt(s.tmp_4, s.i___31036); + s.current___31035 = (r0); + s.tmp_0 = scene_systemMenu_MenuOption_show__P22215_mk(s); + s.tmp_0.arg0 = s.current___31035; + s.callLocIdx = 1067; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_6); - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 4); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 4: + s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P22218_mk(s); + s.tmp_0.arg0 = s.current___31035; + r0 = s.arg0.fields["theme"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1068; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_MenuOption_position__P22216_mk(s); + s.tmp_0.arg0 = s.current___31035; + s.tmp_2 = if_padding_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "padding"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["padding"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["padding"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1069; s.pc = 7; return s.tmp_2; } + } + case 7: r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + s.tmp_5 = r0 = s.i___31036; + s.tmp_7 = if_cardsPerRow_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_7.arg0 = r0; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "cardsPerRow"); + } else { + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 1070; s.pc = 8; return s.tmp_7; } + } + case 8: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_5 % s.tmp_6); + s.tmp_4 = r0; + s.tmp_10 = if_cardWidth_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_10.arg0 = r0; + if (!s.tmp_10.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_10.arg0, "cardWidth"); + } else { + s.tmp_10.fn = s.tmp_10.arg0.vtable.iface["cardWidth"]; + if (s.tmp_10.fn == null) { s.retval = s.tmp_10.arg0.fields["cardWidth"]; } + else if (!s.tmp_10.fn.isGetter) { s.retval = bind(s.tmp_10); } + else { s.callLocIdx = 1071; s.pc = 9; return s.tmp_10; } + } + case 9: + r0 = s.retval; + s.tmp_9 = r0; + s.tmp_12 = if_cardSpacing_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_12.arg0 = r0; + if (!s.tmp_12.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "cardSpacing"); + } else { + s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["cardSpacing"]; + if (s.tmp_12.fn == null) { s.retval = s.tmp_12.arg0.fields["cardSpacing"]; } + else if (!s.tmp_12.fn.isGetter) { s.retval = bind(s.tmp_12); } + else { s.callLocIdx = 1072; s.pc = 10; return s.tmp_12; } + } + case 10: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_9 + s.tmp_11); + s.tmp_8 = r0; + r0 = (s.tmp_4 * s.tmp_8); + s.tmp_3 = r0; + r0 = (s.tmp_1 + s.tmp_3); + s.tmp_0.arg1 = r0; + s.tmp_14 = if_cardsTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_14.arg0 = r0; + if (!s.tmp_14.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "cardsTop"); + } else { + s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["cardsTop"]; + if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["cardsTop"]; } + else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } + else { s.callLocIdx = 1073; s.pc = 11; return s.tmp_14; } + } + case 11: + r0 = s.retval; + s.tmp_13 = r0; + s.tmp_17 = r0 = s.i___31036; + s.tmp_19 = if_cardsPerRow_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_19.arg0 = r0; + if (!s.tmp_19.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_19.arg0, "cardsPerRow"); + } else { + s.tmp_19.fn = s.tmp_19.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_19.fn == null) { s.retval = s.tmp_19.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_19.fn.isGetter) { s.retval = bind(s.tmp_19); } + else { s.callLocIdx = 1074; s.pc = 12; return s.tmp_19; } + } + case 12: + r0 = s.retval; + s.tmp_18 = r0; + r0 = pxsim.Math_.idiv(s.tmp_17, s.tmp_18); + s.tmp_16 = r0; + s.tmp_22 = if_cardWidth_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_22.arg0 = r0; + if (!s.tmp_22.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_22.arg0, "cardWidth"); + } else { + s.tmp_22.fn = s.tmp_22.arg0.vtable.iface["cardWidth"]; + if (s.tmp_22.fn == null) { s.retval = s.tmp_22.arg0.fields["cardWidth"]; } + else if (!s.tmp_22.fn.isGetter) { s.retval = bind(s.tmp_22); } + else { s.callLocIdx = 1075; s.pc = 13; return s.tmp_22; } + } + case 13: + r0 = s.retval; + s.tmp_21 = r0; + s.tmp_24 = if_cardSpacing_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_24.arg0 = r0; + if (!s.tmp_24.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_24.arg0, "cardSpacing"); + } else { + s.tmp_24.fn = s.tmp_24.arg0.vtable.iface["cardSpacing"]; + if (s.tmp_24.fn == null) { s.retval = s.tmp_24.arg0.fields["cardSpacing"]; } + else if (!s.tmp_24.fn.isGetter) { s.retval = bind(s.tmp_24); } + else { s.callLocIdx = 1076; s.pc = 14; return s.tmp_24; } + } + case 14: + r0 = s.retval; + s.tmp_23 = r0; + r0 = (s.tmp_21 + s.tmp_23); + s.tmp_20 = r0; + r0 = (s.tmp_16 * s.tmp_20); + s.tmp_15 = r0; + r0 = (s.tmp_13 + s.tmp_15); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1077; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = (s.i___31036 + 1); + s.i___31036 = (r0); + { step = 1; continue; } + case 2: + s.tmp_0 = controller__setUserEventsEnabled__P21175_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 1078; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31104); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.A___20997; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1080; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31125); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.A___20997; + s.tmp_1.arg1 = 2052; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1082; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P21144_mk(s); + s.tmp_0.arg0 = globals.B___20999; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P31155; + s.callLocIdx = 1084; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P21144_mk(s); + s.tmp_0.arg0 = globals.menu___21009; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P31160; + s.callLocIdx = 1086; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31165); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.up___21003; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1090; s.pc = 20; return s.tmp_1; + case 20: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31177); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.left___21001; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1093; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31186); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.down___21007; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1097; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31202); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P21144_mk(s); + s.tmp_1.arg0 = globals.right___21005; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1100; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P31214); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onShade__P21942_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1103; s.pc = 24; return s.tmp_1; + case 24: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P22226_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1104; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -console_inspect_inline__P284284.info = {"start":3293,"length":61,"line":108,"column":20,"endLine":108,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]} +scene_systemMenu_PauseMenu_show__P22224.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function console_inspect_inline__P284284_mk(s) { +function scene_systemMenu_PauseMenu_show__P22224_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect_inline__P284284, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show__P22224, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17960,15 +18315,33 @@ function console_inspect_inline__P284284_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, + tmp_24: undefined, + current___31035: undefined, + i___31036: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_arrayReduce__P271928(s) { +function scene_systemMenu_PauseMenu_show_inline__P31104(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17978,62 +18351,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___284311 = undefined; - s.i___284314 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__length(s.arg0); - s.len___284311 = (r0); - s.i___284314 = (0); - case 1: - r0 = (s.i___284314 < s.len___284311); + r0 = s.caps[0].fields["options"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = lambda_4_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.arg2; - r0 = pxsim_Array__getAt(s.arg0, s.i___284314); - s.tmp_1.arg1 = r0; - s.tmp_1.arg2 = s.i___284314; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 8; s.pc = 3; return s.tmp_1; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.caps[0].fields["options"]; + s.tmp_5 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + case 2: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 3; continue; } + { step = 5; continue; } case 3: + case 4: + s.tmp_8 = scene_systemMenu_MenuOption_setState__P22219_mk(s); + r0 = s.caps[0].fields["options"]; + s.tmp_9 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); + s.tmp_8.arg0 = r0; + s.tmp_8.arg1 = 1; + s.callLocIdx = 1079; s.pc = 6; return s.tmp_8; + case 6: r0 = s.retval; - s.arg2 = (r0); - r0 = (s.i___284314 + 1); - s.i___284314 = (r0); - { step = 1; continue; } - case 2: - r0 = s.arg2; + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayReduce__P271928.info = {"start":8316,"length":317,"line":280,"column":4,"endLine":286,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayReduce","argumentNames":["arr","callbackfn","initialValue"]} +scene_systemMenu_PauseMenu_show_inline__P31104.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function helpers_arrayReduce__P271928_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31104_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayReduce__P271928, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31104, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___284311: undefined, - i___284314: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, } } -function helpers_arrayJoin__P271919(s) { +function scene_systemMenu_PauseMenu_show_inline__P31125(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18043,133 +18429,64 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___284339 = undefined; - s.len___284340 = undefined; - s.i___284343 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg1 === undefined); + r0 = s.caps[0].fields["options"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = (s.arg1 === null); + r0 = s.caps[0].fields["options"]; + s.tmp_5 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_6 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); case 2: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); if (!r0) { step = 3; continue; } - s.arg1 = (","); + { step = 5; continue; } case 3: case 4: - r0 = pxsim_String_.mkEmpty(); - s.r___284339 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___284340 = (r0); - s.i___284343 = (0); - case 5: - r0 = (s.i___284343 < s.len___284340); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.i___284343 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBool(s.tmp_1); - if (r0) { step = 6; continue; } - r0 = s.tmp_1; - { step = 7; continue; } + s.tmp_8 = scene_systemMenu_MenuOption_setState__P22219_mk(s); + r0 = s.caps[0].fields["options"]; + s.tmp_9 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_10 = r0; + r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); + s.tmp_8.arg0 = r0; + s.tmp_8.arg1 = 0; + s.callLocIdx = 1081; s.pc = 6; return s.tmp_8; case 6: - r0 = s.arg1; - case 7: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 8; continue; } - if ((s.r___284339) && (s.r___284339).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.r___284339); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___284339) + ""; } - case 15: - r0 = s.retval; - s.tmp_3 = r0; - if ((s.arg1) && (s.arg1).vtable) { - setupResume(s, 16); - pxsim_String__stringConv(s.arg1); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg1) + ""; } - case 16: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.r___284339 = (r0); - case 8: - case 9: - r0 = pxsim_Array__getAt(s.arg0, s.i___284343); + r0 = s.caps[0].fields["options"]; s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 10; continue; } - r0 = s.tmp_0; - { step = 11; continue; } - case 10: - r0 = pxsim_Array__getAt(s.arg0, s.i___284343); + r0 = s.caps[0].fields["selection"]; s.tmp_2 = r0; - r0 = (s.tmp_2 === null); - case 11: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 12; continue; } - r0 = pxsim_String_.mkEmpty(); - { step = 13; continue; } - case 12: - r0 = pxsim_Array__getAt(s.arg0, s.i___284343); - case 13: - // jmp value (already in r0) - s.tmp_4 = r0; - if ((s.r___284339) && (s.r___284339).vtable) { - setupResume(s, 17); - pxsim_String__stringConv(s.r___284339); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___284339) + ""; } - case 17: - r0 = s.retval; - s.tmp_5 = r0; - if ((s.tmp_4) && (s.tmp_4).vtable) { - setupResume(s, 18); - pxsim_String__stringConv(s.tmp_4); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_4) + ""; } - case 18: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_6); - s.r___284339 = (r0); - r0 = (s.i___284343 + 1); - s.i___284343 = (r0); - { step = 5; continue; } - case 14: - r0 = s.r___284339; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + r0 = r0.fields["action"]; + s.tmp_0 = r0; + r0 = pxsim.control.runInParallel(s.tmp_0); + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayJoin__P271919.info = {"start":4133,"length":432,"line":157,"column":4,"endLine":170,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayJoin","argumentNames":["arr","sep"]} +scene_systemMenu_PauseMenu_show_inline__P31125.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function helpers_arrayJoin__P271919_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31125_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayJoin__P271919, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31125, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -18178,18 +18495,17 @@ function helpers_arrayJoin__P271919_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - r___284339: undefined, - len___284340: undefined, - i___284343: undefined, - arg0: undefined, - arg1: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, } } -function pauseUntil__P272183(s) { +function scene_systemMenu_PauseMenu_show_inline__P31155(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18199,77 +18515,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_0 = scene_systemMenu_closeMenu__P22240_mk(s); + s.callLocIdx = 1083; s.pc = 1; return s.tmp_0; case 1: - s.tmp_2 = lambda_1_mk(s); - s.tmp_2.argL = s.arg0; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 30; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 5; continue; } - s.arg1 = (0); - case 5: - case 6: - s.tmp_0 = control___queuePollEvent__P272182_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 31; s.pc = 9; return s.tmp_0; - case 9: r0 = s.retval; - case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -pauseUntil__P272183.info = {"start":2224,"length":227,"line":73,"column":0,"endLine":77,"endColumn":1,"fileName":"pxt_modules/base/poll.ts","functionName":"pauseUntil","argumentNames":["condition","timeOut"]} +scene_systemMenu_PauseMenu_show_inline__P31155.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function pauseUntil__P272183_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31155_mk(s) { checkStack(s.depth); return { - parent: s, fn: pauseUntil__P272183, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31155, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - arg0: undefined, - arg1: undefined, } } -function control___queuePollEvent__P272182(s) { +function scene_systemMenu_PauseMenu_show_inline__P31160(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18279,97 +18547,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ev___280061 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = pxsim_pxtcore_mkClassInstance(control_PollEvent__C276276_VT); - s.tmp_0 = r0; - s.tmp_1 = control_PollEvent_constructor__P276277_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = 1023; - r0 = pxsim.control.allocateNotifyEvent(); - s.tmp_1.arg2 = r0; - r0 = pxsim.control.millis(); - s.tmp_1.arg3 = r0; - s.tmp_1.arg4 = s.arg0; - s.tmp_1.arg5 = s.arg1; - r0 = pxsim_numops_toBoolDecr(s.arg2); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1.arg6 = r0; - s.callLocIdx = 28; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.ev___280061 = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___276279); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_2, s.ev___280061); - globals._pollEventQueue___276279 = (s.tmp_2); - r0 = pxsim.control.runInParallel(control_pollEvents__P276280); - { step = 2; continue; } + s.tmp_0 = scene_systemMenu_closeMenu__P22240_mk(s); + s.callLocIdx = 1085; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_Array__push(globals._pollEventQueue___276279, s.ev___280061); - case 2: - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_onEvent__P272207_mk(s); - r0 = s.ev___280061.fields["eid"]; - s.tmp_0.arg0 = r0; - r0 = s.ev___280061.fields["vid"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = 16; - s.callLocIdx = 29; s.pc = 6; return s.tmp_0; - case 6: r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = s.ev___280061.fields["eid"]; - s.tmp_0 = r0; - r0 = s.ev___280061.fields["vid"]; - s.tmp_1 = r0; - setupResume(s, 7); - pxsim.control.waitForEvent(s.tmp_0, s.tmp_1); - checkResumeConsumed(); - return; - case 7: - r0 = s.retval; - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -control___queuePollEvent__P272182.info = {"start":1262,"length":758,"line":39,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"__queuePollEvent","argumentNames":["timeOut","condition","handler"]} +scene_systemMenu_PauseMenu_show_inline__P31160.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function control___queuePollEvent__P272182_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31160_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___queuePollEvent__P272182, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31160, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - ev___280061: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_pollEvents__P276280(s) { +function scene_systemMenu_PauseMenu_show_inline__P31165(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18379,226 +18579,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.now___280188 = undefined; - s.i___280191 = undefined; - s.ev___280197 = undefined; - case 1: - r0 = pxsim_Array__length(globals._pollEventQueue___276279); - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = pxsim.control.millis(); - s.now___280188 = (r0); - s.i___280191 = (0); - case 2: - s.tmp_1 = r0 = s.i___280191; - r0 = pxsim_Array__length(globals._pollEventQueue___276279); + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P22226_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_1.arg0 = 0; + r0 = s.caps[0].fields["selection"]; s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = pxsim_Array__getAt(globals._pollEventQueue___276279, s.i___280191); - s.ev___280197 = (r0); - s.tmp_1 = if_condition_1_mk(s); - s.tmp_1.arg0 = s.ev___280197; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); - s.callLocIdx = 25; s.pc = 13; return s.tmp_1; + s.tmp_4 = if_cardsPerRow_1_mk(s); + r0 = s.caps[0].fields["theme"]; + s.tmp_4.arg0 = r0; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "cardsPerRow"); } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["condition"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["condition"], 1); s.callLocIdx = 25; s.pc = 13; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 25; s.pc = 13; return s.tmp_1;; } - else { s.callLocIdx = 25; s.pc = 13; return s.tmp_1; } + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 1087; s.pc = 3; return s.tmp_4; } } - case 13: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 6; continue; } case 3: - r0 = s.ev___280197.fields["timeOut"]; + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 > 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 4; continue; } - r0 = s.tmp_2; - { step = 5; continue; } - case 4: - r0 = s.ev___280197.fields["start"]; - s.tmp_5 = r0; - r0 = (s.now___280188 - s.tmp_5); - s.tmp_4 = r0; - r0 = s.ev___280197.fields["timeOut"]; - s.tmp_6 = r0; - r0 = (s.tmp_4 > s.tmp_6); - case 5: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 6: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 9; continue; } - r0 = s.ev___280197.fields["eid"]; - s.tmp_9 = r0; - r0 = s.ev___280197.fields["vid"]; - s.tmp_10 = r0; - r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); - r0 = s.ev___280197.fields["once"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = helpers_arraySplice__P271916_mk(s); - s.tmp_1.arg0 = globals._pollEventQueue___276279; - s.tmp_1.arg1 = s.i___280191; - s.tmp_1.arg2 = 1; - s.callLocIdx = 26; s.pc = 14; return s.tmp_1; - case 14: + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1088; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - r0 = (s.i___280191 - 1); - s.i___280191 = (r0); - case 7: - case 8: - case 9: - case 10: - r0 = (s.i___280191 + 1); - s.i___280191 = (r0); - { step = 2; continue; } - case 11: - s.tmp_0 = pause__P272229_mk(s); - s.tmp_0.arg0 = 50; - s.callLocIdx = 27; s.pc = 15; return s.tmp_0; - case 15: + s.tmp_0.arg1 = r0; + s.callLocIdx = 1089; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - { step = 1; continue; } - case 12: - globals._pollEventQueue___276279 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -control_pollEvents__P276280.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P31165.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function control_pollEvents__P276280_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31165_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pollEvents__P276280, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31165, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - now___280188: undefined, - i___280191: undefined, - ev___280197: undefined, -} } - - - - - -function control_PollEvent_constructor__P276277(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_PollEvent__C276276_VT)) failedCast(r0); - r0 = (s.arg0).fields["eid"] = (s.arg1); - r0 = (s.arg0).fields["vid"] = (s.arg2); - r0 = (s.arg0).fields["start"] = (s.arg3); - r0 = (s.arg0).fields["timeOut"] = (s.arg4); - r0 = (s.arg0).fields["condition"] = (s.arg5); - r0 = (s.arg0).fields["once"] = (s.arg6); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_PollEvent_constructor__P276277.info = {"start":239,"length":316,"line":8,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/base/poll.ts","functionName":"inline","argumentNames":["this","eid","vid","start","timeOut","condition","once"]} - -function control_PollEvent_constructor__P276277_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_PollEvent_constructor__P276277, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, -} } - - - - - -function ArrayBuffer_byteLength__P300770(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArrayBuffer__C300769_VT)) failedCast(r0); - r0 = s.arg0.fields["_byteLength"]; - return leaveAccessor(s, r0) - default: oops() -} } } -ArrayBuffer_byteLength__P300770.info = {"start":2242,"length":71,"line":61,"column":4,"endLine":63,"endColumn":5,"fileName":"arrayBuffer.ts","functionName":"byteLength","argumentNames":["this"]} -ArrayBuffer_byteLength__P300770.isGetter = true; - -function ArrayBuffer_byteLength__P300770_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArrayBuffer_byteLength__P300770, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, } } -function create__P315174(s) { +function scene_systemMenu_PauseMenu_show_inline__P31177(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18608,87 +18640,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buffer___315176 = undefined; - s.array___315181 = undefined; - s.i___315187 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_pxtcore_mkClassInstance(ArrayBuffer__C300769_VT); - s.tmp_0 = r0; - s.tmp_1 = ArrayBuffer_constructor__P300774_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = pxsim_Array__length(s.arg0); + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P22226_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P20176_mk(s); + s.tmp_1.arg0 = 0; + r0 = s.caps[0].fields["selection"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); s.tmp_1.arg1 = r0; - s.callLocIdx = 105; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.buffer___315176 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Uint8Array__C276205_VT); - s.tmp_0 = r0; - s.tmp_1 = Uint8Array_constructor__P276206_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 106; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.array___315181 = (s.tmp_0); - s.tmp_0 = TypedArray_fromArrayBuffer__P276178_mk(s); - s.tmp_0.arg0 = s.array___315181; - s.tmp_0.arg1 = s.buffer___315176; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = null; - s.callLocIdx = 107; s.pc = 5; return s.tmp_0; - case 5: + s.callLocIdx = 1091; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.i___315187 = (0); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1092; s.pc = 1; return s.tmp_0; case 1: - s.tmp_1 = r0 = s.i___315187; - r0 = pxsim_Array__length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_3 = TypedArray_set__P276186_mk(s); - s.tmp_3.arg0 = s.array___315181; - s.tmp_3.arg1 = s.i___315187; - r0 = pxsim_Array__getAt(s.arg0, s.i___315187); - s.tmp_3.arg2 = r0; - s.callLocIdx = 108; s.pc = 6; return s.tmp_3; - case 6: r0 = s.retval; - r0 = (s.i___315187 + 1); - s.i___315187 = (r0); - { step = 1; continue; } - case 2: - r0 = s.buffer___315176; + r0 = undefined; return leave(s, r0) default: oops() } } } -create__P315174.info = {"start":300,"length":298,"line":14,"column":0,"endLine":24,"endColumn":1,"fileName":"test.ts","functionName":"create","argumentNames":["bytes"]} +scene_systemMenu_PauseMenu_show_inline__P31177.info = {"start":4927,"length":89,"line":163,"column":53,"endLine":165,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function create__P315174_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31177_mk(s) { checkStack(s.depth); return { - parent: s, fn: create__P315174, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31177, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - buffer___315176: undefined, - array___315181: undefined, - i___315187: undefined, - arg0: undefined, } } -function TypedArray_set__P276186(s) { +function scene_systemMenu_PauseMenu_show_inline__P31186(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18698,88 +18685,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.bytes___279434 = undefined; - s.i___279438 = undefined; - s.o___279439 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, TypedArray__C276175_VT)) failedCast(r0); - r0 = (s.arg1 >>> 0); - s.arg1 = (r0); - r0 = s.arg0.fields["_length"]; - s.tmp_1 = r0; - r0 = (s.arg1 >= s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } - case 1: - case 2: - s.tmp_2 = if__pack_2_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg2; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "_pack"), 2); - s.callLocIdx = 78; s.pc = 6; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["_pack"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["_pack"], 2); s.callLocIdx = 78; s.pc = 6; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 78; s.pc = 6; return s.tmp_2;; } - else { s.callLocIdx = 78; s.pc = 6; return s.tmp_2; } - } - case 6: - r0 = s.retval; - s.bytes___279434 = (r0); - s.i___279438 = (0); - r0 = s.arg0.fields["_byteOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P22226_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P20177_mk(s); + r0 = s.caps[0].fields["options"]; s.tmp_3 = r0; - r0 = (s.arg1 * s.tmp_3); + r0 = pxsim_Array__length(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - s.o___279439 = (r0); - r0 = s.tmp_0; + r0 = (s.tmp_2 - 1); + s.tmp_1.arg0 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_4 = r0; + s.tmp_6 = if_cardsPerRow_1_mk(s); + r0 = s.caps[0].fields["theme"]; + s.tmp_6.arg0 = r0; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "cardsPerRow"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1094; s.pc = 3; return s.tmp_6; } + } case 3: - r0 = s.arg0.fields["BYTES_PER_ELEMENT"]; - s.tmp_1 = r0; - r0 = (s.i___279438 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = s.arg0.fields["_buffer"]; - s.tmp_3 = r0; - r0 = s.tmp_3.fields["_bytes"]; - s.tmp_2 = r0; - s.tmp_4 = r0 = s.o___279439; - r0 = pxsim_Array__getAt(s.bytes___279434, s.i___279438); + r0 = s.retval; s.tmp_5 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_4, s.tmp_5); - r0 = (s.i___279438 + 1); - s.i___279438 = (r0); - s.tmp_0 = r0 = s.o___279439; - r0 = (s.tmp_0 + 1); - s.o___279439 = (r0); - r0 = s.tmp_0; - { step = 3; continue; } - case 4: - case 5: + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1095; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1096; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -TypedArray_set__P276186.info = {"start":5292,"length":436,"line":168,"column":4,"endLine":183,"endColumn":5,"fileName":"typedArray.ts","functionName":"set","argumentNames":["this","index","value"]} +scene_systemMenu_PauseMenu_show_inline__P31186.info = {"start":5073,"length":132,"line":167,"column":53,"endLine":169,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function TypedArray_set__P276186_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31186_mk(s) { checkStack(s.depth); return { - parent: s, fn: TypedArray_set__P276186, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31186, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -18787,19 +18736,14 @@ function TypedArray_set__P276186_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - bytes___279434: undefined, - i___279438: undefined, - o___279439: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + tmp_6: undefined, } } -function game_eventContext__P274819(s) { +function scene_systemMenu_PauseMenu_show_inline__P31202(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18809,96 +18753,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = game_init__P276813_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1010; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P22226_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P20177_mk(s); + r0 = s.caps[0].fields["options"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1.arg0 = r0; + r0 = s.caps[0].fields["selection"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1098; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - r0 = globals._scene___276805.fields["eventContext"]; - return leave(s, r0) - default: oops() -} } } -game_eventContext__P274819.info = {"start":4442,"length":112,"line":136,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"eventContext","argumentNames":[]} - -function game_eventContext__P274819_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_eventContext__P274819, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function controller_pauseUntilAnyButtonIsPressed__P274022(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - setupResume(s, 1); - pxsim.control.waitForEvent(2049, 0); - checkResumeConsumed(); - return; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1099; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller_pauseUntilAnyButtonIsPressed__P274022.info = {"start":9968,"length":96,"line":287,"column":4,"endLine":289,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pauseUntilAnyButtonIsPressed","argumentNames":[]} - -function controller_pauseUntilAnyButtonIsPressed__P274022_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P274022, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, -} } - - - - - -function game_setWaitAnyButton__P274817(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - globals.__waitAnyButton___276809 = (s.arg0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_setWaitAnyButton__P274817.info = {"start":4236,"length":83,"line":127,"column":4,"endLine":129,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setWaitAnyButton","argumentNames":["f"]} +scene_systemMenu_PauseMenu_show_inline__P31202.info = {"start":5263,"length":111,"line":171,"column":54,"endLine":173,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function game_setWaitAnyButton__P274817_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31202_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_setWaitAnyButton__P274817, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31202, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, } } -function Math_FastRandom_constructor__P274878(s) { +function scene_systemMenu_PauseMenu_show_inline__P31214(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18908,44 +18805,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C274876_VT)) failedCast(r0); - r0 = (s.arg1 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.Math_.randomRange(1, 65535); - s.arg1 = (r0); + s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P22225_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1101; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_drawText__P22227_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1102; s.pc = 2; return s.tmp_0; case 2: - r0 = (s.arg0).fields["seed"] = (s.arg1); - r0 = (s.arg0).fields["lfsr"] = (s.arg1); + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_constructor__P274878.info = {"start":1425,"length":175,"line":44,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"inline","argumentNames":["this","seed"]} +scene_systemMenu_PauseMenu_show_inline__P31214.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function Math_FastRandom_constructor__P274878_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P31214_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_constructor__P274878, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P31214, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, } } -function game_consoleOverlay_listener__P277140(s) { +function scene_systemMenu_PauseMenu_drawText__P22227(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18957,78 +18845,276 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 3; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: + s.tmp_3 = helpers_imageFillRect__P20841_mk(s); + s.tmp_3.arg0 = globals.screen___20904; + s.tmp_3.arg1 = 0; + s.tmp_3.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_3.arg3 = r0; + s.tmp_5 = if_cardsTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_5.arg0 = r0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "cardsTop"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["cardsTop"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["cardsTop"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1115; s.pc = 5; return s.tmp_5; } + } + case 5: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 - 2); + s.tmp_3.arg4 = r0; + s.tmp_3.arg5 = 15; + s.callLocIdx = 1116; s.pc = 4; return s.tmp_3; case 4: - s.tmp_4 = helpers_arrayForEach__P271925_mk(s); - s.tmp_5 = helpers_arrayFilter__P271926_mk(s); - s.tmp_6 = helpers_stringSplit__P271938_mk(s); - s.tmp_6.arg0 = s.arg1; - s.tmp_6.arg1 = "\n"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1191; s.pc = 10; return s.tmp_6; - case 10: r0 = s.retval; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = forEach_inline__P284437; - s.callLocIdx = 1192; s.pc = 9; return s.tmp_5; - case 9: + s.tmp_0 = helpers_imagePrintCenter__P20866_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_1 = if_headerText_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "headerText"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["headerText"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["headerText"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1117; s.pc = 7; return s.tmp_1; } + } + case 7: r0 = s.retval; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P284442; - s.callLocIdx = 1194; s.pc = 8; return s.tmp_4; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 2; + s.tmp_0.arg3 = 1; + s.tmp_2 = if_headerFont_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "headerFont"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["headerFont"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["headerFont"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1118; s.pc = 8; return s.tmp_2; } + } case 8: r0 = s.retval; - r0 = pxsim_Array__length(globals.consoleStrings___277105); + s.tmp_0.arg4 = r0; + s.callLocIdx = 1119; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P20841_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_0.arg1 = 0; + s.tmp_2 = if_infoTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "infoTop"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["infoTop"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["infoTop"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1120; s.pc = 10; return s.tmp_2; } + } + case 10: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.consoleLines___277118); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_arraySplice__P271916_mk(s); - s.tmp_2.arg0 = globals.consoleStrings___277105; - s.tmp_2.arg1 = 0; - r0 = pxsim_Array__length(globals.consoleStrings___277105); - s.tmp_3 = r0; - r0 = (s.tmp_3 - globals.consoleLines___277118); - s.tmp_2.arg2 = r0; - s.callLocIdx = 1195; s.pc = 11; return s.tmp_2; + r0 = (s.tmp_1 - 3); + s.tmp_0.arg2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_0.arg3 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_4 = r0; + s.tmp_6 = if_infoTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_6.arg0 = r0; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "infoTop"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["infoTop"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["infoTop"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1121; s.pc = 11; return s.tmp_6; } + } case 11: r0 = s.retval; - case 5: - case 6: - case 7: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_consoleOverlay_listener__P277140.info = {"start":787,"length":571,"line":26,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"listener","argumentNames":["priority","text"]} - -function game_consoleOverlay_listener__P277140_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_consoleOverlay_listener__P277140, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 + 6); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 15; + s.callLocIdx = 1122; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P20841_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_1 = if_padding_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "padding"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["padding"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["padding"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1123; s.pc = 13; return s.tmp_1; } + } + case 13: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = if_infoTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "infoTop"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["infoTop"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["infoTop"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1124; s.pc = 14; return s.tmp_2; } + } + case 14: + r0 = s.retval; + s.tmp_0.arg2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_3 = r0; + s.tmp_6 = if_padding_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_6.arg0 = r0; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "padding"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["padding"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["padding"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1125; s.pc = 15; return s.tmp_6; } + } + case 15: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 << 1); + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + s.tmp_0.arg3 = r0; + s.tmp_8 = if_charHeight_1_mk(s); + s.tmp_9 = if_infoFont_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_9.arg0 = r0; + if (!s.tmp_9.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "infoFont"); + } else { + s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["infoFont"]; + if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["infoFont"]; } + else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } + else { s.callLocIdx = 1126; s.pc = 17; return s.tmp_9; } + } + case 17: + r0 = s.retval; + s.tmp_8.arg0 = r0; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "charHeight"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["charHeight"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["charHeight"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 1127; s.pc = 16; return s.tmp_8; } + } + case 16: + r0 = s.retval; + s.tmp_7 = r0; + r0 = (s.tmp_7 + 1); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 1; + s.callLocIdx = 1128; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = helpers_imagePrintCenter__P20866_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_1 = if_getText_1_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["selection"]; + s.tmp_3 = r0; + r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "getText"), 1); + s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["getText"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["getText"], 1); s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1129; s.pc = 19; return s.tmp_1;; } + else { s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; } + } + case 19: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_5 = if_infoTop_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_5.arg0 = r0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "infoTop"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["infoTop"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["infoTop"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1130; s.pc = 20; return s.tmp_5; } + } + case 20: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 + 1); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = 15; + s.tmp_6 = if_infoFont_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_6.arg0 = r0; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "infoFont"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["infoFont"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["infoFont"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 1131; s.pc = 21; return s.tmp_6; } + } + case 21: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.callLocIdx = 1132; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 3: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_PauseMenu_drawText__P22227.info = {"start":6927,"length":795,"line":224,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"drawText","argumentNames":["this"]} + +function scene_systemMenu_PauseMenu_drawText__P22227_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_PauseMenu_drawText__P22227, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, @@ -19036,15 +19122,17 @@ function game_consoleOverlay_listener__P277140_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, arg0: undefined, - arg1: undefined, } } -function forEach_inline__P284437(s) { +function helpers_imagePrintCenter__P20866(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19054,38 +19142,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.w___31306 = undefined; + s.x___31312 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.arg4); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = image_getFontForText__P20859_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 95; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.arg4 = (r0); + case 1: + case 2: + r0 = pxsim_String_.length(s.arg1); + s.tmp_0 = r0; + s.tmp_2 = if_charWidth_1_mk(s); + s.tmp_2.arg0 = s.arg4; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charWidth"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charWidth"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 96; s.pc = 4; return s.tmp_2; } + } + case 4: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.w___31306 = (r0); + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.w___31306); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 2); + s.x___31312 = (r0); + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.x___31312; + s.tmp_0.arg3 = s.arg2; + s.tmp_0.arg4 = s.arg3; + s.tmp_0.arg5 = s.arg4; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 97; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P284437.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +helpers_imagePrintCenter__P20866.info = {"start":15025,"length":295,"line":206,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"imagePrintCenter","argumentNames":["img","text","y","color","font"]} -function forEach_inline__P284437_mk(s) { +function helpers_imagePrintCenter__P20866_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P284437, depth: s.depth + 1, + parent: s, fn: helpers_imagePrintCenter__P20866, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + w___31306: undefined, + x___31312: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function game_consoleOverlay_listener_inline__P284442(s) { +function scene_systemMenu_PauseMenu_setSelection__P22226(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19095,45 +19237,100 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.j___284444 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.j___284444 = (0); - case 1: - s.tmp_1 = r0 = s.j___284444; - r0 = pxsim_String_.length(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_3 = r0 = globals.consoleStrings___277105; - s.tmp_5 = helpers_stringSlice__P271935_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_5.arg1 = s.j___284444; - r0 = (s.j___284444 + globals.consoleColumns___277128); - s.tmp_5.arg2 = r0; - s.callLocIdx = 1193; s.pc = 3; return s.tmp_5; + if (!r0) { step = 1; continue; } + { step = 9; continue; } + case 1: + case 2: + r0 = s.arg0.fields["options"]; + s.tmp_4 = r0; + r0 = s.arg0.fields["selection"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + s.tmp_6 = scene_systemMenu_MenuOption_setState__P22219_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_7 = r0; + r0 = s.arg0.fields["selection"]; + s.tmp_8 = r0; + r0 = pxsim_Array__getAt(s.tmp_7, s.tmp_8); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = 2; + s.callLocIdx = 1112; s.pc = 10; return s.tmp_6; + case 10: + r0 = s.retval; case 3: + case 4: + r0 = (s.arg0).fields["selection"] = (s.arg1); + r0 = s.arg0.fields["options"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["selection"]; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_4 = controller_Button__C21138_v0_1_mk(s); + s.tmp_4.arg0 = globals.A___20997; + if (!checkSubtype(s.tmp_4.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.isPressed; + s.pc = 11; return s.tmp_4; + case 11: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); - r0 = (s.j___284444 + globals.consoleColumns___277128); - s.j___284444 = (r0); - { step = 1; continue; } - case 2: + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = 1; + { step = 6; continue; } + case 5: + r0 = 0; + case 6: + // jmp value (already in r0) + s.tmp_5 = r0; + s.tmp_6 = scene_systemMenu_MenuOption_setState__P22219_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_7 = r0; + r0 = s.arg0.fields["selection"]; + s.tmp_8 = r0; + r0 = pxsim_Array__getAt(s.tmp_7, s.tmp_8); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = s.tmp_5; + s.callLocIdx = 1113; s.pc = 12; return s.tmp_6; + case 12: + r0 = s.retval; + case 7: + case 8: + s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P22229_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1114; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_listener_inline__P284442.info = {"start":1022,"length":189,"line":33,"column":21,"endLine":37,"endColumn":13,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +scene_systemMenu_PauseMenu_setSelection__P22226.info = {"start":6436,"length":481,"line":208,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setSelection","argumentNames":["this","selection"]} -function game_consoleOverlay_listener_inline__P284442_mk(s) { +function scene_systemMenu_PauseMenu_setSelection__P22226_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_listener_inline__P284442, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P22226, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -19141,15 +19338,18 @@ function game_consoleOverlay_listener_inline__P284442_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - j___284444: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, + arg1: undefined, } } -function console_addListener__P272199(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P22229(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19159,47 +19359,133 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.row___31526 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = s.arg0.fields["selection"]; + s.tmp_0 = r0; + s.tmp_2 = if_cardsPerRow_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "cardsPerRow"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1135; s.pc = 8; return s.tmp_2; } + } + case 8: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); + s.row___31526 = (r0); + r0 = s.arg0.fields["scrollRow"]; + s.tmp_1 = r0; + r0 = (s.row___31526 === s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array_.indexOf(globals.listeners___276283, s.arg0, undefined); + r0 = (s.row___31526 - 1); s.tmp_2 = r0; - r0 = (s.tmp_2 > -1); + r0 = s.arg0.fields["scrollRow"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 === s.tmp_3); case 2: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - { step = 5; continue; } + { step = 7; continue; } case 3: case 4: - r0 = pxsim_Array__push(globals.listeners___276283, s.arg0); + r0 = s.arg0.fields["scrollRow"]; + s.tmp_6 = r0; + r0 = (s.row___31526 > s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 5; continue; } + s.tmp_7 = r0 = s.arg0; + r0 = s.tmp_7.fields["scrollRow"]; + s.tmp_9 = r0; + r0 = (s.tmp_9 + 1); + s.tmp_8 = r0; + r0 = (s.tmp_7).fields["scrollRow"] = (s.tmp_8); + { step = 6; continue; } case 5: + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["scrollRow"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["scrollRow"] = (s.tmp_1); + case 6: + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["scrollRow"]; + s.tmp_2 = r0; + s.tmp_5 = if_cardSpacing_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_5.arg0 = r0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "cardSpacing"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["cardSpacing"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["cardSpacing"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1136; s.pc = 9; return s.tmp_5; } + } + case 9: + r0 = s.retval; + s.tmp_4 = r0; + s.tmp_7 = if_cardWidth_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_7.arg0 = r0; + if (!s.tmp_7.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "cardWidth"); + } else { + s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["cardWidth"]; + if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["cardWidth"]; } + else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } + else { s.callLocIdx = 1137; s.pc = 10; return s.tmp_7; } + } + case 10: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["scrollTarget"] = (s.tmp_1); + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -console_addListener__P272199.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} +scene_systemMenu_PauseMenu_updateScrollTarget__P22229.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} -function console_addListener__P272199_mk(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P22229_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_addListener__P272199, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P22229, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + row___31526: undefined, arg0: undefined, } } @@ -19207,7 +19493,7 @@ function console_addListener__P272199_mk(s) { -function listeners_inline__P276282(s) { +function scene_systemMenu_PauseMenu_onUpdate__P22225(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19217,32 +19503,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.t___31328 = undefined; + s.i___31332 = undefined; + s.dt___31361 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.control.__log(s.arg0, s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C22223_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 250); + s.t___31328 = (r0); + s.i___31332 = (0); + case 1: + s.tmp_1 = r0 = s.i___31332; + r0 = s.arg0.fields["options"]; + s.tmp_3 = r0; + r0 = pxsim_Array__length(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_4 = scene_systemMenu_MenuOption_setOffset__P22217_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.i___31332); + s.tmp_4.arg0 = r0; + s.tmp_8 = r0 = s.t___31328; + s.tmp_11 = r0 = s.i___31332; + s.tmp_13 = if_cardsPerRow_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_13.arg0 = r0; + if (!s.tmp_13.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_13.arg0, "cardsPerRow"); + } else { + s.tmp_13.fn = s.tmp_13.arg0.vtable.iface["cardsPerRow"]; + if (s.tmp_13.fn == null) { s.retval = s.tmp_13.arg0.fields["cardsPerRow"]; } + else if (!s.tmp_13.fn.isGetter) { s.retval = bind(s.tmp_13); } + else { s.callLocIdx = 1105; s.pc = 11; return s.tmp_13; } + } + case 11: + r0 = s.retval; + s.tmp_12 = r0; + r0 = (s.tmp_11 % s.tmp_12); + s.tmp_10 = r0; + r0 = (s.tmp_10 * 1.5707963267948966); + s.tmp_9 = r0; + r0 = (s.tmp_8 - s.tmp_9); + s.tmp_7 = r0; + r0 = pxsim.Math_.sin(s.tmp_7); + s.tmp_6 = r0; + r0 = (2 * s.tmp_6); + s.tmp_4.arg1 = r0; + s.callLocIdx = 1106; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + r0 = (s.i___31332 + 1); + s.i___31332 = (r0); + { step = 1; continue; } + case 2: + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1107; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; + r0 = r0.fields["eventContext"]; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["deltaTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 / 1000); + s.dt___31361 = (r0); + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["scrollOffset"]; + s.tmp_5 = r0; + r0 = (s.dt___31361 * 100); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); + { step = 6; continue; } + case 3: + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 > s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["scrollOffset"]; + s.tmp_5 = r0; + r0 = (s.dt___31361 * 100); + s.tmp_6 = r0; + r0 = (s.tmp_5 - s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); + { step = 5; continue; } + case 4: + { step = 9; continue; } + case 5: + case 6: + s.tmp_2 = Math_abs__P20174_mk(s); + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + s.tmp_2.arg0 = r0; + s.callLocIdx = 1109; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["scrollTarget"]; + s.tmp_5 = r0; + r0 = (s.arg0).fields["scrollOffset"] = (s.tmp_5); + case 7: + case 8: + s.tmp_0 = scene_Camera_offsetY__P21721_mk(s); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1110; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + r0 = r0.fields["camera"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["scrollOffset"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1111; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -listeners_inline__P276282.info = {"start":534,"length":85,"line":25,"column":8,"endLine":25,"endColumn":93,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["priority","text"]} +scene_systemMenu_PauseMenu_onUpdate__P22225.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} -function listeners_inline__P276282_mk(s) { +function scene_systemMenu_PauseMenu_onUpdate__P22225_mk(s) { checkStack(s.depth); return { - parent: s, fn: listeners_inline__P276282, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P22225, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + t___31328: undefined, + i___31332: undefined, + dt___31361: undefined, + arg0: undefined, +} } -function scene_systemMenu_register__P274923(s) { + + + +function scene_systemMenu_MenuOption_setOffset__P22217(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19252,38 +19692,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___277059); - if (!r0) { step = 1; continue; } - { step = 3; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P21285_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["top"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 + s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 1048; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_0 = controller_Button_onEvent__P274013_mk(s); - s.tmp_0.arg0 = globals.menu___273936; - s.tmp_0.arg1 = 2049; - s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P274924; - s.callLocIdx = 1178; s.pc = 4; return s.tmp_0; - case 4: r0 = s.retval; + s.tmp_0 = Sprite_y__P21247_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1049; s.pc = 3; return s.tmp_1; case 3: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1050; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_register__P274923.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} +scene_systemMenu_MenuOption_setOffset__P22217.info = {"start":1411,"length":123,"line":61,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setOffset","argumentNames":["this","offset"]} -function scene_systemMenu_register__P274923_mk(s) { +function scene_systemMenu_MenuOption_setOffset__P22217_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_register__P274923, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setOffset__P22217, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_showSystemMenu__P274924(s) { +function Sprite_top__P21285(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19293,51 +19753,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___277059); - if (!r0) { step = 1; continue; } - { step = 3; continue; } + s.physics___31445 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 360; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_0 = game_pushScene__P274820_mk(s); - s.callLocIdx = 1179; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C274912_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P274913_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P274920; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1180; s.pc = 5; return s.tmp_1; - case 5: r0 = s.retval; - globals.instance___277059 = (s.tmp_0); - s.tmp_0 = scene_systemMenu_PauseMenu_show__P274914_mk(s); - s.tmp_0.arg0 = globals.instance___277059; - s.callLocIdx = 1181; s.pc = 6; return s.tmp_0; - case 6: + r0 = r0.fields["physicsEngine"]; + s.physics___31445 = (r0); + s.tmp_0 = PhysicsEngine__C21384_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___31445; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = 0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["_y"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; + s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_showSystemMenu__P274924.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} +Sprite_top__P21285.info = {"start":11687,"length":256,"line":421,"column":4,"endLine":431,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} -function scene_systemMenu_showSystemMenu__P274924_mk(s) { +function Sprite_top__P21285_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_showSystemMenu__P274924, depth: s.depth + 1, + parent: s, fn: Sprite_top__P21285, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + physics___31445: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList__P274920(s) { +function PhysicsEngine_moveSprite__P21387(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19347,136 +19818,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.options___285581 = undefined; - r0 = pxsim_Array__mk(); - s.options___285581 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___274934; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285589; - s.tmp_1.arg3 = scene_systemMenu_volumeDown__P277065; - s.callLocIdx = 1161; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_UP_ICON___274931; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285603; - s.tmp_1.arg3 = scene_systemMenu_volumeUp__P277064; - s.callLocIdx = 1163; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = 0; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_1 = r0; - s.tmp_2 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___274932; - s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P285618; - s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P277067; - s.callLocIdx = 1166; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___274937; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285633; - s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P277066; - s.callLocIdx = 1168; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.STATS_ICON___274938; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285648; - s.tmp_1.arg3 = scene_systemMenu_toggleStats__P277069; - s.callLocIdx = 1169; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CONSOLE_ICON___274936; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285657; - s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P277070; - s.callLocIdx = 1171; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.SLEEP_ICON___274935; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285666; - s.tmp_1.arg3 = scene_systemMenu_sleep__P277071; - s.callLocIdx = 1172; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___277060); - if (!r0) { step = 3; continue; } - s.tmp_0 = helpers_arrayConcat__P271929_mk(s); - s.tmp_0.arg0 = s.options___285581; - s.tmp_0.arg1 = globals.customMenuOptions___277060; - s.callLocIdx = 1173; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.options___285581 = (r0); - case 3: - case 4: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C274904_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P274905_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___274933; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P285679; - s.tmp_1.arg3 = scene_systemMenu_closeMenu__P274919; - s.callLocIdx = 1174; s.pc = 13; return s.tmp_1; - case 13: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___285581, s.tmp_0); - r0 = s.options___285581; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList__P274920.info = {"start":10499,"length":1149,"line":334,"column":4,"endLine":354,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildOptionList","argumentNames":[]} +PhysicsEngine_moveSprite__P21387.info = {"start":230,"length":43,"line":13,"column":4,"endLine":13,"endColumn":47,"fileName":"pxt_modules/game/physics.ts","functionName":"moveSprite","argumentNames":["this","s","dx","dy"]} -function scene_systemMenu_buildOptionList__P274920_mk(s) { +function PhysicsEngine_moveSprite__P21387_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList__P274920, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_moveSprite__P21387, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - options___285581: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285589(s) { +function Sprite_top__P21284(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19486,44 +19858,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P273438_mk(s); - s.callLocIdx = 1160; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 2: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("VOLUME DOWN (", s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285589.info = {"start":10644,"length":39,"line":337,"column":54,"endLine":337,"endColumn":93,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Sprite_top__P21284.info = {"start":11544,"length":53,"line":416,"column":4,"endLine":418,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this"]} +Sprite_top__P21284.isGetter = true; -function scene_systemMenu_buildOptionList_inline__P285589_mk(s) { +function Sprite_top__P21284_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285589, depth: s.depth + 1, + parent: s, fn: Sprite_top__P21284, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285603(s) { +function Sprite_y__P21247(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19533,44 +19896,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P273438_mk(s); - s.callLocIdx = 1162; s.pc = 1; return s.tmp_3; - case 1: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P21285_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_height__P21279_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 311; s.pc = 2; return s.tmp_4; + case 2: r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / 2); s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 2: + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 312; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("VOLUME UP (", s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285603.info = {"start":10751,"length":37,"line":338,"column":52,"endLine":338,"endColumn":89,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Sprite_y__P21247.info = {"start":3081,"length":65,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this","v"]} -function scene_systemMenu_buildOptionList_inline__P285603_mk(s) { +function Sprite_y__P21247_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285603, depth: s.depth + 1, + parent: s, fn: Sprite_y__P21247, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285618(s) { +function Sprite_height__P21279(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19580,40 +19953,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___273768; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } - case 1: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("BRIGHTNESS DOWN (", s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285618.info = {"start":10910,"length":48,"line":340,"column":62,"endLine":340,"endColumn":110,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Sprite_height__P21279.info = {"start":10541,"length":61,"line":380,"column":4,"endLine":382,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"height","argumentNames":["this"]} +Sprite_height__P21279.isGetter = true; -function scene_systemMenu_buildOptionList_inline__P285618_mk(s) { +function Sprite_height__P21279_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285618, depth: s.depth + 1, + parent: s, fn: Sprite_height__P21279, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285633(s) { +function Math_abs__P20174(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19623,40 +19991,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___273768; - s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_2); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_2) + ""; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (0 - s.arg0); + { step = 2; continue; } case 1: - r0 = s.retval; + r0 = s.arg0; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_String__concat("BRIGHTNESS UP (", s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285633.info = {"start":11038,"length":46,"line":341,"column":60,"endLine":341,"endColumn":106,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Math_abs__P20174.info = {"start":16120,"length":77,"line":539,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"abs","argumentNames":["x"]} -function scene_systemMenu_buildOptionList_inline__P285633_mk(s) { +function Math_abs__P20174_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285633, depth: s.depth + 1, + parent: s, fn: Math_abs__P20174, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285648(s) { +function scene_systemMenu_MenuOption_setState__P22219(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19666,34 +20036,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___274785); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = s.arg0.fields["state"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = "HIDE STATS"; - { step = 2; continue; } + { step = 3; continue; } case 1: - r0 = "SHOW STATS"; case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = s.tmp_0; + r0 = (s.arg0).fields["state"] = (s.arg1); + s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P22221_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1052; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285648.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_MenuOption_setState__P22219.info = {"start":1655,"length":147,"line":71,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setState","argumentNames":["this","state"]} -function scene_systemMenu_buildOptionList_inline__P285648_mk(s) { +function scene_systemMenu_MenuOption_setState__P22219_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285648, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setState__P22219, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285657(s) { +function scene_systemMenu_MenuOption_updateCard__P22221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19703,9 +20090,13 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; @@ -19713,36 +20104,137 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = "HIDE CONSOLE"; - { step = 2; continue; } + { step = 7; continue; } case 1: - r0 = "SHOW CONSOLE"; case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = s.arg0.fields["state"]; + s.tmp_3 = r0; + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_3); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(0, s.tmp_3); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_3); + if (r0) { step = 5; continue; } + r0 = s.tmp_3; + { step = 6; continue; } + case 3: + s.tmp_4 = Sprite_setImage__P21270_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_4.arg0 = r0; + s.tmp_5 = if_basicCard_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_5.arg0 = r0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "basicCard"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["basicCard"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["basicCard"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1055; s.pc = 9; return s.tmp_5; } + } + case 9: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.callLocIdx = 1056; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + { step = 6; continue; } + case 4: + s.tmp_0 = Sprite_setImage__P21270_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = if_selectedCard_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "selectedCard"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["selectedCard"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["selectedCard"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1057; s.pc = 11; return s.tmp_1; } + } + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1058; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = Sprite_setImage__P21270_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = if_activeCard_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "activeCard"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["activeCard"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["activeCard"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1059; s.pc = 13; return s.tmp_1; } + } + case 13: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1060; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + case 6: + s.tmp_0 = Sprite_x__P21245_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P21244_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1061; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1062; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = Sprite_y__P21247_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1063; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1064; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285657.info = {"start":11273,"length":71,"line":344,"column":50,"endLine":344,"endColumn":121,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_MenuOption_updateCard__P22221.info = {"start":2038,"length":497,"line":86,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateCard","argumentNames":["this"]} -function scene_systemMenu_buildOptionList_inline__P285657_mk(s) { +function scene_systemMenu_MenuOption_updateCard__P22221_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285657, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_updateCard__P22221, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285666(s) { +function Sprite_x__P21245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19752,24 +20244,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "SLEEP"; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P21281_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_width__P21278_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 306; s.pc = 2; return s.tmp_4; + case 2: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / 2); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 307; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285666.info = {"start":11411,"length":13,"line":345,"column":48,"endLine":345,"endColumn":61,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Sprite_x__P21245.info = {"start":2724,"length":65,"line":115,"column":4,"endLine":117,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} -function scene_systemMenu_buildOptionList_inline__P285666_mk(s) { +function Sprite_x__P21245_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285666, depth: s.depth + 1, + parent: s, fn: Sprite_x__P21245, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P285679(s) { +function Sprite_left__P21281(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19779,24 +20301,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "CLOSE"; + s.physics___32040 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 352; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = r0.fields["physicsEngine"]; + s.physics___32040 = (r0); + s.tmp_0 = PhysicsEngine__C21384_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___32040; + s.tmp_0.arg1 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = s.arg0.fields["_x"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = 0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; + s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P285679.info = {"start":11590,"length":13,"line":351,"column":53,"endLine":351,"endColumn":66,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +Sprite_left__P21281.info = {"start":10853,"length":257,"line":391,"column":4,"endLine":401,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} -function scene_systemMenu_buildOptionList_inline__P285679_mk(s) { +function Sprite_left__P21281_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P285679, depth: s.depth + 1, + parent: s, fn: Sprite_left__P21281, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + physics___32040: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_setScreenBrightnessSupported__P277072(s) { +function Sprite_left__P21280(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19806,24 +20366,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = 0; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightnessSupported__P277072.info = {"start":10398,"length":95,"line":330,"column":4,"endLine":332,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightnessSupported","argumentNames":[]} +Sprite_left__P21280.info = {"start":10709,"length":53,"line":386,"column":4,"endLine":388,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this"]} +Sprite_left__P21280.isGetter = true; -function scene_systemMenu_setScreenBrightnessSupported__P277072_mk(s) { +function Sprite_left__P21280_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P277072, depth: s.depth + 1, + parent: s, fn: Sprite_left__P21280, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function scene_systemMenu_sleep__P277071(s) { +function Sprite_width__P21278(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19833,25 +20404,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.deepSleep(); - r0 = undefined; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_sleep__P277071.info = {"start":10072,"length":51,"line":316,"column":4,"endLine":318,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"sleep","argumentNames":[]} +Sprite_width__P21278.info = {"start":10374,"length":59,"line":375,"column":4,"endLine":377,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"width","argumentNames":["this"]} +Sprite_width__P21278.isGetter = true; -function scene_systemMenu_sleep__P277071_mk(s) { +function Sprite_width__P21278_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_sleep__P277071, depth: s.depth + 1, + parent: s, fn: Sprite_width__P21278, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, } } -function scene_systemMenu_toggleConsole__P277070(s) { +function scene_systemMenu_MenuOption_setTheme__P22218(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19861,59 +20442,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_4 = game_consoleOverlay_setVisible__P274943_mk(s); - s.tmp_4.arg0 = false; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 1154; s.pc = 3; return s.tmp_4; - case 3: - r0 = s.retval; - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = (s.arg0).fields["theme"] = (s.arg1); + s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P22221_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1051; s.pc = 1; return s.tmp_0; case 1: - s.tmp_0 = game_consoleOverlay_setVisible__P274943_mk(s); - s.tmp_0.arg0 = true; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 1155; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = console_log__P272196_mk(s); - s.tmp_0.arg0 = "console"; - s.callLocIdx = 1156; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; - case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_toggleConsole__P277070.info = {"start":9827,"length":239,"line":307,"column":4,"endLine":314,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleConsole","argumentNames":[]} +scene_systemMenu_MenuOption_setTheme__P22218.info = {"start":1544,"length":101,"line":66,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setTheme","argumentNames":["this","theme"]} -function scene_systemMenu_toggleConsole__P277070_mk(s) { +function scene_systemMenu_MenuOption_setTheme__P22218_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleConsole__P277070, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setTheme__P22218, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -function game_consoleOverlay_setVisible__P274943(s) { +function scene_systemMenu_MenuOption_position__P22216(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19926,67 +20488,75 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_1 = r0 = s.arg0; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 != s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - { step = 2; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = (s.arg0).fields["top"] = (s.arg2); + s.tmp_0 = Sprite_left__P21281_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1042; s.pc = 1; return s.tmp_0; case 1: - r0 = undefined; + r0 = s.retval; + s.tmp_0 = Sprite_top__P21285_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1043; s.pc = 2; return s.tmp_0; case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - globals.consoleStrings___277105 = (s.tmp_6); - case 3: + r0 = s.retval; + s.tmp_0 = Sprite_x__P21245_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P21244_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1044; s.pc = 4; return s.tmp_1; case 4: - r0 = (s.arg1 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - globals.consoleColor___277104 = (s.arg1); - case 5: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1045; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_y__P21247_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 1046; s.pc = 6; return s.tmp_1; case 6: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1047; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_setVisible__P274943.info = {"start":562,"length":219,"line":19,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"setVisible","argumentNames":["value","col"]} +scene_systemMenu_MenuOption_position__P22216.info = {"start":1178,"length":223,"line":51,"column":8,"endLine":59,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"position","argumentNames":["this","left","top"]} -function game_consoleOverlay_setVisible__P274943_mk(s) { +function scene_systemMenu_MenuOption_position__P22216_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_setVisible__P274943, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_position__P22216, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function console_log__P272196(s) { +function scene_systemMenu_MenuOption_show__P22215(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20000,24 +20570,96 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = console_add__P272192_mk(s); - s.tmp_0.arg0 = 1; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 34; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C22214_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = if_basicCard_1_mk(s); + r0 = s.arg0.fields["theme"]; + s.tmp_1.arg0 = r0; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "basicCard"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["basicCard"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["basicCard"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1037; s.pc = 3; return s.tmp_1; } + } + case 3: + r0 = s.retval; + { step = 2; continue; } case 1: + r0 = globals.CARD_NORMAL___22257; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.tmp_3 = r0 = s.arg0; + s.tmp_5 = sprites_create__P21234_mk(s); + s.tmp_5.arg0 = s.tmp_2; + s.tmp_5.arg1 = undefined; + s.callLocIdx = 1038; s.pc = 4; return s.tmp_5; + case 4: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["card"] = (s.tmp_4); + s.tmp_0 = if_z_2_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 1; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1039; s.pc = 5; return s.tmp_0; } + } + case 5: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = sprites_create__P21234_mk(s); + r0 = s.arg0.fields["iconImage"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 1040; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["icon"] = (s.tmp_1); + s.tmp_0 = if_z_2_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 2; + if (!s.tmp_0.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; + if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } + else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } + else { s.callLocIdx = 1041; s.pc = 7; return s.tmp_0; } + } + case 7: r0 = s.retval; + r0 = (s.arg0).fields["state"] = (2); r0 = undefined; return leave(s, r0) default: oops() } } } -console_log__P272196.info = {"start":1450,"length":86,"line":58,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]} +scene_systemMenu_MenuOption_show__P22215.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function console_log__P272196_mk(s) { +function scene_systemMenu_MenuOption_show__P22215_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_log__P272196, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_show__P22215, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, } } @@ -20025,7 +20667,7 @@ function console_log__P272196_mk(s) { -function console_add__P272192(s) { +function sprites_create__P21234(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20035,78 +20677,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.text___285718 = undefined; - s.i___285727 = undefined; + s.scene___27476 = undefined; + s.sprite___27479 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < globals.minPriority___272191); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 297; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_1 = console_inspect__P272198_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = 20; - s.callLocIdx = 32; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.text___285718 = (r0); - if ((s.text___285718) && (s.text___285718).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.text___285718); - checkResumeConsumed(); - return; - } else { s.retval = (s.text___285718) + ""; } - case 7: r0 = s.retval; + s.scene___27476 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(Sprite__C21242_VT); s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\n"); - s.text___285718 = (r0); - s.i___285727 = (0); + s.tmp_1 = Sprite_constructor__P21319_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 298; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.sprite___27479 = (s.tmp_0); + s.tmp_0 = Sprite_setKind__P21289_mk(s); + s.tmp_0.arg0 = s.sprite___27479; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 299; s.pc = 3; return s.tmp_0; case 3: - s.tmp_1 = r0 = s.i___285727; - r0 = pxsim_Array__length(globals.listeners___276283); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = lambda_3_mk(s); - r0 = pxsim_Array__getAt(globals.listeners___276283, s.i___285727); - s.tmp_3.argL = r0; - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.text___285718; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 33; s.pc = 8; return s.tmp_3; - case 8: r0 = s.retval; - r0 = (s.i___285727 + 1); - s.i___285727 = (r0); - { step = 3; continue; } + s.tmp_0 = PhysicsEngine__C21384_v0_2_mk(s); + r0 = s.scene___27476.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.sprite___27479; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C21384_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.addSprite; + s.pc = 4; return s.tmp_0; case 4: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P27497); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P27504); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___27479); + s.tmp_2 = helpers_arrayForEach__P20154_mk(s); + s.tmp_3 = helpers_arrayFilter__P20155_mk(s); + r0 = s.scene___27476.fields["createdHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 300; s.pc = 6; return s.tmp_3; + case 6: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 302; s.pc = 5; return s.tmp_2; case 5: - r0 = undefined; + r0 = s.retval; + r0 = s.sprite___27479; return leave(s, r0) default: oops() } } } -console_add__P272192.info = {"start":632,"length":317,"line":28,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"add","argumentNames":["priority","message"]} +sprites_create__P21234.info = {"start":890,"length":400,"line":35,"column":4,"endLine":47,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"create","argumentNames":["img","kind"]} -function console_add__P272192_mk(s) { +function sprites_create__P21234_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_add__P272192, depth: s.depth + 1, + parent: s, fn: sprites_create__P21234, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - text___285718: undefined, - i___285727: undefined, + scene___27476: undefined, + sprite___27479: undefined, arg0: undefined, arg1: undefined, } } @@ -20115,7 +20757,7 @@ function console_add__P272192_mk(s) { -function scene_systemMenu_toggleStats__P277069(s) { +function forEach_inline__P27497(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20125,57 +20767,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___274785); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - globals.stats___274785 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___274785); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["kind"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = globals.control_EventContext_onStats___272214; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - s.tmp_3 = lambda_2_mk(s); - s.tmp_3.argL = globals.control_EventContext_onStats___272214; - r0 = pxsim_String_.mkEmpty(); - s.tmp_3.arg0 = r0; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 1152; s.pc = 5; return s.tmp_3; - case 5: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; + r0 = (s.tmp_0 == s.caps[0]); return leave(s, r0) default: oops() } } } -scene_systemMenu_toggleStats__P277069.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} +forEach_inline__P27497.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function scene_systemMenu_toggleStats__P277069_mk(s) { +function forEach_inline__P27497_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleStats__P277069, depth: s.depth + 1, + parent: s, fn: forEach_inline__P27497, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, + arg0: undefined, } } -function scene_systemMenu_brightnessDown__P277067(s) { +function sprites_create_inline__P27504(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20185,34 +20802,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_setScreenBrightness__P277068_mk(s); - r0 = globals.brightness___273768; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 5); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1148; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = if_handler_2_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); + s.callLocIdx = 301; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 301; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 301; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 301; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_brightnessDown__P277067.info = {"start":9198,"length":87,"line":289,"column":4,"endLine":291,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessDown","argumentNames":[]} +sprites_create_inline__P27504.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function scene_systemMenu_brightnessDown__P277067_mk(s) { +function sprites_create_inline__P27504_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_brightnessDown__P277067, depth: s.depth + 1, + parent: s, fn: sprites_create_inline__P27504, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + arg0: undefined, } } -function scene_systemMenu_setScreenBrightness__P277068(s) { +function PhysicsEngine_addSprite__P21385(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20224,41 +20851,31 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = helpers_setScreenBrightness__P273782_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1149; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = settings_writeNumber__P273880_mk(s); - s.tmp_0.arg0 = "#brightness"; - r0 = globals.brightness___273768; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1151; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C21384_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightness__P277068.info = {"start":9291,"length":345,"line":293,"column":4,"endLine":298,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightness","argumentNames":["b"]} +PhysicsEngine_addSprite__P21385.info = {"start":124,"length":29,"line":8,"column":4,"endLine":8,"endColumn":33,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} -function scene_systemMenu_setScreenBrightness__P277068_mk(s) { +function PhysicsEngine_addSprite__P21385_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightness__P277068, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_addSprite__P21385, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function settings_writeNumber__P273880(s) { +function Sprite_constructor__P21319(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20273,34 +20890,127 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P20979_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 329; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.arg0.fields["_x"]; s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_1 = settings_writeBuffer__P273877_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = msgpack_packNumberArray__P272000_mk(s); - s.tmp_2.arg0 = s.tmp_0; - s.callLocIdx = 125; s.pc = 2; return s.tmp_2; + r0 = (s.arg0).fields["_lastX"] = (s.tmp_0); + r0 = s.arg0.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.arg0).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = Sprite_vx__P21249_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 332; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 126; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_0 = Sprite_vy__P21251_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 333; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_ax__P21253_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 334; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = Sprite_ay__P21255_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 335; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = Sprite_fx__P21257_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 336; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_fy__P21259_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 337; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = (s.arg0).fields["_sx"] = (256); + r0 = (s.arg0).fields["_sy"] = (256); + r0 = (s.arg0).fields["flags"] = (0); + s.tmp_0 = Sprite_setImage__P21270_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 338; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = Sprite_setKind__P21289_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = -1; + s.callLocIdx = 339; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + r0 = (s.arg0).fields["layer"] = (1); + r0 = (s.arg0).fields["lifespan"] = (undefined); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_overlappers"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_obstacles"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -settings_writeNumber__P273880.info = {"start":2265,"length":122,"line":89,"column":4,"endLine":91,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeNumber","argumentNames":["key","value"]} +Sprite_constructor__P21319.info = {"start":7406,"length":678,"line":278,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} -function settings_writeNumber__P273880_mk(s) { +function Sprite_constructor__P21319_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeNumber__P273880, depth: s.depth + 1, + parent: s, fn: Sprite_constructor__P21319, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, } } @@ -20309,7 +21019,7 @@ function settings_writeNumber__P273880_mk(s) { -function settings_writeBuffer__P273877(s) { +function Sprite_fy__P21259(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20324,26 +21034,37 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.settings._set(s.arg0, s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim.settings._userClean(); - r0 = pxsim_pxtrt.panic(920); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = Math_max__P20176_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 325; s.pc = 1; return s.tmp_3; case 1: - case 2: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -settings_writeBuffer__P273877.info = {"start":1538,"length":290,"line":63,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeBuffer","argumentNames":["key","value"]} +Sprite_fy__P21259.info = {"start":5109,"length":64,"line":191,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this","v"]} -function settings_writeBuffer__P273877_mk(s) { +function Sprite_fy__P21259_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeBuffer__P273877, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P21259, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, } } @@ -20352,7 +21073,45 @@ function settings_writeBuffer__P273877_mk(s) { -function msgpack_packNumberArray__P272000(s) { +function Sprite_fy__P21258(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_fy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_fy__P21258.info = {"start":4947,"length":60,"line":186,"column":4,"endLine":188,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this"]} +Sprite_fy__P21258.isGetter = true; + +function Sprite_fy__P21258_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_fy__P21258, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Sprite_fx__P21257(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20362,108 +21121,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.off___285789 = undefined; - s.n___285791 = undefined; - s.unnamed2110___U2 = undefined; - s.unnamed2111___U3 = undefined; - s.buf___285801 = undefined; - s.n___285807 = undefined; - s.unnamed2112___U6 = undefined; - s.unnamed2113___U7 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.off___285789 = (0); - s.n___285791 = (undefined); - s.unnamed2110___U2 = (s.arg0); - s.unnamed2111___U3 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = Math_max__P20176_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 322; s.pc = 1; return s.tmp_3; case 1: - s.tmp_0 = r0 = s.unnamed2111___U3; - r0 = pxsim_Array__length(s.unnamed2110___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2110___U2, s.unnamed2111___U3); - s.n___285791 = (r0); - s.tmp_2 = r0 = s.off___285789; - s.tmp_4 = msgpack_packNumberCore__P276242_mk(s); - s.tmp_4.arg0 = null; - s.tmp_4.arg1 = s.off___285789; - s.tmp_4.arg2 = s.n___285791; - s.callLocIdx = 22; s.pc = 5; return s.tmp_4; - case 5: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.off___285789 = (r0); - r0 = (s.unnamed2111___U3 + 1); - s.unnamed2111___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed2110___U2 = (undefined); - r0 = pxsim.control.createBuffer(s.off___285789); - s.buf___285801 = (r0); - s.off___285789 = (0); - s.n___285807 = (undefined); - s.unnamed2112___U6 = (s.arg0); - s.unnamed2113___U7 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed2113___U7; - r0 = pxsim_Array__length(s.unnamed2112___U6); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed2112___U6, s.unnamed2113___U7); - s.n___285807 = (r0); - s.tmp_2 = r0 = s.off___285789; - s.tmp_4 = msgpack_packNumberCore__P276242_mk(s); - s.tmp_4.arg0 = s.buf___285801; - s.tmp_4.arg1 = s.off___285789; - s.tmp_4.arg2 = s.n___285807; - s.callLocIdx = 23; s.pc = 6; return s.tmp_4; - case 6: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.off___285789 = (r0); - r0 = (s.unnamed2113___U7 + 1); - s.unnamed2113___U7 = (r0); - { step = 3; continue; } - case 4: - s.unnamed2112___U6 = (undefined); - r0 = s.buf___285801; + r0 = (s.tmp_0).fields["_fx"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_packNumberArray__P272000.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} +Sprite_fx__P21257.info = {"start":4766,"length":64,"line":181,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} -function msgpack_packNumberArray__P272000_mk(s) { +function Sprite_fx__P21257_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_packNumberArray__P272000, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P21257, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - off___285789: undefined, - n___285791: undefined, - unnamed2110___U2: undefined, - unnamed2111___U3: undefined, - buf___285801: undefined, - n___285807: undefined, - unnamed2112___U6: undefined, - unnamed2113___U7: undefined, arg0: undefined, + arg1: undefined, } } -function msgpack_packNumberCore__P276242(s) { +function Sprite_fx__P21256(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20473,154 +21175,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tag___285821 = undefined; - s.fmt___285864 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tag___285821 = (203); - s.tmp_1 = r0 = s.arg2; - r0 = (s.arg2 << 0); - s.tmp_2 = r0; - r0 = (s.tmp_1 == s.tmp_2); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_fx"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_3 = r0 = s.arg2; - r0 = (s.arg2 >>> 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 == s.tmp_4); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 19; continue; } - r0 = (-31 <= s.arg2); - s.tmp_6 = r0; - r0 = pxsim_numops_toBool(s.tmp_6); - if (r0) { step = 3; continue; } - r0 = s.tmp_6; - { step = 4; continue; } - case 3: - r0 = (s.arg2 <= 127); - case 4: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 5; continue; } - r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); - case 5: - case 6: - r0 = 1; - { step = 23; continue; } - { step = 18; continue; } - case 7: - r0 = (0 <= s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = (s.arg2 <= 255); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 8; continue; } - s.tag___285821 = (204); - { step = 11; continue; } - case 8: - r0 = (s.arg2 <= 65535); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tag___285821 = (205); - { step = 10; continue; } - case 9: - s.tag___285821 = (206); - case 10: - case 11: - { step = 17; continue; } - case 12: - r0 = (-127 <= s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.tag___285821 = (208); - { step = 16; continue; } - case 13: - r0 = (-32767 <= s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tag___285821 = (209); - { step = 15; continue; } - case 14: - s.tag___285821 = (210); - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - s.tmp_0 = msgpack_tagFormat__P276241_mk(s); - s.tmp_0.arg0 = s.tag___285821; - s.callLocIdx = 18; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.fmt___285864 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 21; continue; } - r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___285821); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.fmt___285864; - r0 = (s.arg1 + 1); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, s.tmp_1, s.tmp_2, s.arg2); - case 21: - case 22: - s.tmp_1 = pins_sizeOf__P271991_mk(s); - s.tmp_1.arg0 = s.fmt___285864; - s.callLocIdx = 19; s.pc = 25; return s.tmp_1; - case 25: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - case 23: - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -msgpack_packNumberCore__P276242.info = {"start":1632,"length":951,"line":56,"column":4,"endLine":86,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberCore","argumentNames":["buf","offset","num"]} +Sprite_fx__P21256.info = {"start":4604,"length":60,"line":176,"column":4,"endLine":178,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this"]} +Sprite_fx__P21256.isGetter = true; -function msgpack_packNumberCore__P276242_mk(s) { +function Sprite_fx__P21256_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_packNumberCore__P276242, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P21256, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tag___285821: undefined, - fmt___285864: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function msgpack_tagFormat__P276241(s) { +function Sprite_ay__P21255(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20632,70 +21215,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtcore.switch_eq(203, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(204, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(205, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(206, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(208, s.tmp_0); - if (r0) { step = 5; continue; } - r0 = pxsim_pxtcore.switch_eq(209, s.tmp_0); - if (r0) { step = 6; continue; } - r0 = pxsim_pxtcore.switch_eq(210, s.tmp_0); - if (r0) { step = 7; continue; } - r0 = s.tmp_0; - { step = 8; continue; } - case 1: - r0 = 16; - { step = 9; continue; } - case 2: - r0 = 7; - { step = 9; continue; } - case 3: - r0 = 9; - { step = 9; continue; } - case 4: - r0 = 12; - { step = 9; continue; } - case 5: - r0 = 6; - { step = 9; continue; } - case 6: - r0 = 8; - { step = 9; continue; } - case 7: - r0 = 10; - { step = 9; continue; } - case 8: - r0 = null; - { step = 9; continue; } + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); r0 = undefined; - case 9: return leave(s, r0) default: oops() } } } -msgpack_tagFormat__P276241.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} +Sprite_ay__P21255.info = {"start":4435,"length":51,"line":170,"column":4,"endLine":172,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this","v"]} -function msgpack_tagFormat__P276241_mk(s) { +function Sprite_ay__P21255_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_tagFormat__P276241, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P21255, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function pins_sizeOf__P271991(s) { +function Sprite_ay__P21254(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20709,20 +21262,21 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Buffer_sizeOfNumberFormat__P272031_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 17; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_ay"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -pins_sizeOf__P271991.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} +Sprite_ay__P21254.info = {"start":4269,"length":60,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this"]} +Sprite_ay__P21254.isGetter = true; -function pins_sizeOf__P271991_mk(s) { +function Sprite_ay__P21254_mk(s) { checkStack(s.depth); return { - parent: s, fn: pins_sizeOf__P271991, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P21254, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -20732,7 +21286,7 @@ function pins_sizeOf__P271991_mk(s) { -function Buffer_sizeOfNumberFormat__P272031(s) { +function Sprite_ax__P21253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20744,89 +21298,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(6, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(7, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); - if (r0) { step = 5; continue; } - r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); - if (r0) { step = 6; continue; } - r0 = pxsim_pxtcore.switch_eq(8, s.tmp_0); - if (r0) { step = 7; continue; } - r0 = pxsim_pxtcore.switch_eq(9, s.tmp_0); - if (r0) { step = 8; continue; } - r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); - if (r0) { step = 9; continue; } - r0 = pxsim_pxtcore.switch_eq(10, s.tmp_0); - if (r0) { step = 10; continue; } - r0 = pxsim_pxtcore.switch_eq(12, s.tmp_0); - if (r0) { step = 11; continue; } - r0 = pxsim_pxtcore.switch_eq(11, s.tmp_0); - if (r0) { step = 12; continue; } - r0 = pxsim_pxtcore.switch_eq(15, s.tmp_0); - if (r0) { step = 13; continue; } - r0 = pxsim_pxtcore.switch_eq(13, s.tmp_0); - if (r0) { step = 14; continue; } - r0 = pxsim_pxtcore.switch_eq(16, s.tmp_0); - if (r0) { step = 15; continue; } - r0 = pxsim_pxtcore.switch_eq(14, s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 1: - case 2: - case 3: - case 4: - r0 = 1; - { step = 18; continue; } - case 5: - case 6: - case 7: - case 8: - r0 = 2; - { step = 18; continue; } - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - r0 = 4; - { step = 18; continue; } - case 15: - case 16: - r0 = 8; - { step = 18; continue; } - case 17: - r0 = 0; - case 18: + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_ax"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Buffer_sizeOfNumberFormat__P272031.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} +Sprite_ax__P21253.info = {"start":4096,"length":51,"line":159,"column":4,"endLine":161,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} -function Buffer_sizeOfNumberFormat__P272031_mk(s) { +function Sprite_ax__P21253_mk(s) { checkStack(s.depth); return { - parent: s, fn: Buffer_sizeOfNumberFormat__P272031, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P21253, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function helpers_setScreenBrightness__P273782(s) { +function Sprite_ax__P21252(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20838,41 +21343,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 10; - s.tmp_0.arg1 = 100; - r0 = (s.arg1 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 88; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.arg1 = (r0); - globals.brightness___273768 = (s.arg1); - r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___273768); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_ax"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -helpers_setScreenBrightness__P273782.info = {"start":8945,"length":210,"line":282,"column":4,"endLine":286,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"setScreenBrightness","argumentNames":["img","b"]} +Sprite_ax__P21252.info = {"start":3930,"length":60,"line":154,"column":4,"endLine":156,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this"]} +Sprite_ax__P21252.isGetter = true; -function helpers_setScreenBrightness__P273782_mk(s) { +function Sprite_ax__P21252_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_setScreenBrightness__P273782, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P21252, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_brightnessUp__P277066(s) { +function Sprite_vy__P21251(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20882,34 +21379,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_setScreenBrightness__P277068_mk(s); - r0 = globals.brightness___273768; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 + 5); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1146; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_brightnessUp__P277066.info = {"start":9107,"length":85,"line":285,"column":4,"endLine":287,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessUp","argumentNames":[]} +Sprite_vy__P21251.info = {"start":3757,"length":51,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} -function scene_systemMenu_brightnessUp__P277066_mk(s) { +function Sprite_vy__P21251_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_brightnessUp__P277066, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P21251, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_volumeDown__P277065(s) { +function Sprite_vy__P21250(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20919,54 +21424,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___286137 = undefined; - s.remainder___286140 = undefined; - s.newVolume___286143 = undefined; - s.tmp_0 = music_volume__P273438_mk(s); - s.callLocIdx = 1143; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.v___286137 = (r0); - r0 = (s.v___286137 % 32); - s.remainder___286140 = (r0); - r0 = pxsim_numops_toBoolDecr(s.remainder___286140); - if (!r0) { step = 1; continue; } - r0 = s.remainder___286140; - { step = 2; continue; } - case 1: - r0 = 32; - case 2: - // jmp value (already in r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_vy"]; s.tmp_0 = r0; - r0 = (s.v___286137 - s.tmp_0); - s.newVolume___286143 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P277063_mk(s); - s.tmp_0.arg0 = s.newVolume___286143; - s.callLocIdx = 1144; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_volumeDown__P277065.info = {"start":8914,"length":187,"line":278,"column":4,"endLine":283,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeDown","argumentNames":[]} +Sprite_vy__P21250.info = {"start":3595,"length":60,"line":143,"column":4,"endLine":145,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this"]} +Sprite_vy__P21250.isGetter = true; -function scene_systemMenu_volumeDown__P277065_mk(s) { +function Sprite_vy__P21250_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeDown__P277065, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P21250, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - v___286137: undefined, - remainder___286140: undefined, - newVolume___286143: undefined, + arg0: undefined, } } -function scene_systemMenu_setVolume__P277063(s) { +function Sprite_vx__P21249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20978,45 +21464,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = music_setVolume__P273437_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1138; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = music_playTone__P273439_mk(s); - s.tmp_0.arg0 = 440; - s.tmp_0.arg1 = 500; - s.callLocIdx = 1139; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = settings_writeNumber__P273880_mk(s); - s.tmp_0.arg0 = "#volume"; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1140; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setVolume__P277063.info = {"start":8565,"length":166,"line":265,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setVolume","argumentNames":["newVolume"]} +Sprite_vx__P21249.info = {"start":3426,"length":51,"line":137,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this","v"]} -function scene_systemMenu_setVolume__P277063_mk(s) { +function Sprite_vx__P21249_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setVolume__P277063, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P21249, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function music_playTone__P273439(s) { +function Sprite_vx__P21248(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21026,82 +21507,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.id___285978 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtrt.mklocRef(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_2 = r0; - r0 = (s.tmp_2 == 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.arg1, 86400000); - case 1: - case 2: - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 2000); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = music_playNoteCore__P276341_mk(s); - s.tmp_2.arg0 = 0; - s.tmp_2.arg1 = s.arg0; - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_2.arg2 = r0; - s.callLocIdx = 65; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - s.tmp_0 = pause__P272229_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_0.arg0 = r0; - s.callLocIdx = 66; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = (globals.playToneID___276343 + 1); - s.tmp_0 = r0; - globals.playToneID___276343 = (r0); - s.id___285978 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P285984); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_vx"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___285978); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg0); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 4: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -music_playTone__P273439.info = {"start":2612,"length":831,"line":84,"column":4,"endLine":109,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playTone","argumentNames":["frequency","ms"]} +Sprite_vx__P21248.info = {"start":3264,"length":60,"line":132,"column":4,"endLine":134,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vx","argumentNames":["this"]} +Sprite_vx__P21248.isGetter = true; -function music_playTone__P273439_mk(s) { +function Sprite_vx__P21248_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playTone__P273439, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P21248, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - id___285978: undefined, arg0: undefined, - arg1: undefined, } } -function music_playTone_inline__P285984(s) { +function sprites_BaseSprite_constructor__P20979(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21111,106 +21545,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pos___285985 = undefined; - s.now___285995 = undefined; - s.d___285998 = undefined; - s.t___286002 = undefined; - r0 = pxsim.control.millis(); - s.pos___285985 = (r0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_z__P20974_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 130; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.caps[0] == globals.playToneID___276343); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - case 3: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - r0 = pxsim.control.millis(); - s.now___285995 = (r0); - r0 = (s.pos___285985 - s.now___285995); - s.d___285998 = (r0); - s.tmp_0 = Math_min__P271947_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 500; - s.callLocIdx = 67; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.t___286002 = (r0); - s.tmp_0 = r0 = s.caps[1]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.t___286002); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = (s.pos___285985 + s.t___286002); - s.pos___285985 = (r0); - s.tmp_0 = music_playNoteCore__P276341_mk(s); - r0 = (s.d___285998 - 1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.caps[2]; - s.tmp_0.arg2 = s.t___286002; - s.callLocIdx = 68; s.pc = 8; return s.tmp_0; - case 8: r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_1 = r0; - r0 = (s.tmp_1 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = pause__P272229_mk(s); - r0 = (s.d___285998 + s.t___286002); - s.tmp_2.arg0 = r0; - s.callLocIdx = 69; s.pc = 9; return s.tmp_2; - case 9: + s.tmp_0 = scene_Scene_addSprite__P21030_mk(s); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 131; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - { step = 5; continue; } - case 4: - s.tmp_0 = pause__P272229_mk(s); - r0 = (s.d___285998 + s.t___286002); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 100); s.tmp_0.arg0 = r0; - s.callLocIdx = 70; s.pc = 10; return s.tmp_0; - case 10: + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 132; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - case 5: - { step = 1; continue; } - case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -music_playTone_inline__P285984.info = {"start":2911,"length":515,"line":93,"column":34,"endLine":107,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +sprites_BaseSprite_constructor__P20979.info = {"start":344,"length":170,"line":15,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"inline","argumentNames":["this","z"]} -function music_playTone_inline__P285984_mk(s) { +function sprites_BaseSprite_constructor__P20979_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playTone_inline__P285984, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_constructor__P20979, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - pos___285985: undefined, - now___285995: undefined, - d___285998: undefined, - t___286002: undefined, + arg0: undefined, + arg1: undefined, } } -function music_playNoteCore__P276341(s) { +function scene_Scene_addSprite__P21030(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21220,57 +21599,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___286032 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim.control.createBuffer(12); - s.buf___286032 = (r0); - s.tmp_0 = music_addNote__P273453_mk(s); - s.tmp_0.arg0 = s.buf___286032; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = 255; - s.tmp_0.arg4 = 255; - s.tmp_0.arg5 = 3; - s.tmp_0.arg6 = s.arg1; - s.tmp_1 = music_volume__P273438_mk(s); - s.callLocIdx = 63; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg7 = r0; - s.tmp_0.arg8 = s.arg1; - s.callLocIdx = 64; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["spriteNextId"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["spriteNextId"] = (s.tmp_1); + s.tmp_3 = if_id_2_mk(s); + s.tmp_3.arg0 = s.arg1; + s.tmp_3.arg1 = s.tmp_2; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapSetByString(s.tmp_3.arg0, "id", s.tmp_3.arg1); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["set/id"]; + if (s.tmp_3.fn === null) { s.tmp_3.arg0.fields["id"] = s.tmp_3.arg1; } + else if (s.tmp_3.fn === undefined) { failedCast(s.tmp_3.arg0) } + else { s.callLocIdx = 930; s.pc = 1; return s.tmp_3; } + } case 1: r0 = s.retval; - r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___286032); r0 = undefined; return leave(s, r0) default: oops() } } } -music_playNoteCore__P276341.info = {"start":1877,"length":240,"line":66,"column":4,"endLine":70,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"playNoteCore","argumentNames":["when","frequency","ms"]} +scene_Scene_addSprite__P21030.info = {"start":7218,"length":128,"line":200,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} -function music_playNoteCore__P276341_mk(s) { +function scene_Scene_addSprite__P21030_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playNoteCore__P276341, depth: s.depth + 1, + parent: s, fn: scene_Scene_addSprite__P21030, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - buf___286032: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function music_addNote__P273453(s) { +function sprites_BaseSprite_z__P20974(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21283,67 +21664,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); - s.arg7 = (s.lambdaArgs[7]); - s.arg8 = (s.lambdaArgs[8]); s.lambdaArgs = null; } - r0 = (s.arg2 > 0); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim.BufferMethods.setNumber(s.arg0, 2, s.arg1, s.arg5); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 1); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 2, s.tmp_1, 0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 2); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg6); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 4); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg2); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 6); - s.tmp_1 = r0; - r0 = (s.arg3 * s.arg7); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 6); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.tmp_2); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 8); - s.tmp_1 = r0; - r0 = (s.arg4 * s.arg7); + r0 = (s.arg0).fields["_z"] = (s.arg1); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 133; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.tmp_0.fields["flags"]; s.tmp_3 = r0; - r0 = (s.tmp_3 >> 6); + r0 = (s.tmp_3 | 1); s.tmp_2 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.tmp_2); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 10); - s.tmp_1 = r0; - r0 = pxsim.BufferMethods.setNumber(s.tmp_0, 4, s.tmp_1, s.arg8); - r0 = (s.arg1 + 12); - s.arg1 = (r0); + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); case 1: case 2: - r0 = pxsim.BufferMethods.setNumber(s.arg0, 2, s.arg1, 0); - r0 = s.arg1; + r0 = undefined; return leave(s, r0) default: oops() } } } -music_addNote__P273453.info = {"start":10288,"length":911,"line":323,"column":4,"endLine":336,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"addNote","argumentNames":["sndInstr","sndInstrPtr","ms","beg","end","soundWave","hz","volume","endHz"]} +sprites_BaseSprite_z__P20974.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} -function music_addNote__P273453_mk(s) { +function sprites_BaseSprite_z__P20974_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_addNote__P273453, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P20974, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -21351,20 +21704,13 @@ function music_addNote__P273453_mk(s) { tmp_3: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, - arg7: undefined, - arg8: undefined, } } -function music_setVolume__P273437(s) { +function sprites_BaseSprite_z__P20973(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21378,48 +21724,184 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_0.arg1 = 255; - r0 = (s.arg0 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 60; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.globalVolume___276336 = (r0); - r0 = (globals.globalVolume___276336 > 0); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; + return leaveAccessor(s, r0) + default: oops() +} } } +sprites_BaseSprite_z__P20973.info = {"start":591,"length":55,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this"]} +sprites_BaseSprite_z__P20973.isGetter = true; + +function sprites_BaseSprite_z__P20973_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_BaseSprite_z__P20973, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Sprite_setKind__P21289(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.spritesByKind___27550 = undefined; + s.overlapMap___27580 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = (s.arg1 == undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = 1; + r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = 0; + r0 = s.arg0.fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 === s.arg1); case 2: // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 15; continue; } + case 3: + case 4: + s.tmp_3 = game_currentScene__P21034_mk(s); + s.callLocIdx = 367; s.pc = 16; return s.tmp_3; + case 16: + r0 = s.retval; + r0 = r0.fields["spritesByKind"]; + s.spritesByKind___27550 = (r0); + r0 = s.arg0.fields["_kind"]; s.tmp_1 = r0; - r0 = undefined; + r0 = (s.tmp_1 >= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + r0 = s.arg0.fields["_kind"]; + s.tmp_2 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___27550, s.tmp_2); + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = sprites_SpriteSet_remove__P21354_mk(s); + r0 = s.arg0.fields["_kind"]; + s.tmp_5 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___27550, s.tmp_5); + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.arg0; + s.callLocIdx = 368; s.pc = 17; return s.tmp_4; + case 17: + r0 = s.retval; + case 7: + case 8: + r0 = (s.arg1 >= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___27550, s.arg1); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteSet__C21348_VT); + s.tmp_4 = r0; + s.tmp_5 = sprites_SpriteSet_constructor__P21359_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.callLocIdx = 369; s.pc = 18; return s.tmp_5; + case 18: + r0 = s.retval; + r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___27550, s.arg1, s.tmp_4); + case 9: + case 10: + s.tmp_0 = sprites_SpriteSet_add__P21352_mk(s); + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___27550, s.arg1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 370; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + case 11: + case 12: + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 371; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + r0 = r0.fields["overlapMap"]; + s.overlapMap___27580 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___27580, s.arg1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + s.tmp_3 = r0 = s.overlapMap___27580; + s.tmp_4 = r0 = s.arg1; + r0 = pxsim_Array__mk(); + s.tmp_5 = r0; + r0 = pxsim_pxtrt.mapSetGeneric(s.tmp_3, s.tmp_4, s.tmp_5); + case 13: + case 14: + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___27580, s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_kindsOverlappedWith"] = (s.tmp_1); + r0 = (s.arg0).fields["_kind"] = (s.arg1); + case 15: r0 = undefined; return leave(s, r0) default: oops() } } } -music_setVolume__P273437.info = {"start":1533,"length":153,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"setVolume","argumentNames":["volume"]} +Sprite_setKind__P21289.info = {"start":12841,"length":663,"line":464,"column":4,"endLine":484,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setKind","argumentNames":["this","value"]} -function music_setVolume__P273437_mk(s) { +function Sprite_setKind__P21289_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_setVolume__P273437, depth: s.depth + 1, + parent: s, fn: Sprite_setKind__P21289, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + spritesByKind___27550: undefined, + overlapMap___27580: undefined, arg0: undefined, + arg1: undefined, } } -function music_enableAmp__P276339(s) { +function sprites_SpriteSet_constructor__P21359(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21433,17 +21915,25 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_sprites"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -music_enableAmp__P276339.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} +sprites_SpriteSet_constructor__P21359.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} -function music_enableAmp__P276339_mk(s) { +function sprites_SpriteSet_constructor__P21359_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_enableAmp__P276339, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_constructor__P21359, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -21451,7 +21941,7 @@ function music_enableAmp__P276339_mk(s) { -function scene_systemMenu_volumeUp__P277064(s) { +function sprites_SpriteSet_add__P21352(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21461,47 +21951,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___285946 = undefined; - s.remainder___285949 = undefined; - s.newVolume___285952 = undefined; - s.tmp_0 = music_volume__P273438_mk(s); - s.callLocIdx = 1141; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.v___285946 = (r0); - r0 = (s.v___285946 % 32); - s.remainder___285949 = (r0); - r0 = (s.v___285946 + 32); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 - s.remainder___285949); - s.newVolume___285952 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P277063_mk(s); - s.tmp_0.arg0 = s.newVolume___285952; - s.callLocIdx = 1142; s.pc = 2; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 5; continue; } + case 1: case 2: - r0 = s.retval; - r0 = undefined; + r0 = s.arg0.fields["_sprites"]; + s.tmp_4 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_4, s.arg1, undefined); + s.tmp_3 = r0; + r0 = (s.tmp_3 > -1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 5; continue; } + case 3: + case 4: + r0 = s.arg0.fields["_sprites"]; + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_5, s.arg1); + r0 = true; + case 5: return leave(s, r0) default: oops() } } } -scene_systemMenu_volumeUp__P277064.info = {"start":8737,"length":171,"line":271,"column":4,"endLine":276,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeUp","argumentNames":[]} +sprites_SpriteSet_add__P21352.info = {"start":1041,"length":263,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"add","argumentNames":["this","sprite"]} -function scene_systemMenu_volumeUp__P277064_mk(s) { +function sprites_SpriteSet_add__P21352_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeUp__P277064, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_add__P21352, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - v___285946: undefined, - remainder___285949: undefined, - newVolume___285952: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, } } -function game_consoleOverlay_isVisible__P274941(s) { +function sprites_SpriteSet_contains__P21355(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21511,33 +22019,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___277105); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = (s.tmp_0 > -1); return leave(s, r0) default: oops() } } } -game_consoleOverlay_isVisible__P274941.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} +sprites_SpriteSet_contains__P21355.info = {"start":2172,"length":100,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"contains","argumentNames":["this","sprite"]} -function game_consoleOverlay_isVisible__P274941_mk(s) { +function sprites_SpriteSet_contains__P21355_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_isVisible__P274941, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_contains__P21355, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_closeMenu__P274919(s) { +function game_onShade__P21942(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21547,44 +22061,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___277059); - if (!r0) { step = 1; continue; } - s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P274918_mk(s); - s.tmp_0.arg0 = globals.instance___277059; - s.callLocIdx = 1157; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.instance___277059 = (undefined); - s.tmp_0 = controller__setUserEventsEnabled__P274023_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1158; s.pc = 4; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = game_init__P21922_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1026; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - s.tmp_0 = game_popScene__P274821_mk(s); - s.callLocIdx = 1159; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: case 2: + s.tmp_2 = scene_createRenderable__P21738_mk(s); + s.tmp_2.arg0 = 80; + s.tmp_2.arg1 = s.arg0; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 1027; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_closeMenu__P274919.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} +game_onShade__P21942.info = {"start":15927,"length":145,"line":474,"column":4,"endLine":478,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} -function scene_systemMenu_closeMenu__P274919_mk(s) { +function game_onShade__P21942_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_closeMenu__P274919, depth: s.depth + 1, + parent: s, fn: game_onShade__P21942, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + arg0: undefined, } } -function scene_systemMenu_PauseMenu_dispose__P274918(s) { +function scene_createRenderable__P21738(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21594,47 +22118,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.renderable___31477 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + r0 = pxsim_pxtcore_mkClassInstance(scene_Renderable__C21732_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.tmp_1 = r0 = s.arg2; + r0 = pxsim_numops_toBool(s.tmp_1); if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P285054; - s.callLocIdx = 1134; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - r0 = (s.arg0).fields["options"] = (undefined); + r0 = s.tmp_1; + { step = 2; continue; } case 1: + r0 = renderable_inline__P31483; case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_2 = r0; + s.tmp_3 = scene_Renderable_constructor__P21737_mk(s); + s.tmp_3.arg0 = s.tmp_0; + s.tmp_3.arg1 = s.arg1; + s.tmp_3.arg2 = s.tmp_2; + s.tmp_3.arg3 = s.arg0; + s.callLocIdx = 904; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.renderable___31477 = (s.tmp_0); + r0 = s.renderable___31477; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose__P274918.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +scene_createRenderable__P21738.info = {"start":608,"length":339,"line":24,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/renderable.ts","functionName":"createRenderable","argumentNames":["z","handler","shouldBeVisible"]} -function scene_systemMenu_PauseMenu_dispose__P274918_mk(s) { +function scene_createRenderable__P21738_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose__P274918, depth: s.depth + 1, + parent: s, fn: scene_createRenderable__P21738, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + renderable___31477: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_PauseMenu_dispose_inline__P285054(s) { +function renderable_inline__P31483(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21644,35 +22181,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = scene_systemMenu_MenuOption_dispose__P274911_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1133; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = true; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose_inline__P285054.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} +renderable_inline__P31483.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_dispose_inline__P285054_mk(s) { +function renderable_inline__P31483_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P285054, depth: s.depth + 1, + parent: s, fn: renderable_inline__P31483, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, } } -function scene_systemMenu_MenuOption_dispose__P274911(s) { +function scene_Renderable_constructor__P21737(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21684,55 +22210,44 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = s.arg0.fields["card"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = Sprite_destroy__P274245_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1053; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_destroy__P274245_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 1054; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = (s.arg0).fields["card"] = (undefined); - r0 = (s.arg0).fields["icon"] = (undefined); + if (!checkSubtype(r0, scene_Renderable__C21732_VT)) failedCast(r0); + r0 = (s.arg0).fields["handler"] = (s.arg1); + r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); + s.tmp_0 = sprites_BaseSprite_constructor__P20979_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 901; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_dispose__P274911.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +scene_Renderable_constructor__P21737.info = {"start":83,"length":212,"line":2,"column":8,"endLine":8,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":["this","handler","shouldBeVisible","z"]} -function scene_systemMenu_MenuOption_dispose__P274911_mk(s) { +function scene_Renderable_constructor__P21737_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_dispose__P274911, depth: s.depth + 1, + parent: s, fn: scene_Renderable_constructor__P21737, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_destroy__P274245(s) { +function game_pushScene__P21923(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21742,74 +22257,70 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; + s.oldScene___28538 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1014; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.oldScene___28538 = (r0); + s.tmp_0 = particles_clearAll__P22375_mk(s); + s.callLocIdx = 1015; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_disableAll__P22376_mk(s); + s.callLocIdx = 1016; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals._sceneStack___21912); s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 5; continue; } + r0 = pxsim_Array__mk(); + globals._sceneStack___21912 = (r0); case 1: case 2: - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 | 2); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["flags"] = (s.tmp_3); - r0 = pxsim_numops_toBoolDecr(s.arg1); + r0 = pxsim_Array__push(globals._sceneStack___21912, globals._scene___21911); + s.tmp_0 = game_init__P21922_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1017; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___21913); if (!r0) { step = 3; continue; } - s.tmp_0 = effects_ParticleEffect_destroy__P275082_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = undefined; - s.callLocIdx = 432; s.pc = 6; return s.tmp_0; - case 6: + r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P28555); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___28538); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1.arg0 = globals._scenePushHandlers___21913; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 1019; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - { step = 4; continue; } case 3: - s.tmp_0 = Sprite__destroyCore__P274246_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 433; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; case 4: - case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_destroy__P274245.info = {"start":26493,"length":293,"line":859,"column":4,"endLine":868,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"destroy","argumentNames":["this","effect","duration"]} +game_pushScene__P21923.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} -function Sprite_destroy__P274245_mk(s) { +function game_pushScene__P21923_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_destroy__P274245, depth: s.depth + 1, + parent: s, fn: game_pushScene__P21923, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + oldScene___28538: undefined, } } -function effects_ParticleEffect_destroy__P275082(s) { +function game_pushScene_inline__P28555(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21821,86 +22332,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C275079_VT)) failedCast(r0); - s.tmp_0 = Sprite_setFlag__P274236_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 7168; - s.tmp_0.arg2 = true; - s.callLocIdx = 1318; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = effects_ParticleEffect_start__P275081_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg3; - s.tmp_0.arg3 = null; - r0 = s.arg1.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 512); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0.arg4 = r0; - s.callLocIdx = 1319; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 1; continue; } - r0 = s.arg2; - { step = 2; continue; } + s.tmp_0 = lambda_2_mk(s); + s.tmp_0.argL = s.arg0; + s.tmp_0.arg0 = s.caps[0]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1018; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg0.fields["defaultLifespan"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 2); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.arg1).fields["lifespan"] = (s.tmp_1); - s.tmp_0 = effects_ImageEffect_applyTo__P275109_mk(s); - s.tmp_0.arg0 = globals.dissolve___275112; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1320; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_destroy__P275082.info = {"start":1736,"length":368,"line":41,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"destroy","argumentNames":["this","anchor","duration","particlesPerSecond"]} +game_pushScene_inline__P28555.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} -function effects_ParticleEffect_destroy__P275082_mk(s) { +function game_pushScene_inline__P28555_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_destroy__P275082, depth: s.depth + 1, + parent: s, fn: game_pushScene_inline__P28555, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function dissolve_inline__P285179(s) { +function particles_disableAll__P22376(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21910,105 +22370,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___285182 = undefined; - s.x___285193 = undefined; - s.y___285199 = undefined; - s.w___285205 = undefined; - s.h___285209 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 5); - s.i___285182 = (r0); - case 1: - r0 = (s.i___285182 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = 0; - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1.arg2 = r0; - s.callLocIdx = 52; s.pc = 3; return s.tmp_1; + s.sources___30681 = undefined; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1258; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.x___285193 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 0; - r0 = pxsim_ImageMethods.height(s.arg0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 53; s.pc = 4; return s.tmp_0; + s.sources___30681 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___30681); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + s.tmp_0.arg0 = s.sources___30681; + s.tmp_0.arg1 = particles_disableAll_inline__P30687; + s.callLocIdx = 1260; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - s.y___285199 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = 3; - s.callLocIdx = 54; s.pc = 5; return s.tmp_0; + s.tmp_0 = particles_pruneParticles__P22365_mk(s); + s.callLocIdx = 1261; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - s.w___285205 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 1; - s.tmp_0.arg2 = 3; - s.callLocIdx = 55; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.h___285209 = (r0); - s.tmp_0 = helpers_imageDrawRect__P273776_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.x___285193; - s.tmp_0.arg2 = s.y___285199; - s.tmp_0.arg3 = s.w___285205; - s.tmp_0.arg4 = s.h___285209; - s.tmp_0.arg5 = 0; - s.callLocIdx = 56; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = (s.i___285182 - 1); - s.i___285182 = (r0); - { step = 1; continue; } + case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -dissolve_inline__P285179.info = {"start":2199,"length":360,"line":60,"column":49,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +particles_disableAll__P22376.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} -function dissolve_inline__P285179_mk(s) { +function particles_disableAll__P22376_mk(s) { checkStack(s.depth); return { - parent: s, fn: dissolve_inline__P285179, depth: s.depth + 1, + parent: s, fn: particles_disableAll__P22376, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - i___285182: undefined, - x___285193: undefined, - y___285199: undefined, - w___285205: undefined, - h___285209: undefined, - arg0: undefined, - arg1: undefined, + sources___30681: undefined, } } -function helpers_imageDrawRect__P273776(s) { +function particles_disableAll_inline__P30687(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22020,108 +22421,34 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } - r0 = (s.arg3 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = (s.arg4 == 0); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - { step = 5; continue; } - case 3: - case 4: - r0 = (s.arg3 - 1); - s.arg3 = (r0); - r0 = (s.arg4 - 1); - s.arg4 = (r0); - s.tmp_0 = helpers_imageDrawLine__P273775_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - r0 = (s.arg1 + s.arg3); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg2; - s.tmp_0.arg5 = s.arg5; - s.callLocIdx = 84; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P273775_mk(s); + s.tmp_0 = particles_ParticleSource_enabled__P22350_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = s.arg1; - r0 = (s.arg2 + s.arg4); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg5; - s.callLocIdx = 85; s.pc = 7; return s.tmp_0; - case 7: + s.tmp_0.arg1 = false; + s.callLocIdx = 1259; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P273775_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = (s.arg1 + s.arg3); - s.tmp_0.arg1 = r0; - r0 = (s.arg2 + s.arg4); - s.tmp_0.arg2 = r0; - r0 = (s.arg1 + s.arg3); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg2; - s.tmp_0.arg5 = s.arg5; - s.callLocIdx = 86; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P273775_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = (s.arg1 + s.arg3); - s.tmp_0.arg1 = r0; - r0 = (s.arg2 + s.arg4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.arg1; - r0 = (s.arg2 + s.arg4); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg5; - s.callLocIdx = 87; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - case 5: - r0 = undefined; + r0 = false; return leave(s, r0) default: oops() } } } -helpers_imageDrawRect__P273776.info = {"start":5945,"length":370,"line":185,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawRect","argumentNames":["img","x","y","w","h","c"]} +particles_disableAll_inline__P30687.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function helpers_imageDrawRect__P273776_mk(s) { +function particles_disableAll_inline__P30687_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawRect__P273776, depth: s.depth + 1, + parent: s, fn: particles_disableAll_inline__P30687, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function helpers_imageDrawLine__P273775(s) { +function particles_clearAll__P22375(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22131,60 +22458,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P276442_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 82; s.pc = 1; return s.tmp_2; - case 1: + s.sources___30692 = undefined; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1254; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P276442_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 83; s.pc = 2; return s.tmp_4; - case 2: + s.sources___30692 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___30692); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + s.tmp_0.arg0 = s.sources___30692; + s.tmp_0.arg1 = particles_clearAll_inline__P30698; + s.callLocIdx = 1256; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods._drawLine(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); + s.tmp_0 = particles_pruneParticles__P22365_mk(s); + s.callLocIdx = 1257; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageDrawLine__P273775.info = {"start":5781,"length":159,"line":182,"column":4,"endLine":184,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageDrawLine","argumentNames":["img","x","y","w","h","c"]} +particles_clearAll__P22375.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} -function helpers_imageDrawLine__P273775_mk(s) { +function particles_clearAll__P22375_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawLine__P273775, depth: s.depth + 1, + parent: s, fn: particles_clearAll__P22375, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, + sources___30692: undefined, } } -function Math_FastRandom_randomRange__P274880(s) { +function particles_clearAll_inline__P30698(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22196,60 +22509,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C274876_VT)) failedCast(r0); - r0 = (s.arg2 > s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = Math_FastRandom_next__P274879_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1035; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.arg2 - s.arg1); - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_3 = r0; - r0 = (s.tmp_1 % s.tmp_3); - { step = 2; continue; } + s.tmp_0 = particles_ParticleSource_clear__P22352_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1255; s.pc = 1; return s.tmp_0; case 1: - r0 = 0; - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = (s.arg1 + s.tmp_5); + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_randomRange__P274880.info = {"start":2079,"length":131,"line":62,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"randomRange","argumentNames":["this","min","max"]} +particles_clearAll_inline__P30698.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function Math_FastRandom_randomRange__P274880_mk(s) { +function particles_clearAll_inline__P30698_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_randomRange__P274880, depth: s.depth + 1, + parent: s, fn: particles_clearAll_inline__P30698, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Math_FastRandom_next__P274879(s) { +function particles_ParticleSource_clear__P22352(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22264,42 +22550,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C274876_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["lfsr"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = s.arg0.fields["lfsr"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 & 1); - s.tmp_6 = r0; - r0 = (0 - s.tmp_6); - s.tmp_5 = r0; - r0 = (s.tmp_5 & 46080); - s.tmp_4 = r0; - r0 = (s.tmp_2 ^ s.tmp_4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); - r0 = s.tmp_1; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = (s.arg0).fields["head"] = (undefined); + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_next__P274879.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} +particles_ParticleSource_clear__P22352.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} -function Math_FastRandom_next__P274879_mk(s) { +function particles_ParticleSource_clear__P22352_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_next__P274879, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_clear__P22352, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, arg0: undefined, } } @@ -22307,7 +22570,7 @@ function Math_FastRandom_next__P274879_mk(s) { -function effects_ImageEffect_constructor__P275108(s) { +function controller_Button_onEvent__P21144(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22317,6 +22580,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.eventHandler___32819 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -22324,32 +22588,28 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ImageEffect__C275107_VT)) failedCast(r0); - r0 = (s.arg0).fields["effect"] = (s.arg2); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C274876_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P274878_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1328; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P21153_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 203; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = (s.arg0).fields["fastRandom"] = (s.tmp_0); - r0 = (s.arg0).fields["preferredDelay"] = (s.arg1); - r0 = (s.arg0).fields["times"] = (undefined); + s.eventHandler___32819 = (r0); + r0 = (s.eventHandler___32819).fields["callback"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ImageEffect_constructor__P275108.info = {"start":410,"length":290,"line":10,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["this","defaultRate","effectFactory"]} +controller_Button_onEvent__P21144.info = {"start":3784,"length":188,"line":123,"column":8,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"onEvent","argumentNames":["this","event","handler"]} -function effects_ImageEffect_constructor__P275108_mk(s) { +function controller_Button_onEvent__P21144_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_constructor__P275108, depth: s.depth + 1, + parent: s, fn: controller_Button_onEvent__P21144, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, + eventHandler___32819: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -22359,7 +22619,7 @@ function effects_ImageEffect_constructor__P275108_mk(s) { -function effects_ImageEffect_applyTo__P275109(s) { +function controller_Button_getOrCreateHandlerForEvent__P21153(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22369,63 +22629,132 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.clonedImage___285358 = undefined; + s.handlerState___32840 = undefined; + s.eventHandler___32850 = undefined; + s.unnamed160___U2 = undefined; + s.unnamed161___U3 = undefined; + s.newHandler___32866 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ImageEffect__C275107_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + s.tmp_3 = controller_Button_handlerState__P21139_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 213; s.pc = 10; return s.tmp_3; + case 10: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonEventHandlerState__C21171_VT); + s.tmp_4 = r0; + s.tmp_5 = controller_ButtonEventHandlerState_constructor__P21172_mk(s); + s.tmp_5.arg0 = s.tmp_4; + r0 = s.arg0.fields["id"]; + s.tmp_5.arg1 = r0; + s.callLocIdx = 215; s.pc = 11; return s.tmp_5; + case 11: + r0 = s.retval; + s.tmp_7 = game_currentScene__P21034_mk(s); + s.callLocIdx = 214; s.pc = 12; return s.tmp_7; + case 12: + r0 = s.retval; + r0 = r0.fields["buttonEventHandlers"]; + s.tmp_6 = r0; + r0 = pxsim_Array__push(s.tmp_6, s.tmp_4); case 1: - r0 = s.arg1.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_0 = controller_Button_handlerState__P21139_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 216; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.handlerState___32840 = (r0); + r0 = s.handlerState___32840.fields["user"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - { step = 5; continue; } + s.tmp_3 = r0 = s.handlerState___32840; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["user"] = (s.tmp_4); case 3: case 4: - r0 = s.arg1.fields["_image"]; - s.tmp_5 = r0; - r0 = pxsim_ImageMethods.clone(s.tmp_5); - s.clonedImage___285358 = (r0); - s.tmp_0 = effects_ImageEffect_change__P275110_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.clonedImage___285358; - s.callLocIdx = 1331; s.pc = 6; return s.tmp_0; + s.eventHandler___32850 = (undefined); + r0 = s.handlerState___32840.fields["user"]; + s.unnamed160___U2 = (r0); + s.unnamed161___U3 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed161___U3; + r0 = pxsim_Array__length(s.unnamed160___U2); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 8; continue; } + r0 = pxsim_Array__getAt(s.unnamed160___U2, s.unnamed161___U3); + s.eventHandler___32850 = (r0); + r0 = s.eventHandler___32850.fields["event"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 === s.arg1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 6; continue; } + r0 = s.eventHandler___32850; + { step = 9; continue; } case 6: - r0 = s.retval; - s.tmp_0 = Sprite_setImage__P274208_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.clonedImage___285358; - s.callLocIdx = 1332; s.pc = 7; return s.tmp_0; case 7: + r0 = (s.unnamed161___U3 + 1); + s.unnamed161___U3 = (r0); + { step = 5; continue; } + case 8: + s.unnamed160___U2 = (undefined); + r0 = pxsim_pxtcore_mkAction(2, controller_Button_getOrCreateHandlerForEvent_inline__P32863); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.arg1); + s.tmp_5 = control_onEvent__P20386_mk(s); + s.tmp_5.arg0 = s.arg1; + r0 = s.arg0.fields["id"]; + s.tmp_5.arg1 = r0; + s.tmp_5.arg2 = s.tmp_4; + s.tmp_5.arg3 = 16; + s.callLocIdx = 218; s.pc = 14; return s.tmp_5; + case 14: r0 = s.retval; - case 5: - r0 = undefined; + r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C21169_VT); + s.tmp_0 = r0; + s.tmp_1 = controller_ButtonHandler_constructor__P21170_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 219; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.newHandler___32866 = (s.tmp_0); + r0 = s.handlerState___32840.fields["user"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.newHandler___32866); + r0 = s.newHandler___32866; + case 9: return leave(s, r0) default: oops() } } } -effects_ImageEffect_applyTo__P275109.info = {"start":823,"length":218,"line":21,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"applyTo","argumentNames":["this","sprite"]} +controller_Button_getOrCreateHandlerForEvent__P21153.info = {"start":8550,"length":829,"line":250,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"getOrCreateHandlerForEvent","argumentNames":["this","event"]} -function effects_ImageEffect_applyTo__P275109_mk(s) { +function controller_Button_getOrCreateHandlerForEvent__P21153_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_applyTo__P275109, depth: s.depth + 1, + parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P21153, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22433,7 +22762,13 @@ function effects_ImageEffect_applyTo__P275109_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - clonedImage___285358: undefined, + tmp_6: undefined, + tmp_7: undefined, + handlerState___32840: undefined, + eventHandler___32850: undefined, + unnamed160___U2: undefined, + unnamed161___U3: undefined, + newHandler___32866: undefined, arg0: undefined, arg1: undefined, } } @@ -22442,7 +22777,41 @@ function effects_ImageEffect_applyTo__P275109_mk(s) { -function effects_ImageEffect_change__P275110(s) { +function controller_Button_getOrCreateHandlerForEvent_inline__P32863(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_runButtonEvents__P21152_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.caps[1]; + s.callLocIdx = 217; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_getOrCreateHandlerForEvent_inline__P32863.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_getOrCreateHandlerForEvent_inline__P32863_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P32863, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_ButtonEventHandlerState_constructor__P21172(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22458,35 +22827,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ImageEffect__C275107_VT)) failedCast(r0); - s.tmp_0 = if_effect_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - r0 = s.arg0.fields["fastRandom"]; - s.tmp_0.arg2 = r0; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "effect"), 3); - s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["effect"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["effect"], 3); s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1333; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1333; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; + if (!checkSubtype(r0, controller_ButtonEventHandlerState__C21171_VT)) failedCast(r0); + r0 = (s.arg0).fields["id"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ImageEffect_change__P275110.info = {"start":1151,"length":81,"line":32,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"change","argumentNames":["this","input"]} +controller_ButtonEventHandlerState_constructor__P21172.info = {"start":1122,"length":33,"line":48,"column":8,"endLine":48,"endColumn":41,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","id"]} -function effects_ImageEffect_change__P275110_mk(s) { +function controller_ButtonEventHandlerState_constructor__P21172_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_change__P275110, depth: s.depth + 1, + parent: s, fn: controller_ButtonEventHandlerState_constructor__P21172, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, arg1: undefined, } } @@ -22495,7 +22848,7 @@ function effects_ImageEffect_change__P275110_mk(s) { -function effects_ParticleEffect_start__P275081(s) { +function controller_ButtonHandler_constructor__P21170(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22505,112 +22858,184 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.src___285383 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C275079_VT)) failedCast(r0); - r0 = s.arg0.fields["sourceFactory"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!checkSubtype(r0, controller_ButtonHandler__C21169_VT)) failedCast(r0); + r0 = (s.arg0).fields["event"] = (s.arg1); + r0 = (s.arg0).fields["callback"] = (s.arg2); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_ButtonHandler_constructor__P21170.info = {"start":997,"length":66,"line":44,"column":8,"endLine":44,"endColumn":74,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","event","callback"]} + +function controller_ButtonHandler_constructor__P21170_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_ButtonHandler_constructor__P21170, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function controller_Button_runButtonEvents__P21152(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.handlerState___32880 = undefined; + s.userHandler___32884 = undefined; + s.eventHandler___32896 = undefined; + s.unnamed158___U3 = undefined; + s.unnamed159___U4 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + s.tmp_0 = controller_Button_handlerState__P21139_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 209; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.handlerState___32880 = (r0); + r0 = pxsim_numops_toBoolDecr(s.handlerState___32880); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 9; continue; } + { step = 13; continue; } case 1: case 2: - r0 = pxsim_numops_toBoolDecr(s.arg3); + s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P21153_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 210; s.pc = 15; return s.tmp_2; + case 15: + r0 = s.retval; + s.userHandler___32884 = (r0); + r0 = s.userHandler___32884.fields["callback"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = s.arg3; - { step = 4; continue; } - case 3: - r0 = s.arg0.fields["defaultRate"]; - case 4: - // jmp value (already in r0) - s.tmp_3 = r0; - s.tmp_4 = if_sourceFactory_3_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.arg1; - s.tmp_4.arg2 = s.tmp_3; - if (!s.tmp_4.arg0.vtable.iface) { - setupLambda(s.tmp_4, pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "sourceFactory"), 3); - s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; + s.tmp_1 = if_callback_1_mk(s); + s.tmp_1.arg0 = s.userHandler___32884; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); + s.callLocIdx = 211; s.pc = 16; return s.tmp_1; } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["sourceFactory"]; - if (s.tmp_4.fn == null) { setupLambda(s.tmp_4, s.tmp_4.arg0.fields["sourceFactory"], 3); s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; } - else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1316; s.pc = 10; return s.tmp_4;; } - else { s.callLocIdx = 1316; s.pc = 10; return s.tmp_4; } + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["callback"]; + if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["callback"], 1); s.callLocIdx = 211; s.pc = 16; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 211; s.pc = 16; return s.tmp_1;; } + else { s.callLocIdx = 211; s.pc = 16; return s.tmp_1; } } - case 10: - r0 = s.retval; - s.src___285383 = (r0); - s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P274979_mk(s); - s.tmp_0.arg0 = s.src___285383; - r0 = pxsim_numops_toBoolDecr(s.arg4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1317; s.pc = 11; return s.tmp_0; - case 11: + case 16: r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 7; continue; } - r0 = (s.arg2 > 0); + case 3: + case 4: + r0 = s.handlerState___32880.fields["system"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.arg2; - { step = 6; continue; } + if (!r0) { step = 11; continue; } + s.eventHandler___32896 = (undefined); + r0 = s.handlerState___32880.fields["system"]; + s.unnamed158___U3 = (r0); + s.unnamed159___U4 = (0); case 5: - r0 = s.arg0.fields["defaultLifespan"]; - case 6: - // jmp value (already in r0) + s.tmp_0 = r0 = s.unnamed159___U4; + r0 = pxsim_Array__length(s.unnamed158___U3); s.tmp_1 = r0; - r0 = (s.src___285383).fields["lifespan"] = (s.tmp_1); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__getAt(s.unnamed158___U3, s.unnamed159___U4); + s.eventHandler___32896 = (r0); + r0 = s.eventHandler___32896.fields["event"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 === s.arg1); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 6; continue; } + r0 = s.tmp_2; + { step = 7; continue; } + case 6: + r0 = s.eventHandler___32896.fields["callback"]; case 7: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 8; continue; } + s.tmp_5 = if_callback_1_mk(s); + s.tmp_5.arg0 = s.eventHandler___32896; + if (!s.tmp_5.arg0.vtable.iface) { + setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); + s.callLocIdx = 212; s.pc = 17; return s.tmp_5; + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["callback"]; + if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["callback"], 1); s.callLocIdx = 212; s.pc = 17; return s.tmp_5; } + else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 212; s.pc = 17; return s.tmp_5;; } + else { s.callLocIdx = 212; s.pc = 17; return s.tmp_5; } + } + case 17: + r0 = s.retval; case 8: case 9: + r0 = (s.unnamed159___U4 + 1); + s.unnamed159___U4 = (r0); + { step = 5; continue; } + case 10: + s.unnamed158___U3 = (undefined); + case 11: + case 12: + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_start__P275081.info = {"start":967,"length":452,"line":26,"column":8,"endLine":32,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"start","argumentNames":["this","anchor","duration","particlesPerSecond","relativeToCamera"]} +controller_Button_runButtonEvents__P21152.info = {"start":8005,"length":535,"line":236,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"runButtonEvents","argumentNames":["this","event"]} -function effects_ParticleEffect_start__P275081_mk(s) { +function controller_Button_runButtonEvents__P21152_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_start__P275081, depth: s.depth + 1, + parent: s, fn: controller_Button_runButtonEvents__P21152, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - src___285383: undefined, + tmp_5: undefined, + handlerState___32880: undefined, + userHandler___32884: undefined, + eventHandler___32896: undefined, + unnamed158___U3: undefined, + unnamed159___U4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function particles_ParticleSource_setRelativeToCamera__P274979(s) { +function controller_Button_handlerState__P21139(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22620,59 +23045,77 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___32912 = undefined; + s.unnamed156___U1 = undefined; + s.unnamed157___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["pFlags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); - { step = 2; continue; } + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + s.state___32912 = (undefined); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 199; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = r0.fields["buttonEventHandlers"]; + s.unnamed156___U1 = (r0); + s.unnamed157___U2 = (0); case 1: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["pFlags"]; - s.tmp_4 = r0; - r0 = (~ s.tmp_4); + s.tmp_0 = r0 = s.unnamed157___U2; + r0 = pxsim_Array__length(s.unnamed156___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed156___U1, s.unnamed157___U2); + s.state___32912 = (r0); + r0 = s.state___32912.fields["id"]; s.tmp_3 = r0; - r0 = (s.tmp_3 | 4); + r0 = s.arg0.fields["id"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 === s.tmp_4); s.tmp_2 = r0; - r0 = (~ s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + r0 = s.state___32912; + { step = 5; continue; } case 2: + case 3: + r0 = (s.unnamed157___U2 + 1); + s.unnamed157___U2 = (r0); + { step = 1; continue; } + case 4: + s.unnamed156___U1 = (undefined); r0 = undefined; - return leave(s, r0) + case 5: + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_setRelativeToCamera__P274979.info = {"start":6439,"length":173,"line":211,"column":8,"endLine":214,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRelativeToCamera","argumentNames":["this","on"]} +controller_Button_handlerState__P21139.info = {"start":1644,"length":240,"line":66,"column":8,"endLine":71,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"handlerState","argumentNames":["this"]} +controller_Button_handlerState__P21139.isGetter = true; -function particles_ParticleSource_setRelativeToCamera__P274979_mk(s) { +function controller_Button_handlerState__P21139_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRelativeToCamera__P274979, depth: s.depth + 1, + parent: s, fn: controller_Button_handlerState__P21139, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + state___32912: undefined, + unnamed156___U1: undefined, + unnamed157___U2: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_setFlag__P274236(s) { +function scene_systemMenu_initScreen__P22249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22682,61 +23125,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg2); + s.brightness___32924 = undefined; + s.tmp_0 = settings_readNumber__P20949_mk(s); + s.tmp_0.arg0 = "#brightness"; + s.callLocIdx = 1184; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.brightness___32924 = (r0); + r0 = (s.brightness___32924 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - { step = 2; continue; } + s.tmp_1 = helpers_setScreenBrightness__P20851_mk(s); + s.tmp_1.arg0 = globals.screen___20904; + s.tmp_1.arg1 = s.brightness___32924; + s.callLocIdx = 1185; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; case 1: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["flags"]; - s.tmp_4 = r0; - r0 = (~ s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 | s.arg1); - s.tmp_2 = r0; - r0 = (~ s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_setFlag__P274236.info = {"start":20205,"length":130,"line":676,"column":4,"endLine":679,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setFlag","argumentNames":["this","flag","on"]} +scene_systemMenu_initScreen__P22249.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} -function Sprite_setFlag__P274236_mk(s) { +function scene_systemMenu_initScreen__P22249_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setFlag__P274236, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initScreen__P22249, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + brightness___32924: undefined, } } -function Sprite__destroyCore__P274246(s) { +function settings_readNumber__P20949(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22746,126 +23174,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___285104 = undefined; + s.buf___32935 = undefined; + s.nums___32942 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 2); + r0 = pxsim.settings._get(s.arg0); + s.buf___32935 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___32935); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 434; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.scene___285104 = (r0); - r0 = s.scene___285104.fields["allSprites"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - r0 = s.arg0.fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = undefined; + { step = 7; continue; } + { step = 6; continue; } case 1: - r0 = s.scene___285104.fields["spritesByKind"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["_kind"]; - s.tmp_3 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_2, s.tmp_3); - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - s.tmp_5 = sprites_SpriteSet_remove__P274287_mk(s); - r0 = s.scene___285104.fields["spritesByKind"]; - s.tmp_6 = r0; - r0 = s.arg0.fields["_kind"]; - s.tmp_7 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.tmp_6, s.tmp_7); - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = s.arg0; - s.callLocIdx = 438; s.pc = 8; return s.tmp_5; + s.tmp_2 = msgpack_unpackNumberArray__P20238_mk(s); + s.tmp_2.arg0 = s.buf___32935; + s.tmp_2.arg1 = 0; + s.callLocIdx = 129; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; + s.nums___32942 = (r0); + s.tmp_0 = r0 = s.nums___32942; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } + case 2: + r0 = pxsim_Array__length(s.nums___32942); + s.tmp_1 = r0; + r0 = (s.tmp_1 >= 1); case 3: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.nums___32942, 0); + { step = 7; continue; } case 4: - s.tmp_0 = PhysicsEngine__C274328_v1_2_mk(s); - r0 = s.scene___285104.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.removeSprite; - s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - r0 = s.arg0.fields["destroyHandler"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = if_destroyHandler_1_mk(s); - s.tmp_1.arg0 = s.arg0; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "destroyHandler"), 1); - s.callLocIdx = 439; s.pc = 10; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["destroyHandler"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["destroyHandler"], 1); s.callLocIdx = 439; s.pc = 10; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 439; s.pc = 10; return s.tmp_1;; } - else { s.callLocIdx = 439; s.pc = 10; return s.tmp_1; } - } - case 10: - r0 = s.retval; case 5: + r0 = undefined; + { step = 7; continue; } case 6: - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P285133); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P285139); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P271925_mk(s); - s.tmp_3 = helpers_arrayFilter__P271926_mk(s); - r0 = s.scene___285104.fields["destroyedHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 441; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 443; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; r0 = undefined; + case 7: return leave(s, r0) default: oops() } } } -Sprite__destroyCore__P274246.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} +settings_readNumber__P20949.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} -function Sprite__destroyCore__P274246_mk(s) { +function settings_readNumber__P20949_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore__P274246, depth: s.depth + 1, + parent: s, fn: settings_readNumber__P20949, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - scene___285104: undefined, + buf___32935: undefined, + nums___32942: undefined, arg0: undefined, } } @@ -22873,7 +23244,7 @@ function Sprite__destroyCore__P274246_mk(s) { -function forEach_inline__P285133(s) { +function settings_readBuffer__P20946(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22887,23 +23258,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); + r0 = pxsim.settings._get(s.arg0); return leave(s, r0) default: oops() } } } -forEach_inline__P285133.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +settings_readBuffer__P20946.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} -function forEach_inline__P285133_mk(s) { +function settings_readBuffer__P20946_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P285133, depth: s.depth + 1, + parent: s, fn: settings_readBuffer__P20946, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -22911,7 +23276,7 @@ function forEach_inline__P285133_mk(s) { -function Sprite__destroyCore_inline__P285139(s) { +function msgpack_unpackNumberArray__P20238(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22921,44 +23286,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___32955 = undefined; + s.fmt___32962 = undefined; + s.v___32971 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = if_handler_2_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); - s.callLocIdx = 442; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 442; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 442; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 442; s.pc = 1; return s.tmp_0; } - } + r0 = pxsim_Array__mk(); + s.res___32955 = (r0); case 1: + s.tmp_1 = r0 = s.arg1; + r0 = pxsim.BufferMethods.length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.tmp_3 = r0 = s.arg1; + r0 = (s.tmp_3 + 1); + s.arg1 = (r0); + s.tmp_4 = msgpack_tagFormat__P20236_mk(s); + r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); + s.tmp_4.arg0 = r0; + s.callLocIdx = 20; s.pc = 12; return s.tmp_4; + case 12: r0 = s.retval; - r0 = undefined; + s.fmt___32962 = (r0); + r0 = (s.fmt___32962 === null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_1 = r0 = s.arg0; + r0 = (s.arg1 - 1); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 6, s.tmp_2); + s.v___32971 = (r0); + r0 = (-31 <= s.v___32971); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } + case 2: + r0 = (s.v___32971 <= 127); + case 3: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__push(s.res___32955, s.v___32971); + { step = 5; continue; } + case 4: + r0 = null; + { step = 11; continue; } + case 5: + { step = 7; continue; } + case 6: + s.tmp_0 = r0 = s.res___32955; + r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___32962, s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = pins_sizeOf__P20229_mk(s); + s.tmp_2.arg0 = s.fmt___32962; + s.callLocIdx = 21; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.arg1 = (r0); + case 7: + case 8: + r0 = pxsim.BufferMethods.getByte(s.arg0, s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_1 === 193); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = (s.arg1 + 1); + s.arg1 = (r0); + { step = 8; continue; } + case 9: + { step = 1; continue; } + case 10: + r0 = s.res___32955; + case 11: return leave(s, r0) default: oops() } } } -Sprite__destroyCore_inline__P285139.info = {"start":27286,"length":20,"line":881,"column":21,"endLine":881,"endColumn":41,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +msgpack_unpackNumberArray__P20238.info = {"start":2650,"length":669,"line":91,"column":4,"endLine":111,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"unpackNumberArray","argumentNames":["buf","offset"]} -function Sprite__destroyCore_inline__P285139_mk(s) { +function msgpack_unpackNumberArray__P20238_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore_inline__P285139, depth: s.depth + 1, + parent: s, fn: msgpack_unpackNumberArray__P20238, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + res___32955: undefined, + fmt___32962: undefined, + v___32971: undefined, arg0: undefined, + arg1: undefined, } } -function PhysicsEngine_removeSprite__P274331(s) { +function scene_systemMenu_initVolume__P22248(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22968,33 +23409,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); + s.vol___33016 = undefined; + s.tmp_0 = settings_readNumber__P20949_mk(s); + s.tmp_0.arg0 = "#volume"; + s.callLocIdx = 1182; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.vol___33016 = (r0); + r0 = (s.vol___33016 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = music_setVolume__P20543_mk(s); + s.tmp_1.arg0 = s.vol___33016; + s.callLocIdx = 1183; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_removeSprite__P274331.info = {"start":159,"length":32,"line":10,"column":4,"endLine":10,"endColumn":36,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} +scene_systemMenu_initVolume__P22248.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} -function PhysicsEngine_removeSprite__P274331_mk(s) { +function scene_systemMenu_initVolume__P22248_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_removeSprite__P274331, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initVolume__P22248, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, + tmp_1: undefined, + vol___33016: undefined, } } -function Sprite_kind__P274224(s) { +function game_GameOverConfig_constructor__P21901(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23009,18 +23462,24 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_kind"]; + if (!checkSubtype(r0, game_GameOverConfig__C21891_VT)) failedCast(r0); + s.tmp_0 = game_GameOverConfig_init__P21892_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1005; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_kind__P274224.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} +game_GameOverConfig_constructor__P21901.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} -function Sprite_kind__P274224_mk(s) { +function game_GameOverConfig_constructor__P21901_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_kind__P274224, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_constructor__P21901, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -23028,7 +23487,7 @@ function Sprite_kind__P274224_mk(s) { -function scene_systemMenu_MenuOption_constructor__P274905(s) { +function game_GameOverConfig_init__P21892(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23040,38 +23499,60 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = (s.arg0).fields["iconImage"] = (s.arg1); - r0 = (s.arg0).fields["getText"] = (s.arg2); - r0 = (s.arg0).fields["action"] = (s.arg3); + if (!checkSubtype(r0, game_GameOverConfig__C21891_VT)) failedCast(r0); + r0 = (s.arg0).fields["scoringType"] = (0); + r0 = (s.arg0).fields["winEffect"] = (globals.confetti___22492); + r0 = (s.arg0).fields["loseEffect"] = (globals.melt___22529); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = music_melodyPlayable__P20809_mk(s); + s.tmp_2.arg0 = globals.powerUp___20583; + s.callLocIdx = 1006; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["winSound"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = music_melodyPlayable__P20809_mk(s); + s.tmp_2.arg0 = globals.wawawawaa___20577; + s.callLocIdx = 1007; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["loseSound"] = (s.tmp_1); + r0 = (s.arg0).fields["winSoundLooping"] = (false); + r0 = (s.arg0).fields["loseSoundLooping"] = (false); + r0 = (s.arg0).fields["winMessage"] = ("YOU WIN!"); + r0 = (s.arg0).fields["winMessageMultiplayer"] = ("${WINNER} WINS!"); + r0 = (s.arg0).fields["loseMessage"] = ("GAME OVER"); + r0 = (s.arg0).fields["effectSetByUser"] = (false); + r0 = (s.arg0).fields["soundSetByUser"] = (false); + r0 = (s.arg0).fields["messageSetByUser"] = (false); + r0 = (s.arg0).fields["scoringTypeSetByUser"] = (false); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_constructor__P274905.info = {"start":786,"length":108,"line":38,"column":8,"endLine":39,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["this","iconImage","getText","action"]} +game_GameOverConfig_init__P21892.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} -function scene_systemMenu_MenuOption_constructor__P274905_mk(s) { +function game_GameOverConfig_init__P21892_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_constructor__P274905, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_init__P21892, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function helpers_screenBrightness__P273783(s) { +function melt_inline__P33095(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23081,29 +23562,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.rounds___33098 = undefined; + s.j___33106 = undefined; + s.x___33111 = undefined; + s.y___33117 = undefined; + s.c___33123 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = globals.brightness___273768; + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 5); + s.rounds___33098 = (r0); + s.j___33106 = (0); + case 1: + r0 = (s.j___33106 < s.rounds___33098); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = 0; + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); + s.tmp_1.arg2 = r0; + s.callLocIdx = 58; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.x___33111 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 0; + r0 = pxsim_ImageMethods.height(s.arg0); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 3); + s.tmp_0.arg2 = r0; + s.callLocIdx = 59; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.y___33117 = (r0); + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___33111, s.y___33117); + s.c___33123 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___33111; + r0 = (s.y___33117 + 1); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___33123); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___33111; + r0 = (s.y___33117 + 2); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___33123); + r0 = (s.j___33106 + 1); + s.j___33106 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_screenBrightness__P273783.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} +melt_inline__P33095.info = {"start":2652,"length":386,"line":72,"column":45,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} -function helpers_screenBrightness__P273783_mk(s) { +function melt_inline__P33095_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_screenBrightness__P273783, depth: s.depth + 1, + parent: s, fn: melt_inline__P33095, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + rounds___33098: undefined, + j___33106: undefined, + x___33111: undefined, + y___33117: undefined, + c___33123: undefined, arg0: undefined, + arg1: undefined, } } -function music_volume__P273438(s) { +function confetti_inline__P33149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23113,29 +23661,98 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = music_initVolume__P276340_mk(s); - s.callLocIdx = 62; s.pc = 1; return s.tmp_0; + s.factory___33152 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C22428_VT); + s.tmp_0 = r0; + s.tmp_2 = if_width_1_mk(s); + s.tmp_2.arg0 = s.arg0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "width"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["width"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["width"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 46; s.pc = 3; return s.tmp_2; } + } + case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 1; continue; } + s.tmp_3 = if_width_1_mk(s); + s.tmp_3.arg0 = s.arg0; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "width"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["width"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["width"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 47; s.pc = 4; return s.tmp_3; } + } + case 4: + r0 = s.retval; + { step = 2; continue; } case 1: + r0 = 16; + case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + s.tmp_5 = particles_ConfettiFactory_constructor__P22430_mk(s); + s.tmp_5.arg0 = s.tmp_0; + s.tmp_5.arg1 = s.tmp_4; + s.tmp_5.arg2 = 16; + s.callLocIdx = 48; s.pc = 5; return s.tmp_5; + case 5: + r0 = s.retval; + s.factory___33152 = (s.tmp_0); + s.tmp_0 = particles_SprayFactory_setSpeed__P22409_mk(s); + s.tmp_0.arg0 = s.factory___33152; + s.tmp_0.arg1 = 30; + s.callLocIdx = 49; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C22341_VT); + s.tmp_0 = r0; + s.tmp_1 = particles_ParticleSource_constructor__P22359_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.arg1; + s.tmp_1.arg3 = s.factory___33152; + s.callLocIdx = 50; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; - r0 = globals.globalVolume___276336; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -music_volume__P273438.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} +confetti_inline__P33149.info = {"start":7534,"length":284,"line":191,"column":59,"endLine":195,"endColumn":5,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["anchor","particlesPerSecond"]} -function music_volume__P273438_mk(s) { +function confetti_inline__P33149_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_volume__P273438, depth: s.depth + 1, + parent: s, fn: confetti_inline__P33149, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + factory___33152: undefined, + arg0: undefined, + arg1: undefined, } } -function music_initVolume__P276340(s) { +function particles_ParticleSource_constructor__P22359(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23145,38 +23762,130 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.globalVolume___276336 === null); + s.sources___33174 = undefined; + s.removedSource___33183 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P20979_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1204; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = particles_init__P22363_mk(s); + s.callLocIdx = 1205; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1206; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.sources___33174 = (r0); + r0 = pxsim_Array__length(s.sources___33174); + s.tmp_1 = r0; + r0 = (s.tmp_1 >= globals.MAX_SOURCES___22335); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - globals.globalVolume___276336 = (0); - s.tmp_0 = music_setVolume__P273437_mk(s); - r0 = pxsim_pxtcore.getConfig(59, 128); - s.tmp_0.arg0 = r0; - s.callLocIdx = 59; s.pc = 3; return s.tmp_0; - case 3: + s.tmp_2 = particles_sortSources__P22366_mk(s); + s.tmp_2.arg0 = s.sources___33174; + s.callLocIdx = 1207; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + r0 = pxsim_Array_.removeAt(s.sources___33174, 0); + s.removedSource___33183 = (r0); + s.tmp_0 = particles_ParticleSource_clear__P22352_mk(s); + s.tmp_0.arg0 = s.removedSource___33183; + s.callLocIdx = 1209; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_destroy__P22351_mk(s); + s.tmp_0.arg0 = s.removedSource___33183; + s.callLocIdx = 1210; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; case 1: case 2: + r0 = (s.arg0).fields["pFlags"] = (0); + s.tmp_0 = particles_ParticleSource_setRate__P22354_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1211; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAcceleration__P22346_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1212; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAnchor__P22353_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1213; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = (s.arg0).fields["lifespan"] = (undefined); + r0 = (s.arg0).fields["_dt"] = (0); + r0 = (s.arg0).fields["priority"] = (0); + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = globals.defaultFactory___22361; + case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = particles_ParticleSource_setFactory__P22356_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1214; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + r0 = pxsim_Array__push(s.sources___33174, s.arg0); + s.tmp_0 = particles_ParticleSource_enabled__P22350_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1215; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -music_initVolume__P276340.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} +particles_ParticleSource_constructor__P22359.info = {"start":2307,"length":899,"line":87,"column":8,"endLine":110,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["this","anchor","particlesPerSecond","factory"]} -function music_initVolume__P276340_mk(s) { +function particles_ParticleSource_constructor__P22359_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_initVolume__P276340, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_constructor__P22359, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + sources___33174: undefined, + removedSource___33183: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function helpers_arrayConcat__P271929(s) { +function particles_sortSources__P22366(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23186,83 +23895,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.out___285684 = undefined; - s.value___285687 = undefined; - s.unnamed2106___U2 = undefined; - s.unnamed2107___U3 = undefined; - s.value___285694 = undefined; - s.unnamed2108___U5 = undefined; - s.unnamed2109___U6 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.out___285684 = (r0); - s.value___285687 = (undefined); - s.unnamed2106___U2 = (s.arg0); - s.unnamed2107___U3 = (0); + s.tmp_0 = helpers_arraySort__P20150_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = particles_sortSources_inline__P33384; + s.callLocIdx = 1253; s.pc = 1; return s.tmp_0; case 1: - s.tmp_0 = r0 = s.unnamed2107___U3; - r0 = pxsim_Array__length(s.unnamed2106___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed2106___U2, s.unnamed2107___U3); - s.value___285687 = (r0); - r0 = pxsim_Array__push(s.out___285684, s.value___285687); - r0 = (s.unnamed2107___U3 + 1); - s.unnamed2107___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed2106___U2 = (undefined); - s.value___285694 = (undefined); - s.unnamed2108___U5 = (s.arg1); - s.unnamed2109___U6 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed2109___U6; - r0 = pxsim_Array__length(s.unnamed2108___U5); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed2108___U5, s.unnamed2109___U6); - s.value___285694 = (r0); - r0 = pxsim_Array__push(s.out___285684, s.value___285694); - r0 = (s.unnamed2109___U6 + 1); - s.unnamed2109___U6 = (r0); - { step = 3; continue; } - case 4: - s.unnamed2108___U5 = (undefined); - r0 = s.out___285684; + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayConcat__P271929.info = {"start":8639,"length":264,"line":288,"column":4,"endLine":297,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayConcat","argumentNames":["arr","otherArr"]} +particles_sortSources__P22366.info = {"start":10026,"length":129,"line":332,"column":4,"endLine":334,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} -function helpers_arrayConcat__P271929_mk(s) { +function particles_sortSources__P22366_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayConcat__P271929, depth: s.depth + 1, + parent: s, fn: particles_sortSources__P22366, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - out___285684: undefined, - value___285687: undefined, - unnamed2106___U2: undefined, - unnamed2107___U3: undefined, - value___285694: undefined, - unnamed2108___U5: undefined, - unnamed2109___U6: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_PauseMenu_show__P274914(s) { +function particles_sortSources_inline__P33384(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23272,336 +23934,118 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___284522 = undefined; - s.i___284523 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = if_generator_1_mk(s); - s.tmp_2.arg0 = s.arg0; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "generator"), 1); - s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["generator"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["generator"], 1); s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1066; s.pc = 3; return s.tmp_2;; } - else { s.callLocIdx = 1066; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; + r0 = s.arg0.fields["priority"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["options"] = (s.tmp_1); - r0 = (s.arg0).fields["selection"] = (0); - s.i___284523 = (0); + r0 = s.arg1.fields["priority"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - s.tmp_1 = r0 = s.i___284523; - r0 = s.arg0.fields["options"]; + r0 = s.arg0.fields["id"]; s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = s.arg1.fields["id"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; + return leave(s, r0) + default: oops() +} } } +particles_sortSources_inline__P33384.info = {"start":10097,"length":50,"line":333,"column":21,"endLine":333,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} + +function particles_sortSources_inline__P33384_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_sortSources_inline__P33384, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_init__P22363(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.scene___33425 = undefined; + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1243; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.scene___33425 = (r0); + r0 = s.scene___33425.fields["particleSources"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - r0 = s.arg0.fields["options"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.i___284523); - s.current___284522 = (r0); - s.tmp_0 = scene_systemMenu_MenuOption_show__P274906_mk(s); - s.tmp_0.arg0 = s.current___284522; - s.callLocIdx = 1067; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P274909_mk(s); - s.tmp_0.arg0 = s.current___284522; - r0 = s.arg0.fields["theme"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1068; s.pc = 5; return s.tmp_0; + if (!r0) { step = 1; continue; } + { step = 3; continue; } + case 1: + case 2: + s.tmp_1 = r0 = s.scene___33425; + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); + r0 = pxsim.control.millis(); + globals.lastUpdate___22338 = (r0); + s.tmp_0 = game_onUpdate__P21945_mk(s); + s.tmp_0.arg0 = particles_updateParticles__P22364; + s.callLocIdx = 1244; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_position__P274907_mk(s); - s.tmp_0.arg0 = s.current___284522; - s.tmp_2 = if_padding_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "padding"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["padding"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["padding"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1069; s.pc = 7; return s.tmp_2; } - } - case 7: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_5 = r0 = s.i___284523; - s.tmp_7 = if_cardsPerRow_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_7.arg0 = r0; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "cardsPerRow"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 1070; s.pc = 8; return s.tmp_7; } - } - case 8: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_5 % s.tmp_6); - s.tmp_4 = r0; - s.tmp_10 = if_cardWidth_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_10.arg0 = r0; - if (!s.tmp_10.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_10.arg0, "cardWidth"); - } else { - s.tmp_10.fn = s.tmp_10.arg0.vtable.iface["cardWidth"]; - if (s.tmp_10.fn == null) { s.retval = s.tmp_10.arg0.fields["cardWidth"]; } - else if (!s.tmp_10.fn.isGetter) { s.retval = bind(s.tmp_10); } - else { s.callLocIdx = 1071; s.pc = 9; return s.tmp_10; } - } - case 9: - r0 = s.retval; - s.tmp_9 = r0; - s.tmp_12 = if_cardSpacing_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_12.arg0 = r0; - if (!s.tmp_12.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "cardSpacing"); - } else { - s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["cardSpacing"]; - if (s.tmp_12.fn == null) { s.retval = s.tmp_12.arg0.fields["cardSpacing"]; } - else if (!s.tmp_12.fn.isGetter) { s.retval = bind(s.tmp_12); } - else { s.callLocIdx = 1072; s.pc = 10; return s.tmp_12; } - } - case 10: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_9 + s.tmp_11); - s.tmp_8 = r0; - r0 = (s.tmp_4 * s.tmp_8); - s.tmp_3 = r0; - r0 = (s.tmp_1 + s.tmp_3); - s.tmp_0.arg1 = r0; - s.tmp_14 = if_cardsTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_14.arg0 = r0; - if (!s.tmp_14.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "cardsTop"); - } else { - s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["cardsTop"]; - if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["cardsTop"]; } - else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } - else { s.callLocIdx = 1073; s.pc = 11; return s.tmp_14; } - } - case 11: - r0 = s.retval; - s.tmp_13 = r0; - s.tmp_17 = r0 = s.i___284523; - s.tmp_19 = if_cardsPerRow_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_19.arg0 = r0; - if (!s.tmp_19.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_19.arg0, "cardsPerRow"); - } else { - s.tmp_19.fn = s.tmp_19.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_19.fn == null) { s.retval = s.tmp_19.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_19.fn.isGetter) { s.retval = bind(s.tmp_19); } - else { s.callLocIdx = 1074; s.pc = 12; return s.tmp_19; } - } - case 12: - r0 = s.retval; - s.tmp_18 = r0; - r0 = pxsim.Math_.idiv(s.tmp_17, s.tmp_18); - s.tmp_16 = r0; - s.tmp_22 = if_cardWidth_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_22.arg0 = r0; - if (!s.tmp_22.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_22.arg0, "cardWidth"); - } else { - s.tmp_22.fn = s.tmp_22.arg0.vtable.iface["cardWidth"]; - if (s.tmp_22.fn == null) { s.retval = s.tmp_22.arg0.fields["cardWidth"]; } - else if (!s.tmp_22.fn.isGetter) { s.retval = bind(s.tmp_22); } - else { s.callLocIdx = 1075; s.pc = 13; return s.tmp_22; } - } - case 13: - r0 = s.retval; - s.tmp_21 = r0; - s.tmp_24 = if_cardSpacing_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_24.arg0 = r0; - if (!s.tmp_24.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_24.arg0, "cardSpacing"); - } else { - s.tmp_24.fn = s.tmp_24.arg0.vtable.iface["cardSpacing"]; - if (s.tmp_24.fn == null) { s.retval = s.tmp_24.arg0.fields["cardSpacing"]; } - else if (!s.tmp_24.fn.isGetter) { s.retval = bind(s.tmp_24); } - else { s.callLocIdx = 1076; s.pc = 14; return s.tmp_24; } - } - case 14: - r0 = s.retval; - s.tmp_23 = r0; - r0 = (s.tmp_21 + s.tmp_23); - s.tmp_20 = r0; - r0 = (s.tmp_16 * s.tmp_20); - s.tmp_15 = r0; - r0 = (s.tmp_13 + s.tmp_15); - s.tmp_0.arg2 = r0; - s.callLocIdx = 1077; s.pc = 6; return s.tmp_0; + s.tmp_0 = game_onUpdateInterval__P21946_mk(s); + s.tmp_0.arg0 = 250; + s.tmp_0.arg1 = particles_pruneParticles__P22365; + s.callLocIdx = 1245; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - r0 = (s.i___284523 + 1); - s.i___284523 = (r0); - { step = 1; continue; } - case 2: - s.tmp_0 = controller__setUserEventsEnabled__P274023_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 1078; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284586); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.A___273930; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1080; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284606); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.A___273930; - s.tmp_1.arg1 = 2052; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1082; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P274013_mk(s); - s.tmp_0.arg0 = globals.B___273931; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P284635; - s.callLocIdx = 1084; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P274013_mk(s); - s.tmp_0.arg0 = globals.menu___273936; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P284640; - s.callLocIdx = 1086; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284645); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.up___273933; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1090; s.pc = 20; return s.tmp_1; - case 20: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284657); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.left___273932; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1093; s.pc = 21; return s.tmp_1; - case 21: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284666); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.down___273935; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1097; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284682); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P274013_mk(s); - s.tmp_1.arg0 = globals.right___273934; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1100; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P284694); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onShade__P274834_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1103; s.pc = 24; return s.tmp_1; - case 24: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P274916_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1104; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show__P274914.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +particles_init__P22363.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} -function scene_systemMenu_PauseMenu_show__P274914_mk(s) { +function particles_init__P22363_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show__P274914, depth: s.depth + 1, + parent: s, fn: particles_init__P22363, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, - tmp_24: undefined, - current___284522: undefined, - i___284523: undefined, - arg0: undefined, + scene___33425: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284586(s) { +function particles_updateParticles__P22364(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23611,75 +24055,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["options"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.sources___33467 = undefined; + s.time___33474 = undefined; + s.dt___33477 = undefined; + s.i___33483 = undefined; + s.tmp_0 = particles_particleSources__P22378_mk(s); + s.callLocIdx = 1246; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sources___33467 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___33467); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 5; continue; } case 1: - r0 = s.caps[0].fields["options"]; - s.tmp_5 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); case 2: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 3; continue; } - { step = 5; continue; } + s.tmp_2 = particles_sortSources__P22366_mk(s); + s.tmp_2.arg0 = s.sources___33467; + s.callLocIdx = 1247; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim.control.millis(); + s.time___33474 = (r0); + r0 = (s.time___33474 - globals.lastUpdate___22338); + s.dt___33477 = (r0); + globals.lastUpdate___22338 = (s.time___33474); + s.i___33483 = (0); case 3: - case 4: - s.tmp_8 = scene_systemMenu_MenuOption_setState__P274910_mk(s); - r0 = s.caps[0].fields["options"]; - s.tmp_9 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_10 = r0; - r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); - s.tmp_8.arg0 = r0; - s.tmp_8.arg1 = 1; - s.callLocIdx = 1079; s.pc = 6; return s.tmp_8; - case 6: + s.tmp_1 = r0 = s.i___33483; + r0 = pxsim_Array__length(s.sources___33467); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_3 = particles_ParticleSource__update__P22344_mk(s); + r0 = pxsim_Array__getAt(s.sources___33467, s.i___33483); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.dt___33477; + s.callLocIdx = 1248; s.pc = 8; return s.tmp_3; + case 8: r0 = s.retval; + r0 = (s.i___33483 + 1); + s.i___33483 = (r0); + { step = 3; continue; } + case 4: case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284586.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +particles_updateParticles__P22364.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P284586_mk(s) { +function particles_updateParticles__P22364_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284586, depth: s.depth + 1, + parent: s, fn: particles_updateParticles__P22364, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, + sources___33467: undefined, + time___33474: undefined, + dt___33477: undefined, + i___33483: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284606(s) { +function particles_ParticleSource__update__P22344(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23689,208 +24139,266 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["options"]; + s.p___33547 = undefined; + s.current___33566 = undefined; + s.fixedDt___33574 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["timer"]; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 - s.arg1); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0).fields["timer"] = (s.tmp_1); + r0 = s.arg0.fields["lifespan"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.caps[0].fields["options"]; - s.tmp_5 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_6 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.tmp_6); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["lifespan"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); + r0 = (s.tmp_4 - s.arg1); s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 2: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 3; continue; } - { step = 5; continue; } - case 3: - case 4: - s.tmp_8 = scene_systemMenu_MenuOption_setState__P274910_mk(s); - r0 = s.caps[0].fields["options"]; - s.tmp_9 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_10 = r0; - r0 = pxsim_Array__getAt(s.tmp_9, s.tmp_10); - s.tmp_8.arg0 = r0; - s.tmp_8.arg1 = 0; - s.callLocIdx = 1081; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - r0 = s.caps[0].fields["options"]; + r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); + r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - r0 = r0.fields["action"]; + r0 = (s.tmp_1 <= 0); s.tmp_0 = r0; - r0 = pxsim.control.runInParallel(s.tmp_0); - case 5: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_PauseMenu_show_inline__P284606.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} - -function scene_systemMenu_PauseMenu_show_inline__P284606_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284606, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, -} } - - - - - -function scene_systemMenu_PauseMenu_show_inline__P284635(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = scene_systemMenu_closeMenu__P274919_mk(s); - s.callLocIdx = 1083; s.pc = 1; return s.tmp_0; - case 1: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["lifespan"] = (undefined); + s.tmp_0 = particles_ParticleSource_destroy__P22351_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1219; s.pc = 28; return s.tmp_0; + case 28: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_PauseMenu_show_inline__P284635.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} - -function scene_systemMenu_PauseMenu_show_inline__P284635_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284635, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function scene_systemMenu_PauseMenu_show_inline__P284640(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = scene_systemMenu_closeMenu__P274919_mk(s); - s.callLocIdx = 1085; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_PauseMenu_show_inline__P284640.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} - -function scene_systemMenu_PauseMenu_show_inline__P284640_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284640, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function scene_systemMenu_PauseMenu_show_inline__P284645(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P274916_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_1.arg0 = 0; - r0 = s.caps[0].fields["selection"]; - s.tmp_2 = r0; - s.tmp_4 = if_cardsPerRow_1_mk(s); - r0 = s.caps[0].fields["theme"]; - s.tmp_4.arg0 = r0; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "cardsPerRow"); + case 2: + { step = 10; continue; } + case 3: + r0 = s.arg0.fields["anchor"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 4; continue; } + r0 = s.tmp_0; + { step = 5; continue; } + case 4: + s.tmp_2 = if_flags_1_mk(s); + r0 = s.arg0.fields["anchor"]; + s.tmp_2.arg0 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "flags"); } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 1087; s.pc = 3; return s.tmp_4; } + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["flags"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["flags"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 1220; s.pc = 29; return s.tmp_2; } } - case 3: + case 29: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== undefined); + case 5: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1088; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1089; s.pc = 1; return s.tmp_0; - case 1: + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 6; continue; } + r0 = s.tmp_3; + { step = 7; continue; } + case 6: + s.tmp_5 = if_flags_1_mk(s); + r0 = s.arg0.fields["anchor"]; + s.tmp_5.arg0 = r0; + if (!s.tmp_5.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "flags"); + } else { + s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["flags"]; + if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["flags"]; } + else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } + else { s.callLocIdx = 1221; s.pc = 30; return s.tmp_5; } + } + case 30: r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 2); + case 7: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 8; continue; } + r0 = (s.arg0).fields["lifespan"] = (750); + case 8: + case 9: + case 10: + case 11: + r0 = s.arg0.fields["timer"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 12; continue; } + r0 = s.tmp_0; + { step = 13; continue; } + case 12: + s.tmp_2 = particles_ParticleSource_enabled__P22349_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1222; s.pc = 31; return s.tmp_2; + case 31: + r0 = s.retval; + case 13: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 16; continue; } + s.tmp_4 = r0 = s.arg0; + r0 = s.tmp_4.fields["timer"]; + s.tmp_6 = r0; + r0 = s.arg0.fields["period"]; + s.tmp_7 = r0; + r0 = (s.tmp_6 + s.tmp_7); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["timer"] = (s.tmp_5); + s.tmp_0 = particles_ParticleFactory__C22401_v0_2_mk(s); + r0 = s.arg0.fields["_factory"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["anchor"]; + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleFactory__C22401_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.createParticle; + s.pc = 32; return s.tmp_0; + case 32: + r0 = s.retval; + s.p___33547 = (r0); + r0 = pxsim_numops_toBoolDecr(s.p___33547); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + { step = 11; continue; } + case 14: + case 15: + r0 = s.arg0.fields["head"]; + s.tmp_2 = r0; + r0 = (s.p___33547).fields["next"] = (s.tmp_2); + r0 = (s.arg0).fields["head"] = (s.p___33547); + { step = 11; continue; } + case 16: + r0 = s.arg0.fields["head"]; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + { step = 27; continue; } + case 17: + case 18: + r0 = s.arg0.fields["head"]; + s.current___33566 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["_dt"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_dt"] = (s.tmp_1); + r0 = s.arg0.fields["_dt"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.fixedDt___33574 = (r0); + r0 = pxsim_numops_toBoolDecr(s.fixedDt___33574); + if (!r0) { step = 23; continue; } + case 19: + r0 = s.current___33566.fields["lifespan"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_2 = r0 = s.current___33566; + r0 = s.tmp_2.fields["lifespan"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.arg1); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); + s.tmp_0 = particles_ParticleSource__C22341_v4_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.current___33566; + s.tmp_0.arg2 = s.fixedDt___33574; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C22341_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.updateParticle; + s.pc = 33; return s.tmp_0; + case 33: + r0 = s.retval; + case 20: + case 21: + r0 = s.current___33566.fields["next"]; + s.tmp_0 = r0; + s.current___33566 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + { step = 19; continue; } + case 22: + r0 = (s.arg0).fields["_dt"] = (0); + { step = 26; continue; } + case 23: + case 24: + s.tmp_0 = r0 = s.current___33566; + r0 = s.tmp_0.fields["lifespan"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.arg1); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); + r0 = s.current___33566.fields["next"]; + s.tmp_0 = r0; + s.current___33566 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 25; continue; } + { step = 24; continue; } + case 25: + case 26: + case 27: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284645.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +particles_ParticleSource__update__P22344.info = {"start":3694,"length":1400,"line":124,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} -function scene_systemMenu_PauseMenu_show_inline__P284645_mk(s) { +function particles_ParticleSource__update__P22344_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284645, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__update__P22344, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + p___33547: undefined, + current___33566: undefined, + fixedDt___33574: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284657(s) { +function particles_ParticleFactory_createParticle__P22402(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23900,42 +24408,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P274916_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P271946_mk(s); - s.tmp_1.arg0 = 0; - r0 = s.caps[0].fields["selection"]; + s.p___33661 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleFactory__C22401_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C22339_VT); + s.p___33661 = (r0); + s.tmp_0 = r0 = s.p___33661; + s.tmp_3 = if_x_1_mk(s); + s.tmp_3.arg0 = s.arg1; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "x"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["x"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["x"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1273; s.pc = 1; return s.tmp_3; } + } + case 1: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1091; s.pc = 2; return s.tmp_1; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___33661; + s.tmp_3 = if_y_1_mk(s); + s.tmp_3.arg0 = s.arg1; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "y"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["y"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["y"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1275; s.pc = 2; return s.tmp_3; } + } case 2: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1092; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = (s.p___33661).fields["vx"] = (0); + r0 = (s.p___33661).fields["vy"] = (0); + r0 = (s.p___33661).fields["lifespan"] = (500); + r0 = s.p___33661; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284657.info = {"start":4927,"length":89,"line":163,"column":53,"endLine":165,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +particles_ParticleFactory_createParticle__P22402.info = {"start":1822,"length":282,"line":67,"column":8,"endLine":77,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} -function scene_systemMenu_PauseMenu_show_inline__P284657_mk(s) { +function particles_ParticleFactory_createParticle__P22402_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284657, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_createParticle__P22402, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + p___33661: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284666(s) { +function particles_ParticleSource_updateParticle__P22357(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23945,50 +24494,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P274916_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P271947_mk(s); - r0 = s.caps[0].fields["options"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = (s.arg2 >> 10); + s.arg2 = (r0); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["vx"]; + s.tmp_2 = r0; + r0 = s.arg0.fields["ax"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["vy"]; s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg0 = r0; - r0 = s.caps[0].fields["selection"]; + r0 = s.arg0.fields["ay"]; s.tmp_4 = r0; - s.tmp_6 = if_cardsPerRow_1_mk(s); - r0 = s.caps[0].fields["theme"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "cardsPerRow"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1094; s.pc = 3; return s.tmp_6; } - } - case 3: - r0 = s.retval; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1095; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1096; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_2 = r0; + r0 = s.arg1.fields["vx"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_y"]; + s.tmp_2 = r0; + r0 = s.arg1.fields["vy"]; + s.tmp_4 = r0; + r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); + s.tmp_5 = r0; + r0 = (s.tmp_5 >> 8); + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284666.info = {"start":5073,"length":132,"line":167,"column":53,"endLine":169,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +particles_ParticleSource_updateParticle__P22357.info = {"start":8248,"length":357,"line":277,"column":8,"endLine":285,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticle","argumentNames":["this","p","fixedDt"]} -function scene_systemMenu_PauseMenu_show_inline__P284666_mk(s) { +function particles_ParticleSource_updateParticle__P22357_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284666, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_updateParticle__P22357, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -23996,14 +24569,16 @@ function scene_systemMenu_PauseMenu_show_inline__P284666_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284682(s) { +function Fx_rightShift__P20226(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24013,49 +24588,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P274916_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P271947_mk(s); - r0 = s.caps[0].fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg0 = r0; - r0 = s.caps[0].fields["selection"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1098; s.pc = 2; return s.tmp_1; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 >> s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_rightShift__P20226.info = {"start":2266,"length":108,"line":71,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"rightShift","argumentNames":["a","n"]} + +function Fx_rightShift__P20226_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_rightShift__P20226, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function game_onUpdateInterval__P21946(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.timer___33447 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg1); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = (s.arg0 < 0); case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 5; continue; } + case 3: + case 4: + r0 = pxsim_pxtrt.mklocRef(); + s.timer___33447 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.timer___33447, 0); + r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P33451); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___33447); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); + s.tmp_1 = control_EventContext_registerFrameHandler__P20399_mk(s); + s.tmp_2 = game_eventContext__P21921_mk(s); + s.callLocIdx = 1030; s.pc = 7; return s.tmp_2; + case 7: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1099; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 19; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1034; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284682.info = {"start":5263,"length":111,"line":171,"column":54,"endLine":173,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +game_onUpdateInterval__P21946.info = {"start":813,"length":401,"line":26,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdateInterval","argumentNames":["period","a"]} -function scene_systemMenu_PauseMenu_show_inline__P284682_mk(s) { +function game_onUpdateInterval__P21946_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284682, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval__P21946, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, + timer___33447: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P284694(s) { +function game_onUpdateInterval_inline__P33451(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24065,35 +24699,55 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P274915_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1101; s.pc = 1; return s.tmp_0; - case 1: + s.time___33452 = undefined; + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 1031; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - s.tmp_0 = scene_systemMenu_PauseMenu_drawText__P274917_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1102; s.pc = 2; return s.tmp_0; - case 2: + s.tmp_0 = r0; + r0 = s.tmp_0.fields["_millis"]; + s.time___33452 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.time___33452); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = r0 = s.caps[0]; + r0 = (s.time___33452 + s.caps[1]); + s.tmp_3 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_2, s.tmp_3); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.caps[2]; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 1033; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P284694.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +game_onUpdateInterval_inline__P33451.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P284694_mk(s) { +function game_onUpdateInterval_inline__P33451_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P284694, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval_inline__P33451, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + time___33452: undefined, } } -function scene_systemMenu_PauseMenu_drawText__P274917(s) { +function scene_Scene_millis__P21029(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24108,10 +24762,40 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = s.arg0.fields["_millis"]; + return leave(s, r0) + default: oops() +} } } +scene_Scene_millis__P21029.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} + +function scene_Scene_millis__P21029_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Scene_millis__P21029, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_onUpdate__P21945(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -24120,260 +24804,155 @@ switch (step) { { step = 3; continue; } case 1: case 2: - s.tmp_3 = helpers_imageFillRect__P273773_mk(s); - s.tmp_3.arg0 = globals.screen___273849; - s.tmp_3.arg1 = 0; - s.tmp_3.arg2 = 0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_3.arg3 = r0; - s.tmp_5 = if_cardsTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_5.arg0 = r0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "cardsTop"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["cardsTop"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["cardsTop"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1115; s.pc = 5; return s.tmp_5; } - } + s.tmp_2 = control_EventContext_registerFrameHandler__P20399_mk(s); + s.tmp_3 = game_eventContext__P21921_mk(s); + s.callLocIdx = 1028; s.pc = 5; return s.tmp_3; case 5: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 - 2); - s.tmp_3.arg4 = r0; - s.tmp_3.arg5 = 15; - s.callLocIdx = 1116; s.pc = 4; return s.tmp_3; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 20; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 1029; s.pc = 4; return s.tmp_2; case 4: r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P273806_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_1 = if_headerText_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "headerText"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["headerText"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["headerText"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1117; s.pc = 7; return s.tmp_1; } + case 3: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_onUpdate__P21945.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} + +function game_onUpdate__P21945_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_onUpdate__P21945, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, +} } + + + + + +function particles_SprayFactory_constructor__P22411(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; } - case 7: + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C22405_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = particles_initTrig__P22393_mk(s); + s.callLocIdx = 1280; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 2; - s.tmp_0.arg3 = 1; - s.tmp_2 = if_headerFont_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "headerFont"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["headerFont"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["headerFont"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1118; s.pc = 8; return s.tmp_2; } - } - case 8: + s.tmp_0 = particles_SprayFactory_setSpeed__P22409_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1281; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1119; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_0 = particles_SprayFactory_setDirection__P22410_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + s.callLocIdx = 1282; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P273773_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_0.arg1 = 0; - s.tmp_2 = if_infoTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "infoTop"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["infoTop"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["infoTop"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1120; s.pc = 10; return s.tmp_2; } - } - case 10: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 3); - s.tmp_0.arg2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_0.arg3 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_4 = r0; - s.tmp_6 = if_infoTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "infoTop"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["infoTop"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["infoTop"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1121; s.pc = 11; return s.tmp_6; } + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_constructor__P22411.info = {"start":2623,"length":218,"line":98,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","speed","centerDegrees","arcDegrees"]} + +function particles_SprayFactory_constructor__P22411_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_constructor__P22411, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function particles_SprayFactory_setDirection__P22410(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; } - case 11: + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C22405_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P22400_mk(s); + s.tmp_5 = r0 = s.arg1; + r0 = (s.arg2 >> 1); + s.tmp_6 = r0; + r0 = (s.tmp_5 - s.tmp_6); + s.tmp_4.arg0 = r0; + s.callLocIdx = 1290; s.pc = 1; return s.tmp_4; + case 1: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); s.tmp_3 = r0; - r0 = (s.tmp_3 + 6); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 15; - s.callLocIdx = 1122; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P273773_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_1 = if_padding_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "padding"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["padding"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["padding"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1123; s.pc = 13; return s.tmp_1; } - } - case 13: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = if_infoTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "infoTop"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["infoTop"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["infoTop"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1124; s.pc = 14; return s.tmp_2; } - } - case 14: + r0 = (s.tmp_3 / globals.angleSlice___22392); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["minAngle"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P22400_mk(s); + s.tmp_4.arg0 = s.arg2; + s.callLocIdx = 1291; s.pc = 2; return s.tmp_4; + case 2: r0 = s.retval; - s.tmp_0.arg2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); s.tmp_3 = r0; - s.tmp_6 = if_padding_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "padding"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["padding"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["padding"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1125; s.pc = 15; return s.tmp_6; } - } - case 15: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 << 1); - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_0.arg3 = r0; - s.tmp_8 = if_charHeight_1_mk(s); - s.tmp_9 = if_infoFont_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_9.arg0 = r0; - if (!s.tmp_9.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "infoFont"); - } else { - s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["infoFont"]; - if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["infoFont"]; } - else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } - else { s.callLocIdx = 1126; s.pc = 17; return s.tmp_9; } - } - case 17: - r0 = s.retval; - s.tmp_8.arg0 = r0; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "charHeight"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["charHeight"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["charHeight"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 1127; s.pc = 16; return s.tmp_8; } - } - case 16: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_7 + 1); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = 1; - s.callLocIdx = 1128; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P273806_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_1 = if_getText_1_mk(s); - r0 = s.arg0.fields["options"]; + r0 = (s.tmp_3 / globals.angleSlice___22392); s.tmp_2 = r0; - r0 = s.arg0.fields["selection"]; - s.tmp_3 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.tmp_3); - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "getText"), 1); - s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["getText"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["getText"], 1); s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1129; s.pc = 19; return s.tmp_1;; } - else { s.callLocIdx = 1129; s.pc = 19; return s.tmp_1; } - } - case 19: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_5 = if_infoTop_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_5.arg0 = r0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "infoTop"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["infoTop"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["infoTop"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1130; s.pc = 20; return s.tmp_5; } - } - case 20: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 + 1); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 15; - s.tmp_6 = if_infoFont_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_6.arg0 = r0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "infoFont"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["infoFont"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["infoFont"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 1131; s.pc = 21; return s.tmp_6; } - } - case 21: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1132; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - case 3: + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_drawText__P274917.info = {"start":6927,"length":795,"line":224,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"drawText","argumentNames":["this"]} +particles_SprayFactory_setDirection__P22410.info = {"start":3424,"length":228,"line":123,"column":8,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setDirection","argumentNames":["this","centerDegrees","arcDegrees"]} -function scene_systemMenu_PauseMenu_drawText__P274917_mk(s) { +function particles_SprayFactory_setDirection__P22410_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_drawText__P274917, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setDirection__P22410, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -24382,17 +24961,16 @@ function scene_systemMenu_PauseMenu_drawText__P274917_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function helpers_imagePrintCenter__P273806(s) { +function particles_toRadians__P22400(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24402,92 +24980,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___284781 = undefined; - s.x___284787 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg4); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.arg0 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_2 = image_getFontForText__P273794_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 95; s.pc = 3; return s.tmp_2; + s.tmp_3 = Math_abs__P20174_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1272; s.pc = 3; return s.tmp_3; case 3: r0 = s.retval; - s.arg4 = (r0); + s.tmp_2 = r0; + r0 = (s.tmp_2 % 360); + s.tmp_1 = r0; + r0 = (360 - s.tmp_1); + s.arg0 = (r0); + { step = 2; continue; } case 1: + r0 = (s.arg0 % 360); + s.arg0 = (r0); case 2: - r0 = pxsim_String_.length(s.arg1); - s.tmp_0 = r0; - s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.arg4; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["charWidth"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["charWidth"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 96; s.pc = 4; return s.tmp_2; } - } - case 4: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 * s.tmp_1); - s.w___284781 = (r0); - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.w___284781); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 2); - s.x___284787 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.x___284787; - s.tmp_0.arg3 = s.arg2; - s.tmp_0.arg4 = s.arg3; - s.tmp_0.arg5 = s.arg4; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 97; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg0 * 0.017453292519943295); return leave(s, r0) default: oops() } } } -helpers_imagePrintCenter__P273806.info = {"start":15025,"length":295,"line":206,"column":4,"endLine":211,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"imagePrintCenter","argumentNames":["img","text","y","color","font"]} +particles_toRadians__P22400.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} -function helpers_imagePrintCenter__P273806_mk(s) { +function particles_toRadians__P22400_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrintCenter__P273806, depth: s.depth + 1, + parent: s, fn: particles_toRadians__P22400, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - w___284781: undefined, - x___284787: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function scene_systemMenu_PauseMenu_setSelection__P274916(s) { +function particles_ParticleFactory_constructor__P22404(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24499,117 +25037,79 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!checkSubtype(r0, particles_ParticleFactory__C22401_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleFactory_constructor__P22404.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} + +function particles_ParticleFactory_constructor__P22404_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleFactory_constructor__P22404, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function particles_initTrig__P22393(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + r0 = pxsim_numops_toBoolDecr(globals.cachedSin___22379); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 9; continue; } - case 1: - case 2: - r0 = s.arg0.fields["options"]; - s.tmp_4 = r0; - r0 = s.arg0.fields["selection"]; - s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.tmp_6 = scene_systemMenu_MenuOption_setState__P274910_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_7 = r0; - r0 = s.arg0.fields["selection"]; - s.tmp_8 = r0; - r0 = pxsim_Array__getAt(s.tmp_7, s.tmp_8); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = 2; - s.callLocIdx = 1112; s.pc = 10; return s.tmp_6; - case 10: - r0 = s.retval; + s.tmp_2 = particles_cacheSin__P22394_mk(s); + s.tmp_2.arg0 = 100; + s.callLocIdx = 1268; s.pc = 3; return s.tmp_2; case 3: - case 4: - r0 = (s.arg0).fields["selection"] = (s.arg1); - r0 = s.arg0.fields["options"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["selection"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_4 = controller_Button__C274006_v0_1_mk(s); - s.tmp_4.arg0 = globals.A___273930; - if (!checkSubtype(s.tmp_4.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_4.arg0); - s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.isPressed; - s.pc = 11; return s.tmp_4; - case 11: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = 1; - { step = 6; continue; } - case 5: - r0 = 0; - case 6: - // jmp value (already in r0) - s.tmp_5 = r0; - s.tmp_6 = scene_systemMenu_MenuOption_setState__P274910_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_7 = r0; - r0 = s.arg0.fields["selection"]; - s.tmp_8 = r0; - r0 = pxsim_Array__getAt(s.tmp_7, s.tmp_8); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = s.tmp_5; - s.callLocIdx = 1113; s.pc = 12; return s.tmp_6; - case 12: r0 = s.retval; - case 7: - case 8: - s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P277062_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1114; s.pc = 13; return s.tmp_0; - case 13: + globals.cachedSin___22379 = (r0); + s.tmp_0 = particles_cacheCos__P22395_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 1269; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - case 9: + globals.cachedCos___22380 = (r0); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_setSelection__P274916.info = {"start":6436,"length":481,"line":208,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setSelection","argumentNames":["this","selection"]} +particles_initTrig__P22393.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} -function scene_systemMenu_PauseMenu_setSelection__P274916_mk(s) { +function particles_initTrig__P22393_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P274916, depth: s.depth + 1, + parent: s, fn: particles_initTrig__P22393, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_PauseMenu_updateScrollTarget__P277062(s) { +function particles_cacheCos__P22395(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24619,121 +25119,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.row___285000 = undefined; + s.cos___33280 = undefined; + s.anglePerSlice___33282 = undefined; + s.i___33288 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = s.arg0.fields["selection"]; - s.tmp_0 = r0; - s.tmp_2 = if_cardsPerRow_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "cardsPerRow"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1135; s.pc = 8; return s.tmp_2; } - } - case 8: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); - s.row___285000 = (r0); - r0 = s.arg0.fields["scrollRow"]; - s.tmp_1 = r0; - r0 = (s.row___285000 === s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = pxsim_Array__mk(); + s.cos___33280 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___33282 = (r0); + s.i___33288 = (0); case 1: - r0 = (s.row___285000 - 1); - s.tmp_2 = r0; - r0 = s.arg0.fields["scrollRow"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 === s.tmp_3); - case 2: - // jmp value (already in r0) + r0 = (s.i___33288 < s.arg0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.cos___33280; + r0 = (s.i___33288 * s.anglePerSlice___33282); s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: - case 4: - r0 = s.arg0.fields["scrollRow"]; - s.tmp_6 = r0; - r0 = (s.row___285000 > s.tmp_6); + r0 = pxsim.Math_.cos(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 * 256); s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 5; continue; } - s.tmp_7 = r0 = s.arg0; - r0 = s.tmp_7.fields["scrollRow"]; - s.tmp_9 = r0; - r0 = (s.tmp_9 + 1); - s.tmp_8 = r0; - r0 = (s.tmp_7).fields["scrollRow"] = (s.tmp_8); - { step = 6; continue; } - case 5: - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["scrollRow"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["scrollRow"] = (s.tmp_1); - case 6: - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["scrollRow"]; + r0 = (s.tmp_5 | 0); s.tmp_2 = r0; - s.tmp_5 = if_cardSpacing_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_5.arg0 = r0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "cardSpacing"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["cardSpacing"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["cardSpacing"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1136; s.pc = 9; return s.tmp_5; } - } - case 9: - r0 = s.retval; - s.tmp_4 = r0; - s.tmp_7 = if_cardWidth_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_7.arg0 = r0; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "cardWidth"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["cardWidth"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["cardWidth"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 1137; s.pc = 10; return s.tmp_7; } - } - case 10: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_4 + s.tmp_6); - s.tmp_3 = r0; - r0 = (s.tmp_2 * s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["scrollTarget"] = (s.tmp_1); - case 7: - r0 = undefined; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___33288 + 1); + s.i___33288 = (r0); + { step = 1; continue; } + case 2: + r0 = s.cos___33280; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_updateScrollTarget__P277062.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} +particles_cacheCos__P22395.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} -function scene_systemMenu_PauseMenu_updateScrollTarget__P277062_mk(s) { +function particles_cacheCos__P22395_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P277062, depth: s.depth + 1, + parent: s, fn: particles_cacheCos__P22395, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -24741,11 +25167,9 @@ function scene_systemMenu_PauseMenu_updateScrollTarget__P277062_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - row___285000: undefined, + cos___33280: undefined, + anglePerSlice___33282: undefined, + i___33288: undefined, arg0: undefined, } } @@ -24753,7 +25177,7 @@ function scene_systemMenu_PauseMenu_updateScrollTarget__P277062_mk(s) { -function scene_systemMenu_PauseMenu_onUpdate__P274915(s) { +function particles_cacheSin__P22394(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24763,160 +25187,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.t___284803 = undefined; - s.i___284807 = undefined; - s.dt___284836 = undefined; + s.sin___33306 = undefined; + s.anglePerSlice___33308 = undefined; + s.i___33314 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 250); - s.t___284803 = (r0); - s.i___284807 = (0); + r0 = pxsim_Array__mk(); + s.sin___33306 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___33308 = (r0); + s.i___33314 = (0); case 1: - s.tmp_1 = r0 = s.i___284807; - r0 = s.arg0.fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.i___33314 < s.arg0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 2; continue; } - s.tmp_4 = scene_systemMenu_MenuOption_setOffset__P274908_mk(s); - r0 = s.arg0.fields["options"]; + s.tmp_1 = r0 = s.sin___33306; + r0 = (s.i___33314 * s.anglePerSlice___33308); + s.tmp_4 = r0; + r0 = pxsim.Math_.sin(s.tmp_4); + s.tmp_3 = r0; + r0 = (s.tmp_3 * 256); s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___284807); - s.tmp_4.arg0 = r0; - s.tmp_8 = r0 = s.t___284803; - s.tmp_11 = r0 = s.i___284807; - s.tmp_13 = if_cardsPerRow_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_13.arg0 = r0; - if (!s.tmp_13.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_13.arg0, "cardsPerRow"); - } else { - s.tmp_13.fn = s.tmp_13.arg0.vtable.iface["cardsPerRow"]; - if (s.tmp_13.fn == null) { s.retval = s.tmp_13.arg0.fields["cardsPerRow"]; } - else if (!s.tmp_13.fn.isGetter) { s.retval = bind(s.tmp_13); } - else { s.callLocIdx = 1105; s.pc = 11; return s.tmp_13; } - } - case 11: - r0 = s.retval; - s.tmp_12 = r0; - r0 = (s.tmp_11 % s.tmp_12); - s.tmp_10 = r0; - r0 = (s.tmp_10 * 1.5707963267948966); - s.tmp_9 = r0; - r0 = (s.tmp_8 - s.tmp_9); - s.tmp_7 = r0; - r0 = pxsim.Math_.sin(s.tmp_7); - s.tmp_6 = r0; - r0 = (2 * s.tmp_6); - s.tmp_4.arg1 = r0; - s.callLocIdx = 1106; s.pc = 10; return s.tmp_4; - case 10: - r0 = s.retval; - r0 = (s.i___284807 + 1); - s.i___284807 = (r0); + r0 = (s.tmp_5 | 0); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___33314 + 1); + s.i___33314 = (r0); { step = 1; continue; } case 2: - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1107; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - r0 = r0.fields["eventContext"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["deltaTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.dt___284836 = (r0); - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["scrollTarget"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["scrollOffset"]; - s.tmp_5 = r0; - r0 = (s.dt___284836 * 100); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); - { step = 6; continue; } - case 3: - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["scrollTarget"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 > s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = s.tmp_3.fields["scrollOffset"]; - s.tmp_5 = r0; - r0 = (s.dt___284836 * 100); - s.tmp_6 = r0; - r0 = (s.tmp_5 - s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["scrollOffset"] = (s.tmp_4); - { step = 5; continue; } - case 4: - { step = 9; continue; } - case 5: - case 6: - s.tmp_2 = Math_abs__P271944_mk(s); - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["scrollTarget"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2.arg0 = r0; - s.callLocIdx = 1109; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["scrollTarget"]; - s.tmp_5 = r0; - r0 = (s.arg0).fields["scrollOffset"] = (s.tmp_5); - case 7: - case 8: - s.tmp_0 = scene_Camera_offsetY__P274606_mk(s); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1110; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - r0 = r0.fields["camera"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1111; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 9: - r0 = undefined; + r0 = s.sin___33306; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_onUpdate__P274915.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} +particles_cacheSin__P22394.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} -function scene_systemMenu_PauseMenu_onUpdate__P274915_mk(s) { +function particles_cacheSin__P22394_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P274915, depth: s.depth + 1, + parent: s, fn: particles_cacheSin__P22394, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -24924,17 +25235,9 @@ function scene_systemMenu_PauseMenu_onUpdate__P274915_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - t___284803: undefined, - i___284807: undefined, - dt___284836: undefined, + sin___33306: undefined, + anglePerSlice___33308: undefined, + i___33314: undefined, arg0: undefined, } } @@ -24942,7 +25245,7 @@ function scene_systemMenu_PauseMenu_onUpdate__P274915_mk(s) { -function scene_systemMenu_MenuOption_setOffset__P274908(s) { +function particles_ParticleSource_setFactory__P22356(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24958,43 +25261,23 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P274221_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["top"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 + s.arg1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1048; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["_factory"] = (s.arg1); case 1: - r0 = s.retval; - s.tmp_0 = Sprite_y__P274174_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1049; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1050; s.pc = 2; return s.tmp_0; case 2: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setOffset__P274908.info = {"start":1411,"length":123,"line":61,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setOffset","argumentNames":["this","offset"]} +particles_ParticleSource_setFactory__P22356.info = {"start":8124,"length":114,"line":272,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} -function scene_systemMenu_MenuOption_setOffset__P274908_mk(s) { +function particles_ParticleSource_setFactory__P22356_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setOffset__P274908, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setFactory__P22356, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, arg1: undefined, } } @@ -25003,7 +25286,7 @@ function scene_systemMenu_MenuOption_setOffset__P274908_mk(s) { -function Sprite_top__P274221(s) { +function particles_ParticleSource_setRate__P22354(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25013,53 +25296,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___284920 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 360; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___284920 = (r0); - s.tmp_0 = PhysicsEngine__C274328_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___284920; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = 0; - r0 = (s.arg1 * 256); + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (1000 / s.arg1); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim.Math_.ceil(s.tmp_2); s.tmp_1 = r0; - r0 = s.arg0.fields["_y"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0.arg3 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; - s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + r0 = (s.tmp_0).fields["period"] = (s.tmp_1); + r0 = (s.arg0).fields["timer"] = (0); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_top__P274221.info = {"start":11687,"length":256,"line":421,"column":4,"endLine":431,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} +particles_ParticleSource_setRate__P22354.info = {"start":7802,"length":139,"line":259,"column":8,"endLine":262,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} -function Sprite_top__P274221_mk(s) { +function particles_ParticleSource_setRate__P22354_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P274221, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRate__P22354, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - physics___284920: undefined, arg0: undefined, arg1: undefined, } } @@ -25068,7 +25332,7 @@ function Sprite_top__P274221_mk(s) { -function PhysicsEngine_moveSprite__P274332(s) { +function particles_ParticleSource_setAnchor__P22353(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25081,34 +25345,31 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C274328_VT)) failedCast(r0); + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = (s.arg0).fields["anchor"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_moveSprite__P274332.info = {"start":230,"length":43,"line":13,"column":4,"endLine":13,"endColumn":47,"fileName":"pxt_modules/game/physics.ts","functionName":"moveSprite","argumentNames":["this","s","dx","dy"]} +particles_ParticleSource_setAnchor__P22353.info = {"start":7594,"length":79,"line":251,"column":8,"endLine":253,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} -function PhysicsEngine_moveSprite__P274332_mk(s) { +function particles_ParticleSource_setAnchor__P22353_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_moveSprite__P274332, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setAnchor__P22353, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Sprite_top__P274220(s) { +function particles_ParticleSource_destroy__P22351(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25123,22 +25384,38 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleSource_enabled__P22350_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1229; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["pFlags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 | 2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + s.tmp_0 = particles_ParticleSource__prune__P22345_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1230; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_top__P274220.info = {"start":11544,"length":53,"line":416,"column":4,"endLine":418,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this"]} -Sprite_top__P274220.isGetter = true; +particles_ParticleSource_destroy__P22351.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} -function Sprite_top__P274220_mk(s) { +function particles_ParticleSource_destroy__P22351_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P274220, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_destroy__P22351, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -25146,7 +25423,7 @@ function Sprite_top__P274220_mk(s) { -function Sprite_y__P274174(s) { +function particles_ParticleSource_setAcceleration__P22346(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25159,51 +25436,47 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P274221_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_height__P274215_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 311; s.pc = 2; return s.tmp_4; - case 2: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / 2); + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 312; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["ax"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg2 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["ay"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_y__P274174.info = {"start":3081,"length":65,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this","v"]} +particles_ParticleSource_setAcceleration__P22346.info = {"start":6026,"length":113,"line":194,"column":8,"endLine":197,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAcceleration","argumentNames":["this","ax","ay"]} -function Sprite_y__P274174_mk(s) { +function particles_ParticleSource_setAcceleration__P22346_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P274174, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setAcceleration__P22346, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function Sprite_height__P274215(s) { +function MAX_SOURCES_inline__P33400(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25213,35 +25486,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; + s.sz___33401 = undefined; + s.tmp_0 = control_ramSize__P20334_mk(s); + s.callLocIdx = 42; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sz___33401 = (r0); + r0 = (s.sz___33401 <= 102400); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 8; + { step = 5; continue; } + { step = 4; continue; } + case 1: + r0 = (s.sz___33401 <= 204800); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = 16; + { step = 5; continue; } + { step = 3; continue; } + case 2: + r0 = 50; + { step = 5; continue; } + case 3: + case 4: + r0 = undefined; + case 5: + return leave(s, r0) default: oops() } } } -Sprite_height__P274215.info = {"start":10541,"length":61,"line":380,"column":4,"endLine":382,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"height","argumentNames":["this"]} -Sprite_height__P274215.isGetter = true; +MAX_SOURCES_inline__P33400.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} -function Sprite_height__P274215_mk(s) { +function MAX_SOURCES_inline__P33400_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_height__P274215, depth: s.depth + 1, + parent: s, fn: MAX_SOURCES_inline__P33400, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, + sz___33401: undefined, } } -function Math_abs__P271944(s) { +function control_ramSize__P20334(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25251,18 +25543,14 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = (s.arg0 < 0); + r0 = pxsim_pxtcore.getConfig(205, 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (0 - s.arg0); + r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.arg0; + r0 = 33554432; case 2: // jmp value (already in r0) s.tmp_1 = r0; @@ -25270,23 +25558,49 @@ switch (step) { return leave(s, r0) default: oops() } } } -Math_abs__P271944.info = {"start":16120,"length":77,"line":539,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"abs","argumentNames":["x"]} +control_ramSize__P20334.info = {"start":4847,"length":100,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]} -function Math_abs__P271944_mk(s) { +function control_ramSize__P20334_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_abs__P271944, depth: s.depth + 1, + parent: s, fn: control_ramSize__P20334, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, } } -function scene_systemMenu_MenuOption_setState__P274910(s) { +function control__ramSize__P20333(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + r0 = 33554432; + return leave(s, r0) + default: oops() +} } } +control__ramSize__P20333.info = {"start":4727,"length":60,"line":160,"column":4,"endLine":162,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]} + +function control__ramSize__P20333_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control__ramSize__P20333, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function helpers_arrayShift__P20145(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25298,49 +25612,27 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = s.arg0.fields["state"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - r0 = (s.arg0).fields["state"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P277061_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1052; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = pxsim_Array_.removeAt(s.arg0, 0); return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setState__P274910.info = {"start":1655,"length":147,"line":71,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setState","argumentNames":["this","state"]} +helpers_arrayShift__P20145.info = {"start":4045,"length":82,"line":153,"column":4,"endLine":155,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayShift","argumentNames":["arr"]} -function scene_systemMenu_MenuOption_setState__P274910_mk(s) { +function helpers_arrayShift__P20145_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setState__P274910, depth: s.depth + 1, + parent: s, fn: helpers_arrayShift__P20145, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_MenuOption_updateCard__P277061(s) { +function particles_SprayFactory_setSpeed__P22409(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25352,149 +25644,40 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; + if (!checkSubtype(r0, particles_SprayFactory__C22405_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 7; continue; } - case 1: - case 2: - r0 = s.arg0.fields["state"]; - s.tmp_3 = r0; - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_3); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(0, s.tmp_3); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_3); - if (r0) { step = 5; continue; } - r0 = s.tmp_3; - { step = 6; continue; } - case 3: - s.tmp_4 = Sprite_setImage__P274208_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_4.arg0 = r0; - s.tmp_5 = if_basicCard_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_5.arg0 = r0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "basicCard"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["basicCard"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["basicCard"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1055; s.pc = 9; return s.tmp_5; } - } - case 9: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 1056; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - { step = 6; continue; } - case 4: - s.tmp_0 = Sprite_setImage__P274208_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = if_selectedCard_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "selectedCard"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["selectedCard"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["selectedCard"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1057; s.pc = 11; return s.tmp_1; } - } - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1058; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = Sprite_setImage__P274208_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = if_activeCard_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "activeCard"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["activeCard"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["activeCard"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1059; s.pc = 13; return s.tmp_1; } - } - case 13: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1060; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - case 6: - s.tmp_0 = Sprite_x__P274172_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P274171_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1061; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1062; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.tmp_0 = Sprite_y__P274174_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1063; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1064; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - case 7: + r0 = (s.tmp_0).fields["speed"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_updateCard__P277061.info = {"start":2038,"length":497,"line":86,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateCard","argumentNames":["this"]} +particles_SprayFactory_setSpeed__P22409.info = {"start":3322,"length":92,"line":119,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setSpeed","argumentNames":["this","pixelsPerSecond"]} -function scene_systemMenu_MenuOption_updateCard__P277061_mk(s) { +function particles_SprayFactory_setSpeed__P22409_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_updateCard__P277061, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setSpeed__P22409, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_x__P274172(s) { +function particles_ConfettiFactory_constructor__P22430(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25504,54 +25687,99 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.confetti___33695 = undefined; + s.i___33711 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P274217_mk(s); + if (!checkSubtype(r0, particles_ConfettiFactory__C22428_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim.image.ofBuffer(_hex33698); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex33700); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); + r0 = pxsim.image.ofBuffer(_hex33702); + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); + r0 = pxsim.image.ofBuffer(_hex33704); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); + r0 = pxsim.image.ofBuffer(_hex33706); + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); + s.confetti___33695 = (s.tmp_0); + s.tmp_0 = particles_ShapeFactory_constructor__P22427_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_width__P274214_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 306; s.pc = 2; return s.tmp_4; - case 2: + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + r0 = pxsim_Array__getAt(s.confetti___33695, 0); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1314; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / 2); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 307; s.pc = 1; return s.tmp_0; + s.i___33711 = (1); case 1: + s.tmp_1 = r0 = s.i___33711; + r0 = pxsim_Array__length(s.confetti___33695); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_3 = particles_ShapeFactory_addShape__P22424_mk(s); + s.tmp_3.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.confetti___33695, s.i___33711); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1315; s.pc = 4; return s.tmp_3; + case 4: r0 = s.retval; + r0 = (s.i___33711 + 1); + s.i___33711 = (r0); + { step = 1; continue; } + case 2: + r0 = (s.arg0).fields["minLifespan"] = (1000); + r0 = (s.arg0).fields["maxLifespan"] = (4500); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_x__P274172.info = {"start":2724,"length":65,"line":115,"column":4,"endLine":117,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} +particles_ConfettiFactory_constructor__P22430.info = {"start":7755,"length":706,"line":247,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange"]} -function Sprite_x__P274172_mk(s) { +function particles_ConfettiFactory_constructor__P22430_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P274172, depth: s.depth + 1, + parent: s, fn: particles_ConfettiFactory_constructor__P22430, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + confetti___33695: undefined, + i___33711: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } +const _hex33698 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") +const _hex33700 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") +const _hex33702 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") +const _hex33704 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") +const _hex33706 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function Sprite_left__P274217(s) { +function particles_ShapeFactory_constructor__P22427(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25561,62 +25789,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___285506 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 352; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, particles_ShapeFactory__C22422_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_constructor__P22416_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = undefined; + s.tmp_0.arg4 = undefined; + s.callLocIdx = 1304; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___285506 = (r0); - s.tmp_0 = PhysicsEngine__C274328_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___285506; - s.tmp_0.arg1 = s.arg0; - r0 = (s.arg1 * 256); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.arg3); + r0 = (s.arg0).fields["sources"] = (s.tmp_0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(s.arg3); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = s.arg0.fields["_x"]; + r0 = (s.tmp_0).fields["ox"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.height(s.arg3); s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C274328_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.moveSprite; - s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["oy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_left__P274217.info = {"start":10853,"length":257,"line":391,"column":4,"endLine":401,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} +particles_ShapeFactory_constructor__P22427.info = {"start":6668,"length":285,"line":212,"column":8,"endLine":219,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","source"]} -function Sprite_left__P274217_mk(s) { +function particles_ShapeFactory_constructor__P22427_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P274217, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_constructor__P22427, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - physics___285506: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite_left__P274216(s) { +function particles_AreaFactory_constructor__P22416(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25628,33 +25869,78 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, particles_AreaFactory__C22412_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_constructor__P22411_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 40; + s.tmp_0.arg2 = 0; + s.tmp_0.arg3 = 90; + s.callLocIdx = 1292; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = (s.arg0).fields["xRange"] = (s.arg1); + r0 = (s.arg0).fields["yRange"] = (s.arg2); + r0 = pxsim_numops_toBoolDecr(s.arg3); + if (!r0) { step = 1; continue; } + r0 = s.arg3; + { step = 2; continue; } + case 1: + r0 = 150; + case 2: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.arg0).fields["minLifespan"] = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg4); + if (!r0) { step = 3; continue; } + r0 = s.arg4; + { step = 4; continue; } + case 3: + r0 = 850; + case 4: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.arg0).fields["maxLifespan"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C22203_VT); + s.tmp_0 = r0; + s.tmp_1 = Math_FastRandom_constructor__P22210_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1293; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = (s.arg0).fields["galois"] = (s.tmp_0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_left__P274216.info = {"start":10709,"length":53,"line":386,"column":4,"endLine":388,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this"]} -Sprite_left__P274216.isGetter = true; +particles_AreaFactory_constructor__P22416.info = {"start":3950,"length":374,"line":139,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","minLifespan","maxLifespan"]} -function Sprite_left__P274216_mk(s) { +function particles_AreaFactory_constructor__P22416_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P274216, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_constructor__P22416, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function Sprite_width__P274214(s) { +function particles_ShapeFactory_addShape__P22424(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25666,33 +25952,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; + if (!checkSubtype(r0, particles_ShapeFactory__C22422_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["sources"]; s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + case 1: + case 2: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_width__P274214.info = {"start":10374,"length":59,"line":375,"column":4,"endLine":377,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"width","argumentNames":["this"]} -Sprite_width__P274214.isGetter = true; +particles_ShapeFactory_addShape__P22424.info = {"start":7079,"length":83,"line":225,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"addShape","argumentNames":["this","shape"]} -function Sprite_width__P274214_mk(s) { +function particles_ShapeFactory_addShape__P22424_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_width__P274214, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_addShape__P22424, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_MenuOption_setTheme__P274909(s) { +function effects_ScreenEffect_constructor__P22482(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25705,37 +25997,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = (s.arg0).fields["theme"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P277061_mk(s); + if (!checkSubtype(r0, effects_ScreenEffect__C22478_VT)) failedCast(r0); + s.tmp_0 = effects_ParticleEffect_constructor__P22471_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1051; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg3; + s.tmp_0.arg3 = s.arg4; + s.callLocIdx = 1321; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = (s.arg0).fields["sceneDefaultRate"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setTheme__P274909.info = {"start":1544,"length":101,"line":66,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setTheme","argumentNames":["this","theme"]} +effects_ScreenEffect_constructor__P22482.info = {"start":2911,"length":332,"line":81,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this","anchorDefault","sceneDefault","defaultLifespan","sourceFactory"]} -function scene_systemMenu_MenuOption_setTheme__P274909_mk(s) { +function effects_ScreenEffect_constructor__P22482_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setTheme__P274909, depth: s.depth + 1, + parent: s, fn: effects_ScreenEffect_constructor__P22482, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function scene_systemMenu_MenuOption_position__P274907(s) { +function effects_ParticleEffect_constructor__P22471(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25749,74 +26050,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = (s.arg0).fields["top"] = (s.arg2); - s.tmp_0 = Sprite_left__P274217_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1042; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = Sprite_top__P274221_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1043; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = Sprite_x__P274172_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P274171_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1044; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1045; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_y__P274174_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 1046; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1047; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + if (!checkSubtype(r0, effects_ParticleEffect__C22468_VT)) failedCast(r0); + r0 = (s.arg0).fields["sourceFactory"] = (s.arg3); + r0 = (s.arg0).fields["defaultRate"] = (s.arg1); + r0 = (s.arg0).fields["defaultLifespan"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_position__P274907.info = {"start":1178,"length":223,"line":51,"column":8,"endLine":59,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"position","argumentNames":["this","left","top"]} +effects_ParticleEffect_constructor__P22471.info = {"start":384,"length":364,"line":13,"column":8,"endLine":18,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this","defaultParticlesPerSecond","defaultLifespan","sourceFactory"]} -function scene_systemMenu_MenuOption_position__P274907_mk(s) { +function effects_ParticleEffect_constructor__P22471_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_position__P274907, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_constructor__P22471, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function scene_systemMenu_MenuOption_show__P274906(s) { +function music_melodyPlayable__P20809(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25830,96 +26093,27 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C274904_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; + r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayable__C20800_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = if_basicCard_1_mk(s); - r0 = s.arg0.fields["theme"]; - s.tmp_1.arg0 = r0; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "basicCard"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["basicCard"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["basicCard"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1037; s.pc = 3; return s.tmp_1; } - } - case 3: - r0 = s.retval; - { step = 2; continue; } + s.tmp_1 = music_MelodyPlayable_constructor__P20803_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 74; s.pc = 1; return s.tmp_1; case 1: - r0 = globals.CARD_NORMAL___274928; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = r0 = s.arg0; - s.tmp_5 = sprites_create__P274092_mk(s); - s.tmp_5.arg0 = s.tmp_2; - s.tmp_5.arg1 = undefined; - s.callLocIdx = 1038; s.pc = 4; return s.tmp_5; - case 4: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["card"] = (s.tmp_4); - s.tmp_0 = if_z_2_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 1; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1039; s.pc = 5; return s.tmp_0; } - } - case 5: - r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = sprites_create__P274092_mk(s); - r0 = s.arg0.fields["iconImage"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 1040; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["icon"] = (s.tmp_1); - s.tmp_0 = if_z_2_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 2; - if (!s.tmp_0.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapSetByString(s.tmp_0.arg0, "z", s.tmp_0.arg1); - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["set/z"]; - if (s.tmp_0.fn === null) { s.tmp_0.arg0.fields["z"] = s.tmp_0.arg1; } - else if (s.tmp_0.fn === undefined) { failedCast(s.tmp_0.arg0) } - else { s.callLocIdx = 1041; s.pc = 7; return s.tmp_0; } - } - case 7: r0 = s.retval; - r0 = (s.arg0).fields["state"] = (2); - r0 = undefined; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_show__P274906.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +music_melodyPlayable__P20809.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} -function scene_systemMenu_MenuOption_show__P274906_mk(s) { +function music_melodyPlayable__P20809_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_show__P274906, depth: s.depth + 1, + parent: s, fn: music_melodyPlayable__P20809, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, } } @@ -25927,7 +26121,7 @@ function scene_systemMenu_MenuOption_show__P274906_mk(s) { -function game_onShade__P274834(s) { +function music_MelodyPlayable_constructor__P20803(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25939,52 +26133,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = game_init__P276813_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1026; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_2 = scene_createRenderable__P274622_mk(s); - s.tmp_2.arg0 = 80; - s.tmp_2.arg1 = s.arg0; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 1027; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: + r0 = s.arg0; + if (!checkSubtype(r0, music_MelodyPlayable__C20800_VT)) failedCast(r0); + r0 = (s.arg0).fields["melody"] = (s.arg1); + r0 = undefined; r0 = undefined; return leave(s, r0) default: oops() } } } -game_onShade__P274834.info = {"start":15927,"length":145,"line":474,"column":4,"endLine":478,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} +music_MelodyPlayable_constructor__P20803.info = {"start":1531,"length":67,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this","melody"]} -function game_onShade__P274834_mk(s) { +function music_MelodyPlayable_constructor__P20803_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onShade__P274834, depth: s.depth + 1, + parent: s, fn: music_MelodyPlayable_constructor__P20803, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, + arg1: undefined, } } -function scene_createRenderable__P274622(s) { +function music_Playable_constructor__P20799(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25994,60 +26169,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.renderable___284952 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(scene_Renderable__C274617_VT); - s.tmp_0 = r0; - s.tmp_1 = r0 = s.arg2; - r0 = pxsim_numops_toBool(s.tmp_1); - if (!r0) { step = 1; continue; } - r0 = s.tmp_1; - { step = 2; continue; } - case 1: - r0 = renderable_inline__P284958; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = scene_Renderable_constructor__P274618_mk(s); - s.tmp_3.arg0 = s.tmp_0; - s.tmp_3.arg1 = s.arg1; - s.tmp_3.arg2 = s.tmp_2; - s.tmp_3.arg3 = s.arg0; - s.callLocIdx = 904; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.renderable___284952 = (s.tmp_0); - r0 = s.renderable___284952; + r0 = s.arg0; + if (!checkSubtype(r0, music_Playable__C20627_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_createRenderable__P274622.info = {"start":608,"length":339,"line":24,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/renderable.ts","functionName":"createRenderable","argumentNames":["z","handler","shouldBeVisible"]} +music_Playable_constructor__P20799.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} -function scene_createRenderable__P274622_mk(s) { +function music_Playable_constructor__P20799_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_createRenderable__P274622, depth: s.depth + 1, + parent: s, fn: music_Playable_constructor__P20799, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - renderable___284952: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function renderable_inline__P284958(s) { +function music_Melody_constructor__P20564(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26057,24 +26203,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = true; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, music_Melody__C20552_VT)) failedCast(r0); + r0 = (s.arg0).fields["_text"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -renderable_inline__P284958.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} +music_Melody_constructor__P20564.info = {"start":6430,"length":67,"line":203,"column":8,"endLine":205,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} -function renderable_inline__P284958_mk(s) { +function music_Melody_constructor__P20564_mk(s) { checkStack(s.depth); return { - parent: s, fn: renderable_inline__P284958, depth: s.depth + 1, + parent: s, fn: music_Melody_constructor__P20564, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, } } -function scene_Renderable_constructor__P274618(s) { +function Fx8__P20193(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26086,44 +26242,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C274617_VT)) failedCast(r0); - r0 = (s.arg0).fields["handler"] = (s.arg1); - r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); - s.tmp_0 = sprites_BaseSprite_constructor__P273913_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 901; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg0 * 256); + s.tmp_0 = r0; + r0 = (s.tmp_0 | 0); return leave(s, r0) default: oops() } } } -scene_Renderable_constructor__P274618.info = {"start":83,"length":212,"line":2,"column":8,"endLine":8,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":["this","handler","shouldBeVisible","z"]} +Fx8__P20193.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} -function scene_Renderable_constructor__P274618_mk(s) { +function Fx8__P20193_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable_constructor__P274618, depth: s.depth + 1, + parent: s, fn: Fx8__P20193, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_systemMenu_PauseMenu_constructor__P274913(s) { +function SpriteKind_create__P21363(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26133,61 +26275,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C274912_VT)) failedCast(r0); - r0 = (s.arg0).fields["generator"] = (s.arg1); - s.tmp_0 = r0 = s.arg2; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = (globals.nextKind___21362 === undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + globals.nextKind___21362 = (1000); case 1: - s.tmp_1 = scene_systemMenu_buildMenuTheme__P274921_mk(s); - r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___274928); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 3; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.callLocIdx = 1065; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = (s.arg0).fields["theme"] = (s.tmp_2); - r0 = (s.arg0).fields["scrollRow"] = (0); - r0 = (s.arg0).fields["scrollOffset"] = (0); - r0 = (s.arg0).fields["scrollTarget"] = (0); - r0 = undefined; + s.tmp_0 = r0 = globals.nextKind___21362; + r0 = (s.tmp_0 + 1); + globals.nextKind___21362 = (r0); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_constructor__P274913.info = {"start":3029,"length":257,"line":116,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["this","generator","theme"]} +SpriteKind_create__P21363.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} -function scene_systemMenu_PauseMenu_constructor__P274913_mk(s) { +function SpriteKind_create__P21363_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_constructor__P274913, depth: s.depth + 1, + parent: s, fn: SpriteKind_create__P21363, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_systemMenu_buildMenuTheme__P274921(s) { +function controller_Button_constructor__P21158(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26197,150 +26313,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cardsPerRow___286182 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = pxsim_ImageMethods.width(globals.screen___273849); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = (s.arg0).fields["id"] = (s.arg1); + r0 = (s.arg0).fields["_pressed"] = (false); + r0 = (s.arg0).fields["repeatDelay"] = (undefined); + r0 = (s.arg0).fields["repeatInterval"] = (undefined); + r0 = (s.arg0).fields["_repeatCount"] = (0); + r0 = (s.arg1 > 0); s.tmp_0 = r0; - r0 = (s.arg0 + s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P33852); s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); - s.cardsPerRow___286182 = (r0); - s.tmp_0 = r0 = s.arg2; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + r0 = s.arg0.fields["id"]; + s.tmp_2 = r0; + r0 = pxsim.control.internalOnEvent(2050, s.tmp_2, s.tmp_1, 16); + r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P33859); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = s.arg0.fields["id"]; + s.tmp_1 = r0; + r0 = pxsim.control.internalOnEvent(2051, s.tmp_1, s.tmp_0, 16); + r0 = (s.arg2 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = undefined; case 1: - r0 = globals.font8___273792; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - s.arg2 = (s.tmp_1); - s.tmp_0 = r0 = s.arg3; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } case 3: - s.tmp_1 = image_doubledFont__P273795_mk(s); - s.tmp_1.arg0 = s.arg2; - s.callLocIdx = 1175; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.arg3 = (s.tmp_2); - r0 = pxsim_pxtrt.mkMap(); - s.tmp_0 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardSpacing", s.arg1); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardWidth", s.arg0); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardsPerRow", s.cardsPerRow___286182); - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_3 = r0; - r0 = (s.cardsPerRow___286182 * s.arg0); - s.tmp_5 = r0; - r0 = (s.cardsPerRow___286182 - 1); - s.tmp_7 = r0; - r0 = (s.tmp_7 * s.arg1); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "padding", s.tmp_1); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "infoFont", s.arg2); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "headerFont", s.arg3); - s.tmp_11 = if_charHeight_1_mk(s); - s.tmp_11.arg0 = s.arg3; - if (!s.tmp_11.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "charHeight"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["charHeight"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["charHeight"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 1176; s.pc = 6; return s.tmp_11; } - } - case 6: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 + 2); - s.tmp_9 = r0; - r0 = (s.tmp_9 + s.arg1); - s.tmp_8 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "cardsTop", s.tmp_8); - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_14 = r0; - s.tmp_16 = if_charHeight_1_mk(s); - s.tmp_16.arg0 = s.arg2; - if (!s.tmp_16.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_16.arg0, "charHeight"); - } else { - s.tmp_16.fn = s.tmp_16.arg0.vtable.iface["charHeight"]; - if (s.tmp_16.fn == null) { s.retval = s.tmp_16.arg0.fields["charHeight"]; } - else if (!s.tmp_16.fn.isGetter) { s.retval = bind(s.tmp_16); } - else { s.callLocIdx = 1177; s.pc = 7; return s.tmp_16; } - } - case 7: - r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_14 - s.tmp_15); - s.tmp_13 = r0; - r0 = (s.tmp_13 - 2); - s.tmp_12 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "infoTop", s.tmp_12); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "headerText", "PAUSED"); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "selectedCard", globals.CARD_SELECTED___274929); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___274930); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___274928); - r0 = s.tmp_0; + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildMenuTheme__P274921.info = {"start":11654,"length":906,"line":356,"column":4,"endLine":375,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildMenuTheme","argumentNames":["cardWidth","cardSpacing","infoFont","headerFont"]} +controller_Button_constructor__P21158.info = {"start":2004,"length":864,"line":77,"column":8,"endLine":94,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","id","configKey"]} -function scene_systemMenu_buildMenuTheme__P274921_mk(s) { +function controller_Button_constructor__P21158_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildMenuTheme__P274921, depth: s.depth + 1, + parent: s, fn: controller_Button_constructor__P21158, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - cardsPerRow___286182: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function image_doubledFont__P273795(s) { +function controller_Button_inline__P33852(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_setPressed__P21150_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 200; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_inline__P33852.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_inline__P33852_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_inline__P33852, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_Button_inline__P33859(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.tmp_0 = controller_Button_setPressed__P21150_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 201; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_Button_inline__P33859.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} + +function controller_Button_inline__P33859_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_inline__P33859, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function controller_setupButton__P21168(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26352,33 +26454,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = image_scaledFont__P273796_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 2; - s.callLocIdx = 89; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -image_doubledFont__P273795.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} +controller_setupButton__P21168.info = {"start":861,"length":93,"line":39,"column":4,"endLine":41,"endColumn":6,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setupButton","argumentNames":["buttonId","key"]} -function image_doubledFont__P273795_mk(s) { +function controller_setupButton__P21168_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_doubledFont__P273795, depth: s.depth + 1, + parent: s, fn: controller_setupButton__P21168, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function image_scaledFont__P273796(s) { +function controller_Button_setPressed__P21150(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26393,129 +26491,67 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg1 | 0); - s.arg1 = (r0); - r0 = (s.arg1 < 2); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 != s.arg1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = power_poke__P20816_mk(s); + s.callLocIdx = 204; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = s.arg0.fields["_owner"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 5; continue; } + s.tmp_1 = controller_Controller_connected__P21121_mk(s); + r0 = s.arg0.fields["_owner"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = true; + s.callLocIdx = 205; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; case 1: case 2: - r0 = pxsim_pxtrt.mkMap(); - s.tmp_1 = r0; - s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = s.arg0; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["charWidth"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["charWidth"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 90; s.pc = 6; return s.tmp_4; } - } - case 6: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 * s.arg1); - s.tmp_2 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charWidth", s.tmp_2); - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.arg0; - if (!s.tmp_7.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); - } else { - s.tmp_7.fn = s.tmp_7.arg0.vtable.iface["charHeight"]; - if (s.tmp_7.fn == null) { s.retval = s.tmp_7.arg0.fields["charHeight"]; } - else if (!s.tmp_7.fn.isGetter) { s.retval = bind(s.tmp_7); } - else { s.callLocIdx = 91; s.pc = 7; return s.tmp_7; } - } - case 7: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 * s.arg1); - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "charHeight", s.tmp_5); - s.tmp_9 = if_data_1_mk(s); - s.tmp_9.arg0 = s.arg0; - if (!s.tmp_9.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_9.arg0, "data"); - } else { - s.tmp_9.fn = s.tmp_9.arg0.vtable.iface["data"]; - if (s.tmp_9.fn == null) { s.retval = s.tmp_9.arg0.fields["data"]; } - else if (!s.tmp_9.fn.isGetter) { s.retval = bind(s.tmp_9); } - else { s.callLocIdx = 92; s.pc = 8; return s.tmp_9; } - } - case 8: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "data", s.tmp_8); - s.tmp_11 = if_multiplier_1_mk(s); - s.tmp_11.arg0 = s.arg0; - if (!s.tmp_11.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_11.arg0, "multiplier"); - } else { - s.tmp_11.fn = s.tmp_11.arg0.vtable.iface["multiplier"]; - if (s.tmp_11.fn == null) { s.retval = s.tmp_11.arg0.fields["multiplier"]; } - else if (!s.tmp_11.fn.isGetter) { s.retval = bind(s.tmp_11); } - else { s.callLocIdx = 93; s.pc = 9; return s.tmp_11; } - } - case 9: - r0 = s.retval; - s.tmp_10 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_10); + r0 = (s.arg0).fields["_pressed"] = (s.arg1); + r0 = s.arg0.fields["_pressed"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - s.tmp_12 = r0 = s.arg1; - s.tmp_14 = if_multiplier_1_mk(s); - s.tmp_14.arg0 = s.arg0; - if (!s.tmp_14.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "multiplier"); - } else { - s.tmp_14.fn = s.tmp_14.arg0.vtable.iface["multiplier"]; - if (s.tmp_14.fn == null) { s.retval = s.tmp_14.arg0.fields["multiplier"]; } - else if (!s.tmp_14.fn.isGetter) { s.retval = bind(s.tmp_14); } - else { s.callLocIdx = 94; s.pc = 10; return s.tmp_14; } - } - case 10: + r0 = (s.arg0).fields["_pressedElasped"] = (0); + s.tmp_0 = controller_Button_raiseButtonDown__P21142_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 206; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - s.tmp_13 = r0; - r0 = (s.tmp_12 * s.tmp_13); { step = 4; continue; } case 3: - r0 = s.arg1; + r0 = (s.arg0).fields["_repeatCount"] = (0); + s.tmp_0 = controller_Button_raiseButtonUp__P21141_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 207; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; case 4: - // jmp value (already in r0) - s.tmp_15 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_1, "multiplier", s.tmp_15); - r0 = s.tmp_1; case 5: + case 6: + r0 = undefined; return leave(s, r0) default: oops() } } } -image_scaledFont__P273796.info = {"start":12096,"length":331,"line":150,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"scaledFont","argumentNames":["f","size"]} +controller_Button_setPressed__P21150.info = {"start":6774,"length":507,"line":201,"column":8,"endLine":215,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setPressed","argumentNames":["this","pressed"]} -function image_scaledFont__P273796_mk(s) { +function controller_Button_setPressed__P21150_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_scaledFont__P273796, depth: s.depth + 1, + parent: s, fn: controller_Button_setPressed__P21150, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, arg0: undefined, arg1: undefined, } } @@ -26524,7 +26560,7 @@ function image_scaledFont__P273796_mk(s) { -function controller_Button_onEvent__P274013(s) { +function controller_Button_raiseButtonDown__P21142(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26534,46 +26570,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.eventHandler___286264 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P276594_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 203; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___21162); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2049, s.tmp_0); + { step = 2; continue; } case 1: - r0 = s.retval; - s.eventHandler___286264 = (r0); - r0 = (s.eventHandler___286264).fields["callback"] = (s.arg2); + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2053, s.tmp_0); + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_onEvent__P274013.info = {"start":3784,"length":188,"line":123,"column":8,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"onEvent","argumentNames":["this","event","handler"]} +controller_Button_raiseButtonDown__P21142.info = {"start":3088,"length":205,"line":103,"column":8,"endLine":108,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonDown","argumentNames":["this"]} -function controller_Button_onEvent__P274013_mk(s) { +function controller_Button_raiseButtonDown__P21142_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_onEvent__P274013, depth: s.depth + 1, + parent: s, fn: controller_Button_raiseButtonDown__P21142, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - eventHandler___286264: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function controller_Button_getOrCreateHandlerForEvent__P276594(s) { +function controller_Button_raiseButtonUp__P21141(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26583,155 +26616,43 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___286285 = undefined; - s.eventHandler___286294 = undefined; - s.unnamed2128___U2 = undefined; - s.unnamed2129___U3 = undefined; - s.newHandler___286310 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - s.tmp_3 = controller_Button_handlerState__P276589_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 213; s.pc = 10; return s.tmp_3; - case 10: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___21162); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonEventHandlerState__C274002_VT); - s.tmp_4 = r0; - s.tmp_5 = controller_ButtonEventHandlerState_constructor__P274003_mk(s); - s.tmp_5.arg0 = s.tmp_4; r0 = s.arg0.fields["id"]; - s.tmp_5.arg1 = r0; - s.callLocIdx = 215; s.pc = 11; return s.tmp_5; - case 11: - r0 = s.retval; - s.tmp_7 = game_currentScene__P274816_mk(s); - s.callLocIdx = 214; s.pc = 12; return s.tmp_7; - case 12: - r0 = s.retval; - r0 = r0.fields["buttonEventHandlers"]; - s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_6, s.tmp_4); - case 1: - case 2: - s.tmp_0 = controller_Button_handlerState__P276589_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 216; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.handlerState___286285 = (r0); - r0 = s.handlerState___286285.fields["user"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = r0 = s.handlerState___286285; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["user"] = (s.tmp_4); - case 3: - case 4: - s.eventHandler___286294 = (undefined); - r0 = s.handlerState___286285.fields["user"]; - s.unnamed2128___U2 = (r0); - s.unnamed2129___U3 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed2129___U3; - r0 = pxsim_Array__length(s.unnamed2128___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = pxsim_Array__getAt(s.unnamed2128___U2, s.unnamed2129___U3); - s.eventHandler___286294 = (r0); - r0 = s.eventHandler___286294.fields["event"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 === s.arg1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - r0 = s.eventHandler___286294; - { step = 9; continue; } - case 6: - case 7: - r0 = (s.unnamed2129___U3 + 1); - s.unnamed2129___U3 = (r0); - { step = 5; continue; } - case 8: - s.unnamed2128___U2 = (undefined); - r0 = pxsim_pxtcore_mkAction(2, controller_Button_getOrCreateHandlerForEvent_inline__P286307); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.arg1); - s.tmp_5 = control_onEvent__P272207_mk(s); - s.tmp_5.arg0 = s.arg1; + r0 = pxsim.control.raiseEvent(2048, s.tmp_0); + { step = 2; continue; } + case 1: r0 = s.arg0.fields["id"]; - s.tmp_5.arg1 = r0; - s.tmp_5.arg2 = s.tmp_4; - s.tmp_5.arg3 = 16; - s.callLocIdx = 218; s.pc = 14; return s.tmp_5; - case 14: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C274000_VT); s.tmp_0 = r0; - s.tmp_1 = controller_ButtonHandler_constructor__P274001_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 219; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.newHandler___286310 = (s.tmp_0); - r0 = s.handlerState___286285.fields["user"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.newHandler___286310); - r0 = s.newHandler___286310; - case 9: + r0 = pxsim.control.raiseEvent(2052, s.tmp_0); + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent__P276594.info = {"start":8550,"length":829,"line":250,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"getOrCreateHandlerForEvent","argumentNames":["this","event"]} +controller_Button_raiseButtonUp__P21141.info = {"start":2878,"length":200,"line":96,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonUp","argumentNames":["this"]} -function controller_Button_getOrCreateHandlerForEvent__P276594_mk(s) { +function controller_Button_raiseButtonUp__P21141_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P276594, depth: s.depth + 1, + parent: s, fn: controller_Button_raiseButtonUp__P21141, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - handlerState___286285: undefined, - eventHandler___286294: undefined, - unnamed2128___U2: undefined, - unnamed2129___U3: undefined, - newHandler___286310: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Button_getOrCreateHandlerForEvent_inline__P286307(s) { +function game_addScenePushHandler__P21075(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26741,31 +26662,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_runButtonEvents__P276593_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.caps[1]; - s.callLocIdx = 217; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___21913); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + globals._scenePushHandlers___21913 = (r0); case 1: - r0 = s.retval; + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___21913, s.arg0, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__push(globals._scenePushHandlers___21913, s.arg0); + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent_inline__P286307.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +game_addScenePushHandler__P21075.info = {"start":16454,"length":242,"line":489,"column":4,"endLine":493,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePushHandler","argumentNames":["handler"]} -function controller_Button_getOrCreateHandlerForEvent_inline__P286307_mk(s) { +function game_addScenePushHandler__P21075_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P286307, depth: s.depth + 1, + parent: s, fn: game_addScenePushHandler__P21075, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, } } -function controller_Button_runButtonEvents__P276593(s) { +function controller_Controller_id__P21064(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26775,144 +26715,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___286324 = undefined; - s.userHandler___286328 = undefined; - s.eventHandler___286339 = undefined; - s.unnamed2126___U3 = undefined; - s.unnamed2127___U4 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - s.tmp_0 = controller_Button_handlerState__P276589_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 209; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.handlerState___286324 = (r0); - r0 = pxsim_numops_toBoolDecr(s.handlerState___286324); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 13; continue; } - case 1: - case 2: - s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P276594_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 210; s.pc = 15; return s.tmp_2; - case 15: - r0 = s.retval; - s.userHandler___286328 = (r0); - r0 = s.userHandler___286328.fields["callback"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = if_callback_1_mk(s); - s.tmp_1.arg0 = s.userHandler___286328; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); - s.callLocIdx = 211; s.pc = 16; return s.tmp_1; - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["callback"]; - if (s.tmp_1.fn == null) { setupLambda(s.tmp_1, s.tmp_1.arg0.fields["callback"], 1); s.callLocIdx = 211; s.pc = 16; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 211; s.pc = 16; return s.tmp_1;; } - else { s.callLocIdx = 211; s.pc = 16; return s.tmp_1; } - } - case 16: - r0 = s.retval; - case 3: - case 4: - r0 = s.handlerState___286324.fields["system"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.eventHandler___286339 = (undefined); - r0 = s.handlerState___286324.fields["system"]; - s.unnamed2126___U3 = (r0); - s.unnamed2127___U4 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed2127___U4; - r0 = pxsim_Array__length(s.unnamed2126___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed2126___U3, s.unnamed2127___U4); - s.eventHandler___286339 = (r0); - r0 = s.eventHandler___286339.fields["event"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 === s.arg1); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 6; continue; } - r0 = s.tmp_2; - { step = 7; continue; } - case 6: - r0 = s.eventHandler___286339.fields["callback"]; - case 7: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 8; continue; } - s.tmp_5 = if_callback_1_mk(s); - s.tmp_5.arg0 = s.eventHandler___286339; - if (!s.tmp_5.arg0.vtable.iface) { - setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); - s.callLocIdx = 212; s.pc = 17; return s.tmp_5; - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["callback"]; - if (s.tmp_5.fn == null) { setupLambda(s.tmp_5, s.tmp_5.arg0.fields["callback"], 1); s.callLocIdx = 212; s.pc = 17; return s.tmp_5; } - else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 212; s.pc = 17; return s.tmp_5;; } - else { s.callLocIdx = 212; s.pc = 17; return s.tmp_5; } - } - case 17: - r0 = s.retval; - case 8: - case 9: - r0 = (s.unnamed2127___U4 + 1); - s.unnamed2127___U4 = (r0); - { step = 5; continue; } - case 10: - s.unnamed2126___U3 = (undefined); - case 11: - case 12: - case 13: - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["_id"]; + return leaveAccessor(s, r0) default: oops() } } } -controller_Button_runButtonEvents__P276593.info = {"start":8005,"length":535,"line":236,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"runButtonEvents","argumentNames":["this","event"]} +controller_Controller_id__P21064.info = {"start":3444,"length":49,"line":109,"column":8,"endLine":111,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"id","argumentNames":["this"]} +controller_Controller_id__P21064.isGetter = true; -function controller_Button_runButtonEvents__P276593_mk(s) { +function controller_Controller_id__P21064_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_runButtonEvents__P276593, depth: s.depth + 1, + parent: s, fn: controller_Controller_id__P21064, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - handlerState___286324: undefined, - userHandler___286328: undefined, - eventHandler___286339: undefined, - unnamed2126___U3: undefined, - unnamed2127___U4: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Button_handlerState__P276589(s) { +function controller_Controller_connected__P21059(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26922,69 +26750,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___286355 = undefined; - s.unnamed2124___U1 = undefined; - s.unnamed2125___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - s.state___286355 = (undefined); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 199; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = r0.fields["buttonEventHandlers"]; - s.unnamed2124___U1 = (r0); - s.unnamed2125___U2 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2125___U2; - r0 = pxsim_Array__length(s.unnamed2124___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed2124___U1, s.unnamed2125___U2); - s.state___286355 = (r0); - r0 = s.state___286355.fields["id"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 === s.tmp_4); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = s.state___286355; - { step = 5; continue; } - case 2: - case 3: - r0 = (s.unnamed2125___U2 + 1); - s.unnamed2125___U2 = (r0); - { step = 1; continue; } - case 4: - s.unnamed2124___U1 = (undefined); - r0 = undefined; - case 5: + if (!checkSubtype(r0, controller_Controller__C21104_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; return leaveAccessor(s, r0) default: oops() } } } -controller_Button_handlerState__P276589.info = {"start":1644,"length":240,"line":66,"column":8,"endLine":71,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"handlerState","argumentNames":["this"]} -controller_Button_handlerState__P276589.isGetter = true; +controller_Controller_connected__P21059.info = {"start":7723,"length":63,"line":250,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this"]} +controller_Controller_connected__P21059.isGetter = true; -function controller_Button_handlerState__P276589_mk(s) { +function controller_Controller_connected__P21059_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_handlerState__P276589, depth: s.depth + 1, + parent: s, fn: controller_Controller_connected__P21059, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - state___286355: undefined, - unnamed2124___U1: undefined, - unnamed2125___U2: undefined, arg0: undefined, } } @@ -26992,7 +26775,7 @@ function controller_Button_handlerState__P276589_mk(s) { -function controller_ButtonEventHandlerState_constructor__P274003(s) { +function game_currentScene__P21034(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27002,34 +26785,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_ButtonEventHandlerState__C274002_VT)) failedCast(r0); - r0 = (s.arg0).fields["id"] = (s.arg1); - r0 = undefined; + s.tmp_0 = game_init__P21922_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 1009; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals._scene___21911; return leave(s, r0) default: oops() } } } -controller_ButtonEventHandlerState_constructor__P274003.info = {"start":1122,"length":33,"line":48,"column":8,"endLine":48,"endColumn":41,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","id"]} +game_currentScene__P21034.info = {"start":4025,"length":90,"line":118,"column":4,"endLine":121,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"currentScene","argumentNames":[]} -function controller_ButtonEventHandlerState_constructor__P274003_mk(s) { +function game_currentScene__P21034_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_ButtonEventHandlerState_constructor__P274003, depth: s.depth + 1, + parent: s, fn: game_currentScene__P21034, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, + tmp_0: undefined, } } -function controller_ButtonHandler_constructor__P274001(s) { +function game_addScenePopHandler__P21020(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27041,35 +26820,48 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, controller_ButtonHandler__C274000_VT)) failedCast(r0); - r0 = (s.arg0).fields["event"] = (s.arg1); - r0 = (s.arg0).fields["callback"] = (s.arg2); + r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___21914); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + globals._scenePopHandlers___21914 = (r0); + case 1: + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___21914, s.arg0, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__push(globals._scenePopHandlers___21914, s.arg0); + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_ButtonHandler_constructor__P274001.info = {"start":997,"length":66,"line":44,"column":8,"endLine":44,"endColumn":74,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","event","callback"]} +game_addScenePopHandler__P21020.info = {"start":17455,"length":237,"line":513,"column":4,"endLine":517,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePopHandler","argumentNames":["handler"]} -function controller_ButtonHandler_constructor__P274001_mk(s) { +function game_addScenePopHandler__P21020_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_ButtonHandler_constructor__P274001, depth: s.depth + 1, + parent: s, fn: game_addScenePopHandler__P21020, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function scene_systemMenu_initScreen__P277074(s) { +function settings_initScopes__P20938(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27079,46 +26871,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.brightness___286367 = undefined; - s.tmp_0 = settings_readNumber__P273885_mk(s); - s.tmp_0.arg0 = "#brightness"; - s.callLocIdx = 1184; s.pc = 3; return s.tmp_0; - case 3: + s.rn___33954 = undefined; + s.tmp_1 = settings_runNumber__P20936_mk(s); + s.callLocIdx = 120; s.pc = 1; return s.tmp_1; + case 1: r0 = s.retval; - s.brightness___286367 = (r0); - r0 = (s.brightness___286367 !== undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_setScreenBrightness__P273782_mk(s); - s.tmp_1.arg0 = globals.screen___273849; - s.tmp_1.arg1 = s.brightness___286367; - s.callLocIdx = 1185; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - case 1: + r0 = (s.tmp_0 + 1); + s.rn___33954 = (r0); + s.tmp_0 = settings_writeNumber__P20944_mk(s); + s.tmp_0.arg0 = globals.RUN_KEY___20925; + s.tmp_0.arg1 = s.rn___33954; + s.callLocIdx = 121; s.pc = 2; return s.tmp_0; case 2: + r0 = s.retval; + r0 = pxsim.control.deviceSerialNumber(); + s.tmp_1 = r0; + r0 = (s.tmp_1 & 2147483647); + s.tmp_0 = r0; + r0 = pxsim_pxtcore.seedAddRandom(s.tmp_0); + r0 = pxsim_pxtcore.seedAddRandom(s.rn___33954); + s.tmp_0 = settings_setScope__P20937_mk(s); + r0 = pxsim_pxtcore.programName(); + s.tmp_0.arg0 = r0; + s.callLocIdx = 122; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_initScreen__P277074.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} +settings_initScopes__P20938.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} -function scene_systemMenu_initScreen__P277074_mk(s) { +function settings_initScopes__P20938_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initScreen__P277074, depth: s.depth + 1, + parent: s, fn: settings_initScopes__P20938, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - brightness___286367: undefined, + rn___33954: undefined, } } -function settings_readNumber__P273885(s) { +function settings_setScope__P20937(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27128,69 +26927,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___286378 = undefined; - s.nums___286385 = undefined; + s.currScope___33983 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); - s.buf___286378 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___286378); + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = undefined; - { step = 7; continue; } - { step = 6; continue; } - case 1: - s.tmp_2 = msgpack_unpackNumberArray__P271999_mk(s); - s.tmp_2.arg0 = s.buf___286378; - s.tmp_2.arg1 = 0; - s.callLocIdx = 129; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - s.nums___286385 = (r0); - s.tmp_0 = r0 = s.nums___286385; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; - { step = 3; continue; } + { step = 2; continue; } + case 1: + r0 = pxsim_String_.length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_2 > 100); case 2: - r0 = pxsim_Array__length(s.nums___286385); - s.tmp_1 = r0; - r0 = (s.tmp_1 >= 1); - case 3: // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.nums___286385, 0); - { step = 7; continue; } + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtrt.panic(922); + case 3: case 4: + s.tmp_0 = settings_readString__P20947_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___20926; + s.callLocIdx = 118; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.currScope___33983 = (r0); + r0 = (s.currScope___33983 != s.arg0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = pxsim.settings._userClean(); + s.tmp_0 = settings_writeString__P20942_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___20926; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 119; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; case 5: - r0 = undefined; - { step = 7; continue; } case 6: r0 = undefined; - case 7: return leave(s, r0) default: oops() } } } -settings_readNumber__P273885.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} +settings_setScope__P20937.info = {"start":826,"length":272,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"setScope","argumentNames":["scope"]} -function settings_readNumber__P273885_mk(s) { +function settings_setScope__P20937_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readNumber__P273885, depth: s.depth + 1, + parent: s, fn: settings_setScope__P20937, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - buf___286378: undefined, - nums___286385: undefined, + tmp_3: undefined, + currScope___33983: undefined, arg0: undefined, } } @@ -27198,7 +26994,7 @@ function settings_readNumber__P273885_mk(s) { -function settings_readBuffer__P273882(s) { +function settings_readString__P20947(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27208,21 +27004,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.buf___34004 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = pxsim.settings._get(s.arg0); + s.buf___34004 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___34004); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = undefined; + { step = 3; continue; } + { step = 2; continue; } + case 1: + r0 = pxsim.BufferMethods.toString(s.buf___34004); + { step = 3; continue; } + case 2: + r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -settings_readBuffer__P273882.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} +settings_readString__P20947.info = {"start":2827,"length":177,"line":110,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readString","argumentNames":["key"]} -function settings_readBuffer__P273882_mk(s) { +function settings_readString__P20947_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readBuffer__P273882, depth: s.depth + 1, + parent: s, fn: settings_readString__P20947, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + buf___34004: undefined, arg0: undefined, } } @@ -27230,7 +27046,7 @@ function settings_readBuffer__P273882_mk(s) { -function msgpack_unpackNumberArray__P271999(s) { +function settings_writeString__P20942(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27240,111 +27056,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___286398 = undefined; - s.fmt___286405 = undefined; - s.v___286414 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___286398 = (r0); + s.tmp_0 = settings_writeBuffer__P20941_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim.control.createBufferFromUTF8(s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 124; s.pc = 1; return s.tmp_0; case 1: - s.tmp_1 = r0 = s.arg1; - r0 = pxsim.BufferMethods.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.tmp_3 = r0 = s.arg1; - r0 = (s.tmp_3 + 1); - s.arg1 = (r0); - s.tmp_4 = msgpack_tagFormat__P276241_mk(s); - r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); - s.tmp_4.arg0 = r0; - s.callLocIdx = 20; s.pc = 12; return s.tmp_4; - case 12: r0 = s.retval; - s.fmt___286405 = (r0); - r0 = (s.fmt___286405 === null); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_1 = r0 = s.arg0; - r0 = (s.arg1 - 1); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 6, s.tmp_2); - s.v___286414 = (r0); - r0 = (-31 <= s.v___286414); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = (s.v___286414 <= 127); - case 3: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__push(s.res___286398, s.v___286414); - { step = 5; continue; } - case 4: - r0 = null; - { step = 11; continue; } - case 5: - { step = 7; continue; } - case 6: - s.tmp_0 = r0 = s.res___286398; - r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___286405, s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.tmp_0 = r0 = s.arg1; - s.tmp_2 = pins_sizeOf__P271991_mk(s); - s.tmp_2.arg0 = s.fmt___286405; - s.callLocIdx = 21; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.arg1 = (r0); - case 7: - case 8: - r0 = pxsim.BufferMethods.getByte(s.arg0, s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_1 === 193); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = (s.arg1 + 1); - s.arg1 = (r0); - { step = 8; continue; } - case 9: - { step = 1; continue; } - case 10: - r0 = s.res___286398; - case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_unpackNumberArray__P271999.info = {"start":2650,"length":669,"line":91,"column":4,"endLine":111,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"unpackNumberArray","argumentNames":["buf","offset"]} +settings_writeString__P20942.info = {"start":1895,"length":125,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeString","argumentNames":["key","value"]} -function msgpack_unpackNumberArray__P271999_mk(s) { +function settings_writeString__P20942_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_unpackNumberArray__P271999, depth: s.depth + 1, + parent: s, fn: settings_writeString__P20942, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - res___286398: undefined, - fmt___286405: undefined, - v___286414: undefined, arg0: undefined, arg1: undefined, } } @@ -27353,7 +27088,7 @@ function msgpack_unpackNumberArray__P271999_mk(s) { -function scene_systemMenu_initVolume__P277073(s) { +function settings_runNumber__P20936(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27363,45 +27098,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.vol___286459 = undefined; - s.tmp_0 = settings_readNumber__P273885_mk(s); - s.tmp_0.arg0 = "#volume"; - s.callLocIdx = 1182; s.pc = 3; return s.tmp_0; + s.tmp_1 = settings_readNumber__P20949_mk(s); + s.tmp_1.arg0 = globals.RUN_KEY___20925; + s.callLocIdx = 117; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.vol___286459 = (r0); - r0 = (s.vol___286459 !== undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = music_setVolume__P273437_mk(s); - s.tmp_1.arg0 = s.vol___286459; - s.callLocIdx = 1183; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = 0; case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_2 = r0; + r0 = s.tmp_2; return leave(s, r0) default: oops() } } } -scene_systemMenu_initVolume__P277073.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} +settings_runNumber__P20936.info = {"start":745,"length":75,"line":27,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"runNumber","argumentNames":[]} -function scene_systemMenu_initVolume__P277073_mk(s) { +function settings_runNumber__P20936_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initVolume__P277073, depth: s.depth + 1, + parent: s, fn: settings_runNumber__P20936, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - vol___286459: undefined, + tmp_2: undefined, } } -function game_GameOverConfig_constructor__P274805(s) { +function control___screen_setupUpdate__P20872(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27415,23 +27147,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C274790_VT)) failedCast(r0); - s.tmp_0 = game_GameOverConfig_init__P274806_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1005; s.pc = 1; return s.tmp_0; + globals.__updated___20870 = (true); + globals.__update___20868 = (s.arg0); + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = s.arg0; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 111; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_constructor__P274805.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} +control___screen_setupUpdate__P20872.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"setupUpdate","argumentNames":["update"]} -function game_GameOverConfig_constructor__P274805_mk(s) { +function control___screen_setupUpdate__P20872_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_constructor__P274805, depth: s.depth + 1, + parent: s, fn: control___screen_setupUpdate__P20872, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -27441,7 +27174,7 @@ function game_GameOverConfig_constructor__P274805_mk(s) { -function game_GameOverConfig_init__P274806(s) { +function _screen_internal_getScreenHeight__P20909(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27455,50 +27188,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C274790_VT)) failedCast(r0); - r0 = (s.arg0).fields["scoringType"] = (0); - r0 = (s.arg0).fields["winEffect"] = (globals.confetti___275091); - r0 = (s.arg0).fields["loseEffect"] = (globals.melt___275113); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = music_melodyPlayable__P273740_mk(s); - s.tmp_2.arg0 = globals.powerUp___273467; - s.callLocIdx = 1006; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["winSound"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = music_melodyPlayable__P273740_mk(s); - s.tmp_2.arg0 = globals.wawawawaa___273464; - s.callLocIdx = 1007; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["loseSound"] = (s.tmp_1); - r0 = (s.arg0).fields["winSoundLooping"] = (false); - r0 = (s.arg0).fields["loseSoundLooping"] = (false); - r0 = (s.arg0).fields["winMessage"] = ("YOU WIN!"); - r0 = (s.arg0).fields["winMessageMultiplayer"] = ("${WINNER} WINS!"); - r0 = (s.arg0).fields["loseMessage"] = ("GAME OVER"); - r0 = (s.arg0).fields["effectSetByUser"] = (false); - r0 = (s.arg0).fields["soundSetByUser"] = (false); - r0 = (s.arg0).fields["messageSetByUser"] = (false); - r0 = (s.arg0).fields["scoringTypeSetByUser"] = (false); - r0 = undefined; + r0 = pxsim_pxtcore.getConfig(2103, s.arg0); return leave(s, r0) default: oops() } } } -game_GameOverConfig_init__P274806.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} +_screen_internal_getScreenHeight__P20909.info = {"start":960,"length":127,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenHeight","argumentNames":["defl"]} -function game_GameOverConfig_init__P274806_mk(s) { +function _screen_internal_getScreenHeight__P20909_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_init__P274806, depth: s.depth + 1, + parent: s, fn: _screen_internal_getScreenHeight__P20909, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, } } @@ -27506,7 +27206,7 @@ function game_GameOverConfig_init__P274806_mk(s) { -function melt_inline__P286522(s) { +function _screen_internal_getScreenWidth__P20907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27516,96 +27216,68 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rounds___286525 = undefined; - s.j___286533 = undefined; - s.x___286538 = undefined; - s.y___286544 = undefined; - s.c___286550 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 5); - s.rounds___286525 = (r0); - s.j___286533 = (0); - case 1: - r0 = (s.j___286533 < s.rounds___286525); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = 0; - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_2 - 1); - s.tmp_1.arg2 = r0; - s.callLocIdx = 58; s.pc = 3; return s.tmp_1; + r0 = pxsim_pxtcore.getConfig(2102, s.arg0); + return leave(s, r0) + default: oops() +} } } +_screen_internal_getScreenWidth__P20907.info = {"start":810,"length":125,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenWidth","argumentNames":["defl"]} + +function _screen_internal_getScreenWidth__P20907_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: _screen_internal_getScreenWidth__P20907, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function control___screen_update__P20871(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + r0 = pxsim_numops_toBoolDecr(globals.__update___20868); + if (!r0) { step = 1; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.__update___20868; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 110; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.x___286538 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 0; - r0 = pxsim_ImageMethods.height(s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 3); - s.tmp_0.arg2 = r0; - s.callLocIdx = 59; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.y___286544 = (r0); - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___286538, s.y___286544); - s.c___286550 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___286538; - r0 = (s.y___286544 + 1); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___286550); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___286538; - r0 = (s.y___286544 + 2); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___286550); - r0 = (s.j___286533 + 1); - s.j___286533 = (r0); - { step = 1; continue; } + case 1: case 2: + globals.__updated___20870 = (true); r0 = undefined; return leave(s, r0) default: oops() } } } -melt_inline__P286522.info = {"start":2652,"length":386,"line":72,"column":45,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +control___screen_update__P20871.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"update","argumentNames":[]} -function melt_inline__P286522_mk(s) { +function control___screen_update__P20871_mk(s) { checkStack(s.depth); return { - parent: s, fn: melt_inline__P286522, depth: s.depth + 1, + parent: s, fn: control___screen_update__P20871, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - rounds___286525: undefined, - j___286533: undefined, - x___286538: undefined, - y___286544: undefined, - c___286550: undefined, - arg0: undefined, - arg1: undefined, } } -function confetti_inline__P286576(s) { +function pause__P20415(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27615,98 +27287,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.factory___286579 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C275035_VT); - s.tmp_0 = r0; - s.tmp_2 = if_width_1_mk(s); - s.tmp_2.arg0 = s.arg0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "width"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["width"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["width"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 46; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 1; continue; } - s.tmp_3 = if_width_1_mk(s); - s.tmp_3.arg0 = s.arg0; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "width"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["width"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["width"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 47; s.pc = 4; return s.tmp_3; } - } - case 4: - r0 = s.retval; - { step = 2; continue; } + setupResume(s, 1); + pxsim.loops.pause(s.arg0); + checkResumeConsumed(); + return; case 1: - r0 = 16; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = particles_ConfettiFactory_constructor__P275036_mk(s); - s.tmp_5.arg0 = s.tmp_0; - s.tmp_5.arg1 = s.tmp_4; - s.tmp_5.arg2 = 16; - s.callLocIdx = 48; s.pc = 5; return s.tmp_5; - case 5: - r0 = s.retval; - s.factory___286579 = (s.tmp_0); - s.tmp_0 = particles_SprayFactory_setSpeed__P275012_mk(s); - s.tmp_0.arg0 = s.factory___286579; - s.tmp_0.arg1 = 30; - s.callLocIdx = 49; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(particles_ParticleSource__C274968_VT); - s.tmp_0 = r0; - s.tmp_1 = particles_ParticleSource_constructor__P274973_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.arg1; - s.tmp_1.arg3 = s.factory___286579; - s.callLocIdx = 50; s.pc = 7; return s.tmp_1; - case 7: r0 = s.retval; - r0 = s.tmp_0; + r0 = undefined; return leave(s, r0) default: oops() } } } -confetti_inline__P286576.info = {"start":7534,"length":284,"line":191,"column":59,"endLine":195,"endColumn":5,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["anchor","particlesPerSecond"]} +pause__P20415.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]} -function confetti_inline__P286576_mk(s) { +function pause__P20415_mk(s) { checkStack(s.depth); return { - parent: s, fn: confetti_inline__P286576, depth: s.depth + 1, + parent: s, fn: pause__P20415, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - factory___286579: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_constructor__P274973(s) { +function music_Melody_toString__P20562(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27716,130 +27325,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___286600 = undefined; - s.removedSource___286609 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P273913_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1204; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = particles_init__P277150_mk(s); - s.callLocIdx = 1205; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1206; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.sources___286600 = (r0); - r0 = pxsim_Array__length(s.sources___286600); - s.tmp_1 = r0; - r0 = (s.tmp_1 >= globals.MAX_SOURCES___277142); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = particles_sortSources__P277153_mk(s); - s.tmp_2.arg0 = s.sources___286600; - s.callLocIdx = 1207; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - r0 = pxsim_Array_.removeAt(s.sources___286600, 0); - s.removedSource___286609 = (r0); - s.tmp_0 = particles_ParticleSource_clear__P274983_mk(s); - s.tmp_0.arg0 = s.removedSource___286609; - s.callLocIdx = 1209; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_destroy__P274982_mk(s); - s.tmp_0.arg0 = s.removedSource___286609; - s.callLocIdx = 1210; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - case 1: - case 2: - r0 = (s.arg0).fields["pFlags"] = (0); - s.tmp_0 = particles_ParticleSource_setRate__P274985_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1211; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAcceleration__P274977_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1212; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAnchor__P274984_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1213; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = (s.arg0).fields["lifespan"] = (undefined); - r0 = (s.arg0).fields["_dt"] = (0); - r0 = (s.arg0).fields["priority"] = (0); - s.tmp_0 = r0 = s.arg3; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = globals.defaultFactory___274988; - case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.tmp_2 = particles_ParticleSource_setFactory__P274987_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1214; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - r0 = pxsim_Array__push(s.sources___286600, s.arg0); - s.tmp_0 = particles_ParticleSource_enabled__P274981_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1215; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = undefined; + if (!checkSubtype(r0, music_Melody__C20552_VT)) failedCast(r0); + r0 = s.arg0.fields["_text"]; return leave(s, r0) default: oops() } } } -particles_ParticleSource_constructor__P274973.info = {"start":2307,"length":899,"line":87,"column":8,"endLine":110,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["this","anchor","particlesPerSecond","factory"]} +music_Melody_toString__P20562.info = {"start":10223,"length":53,"line":318,"column":8,"endLine":320,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"toString","argumentNames":["this"]} -function particles_ParticleSource_constructor__P274973_mk(s) { +function music_Melody_toString__P20562_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_constructor__P274973, depth: s.depth + 1, + parent: s, fn: music_Melody_toString__P20562, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - sources___286600: undefined, - removedSource___286609: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_sortSources__P277153(s) { +function particles_ShapeFactory_createParticle__P22426(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27849,36 +27359,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___34045 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = helpers_arraySort__P271921_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ShapeFactory__C22422_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_createParticle__P22414_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = particles_sortSources_inline__P286807; - s.callLocIdx = 1253; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1312; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; + s.p___34045 = (r0); + s.tmp_0 = r0 = s.p___34045; + s.tmp_2 = Math_FastRandom_randomRange__P22205_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 1; + s.tmp_2.arg2 = 14; + s.callLocIdx = 1313; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["color"] = (s.tmp_1); + r0 = s.p___34045; return leave(s, r0) default: oops() } } } -particles_sortSources__P277153.info = {"start":10026,"length":129,"line":332,"column":4,"endLine":334,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} +particles_ShapeFactory_createParticle__P22426.info = {"start":7505,"length":178,"line":239,"column":8,"endLine":243,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} -function particles_sortSources__P277153_mk(s) { +function particles_ShapeFactory_createParticle__P22426_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources__P277153, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_createParticle__P22426, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + p___34045: undefined, arg0: undefined, + arg1: undefined, } } -function particles_sortSources_inline__P286807(s) { +function particles_AreaFactory_createParticle__P22414(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27888,40 +27418,123 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___34058 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["priority"]; + r0 = s.arg0; + if (!checkSubtype(r0, particles_AreaFactory__C22412_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_createParticle__P22407_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1294; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.p___34058 = (r0); + s.tmp_0 = r0 = s.p___34058; + s.tmp_2 = Math_FastRandom_randomRange__P22205_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_2.arg0 = r0; + r0 = s.arg0.fields["minLifespan"]; + s.tmp_2.arg1 = r0; + r0 = s.arg0.fields["maxLifespan"]; + s.tmp_2.arg2 = r0; + s.callLocIdx = 1295; s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; s.tmp_1 = r0; - r0 = s.arg1.fields["priority"]; + r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___34058; + s.tmp_4 = Math_FastRandom_randomRange__P22205_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = 0; + r0 = s.arg0.fields["xRange"]; + s.tmp_4.arg2 = r0; + s.callLocIdx = 1296; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + s.tmp_3 = r0; + r0 = s.arg0.fields["xRange"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 1); + s.tmp_5 = r0; + r0 = (s.tmp_3 - s.tmp_5); s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); + r0 = s.p___34058.fields["_x"]; + s.tmp_7 = r0; + r0 = (s.tmp_2 << 8); + s.tmp_8 = r0; + r0 = (s.tmp_8 + s.tmp_7); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_1 = if_height_1_mk(s); + s.tmp_1.arg0 = s.arg1; + if (!s.tmp_1.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "height"); + } else { + s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["height"]; + if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["height"]; } + else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } + else { s.callLocIdx = 1299; s.pc = 6; return s.tmp_1; } + } + case 6: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; + s.tmp_3 = if_height_1_mk(s); + s.tmp_3.arg0 = s.arg1; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "height"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["height"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["height"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 1300; s.pc = 7; return s.tmp_3; } + } + case 7: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); { step = 2; continue; } case 1: - r0 = s.arg0.fields["id"]; - s.tmp_3 = r0; - r0 = s.arg1.fields["id"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); + r0 = 0; case 2: // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; + s.tmp_4 = r0; + s.tmp_5 = r0 = s.p___34058; + s.tmp_9 = Math_FastRandom_randomRange__P22205_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_9.arg0 = r0; + s.tmp_9.arg1 = 0; + r0 = s.arg0.fields["yRange"]; + s.tmp_9.arg2 = r0; + s.callLocIdx = 1298; s.pc = 8; return s.tmp_9; + case 8: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 - s.tmp_4); + s.tmp_7 = r0; + r0 = s.p___34058.fields["_y"]; + s.tmp_10 = r0; + r0 = (s.tmp_7 << 8); + s.tmp_11 = r0; + r0 = (s.tmp_11 + s.tmp_10); + s.tmp_6 = r0; + r0 = (s.tmp_5).fields["_y"] = (s.tmp_6); + r0 = s.p___34058; return leave(s, r0) default: oops() } } } -particles_sortSources_inline__P286807.info = {"start":10097,"length":50,"line":333,"column":21,"endLine":333,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} +particles_AreaFactory_createParticle__P22414.info = {"start":4334,"length":426,"line":148,"column":8,"endLine":156,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} -function particles_sortSources_inline__P286807_mk(s) { +function particles_AreaFactory_createParticle__P22414_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources_inline__P286807, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_createParticle__P22414, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -27929,6 +27542,13 @@ function particles_sortSources_inline__P286807_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + p___34058: undefined, arg0: undefined, arg1: undefined, } } @@ -27937,7 +27557,7 @@ function particles_sortSources_inline__P286807_mk(s) { -function particles_init__P277150(s) { +function Fx_iadd__P20213(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27947,59 +27567,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___286846 = undefined; - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1243; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.scene___286846 = (r0); - r0 = s.scene___286846.fields["particleSources"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 << 8); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_1 = r0 = s.scene___286846; - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); - r0 = pxsim.control.millis(); - globals.lastUpdate___277145 = (r0); - s.tmp_0 = game_onUpdate__P274840_mk(s); - s.tmp_0.arg0 = particles_updateParticles__P277151; - s.callLocIdx = 1244; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = game_onUpdateInterval__P274841_mk(s); - s.tmp_0.arg0 = 250; - s.tmp_0.arg1 = particles_pruneParticles__P277152; - s.callLocIdx = 1245; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = (s.tmp_0 + s.arg1); return leave(s, r0) default: oops() } } } -particles_init__P277150.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} +Fx_iadd__P20213.info = {"start":634,"length":110,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"iadd","argumentNames":["a","b"]} -function particles_init__P277150_mk(s) { +function Fx_iadd__P20213_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_init__P277150, depth: s.depth + 1, + parent: s, fn: Fx_iadd__P20213, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - scene___286846: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_updateParticles__P277151(s) { +function particles_SprayFactory_createParticle__P22407(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28009,81 +27604,84 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___286888 = undefined; - s.time___286895 = undefined; - s.dt___286898 = undefined; - s.i___286904 = undefined; - s.tmp_0 = particles_particleSources__P277156_mk(s); - s.callLocIdx = 1246; s.pc = 6; return s.tmp_0; - case 6: + s.p___34115 = undefined; + s.angle___34119 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C22405_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory_createParticle__P22402_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1283; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.sources___286888 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___286888); + s.p___34115 = (r0); + r0 = s.arg0.fields["minAngle"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } - case 1: + s.tmp_3 = Math_FastRandom_randomRange__P22205_mk(s); + s.tmp_3.arg0 = globals.galois___22384; + s.tmp_3.arg1 = 0; + r0 = s.arg0.fields["spread"]; + s.tmp_3.arg2 = r0; + s.callLocIdx = 1284; s.pc = 2; return s.tmp_3; case 2: - s.tmp_2 = particles_sortSources__P277153_mk(s); - s.tmp_2.arg0 = s.sources___286888; - s.callLocIdx = 1247; s.pc = 7; return s.tmp_2; - case 7: r0 = s.retval; - r0 = pxsim.control.millis(); - s.time___286895 = (r0); - r0 = (s.time___286895 - globals.lastUpdate___277145); - s.dt___286898 = (r0); - globals.lastUpdate___277145 = (s.time___286895); - s.i___286904 = (0); - case 3: - s.tmp_1 = r0 = s.i___286904; - r0 = pxsim_Array__length(s.sources___286888); s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = (s.tmp_1 + s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = particles_ParticleSource__update__P274975_mk(s); - r0 = pxsim_Array__getAt(s.sources___286888, s.i___286904); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.dt___286898; - s.callLocIdx = 1248; s.pc = 8; return s.tmp_3; - case 8: - r0 = s.retval; - r0 = (s.i___286904 + 1); - s.i___286904 = (r0); - { step = 3; continue; } - case 4: - case 5: - r0 = undefined; + r0 = (s.tmp_0 % 100); + s.angle___34119 = (r0); + s.tmp_0 = r0 = s.p___34115; + r0 = pxsim_Array__getAt(globals.cachedSin___22379, s.angle___34119); + s.tmp_2 = r0; + r0 = s.arg0.fields["speed"]; + s.tmp_3 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___34115; + r0 = pxsim_Array__getAt(globals.cachedCos___22380, s.angle___34119); + s.tmp_2 = r0; + r0 = s.arg0.fields["speed"]; + s.tmp_3 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); + r0 = s.p___34115; return leave(s, r0) default: oops() } } } -particles_updateParticles__P277151.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} +particles_SprayFactory_createParticle__P22407.info = {"start":2851,"length":333,"line":105,"column":8,"endLine":113,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} -function particles_updateParticles__P277151_mk(s) { +function particles_SprayFactory_createParticle__P22407_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_updateParticles__P277151, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_createParticle__P22407, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - sources___286888: undefined, - time___286895: undefined, - dt___286898: undefined, - i___286904: undefined, + tmp_4: undefined, + p___34115: undefined, + angle___34119: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource__update__P274975(s) { +function sprites_SpriteSet_toString__P21358(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28093,266 +27691,91 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___286967 = undefined; - s.current___286986 = undefined; - s.fixedDt___286994 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["timer"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["timer"] = (s.tmp_1); - r0 = s.arg0.fields["lifespan"]; + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["lifespan"]; + r0 = s.arg0.fields["_sprites"]; s.tmp_4 = r0; - r0 = (s.tmp_4 - s.arg1); + r0 = pxsim_Array__length(s.tmp_4); s.tmp_3 = r0; - r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); - r0 = s.arg0.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = particles_ParticleSource_destroy__P274982_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1219; s.pc = 28; return s.tmp_0; - case 28: - r0 = s.retval; + if ((s.tmp_3) && (s.tmp_3).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_3); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_3) + ""; } case 1: - case 2: - { step = 10; continue; } - case 3: - r0 = s.arg0.fields["anchor"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 4; continue; } - r0 = s.tmp_0; - { step = 5; continue; } - case 4: - s.tmp_2 = if_flags_1_mk(s); - r0 = s.arg0.fields["anchor"]; - s.tmp_2.arg0 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "flags"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["flags"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["flags"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 1220; s.pc = 29; return s.tmp_2; } - } - case 29: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - case 5: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 6; continue; } - r0 = s.tmp_3; - { step = 7; continue; } - case 6: - s.tmp_5 = if_flags_1_mk(s); - r0 = s.arg0.fields["anchor"]; - s.tmp_5.arg0 = r0; - if (!s.tmp_5.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "flags"); - } else { - s.tmp_5.fn = s.tmp_5.arg0.vtable.iface["flags"]; - if (s.tmp_5.fn == null) { s.retval = s.tmp_5.arg0.fields["flags"]; } - else if (!s.tmp_5.fn.isGetter) { s.retval = bind(s.tmp_5); } - else { s.callLocIdx = 1221; s.pc = 30; return s.tmp_5; } - } - case 30: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 2); - case 7: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 8; continue; } - r0 = (s.arg0).fields["lifespan"] = (750); - case 8: - case 9: - case 10: - case 11: - r0 = s.arg0.fields["timer"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 12; continue; } - r0 = s.tmp_0; - { step = 13; continue; } - case 12: - s.tmp_2 = particles_ParticleSource_enabled__P274980_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1222; s.pc = 31; return s.tmp_2; - case 31: - r0 = s.retval; - case 13: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 16; continue; } - s.tmp_4 = r0 = s.arg0; - r0 = s.tmp_4.fields["timer"]; - s.tmp_6 = r0; - r0 = s.arg0.fields["period"]; - s.tmp_7 = r0; - r0 = (s.tmp_6 + s.tmp_7); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["timer"] = (s.tmp_5); - s.tmp_0 = particles_ParticleFactory__C275004_v0_2_mk(s); - r0 = s.arg0.fields["_factory"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["anchor"]; - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleFactory__C275004_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.createParticle; - s.pc = 32; return s.tmp_0; - case 32: - r0 = s.retval; - s.p___286967 = (r0); - r0 = pxsim_numops_toBoolDecr(s.p___286967); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - { step = 11; continue; } - case 14: - case 15: - r0 = s.arg0.fields["head"]; - s.tmp_2 = r0; - r0 = (s.p___286967).fields["next"] = (s.tmp_2); - r0 = (s.arg0).fields["head"] = (s.p___286967); - { step = 11; continue; } - case 16: - r0 = s.arg0.fields["head"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - { step = 27; continue; } - case 17: - case 18: - r0 = s.arg0.fields["head"]; - s.current___286986 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["_dt"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_dt"] = (s.tmp_1); - r0 = s.arg0.fields["_dt"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.fixedDt___286994 = (r0); - r0 = pxsim_numops_toBoolDecr(s.fixedDt___286994); - if (!r0) { step = 23; continue; } - case 19: - r0 = s.current___286986.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_2 = r0 = s.current___286986; - r0 = s.tmp_2.fields["lifespan"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.arg1); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); - s.tmp_0 = particles_ParticleSource__C274968_v4_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.current___286986; - s.tmp_0.arg2 = s.fixedDt___286994; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C274968_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.updateParticle; - s.pc = 33; return s.tmp_0; - case 33: r0 = s.retval; - case 20: - case 21: - r0 = s.current___286986.fields["next"]; - s.tmp_0 = r0; - s.current___286986 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - { step = 19; continue; } - case 22: - r0 = (s.arg0).fields["_dt"] = (0); - { step = 26; continue; } - case 23: - case 24: - s.tmp_0 = r0 = s.current___286986; - r0 = s.tmp_0.fields["lifespan"]; s.tmp_2 = r0; - r0 = (s.tmp_2 - s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); - r0 = s.current___286986.fields["next"]; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); s.tmp_0 = r0; - s.current___286986 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 25; continue; } - { step = 24; continue; } - case 25: - case 26: - case 27: - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, " sprites"); return leave(s, r0) default: oops() } } } -particles_ParticleSource__update__P274975.info = {"start":3694,"length":1400,"line":124,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} +sprites_SpriteSet_toString__P21358.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} -function particles_ParticleSource__update__P274975_mk(s) { +function sprites_SpriteSet_toString__P21358_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__update__P274975, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_toString__P21358, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - p___286967: undefined, - current___286986: undefined, - fixedDt___286994: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_updateParticle__P277147(s) { +function sprites_SpriteSet_length__P21350(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C21348_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array__length(s.tmp_0); + return leaveAccessor(s, r0) + default: oops() +} } } +sprites_SpriteSet_length__P21350.info = {"start":625,"length":65,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"length","argumentNames":["this"]} +sprites_SpriteSet_length__P21350.isGetter = true; + +function sprites_SpriteSet_length__P21350_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_SpriteSet_length__P21350, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function particles_ParticleSource___draw__P22343(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28362,91 +27785,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.current___37398 = undefined; + s.left___37401 = undefined; + s.top___37411 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = (s.arg2 >> 10); - s.arg2 = (r0); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["vx"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["ax"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + r0 = s.arg0.fields["head"]; + s.current___37398 = (r0); + r0 = s.arg0.fields["pFlags"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["vy"]; + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + r0 = s.arg1.fields["drawOffsetX"]; s.tmp_2 = r0; - r0 = s.arg0.fields["ay"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); + r0 = (s.tmp_2 * 256); s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_x"]; - s.tmp_2 = r0; - r0 = s.arg1.fields["vx"]; + r0 = (s.tmp_3 | 0); + case 2: + // jmp value (already in r0) s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); + s.left___37401 = (s.tmp_4); + r0 = s.arg0.fields["pFlags"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_y"]; + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 4; continue; } + case 3: + r0 = s.arg1.fields["drawOffsetY"]; s.tmp_2 = r0; - r0 = s.arg1.fields["vy"]; - s.tmp_4 = r0; - r0 = pxsim.Math_.imul(s.tmp_4, s.arg2); - s.tmp_5 = r0; - r0 = (s.tmp_5 >> 8); + r0 = (s.tmp_2 * 256); s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); + r0 = (s.tmp_3 | 0); + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + s.top___37411 = (s.tmp_4); + case 5: + r0 = pxsim_numops_toBoolDecr(s.current___37398); + if (!r0) { step = 8; continue; } + r0 = s.current___37398.fields["lifespan"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = (s.tmp_1 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.tmp_2 = particles_ParticleSource_drawParticle__P22358_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.current___37398; + s.tmp_2.arg2 = s.left___37401; + s.tmp_2.arg3 = s.top___37411; + s.callLocIdx = 1218; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + case 6: + case 7: + r0 = s.current___37398.fields["next"]; + s.current___37398 = (r0); + { step = 5; continue; } + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_updateParticle__P277147.info = {"start":8248,"length":357,"line":277,"column":8,"endLine":285,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticle","argumentNames":["this","p","fixedDt"]} +particles_ParticleSource___draw__P22343.info = {"start":3216,"length":468,"line":112,"column":8,"endLine":122,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"__draw","argumentNames":["this","camera"]} -function particles_ParticleSource_updateParticle__P277147_mk(s) { +function particles_ParticleSource___draw__P22343_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_updateParticle__P277147, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource___draw__P22343, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, + current___37398: undefined, + left___37401: undefined, + top___37411: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function Fx_rightShift__P271987(s) { +function particles_ParticleSource_drawParticle__P22358(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28459,28 +27896,54 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = (s.arg0 >> s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C22341_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory__C22401_v1_4_mk(s); + r0 = s.arg0.fields["_factory"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.arg2); + s.tmp_0.arg2 = r0; + r0 = s.arg1.fields["_y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.arg3); + s.tmp_0.arg3 = r0; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleFactory__C22401_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawParticle; + s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_rightShift__P271987.info = {"start":2266,"length":108,"line":71,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"rightShift","argumentNames":["a","n"]} +particles_ParticleSource_drawParticle__P22358.info = {"start":8615,"length":174,"line":287,"column":8,"endLine":289,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"drawParticle","argumentNames":["this","p","screenLeft","screenTop"]} -function Fx_rightShift__P271987_mk(s) { +function particles_ParticleSource_drawParticle__P22358_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_rightShift__P271987, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_drawParticle__P22358, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_ParticleFactory_createParticle__P275006(s) { +function particles_ParticleFactory_drawParticle__P22403(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28490,83 +27953,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___287077 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleFactory__C275004_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C274949_VT); - s.p___287077 = (r0); - s.tmp_0 = r0 = s.p___287077; - s.tmp_3 = if_x_1_mk(s); - s.tmp_3.arg0 = s.arg1; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "x"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["x"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["x"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1273; s.pc = 1; return s.tmp_3; } - } - case 1: - r0 = s.retval; + if (!checkSubtype(r0, particles_ParticleFactory__C22401_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___20904; + r0 = (s.arg2 + 128); s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); + r0 = (s.tmp_2 >> 8); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___287077; - s.tmp_3 = if_y_1_mk(s); - s.tmp_3.arg0 = s.arg1; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "y"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["y"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["y"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1275; s.pc = 2; return s.tmp_3; } - } - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + r0 = (s.arg3 + 128); s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - r0 = (s.p___287077).fields["vx"] = (0); - r0 = (s.p___287077).fields["vy"] = (0); - r0 = (s.p___287077).fields["lifespan"] = (500); - r0 = s.p___287077; + r0 = (s.tmp_4 >> 8); + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_createParticle__P275006.info = {"start":1822,"length":282,"line":67,"column":8,"endLine":77,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +particles_ParticleFactory_drawParticle__P22403.info = {"start":2265,"length":118,"line":85,"column":8,"endLine":87,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","particle","x","y"]} -function particles_ParticleFactory_createParticle__P275006_mk(s) { +function particles_ParticleFactory_drawParticle__P22403_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_createParticle__P275006, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_drawParticle__P22403, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - p___287077: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function game_onUpdateInterval__P274841(s) { +function scene_BackgroundLayer_constructor__P21626(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28576,74 +28008,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.timer___286868 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_BackgroundLayer__C21624_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_max__P20176_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 795; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + r0 = (s.tmp_0).fields["distance"] = (s.tmp_1); + r0 = (s.arg0).fields["img"] = (s.arg3); + s.tmp_0 = r0 = s.arg2; + r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); + if (r0) { step = 1; continue; } + r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); + if (r0) { step = 2; continue; } + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); + if (r0) { step = 3; continue; } + r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); + if (r0) { step = 4; continue; } + r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); + if (r0) { step = 5; continue; } r0 = s.tmp_0; - { step = 2; continue; } + { step = 6; continue; } case 1: - r0 = (s.arg0 < 0); + r0 = (s.arg0).fields["repeatX"] = (true); + r0 = (s.arg0).fields["repeatY"] = (true); + r0 = (s.arg0).fields["alignX"] = (5); + r0 = (s.arg0).fields["alignY"] = (5); + { step = 6; continue; } case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - { step = 5; continue; } case 3: + r0 = (s.arg0).fields["repeatX"] = (false); + r0 = (s.arg0).fields["repeatY"] = (true); + r0 = (s.arg0).fields["alignX"] = (s.arg2); + r0 = (s.arg0).fields["alignY"] = (5); + { step = 6; continue; } case 4: - r0 = pxsim_pxtrt.mklocRef(); - s.timer___286868 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.timer___286868, 0); - r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P286872); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___286868); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg1); - s.tmp_1 = control_EventContext_registerFrameHandler__P272219_mk(s); - s.tmp_2 = game_eventContext__P274819_mk(s); - s.callLocIdx = 1030; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 19; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1034; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; case 5: + r0 = (s.arg0).fields["repeatX"] = (true); + r0 = (s.arg0).fields["repeatY"] = (false); + r0 = (s.arg0).fields["alignX"] = (5); + r0 = (s.arg0).fields["alignY"] = (s.arg2); + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdateInterval__P274841.info = {"start":813,"length":401,"line":26,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdateInterval","argumentNames":["period","a"]} +scene_BackgroundLayer_constructor__P21626.info = {"start":1936,"length":1117,"line":72,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","distance","alignment","img"]} -function game_onUpdateInterval__P274841_mk(s) { +function scene_BackgroundLayer_constructor__P21626_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval__P274841, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_constructor__P21626, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - timer___286868: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function game_onUpdateInterval_inline__P286872(s) { +function tiles_TileMapData_constructor__P21667(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28653,55 +28094,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.time___286873 = undefined; - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 1031; s.pc = 3; return s.tmp_1; - case 3: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = (s.arg0).fields["data"] = (s.arg1); + r0 = (s.arg0).fields["layers"] = (s.arg2); + r0 = (s.arg0).fields["tileset"] = (s.arg3); + s.tmp_0 = tiles_TileMapData_scale__P21659_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg4; + s.callLocIdx = 809; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_millis"]; - s.time___286873 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 0); s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.time___286873); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = r0 = s.caps[0]; - r0 = (s.time___286873 + s.caps[1]); - s.tmp_3 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_2, s.tmp_3); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.caps[2]; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 1033; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - case 1: - case 2: + r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdateInterval_inline__P286872.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} +tiles_TileMapData_constructor__P21667.info = {"start":6048,"length":358,"line":204,"column":8,"endLine":212,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","data","layers","tileset","scale"]} -function game_onUpdateInterval_inline__P286872_mk(s) { +function tiles_TileMapData_constructor__P21667_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval_inline__P286872, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_constructor__P21667, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - time___286873: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function scene_Scene_millis__P274686(s) { +function tiles_TileMapData_scale__P21659(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28713,29 +28157,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = s.arg0.fields["_millis"]; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = (s.arg0).fields["_scale"] = (s.arg1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cachedTileView"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_millis__P274686.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} +tiles_TileMapData_scale__P21659.info = {"start":6640,"length":102,"line":226,"column":8,"endLine":229,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} -function scene_Scene_millis__P274686_mk(s) { +function tiles_TileMapData_scale__P21659_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_millis__P274686, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P21659, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, } } -function MAX_SOURCES_inline__P286822(s) { +function tiles_TileMapData_scale__P21658(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28745,54 +28198,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sz___286823 = undefined; - s.tmp_0 = control_ramSize__P272162_mk(s); - s.callLocIdx = 42; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sz___286823 = (r0); - r0 = (s.sz___286823 <= 102400); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 8; - { step = 5; continue; } - { step = 4; continue; } - case 1: - r0 = (s.sz___286823 <= 204800); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = 16; - { step = 5; continue; } - { step = 3; continue; } - case 2: - r0 = 50; - { step = 5; continue; } - case 3: - case 4: - r0 = undefined; - case 5: - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -MAX_SOURCES_inline__P286822.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} +tiles_TileMapData_scale__P21658.info = {"start":6564,"length":66,"line":222,"column":8,"endLine":224,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} +tiles_TileMapData_scale__P21658.isGetter = true; -function MAX_SOURCES_inline__P286822_mk(s) { +function tiles_TileMapData_scale__P21658_mk(s) { checkStack(s.depth); return { - parent: s, fn: MAX_SOURCES_inline__P286822, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P21658, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - sz___286823: undefined, + arg0: undefined, } } -function control_ramSize__P272162(s) { +function tiles_TileMap_constructor__P21697(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28802,64 +28233,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.getConfig(205, 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = (s.arg0).fields["_layer"] = (1); + s.tmp_0 = tiles_TileMap_scale__P21672_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 815; s.pc = 1; return s.tmp_0; case 1: - r0 = 33554432; + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P36982); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = r0 = s.arg0; + s.tmp_3 = scene_createRenderable__P21738_mk(s); + s.tmp_3.arg0 = -1; + s.tmp_3.arg1 = s.tmp_0; + s.tmp_3.arg2 = undefined; + s.callLocIdx = 817; s.pc = 2; return s.tmp_3; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["renderable"] = (s.tmp_2); + r0 = undefined; return leave(s, r0) default: oops() } } } -control_ramSize__P272162.info = {"start":4847,"length":100,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]} +tiles_TileMap_constructor__P21697.info = {"start":8927,"length":268,"line":300,"column":8,"endLine":308,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","scale"]} -function control_ramSize__P272162_mk(s) { +function tiles_TileMap_constructor__P21697_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_ramSize__P272162, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_constructor__P21697, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, + arg1: undefined, } } -function control__ramSize__P276268(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - r0 = 33554432; - return leave(s, r0) - default: oops() -} } } -control__ramSize__P276268.info = {"start":4727,"length":60,"line":160,"column":4,"endLine":162,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]} - -function control__ramSize__P276268_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control__ramSize__P276268, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, -} } - - - - - -function particles_SprayFactory_constructor__P275009(s) { +function tiles_TileMap_inline__P36982(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28872,53 +28296,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C275008_VT)) failedCast(r0); - r0 = undefined; - s.tmp_0 = particles_initTrig__P277171_mk(s); - s.callLocIdx = 1280; s.pc = 1; return s.tmp_0; + s.tmp_0 = tiles_TileMap_draw__P21690_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 816; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setSpeed__P275012_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1281; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setDirection__P275013_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.tmp_0.arg2 = s.arg3; - s.callLocIdx = 1282; s.pc = 3; return s.tmp_0; - case 3: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_constructor__P275009.info = {"start":2623,"length":218,"line":98,"column":8,"endLine":103,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","speed","centerDegrees","arcDegrees"]} +tiles_TileMap_inline__P36982.info = {"start":9145,"length":25,"line":306,"column":16,"endLine":306,"endColumn":41,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["t","c"]} -function particles_SprayFactory_constructor__P275009_mk(s) { +function tiles_TileMap_inline__P36982_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_constructor__P275009, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_inline__P36982, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_initTrig__P277171(s) { +function tiles_TileMap_draw__P21690(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28928,47 +28335,333 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.cachedSin___277157); + s.bitmask___36993 = undefined; + s.offsetX___36999 = undefined; + s.offsetY___37004 = undefined; + s.x0___37009 = undefined; + s.xn___37016 = undefined; + s.y0___37033 = undefined; + s.yn___37040 = undefined; + s.x___37057 = undefined; + s.y___37063 = undefined; + s.index___37069 = undefined; + s.tile___37076 = undefined; + s.x___37112 = undefined; + s.xLine___37118 = undefined; + s.y___37145 = undefined; + s.yLine___37151 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_2 = particles_cacheSin__P275002_mk(s); - s.tmp_2.arg0 = 100; - s.callLocIdx = 1268; s.pc = 3; return s.tmp_2; - case 3: + { step = 23; continue; } + case 1: + case 2: + r0 = s.arg0.fields["_scale"]; + s.tmp_8 = r0; + r0 = (1 << s.tmp_8); + s.tmp_7 = r0; + r0 = (s.tmp_7 - 1); + s.bitmask___36993 = (r0); + r0 = s.arg2.fields["drawOffsetX"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___36993); + s.offsetX___36999 = (r0); + r0 = s.arg2.fields["drawOffsetY"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___36993); + s.offsetY___37004 = (r0); + s.tmp_0 = Math_max__P20176_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg2.fields["drawOffsetX"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 >> s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 835; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - globals.cachedSin___277157 = (r0); - s.tmp_0 = particles_cacheCos__P275003_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 1269; s.pc = 4; return s.tmp_0; + s.x0___37009 = (r0); + s.tmp_0 = Math_min__P20177_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["_width"]; + s.tmp_0.arg0 = r0; + r0 = s.arg2.fields["drawOffsetX"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_6 = r0; + r0 = (s.tmp_3 >> s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 838; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.xn___37016 = (r0); + s.tmp_0 = Math_max__P20176_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg2.fields["drawOffsetY"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 >> s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 840; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + s.y0___37033 = (r0); + s.tmp_0 = Math_min__P20177_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1 = r0; + r0 = s.tmp_1.fields["_height"]; + s.tmp_0.arg0 = r0; + r0 = s.arg2.fields["drawOffsetY"]; + s.tmp_4 = r0; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_3 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_6 = r0; + r0 = (s.tmp_3 >> s.tmp_6); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 843; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + s.yn___37040 = (r0); + s.x___37057 = (s.x0___37009); + case 3: + r0 = (s.x___37057 <= s.xn___37016); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.y___37063 = (s.y0___37033); case 4: + r0 = (s.y___37063 <= s.yn___37040); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = tiles_TileMapData_getTile__P21660_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.x___37057; + s.tmp_1.arg2 = s.y___37063; + s.callLocIdx = 844; s.pc = 28; return s.tmp_1; + case 28: r0 = s.retval; - globals.cachedCos___277158 = (r0); - case 1: - case 2: + s.index___37069 = (r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P21663_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___37069; + s.callLocIdx = 845; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + s.tile___37076 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tile___37076); + if (!r0) { step = 5; continue; } + s.tmp_0 = r0 = s.arg1; + s.tmp_1 = r0 = s.tile___37076; + r0 = (s.x___37057 - s.x0___37009); + s.tmp_4 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 << s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_3 - s.offsetX___36999); + s.tmp_2 = r0; + r0 = (s.y___37063 - s.y0___37033); + s.tmp_8 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_9 = r0; + r0 = (s.tmp_8 << s.tmp_9); + s.tmp_7 = r0; + r0 = (s.tmp_7 - s.offsetY___37004); + s.tmp_6 = r0; + r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); + case 5: + case 6: + r0 = (s.y___37063 + 1); + s.y___37063 = (r0); + { step = 4; continue; } + case 7: + r0 = (s.x___37057 + 1); + s.x___37057 = (r0); + { step = 3; continue; } + case 8: + r0 = pxsim_numops_toBoolDecr(globals.debug___21888); + if (!r0) { step = 21; continue; } + s.x___37112 = (s.x0___37009); + case 9: + r0 = (s.x___37112 <= s.xn___37016); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.x___37112 - s.x0___37009); + s.tmp_2 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 << s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.offsetX___36999); + s.xLine___37118 = (r0); + r0 = (s.xLine___37118 >= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 10; continue; } + r0 = s.tmp_0; + { step = 11; continue; } + case 10: + s.tmp_1 = r0 = s.xLine___37118; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_2 = r0; + r0 = (s.tmp_1 <= s.tmp_2); + case 11: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 12; continue; } + s.tmp_4 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = s.xLine___37118; + s.tmp_4.arg2 = 0; + s.tmp_4.arg3 = s.xLine___37118; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_4.arg4 = r0; + s.tmp_4.arg5 = 1; + s.callLocIdx = 849; s.pc = 30; return s.tmp_4; + case 30: + r0 = s.retval; + case 12: + case 13: + r0 = (s.x___37112 + 1); + s.x___37112 = (r0); + { step = 9; continue; } + case 14: + s.y___37145 = (s.y0___37033); + case 15: + r0 = (s.y___37145 <= s.yn___37040); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.y___37145 - s.y0___37033); + s.tmp_2 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 << s.tmp_3); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.offsetY___37004); + s.yLine___37151 = (r0); + r0 = (s.yLine___37151 >= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } + case 16: + s.tmp_1 = r0 = s.yLine___37151; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_2 = r0; + r0 = (s.tmp_1 <= s.tmp_2); + case 17: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 18; continue; } + s.tmp_4 = helpers_imageDrawLine__P20843_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = 0; + s.tmp_4.arg2 = s.yLine___37151; + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_4.arg3 = r0; + s.tmp_4.arg4 = s.yLine___37151; + s.tmp_4.arg5 = 1; + s.callLocIdx = 851; s.pc = 31; return s.tmp_4; + case 31: + r0 = s.retval; + case 18: + case 19: + r0 = (s.y___37145 + 1); + s.y___37145 = (r0); + { step = 15; continue; } + case 20: + case 21: + case 22: + case 23: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_initTrig__P277171.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} +tiles_TileMap_draw__P21690.info = {"start":13998,"length":2224,"line":458,"column":8,"endLine":513,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"draw","argumentNames":["this","target","camera"]} -function particles_initTrig__P277171_mk(s) { +function tiles_TileMap_draw__P21690_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_initTrig__P277171, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_draw__P21690, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + bitmask___36993: undefined, + offsetX___36999: undefined, + offsetY___37004: undefined, + x0___37009: undefined, + xn___37016: undefined, + y0___37033: undefined, + yn___37040: undefined, + x___37057: undefined, + y___37063: undefined, + index___37069: undefined, + tile___37076: undefined, + x___37112: undefined, + xLine___37118: undefined, + y___37145: undefined, + yLine___37151: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_cacheCos__P275003(s) { +function tiles_TileMapData_getTileImage__P21663(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28978,65 +28671,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cos___286703 = undefined; - s.anglePerSlice___286705 = undefined; - s.i___286711 = undefined; + s.size___35201 = undefined; + s.cachedImage___35205 = undefined; + s.originalImage___35212 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.cos___286703 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___286705 = (r0); - s.i___286711 = (0); - case 1: - r0 = (s.i___286711 < s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + s.tmp_0 = r0; + r0 = (1 << s.tmp_0); + s.size___35201 = (r0); + r0 = s.arg0.fields["cachedTileView"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); + s.cachedImage___35205 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cachedImage___35205); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.cos___286703; - r0 = (s.i___286711 * s.anglePerSlice___286705); - s.tmp_4 = r0; - r0 = pxsim.Math_.cos(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["tileset"]; s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___286711 + 1); - s.i___286711 = (r0); - { step = 1; continue; } + r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); + s.originalImage___35212 = (r0); + r0 = pxsim_numops_toBoolDecr(s.originalImage___35212); + if (!r0) { step = 5; continue; } + r0 = pxsim_ImageMethods.width(s.originalImage___35212); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.size___35201); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = pxsim_ImageMethods.height(s.originalImage___35212); + s.tmp_2 = r0; + r0 = (s.tmp_2 <= s.size___35201); case 2: - r0 = s.cos___286703; + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + s.cachedImage___35205 = (s.originalImage___35212); + { step = 4; continue; } + case 3: + r0 = pxsim.image.create(s.size___35201, s.size___35201); + s.cachedImage___35205 = (r0); + r0 = pxsim_ImageMethods.drawImage(s.cachedImage___35205, s.originalImage___35212, 0, 0); + case 4: + r0 = s.arg0.fields["cachedTileView"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___35205); + case 5: + case 6: + case 7: + case 8: + r0 = s.cachedImage___35205; return leave(s, r0) default: oops() } } } -particles_cacheCos__P275003.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} +tiles_TileMapData_getTileImage__P21663.info = {"start":7354,"length":717,"line":251,"column":8,"endLine":268,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} -function particles_cacheCos__P275003_mk(s) { +function tiles_TileMapData_getTileImage__P21663_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheCos__P275003, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileImage__P21663, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - cos___286703: undefined, - anglePerSlice___286705: undefined, - i___286711: undefined, + size___35201: undefined, + cachedImage___35205: undefined, + originalImage___35212: undefined, arg0: undefined, + arg1: undefined, } } -function particles_cacheSin__P275002(s) { +function tiles_TileMapData_getTile__P21660(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29046,47 +28768,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sin___286729 = undefined; - s.anglePerSlice___286731 = undefined; - s.i___286737 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.sin___286729 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___286731 = (r0); - s.i___286737 = (0); - case 1: - r0 = (s.i___286737 < s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P21666_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 810; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.sin___286729; - r0 = (s.i___286737 * s.anglePerSlice___286731); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 3; continue; } + case 1: + case 2: + r0 = s.arg0.fields["data"]; + s.tmp_2 = r0; + r0 = (s.arg1 | 0); + s.tmp_5 = r0; + r0 = (4 + s.tmp_5); s.tmp_4 = r0; - r0 = pxsim.Math_.sin(s.tmp_4); + r0 = (s.arg2 | 0); + s.tmp_7 = r0; + r0 = s.arg0.fields["_width"]; + s.tmp_8 = r0; + r0 = (s.tmp_7 * s.tmp_8); + s.tmp_6 = r0; + r0 = (s.tmp_4 + s.tmp_6); s.tmp_3 = r0; - r0 = (s.tmp_3 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___286737 + 1); - s.i___286737 = (r0); - { step = 1; continue; } - case 2: - r0 = s.sin___286729; + r0 = pxsim.BufferMethods.getUint8(s.tmp_2, s.tmp_3); + case 3: return leave(s, r0) default: oops() } } } -particles_cacheSin__P275002.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} +tiles_TileMapData_getTile__P21660.info = {"start":6752,"length":200,"line":231,"column":8,"endLine":235,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} -function particles_cacheSin__P275002_mk(s) { +function tiles_TileMapData_getTile__P21660_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheSin__P275002, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTile__P21660, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -29094,17 +28822,19 @@ function particles_cacheSin__P275002_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - sin___286729: undefined, - anglePerSlice___286731: undefined, - i___286737: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_SprayFactory_setDirection__P275013(s) { +function tiles_TileMapData_isOutsideMap__P21666(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29121,45 +28851,52 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C275008_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P277176_mk(s); - s.tmp_5 = r0 = s.arg1; - r0 = (s.arg2 >> 1); - s.tmp_6 = r0; - r0 = (s.tmp_5 - s.tmp_6); - s.tmp_4.arg0 = r0; - s.callLocIdx = 1290; s.pc = 1; return s.tmp_4; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = (s.arg1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___277170); + s.tmp_1 = r0 = s.arg1; + r0 = s.arg0.fields["_width"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minAngle"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P277176_mk(s); - s.tmp_4.arg0 = s.arg2; - s.callLocIdx = 1291; s.pc = 2; return s.tmp_4; + r0 = (s.tmp_1 >= s.tmp_2); case 2: - r0 = s.retval; + // jmp value (already in r0) s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___277170); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); - r0 = undefined; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 3; continue; } + r0 = s.tmp_3; + { step = 4; continue; } + case 3: + r0 = (s.arg2 < 0); + case 4: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (!r0) { step = 5; continue; } + r0 = s.tmp_4; + { step = 6; continue; } + case 5: + s.tmp_5 = r0 = s.arg2; + r0 = s.arg0.fields["_height"]; + s.tmp_6 = r0; + r0 = (s.tmp_5 >= s.tmp_6); + case 6: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; return leave(s, r0) default: oops() } } } -particles_SprayFactory_setDirection__P275013.info = {"start":3424,"length":228,"line":123,"column":8,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setDirection","argumentNames":["this","centerDegrees","arcDegrees"]} +tiles_TileMapData_isOutsideMap__P21666.info = {"start":8335,"length":132,"line":278,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOutsideMap","argumentNames":["this","col","row"]} -function particles_SprayFactory_setDirection__P275013_mk(s) { +function tiles_TileMapData_isOutsideMap__P21666_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setDirection__P275013, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isOutsideMap__P21666, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -29168,6 +28905,7 @@ function particles_SprayFactory_setDirection__P275013_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -29177,7 +28915,7 @@ function particles_SprayFactory_setDirection__P275013_mk(s) { -function particles_toRadians__P277176(s) { +function tiles_TileMap_scale__P21672(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29189,50 +28927,47 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = (s.arg0).fields["_scale"] = (s.arg1); + r0 = s.arg0.fields["_map"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_3 = Math_abs__P271944_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1272; s.pc = 3; return s.tmp_3; + s.tmp_1 = tiles_TileMapData_scale__P21659_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 818; s.pc = 3; return s.tmp_1; case 3: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 % 360); - s.tmp_1 = r0; - r0 = (360 - s.tmp_1); - s.arg0 = (r0); - { step = 2; continue; } case 1: - r0 = (s.arg0 % 360); - s.arg0 = (r0); case 2: - r0 = (s.arg0 * 0.017453292519943295); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_toRadians__P277176.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} +tiles_TileMap_scale__P21672.info = {"start":9270,"length":144,"line":314,"column":8,"endLine":319,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} -function particles_toRadians__P277176_mk(s) { +function tiles_TileMap_scale__P21672_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_toRadians__P277176, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P21672, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleFactory_constructor__P275005(s) { +function tiles_TileMap_data__P21673(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29247,17 +28982,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleFactory__C275004_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleFactory_constructor__P275005.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} +tiles_TileMap_data__P21673.info = {"start":9424,"length":65,"line":321,"column":8,"endLine":323,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"data","argumentNames":["this"]} +tiles_TileMap_data__P21673.isGetter = true; -function particles_ParticleFactory_constructor__P275005_mk(s) { +function tiles_TileMap_data__P21673_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_constructor__P275005, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_data__P21673, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -29266,7 +29002,7 @@ function particles_ParticleFactory_constructor__P275005_mk(s) { -function particles_ParticleSource_setFactory__P274987(s) { +function Sprite_toString__P21315(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29278,36 +29014,144 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["_factory"] = (s.arg1); - case 1: - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_ParticleSource_setFactory__P274987.info = {"start":8124,"length":114,"line":272,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} - -function particles_ParticleSource_setFactory__P274987_mk(s) { - checkStack(s.depth); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); + s.tmp_9 = r0; + r0 = s.arg0.fields["id"]; + s.tmp_11 = r0; + if ((s.tmp_11) && (s.tmp_11).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_11); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_11) + ""; } + case 1: + r0 = s.retval; + s.tmp_10 = r0; + r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); + s.tmp_8 = r0; + r0 = pxsim_String__concat(s.tmp_8, "("); + s.tmp_7 = r0; + s.tmp_14 = Sprite_x__P21244_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 444; s.pc = 2; return s.tmp_14; + case 2: + r0 = s.retval; + s.tmp_13 = r0; + if ((s.tmp_13) && (s.tmp_13).vtable) { + setupResume(s, 3); + pxsim_String__stringConv(s.tmp_13); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_13) + ""; } + case 3: + r0 = s.retval; + s.tmp_12 = r0; + r0 = pxsim_String__concat(s.tmp_7, s.tmp_12); + s.tmp_6 = r0; + r0 = pxsim_String__concat(s.tmp_6, ","); + s.tmp_5 = r0; + s.tmp_17 = Sprite_y__P21246_mk(s); + s.tmp_17.arg0 = s.arg0; + s.callLocIdx = 445; s.pc = 4; return s.tmp_17; + case 4: + r0 = s.retval; + s.tmp_16 = r0; + if ((s.tmp_16) && (s.tmp_16).vtable) { + setupResume(s, 5); + pxsim_String__stringConv(s.tmp_16); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_16) + ""; } + case 5: + r0 = s.retval; + s.tmp_15 = r0; + r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_4, ")->("); + s.tmp_3 = r0; + s.tmp_20 = Sprite_vx__P21248_mk(s); + s.tmp_20.arg0 = s.arg0; + s.callLocIdx = 446; s.pc = 6; return s.tmp_20; + case 6: + r0 = s.retval; + s.tmp_19 = r0; + if ((s.tmp_19) && (s.tmp_19).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.tmp_19); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_19) + ""; } + case 7: + r0 = s.retval; + s.tmp_18 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_18); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, ","); + s.tmp_1 = r0; + s.tmp_23 = Sprite_vy__P21250_mk(s); + s.tmp_23.arg0 = s.arg0; + s.callLocIdx = 447; s.pc = 8; return s.tmp_23; + case 8: + r0 = s.retval; + s.tmp_22 = r0; + if ((s.tmp_22) && (s.tmp_22).vtable) { + setupResume(s, 9); + pxsim_String__stringConv(s.tmp_22); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_22) + ""; } + case 9: + r0 = s.retval; + s.tmp_21 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_21); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); + return leave(s, r0) + default: oops() +} } } +Sprite_toString__P21315.info = {"start":34111,"length":93,"line":1066,"column":4,"endLine":1068,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"toString","argumentNames":["this"]} + +function Sprite_toString__P21315_mk(s) { + checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setFactory__P274987, depth: s.depth + 1, + parent: s, fn: Sprite_toString__P21315, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_setRate__P274985(s) { +function Sprite___update__P21297(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29320,40 +29164,114 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (1000 / s.arg1); - s.tmp_2 = r0; - r0 = pxsim.Math_.ceil(s.tmp_2); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["period"] = (s.tmp_1); - r0 = (s.arg0).fields["timer"] = (0); + r0 = (s.tmp_1 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["lifespan"]; + s.tmp_4 = r0; + r0 = (s.arg2 * 1000); + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); + r0 = s.arg0.fields["lifespan"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = (s.arg0).fields["lifespan"] = (undefined); + s.tmp_0 = Sprite__destroyCore__P21310_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 381; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + case 1: + case 2: + case 3: + case 4: + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + s.tmp_2 = Sprite_isOutOfScreen__P21295_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 382; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + case 6: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = Sprite_destroy__P21309_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = undefined; + s.tmp_4.arg2 = undefined; + s.callLocIdx = 383; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + case 7: + case 8: + r0 = s.arg0.fields["sayRenderer"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + s.tmp_1 = sprites_BaseSpriteSayRenderer__C21217_v1_4_mk(s); + r0 = s.arg0.fields["sayRenderer"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg2; + s.tmp_1.arg2 = s.arg1; + s.tmp_1.arg3 = s.arg0; + if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.update; + s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + case 9: + case 10: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setRate__P274985.info = {"start":7802,"length":139,"line":259,"column":8,"endLine":262,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} +Sprite___update__P21297.info = {"start":18662,"length":483,"line":628,"column":4,"endLine":642,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__update","argumentNames":["this","camera","dt"]} -function particles_ParticleSource_setRate__P274985_mk(s) { +function Sprite___update__P21297_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRate__P274985, depth: s.depth + 1, + parent: s, fn: Sprite___update__P21297, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function particles_ParticleSource_setAnchor__P274984(s) { +function Sprite_isOutOfScreen__P21295(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29363,25 +29281,139 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ox___37343 = undefined; + s.oy___37351 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = (s.arg0).fields["anchor"] = (s.arg1); - r0 = undefined; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + r0 = s.arg1.fields["drawOffsetX"]; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.ox___37343 = (s.tmp_2); + r0 = s.arg0.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 512); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 4; continue; } + case 3: + r0 = s.arg1.fields["drawOffsetY"]; + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + s.oy___37351 = (s.tmp_2); + s.tmp_3 = Sprite_right__P21282_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 372; s.pc = 11; return s.tmp_3; + case 11: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.ox___37343); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.tmp_0; + { step = 6; continue; } + case 5: + s.tmp_6 = Sprite_bottom__P21286_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 373; s.pc = 12; return s.tmp_6; + case 12: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.oy___37351); + s.tmp_4 = r0; + r0 = (s.tmp_4 < 0); + case 6: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBool(s.tmp_7); + if (!r0) { step = 7; continue; } + r0 = s.tmp_7; + { step = 8; continue; } + case 7: + s.tmp_10 = Sprite_left__P21280_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 374; s.pc = 13; return s.tmp_10; + case 13: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 - s.ox___37343); + s.tmp_8 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_11 = r0; + r0 = (s.tmp_8 > s.tmp_11); + case 8: + // jmp value (already in r0) + s.tmp_12 = r0; + r0 = pxsim_numops_toBool(s.tmp_12); + if (!r0) { step = 9; continue; } + r0 = s.tmp_12; + { step = 10; continue; } + case 9: + s.tmp_15 = Sprite_top__P21284_mk(s); + s.tmp_15.arg0 = s.arg0; + s.callLocIdx = 375; s.pc = 14; return s.tmp_15; + case 14: + r0 = s.retval; + s.tmp_14 = r0; + r0 = (s.tmp_14 - s.oy___37351); + s.tmp_13 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_16 = r0; + r0 = (s.tmp_13 > s.tmp_16); + case 10: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAnchor__P274984.info = {"start":7594,"length":79,"line":251,"column":8,"endLine":253,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} +Sprite_isOutOfScreen__P21295.info = {"start":17830,"length":358,"line":607,"column":4,"endLine":611,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isOutOfScreen","argumentNames":["this","camera"]} -function particles_ParticleSource_setAnchor__P274984_mk(s) { +function Sprite_isOutOfScreen__P21295_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAnchor__P274984, depth: s.depth + 1, + parent: s, fn: Sprite_isOutOfScreen__P21295, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + ox___37343: undefined, + oy___37351: undefined, arg0: undefined, arg1: undefined, } } @@ -29390,7 +29422,7 @@ function particles_ParticleSource_setAnchor__P274984_mk(s) { -function particles_ParticleSource_destroy__P274982(s) { +function Sprite_bottom__P21286(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29405,38 +29437,35 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleSource_enabled__P274981_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1229; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_1 = Sprite_top__P21284_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 363; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["pFlags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); - s.tmp_0 = particles_ParticleSource__prune__P274976_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1230; s.pc = 2; return s.tmp_0; + s.tmp_0 = r0; + s.tmp_3 = Sprite_height__P21279_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 364; s.pc = 2; return s.tmp_3; case 2: r0 = s.retval; - r0 = undefined; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_destroy__P274982.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} +Sprite_bottom__P21286.info = {"start":12052,"length":59,"line":435,"column":4,"endLine":437,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this"]} +Sprite_bottom__P21286.isGetter = true; -function particles_ParticleSource_destroy__P274982_mk(s) { +function Sprite_bottom__P21286_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_destroy__P274982, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P21286, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, arg0: undefined, } } @@ -29444,7 +29473,7 @@ function particles_ParticleSource_destroy__P274982_mk(s) { -function particles_ParticleSource_setAcceleration__P274977(s) { +function Sprite_right__P21282(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29456,48 +29485,46 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ax"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg2 * 256); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_1 = Sprite_left__P21280_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 355; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Sprite_width__P21278_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 356; s.pc = 2; return s.tmp_3; + case 2: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ay"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_setAcceleration__P274977.info = {"start":6026,"length":113,"line":194,"column":8,"endLine":197,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAcceleration","argumentNames":["this","ax","ay"]} +Sprite_right__P21282.info = {"start":11218,"length":57,"line":405,"column":4,"endLine":407,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this"]} +Sprite_right__P21282.isGetter = true; -function particles_ParticleSource_setAcceleration__P274977_mk(s) { +function Sprite_right__P21282_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAcceleration__P274977, depth: s.depth + 1, + parent: s, fn: Sprite_right__P21282, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_arrayShift__P271918(s) { +function sprites_BaseSpriteSayRenderer_update__P21219(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29509,27 +29536,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = pxsim_Array_.removeAt(s.arg0, 0); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayShift__P271918.info = {"start":4045,"length":82,"line":153,"column":4,"endLine":155,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayShift","argumentNames":["arr"]} +sprites_BaseSpriteSayRenderer_update__P21219.info = {"start":250,"length":68,"line":9,"column":8,"endLine":11,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"update","argumentNames":["this","dt","camera","owner"]} -function helpers_arrayShift__P271918_mk(s) { +function sprites_BaseSpriteSayRenderer_update__P21219_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayShift__P271918, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_update__P21219, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_SprayFactory_setSpeed__P275012(s) { +function Sprite_data__P21267(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29545,27 +29580,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C275008_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["speed"] = (s.tmp_1); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = (s.arg0).fields["_data"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_setSpeed__P275012.info = {"start":3322,"length":92,"line":119,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setSpeed","argumentNames":["this","pixelsPerSecond"]} +Sprite_data__P21267.info = {"start":6536,"length":56,"line":241,"column":4,"endLine":243,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this","value"]} -function particles_SprayFactory_setSpeed__P275012_mk(s) { +function Sprite_data__P21267_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setSpeed__P275012, depth: s.depth + 1, + parent: s, fn: Sprite_data__P21267, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, arg1: undefined, } } @@ -29574,7 +29601,7 @@ function particles_SprayFactory_setSpeed__P275012_mk(s) { -function particles_ConfettiFactory_constructor__P275036(s) { +function Sprite_data__P21266(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29584,99 +29611,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.confetti___287109 = undefined; - s.i___287125 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ConfettiFactory__C275035_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex287112); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim.image.ofBuffer(_hex287114); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); - r0 = pxsim.image.ofBuffer(_hex287116); - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); - r0 = pxsim.image.ofBuffer(_hex287118); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); - r0 = pxsim.image.ofBuffer(_hex287120); - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); - s.confetti___287109 = (s.tmp_0); - s.tmp_0 = particles_ShapeFactory_constructor__P275031_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - r0 = pxsim_Array__getAt(s.confetti___287109, 0); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1314; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.i___287125 = (1); - case 1: - s.tmp_1 = r0 = s.i___287125; - r0 = pxsim_Array__length(s.confetti___287109); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_3 = particles_ShapeFactory_addShape__P275032_mk(s); - s.tmp_3.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.confetti___287109, s.i___287125); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1315; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - r0 = (s.i___287125 + 1); - s.i___287125 = (r0); - { step = 1; continue; } + if (!r0) { step = 1; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_pxtrt.mkMap(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["_data"] = (s.tmp_4); + case 1: case 2: - r0 = (s.arg0).fields["minLifespan"] = (1000); - r0 = (s.arg0).fields["maxLifespan"] = (4500); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) default: oops() } } } -particles_ConfettiFactory_constructor__P275036.info = {"start":7755,"length":706,"line":247,"column":8,"endLine":274,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange"]} +Sprite_data__P21266.info = {"start":6438,"length":92,"line":236,"column":4,"endLine":239,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this"]} +Sprite_data__P21266.isGetter = true; -function particles_ConfettiFactory_constructor__P275036_mk(s) { +function Sprite_data__P21266_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ConfettiFactory_constructor__P275036, depth: s.depth + 1, + parent: s, fn: Sprite_data__P21266, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - tmp_5: undefined, - confetti___287109: undefined, - i___287125: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -const _hex287112 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") -const _hex287114 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") -const _hex287116 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") -const _hex287118 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") -const _hex287120 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function particles_ShapeFactory_addShape__P275032(s) { +function sprites_BaseSprite___update__P20977(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29689,38 +29668,32 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C275030_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["sources"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - case 1: - case 2: + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_addShape__P275032.info = {"start":7079,"length":83,"line":225,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"addShape","argumentNames":["this","shape"]} +sprites_BaseSprite___update__P20977.info = {"start":1027,"length":46,"line":45,"column":8,"endLine":45,"endColumn":54,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__update","argumentNames":["this","camera","dt"]} -function particles_ShapeFactory_addShape__P275032_mk(s) { +function sprites_BaseSprite___update__P20977_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_addShape__P275032, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___update__P20977, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function particles_ShapeFactory_constructor__P275031(s) { +function sprites_BaseSprite___draw__P20975(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29733,72 +29706,53 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C275030_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_constructor__P275019_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = undefined; - s.tmp_0.arg4 = undefined; - s.callLocIdx = 1304; s.pc = 1; return s.tmp_0; - case 1: + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); + s.tmp_1 = sprites_BaseSprite__C20971_v0_1_mk(s); + s.tmp_1.arg0 = s.arg0; + if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C20971_VT)) failedCast(s.tmp_1.arg0); + s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.__visible; + s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg3); - r0 = (s.arg0).fields["sources"] = (s.tmp_0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(s.arg3); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ox"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.height(s.arg3); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["oy"] = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = sprites_BaseSprite__C20971_v2_2_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C20971_VT)) failedCast(s.tmp_2.arg0); + s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.__drawCore; + s.pc = 4; return s.tmp_2; + case 4: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_constructor__P275031.info = {"start":6668,"length":285,"line":212,"column":8,"endLine":219,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","source"]} +sprites_BaseSprite___draw__P20975.info = {"start":840,"length":131,"line":37,"column":8,"endLine":41,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__draw","argumentNames":["this","camera"]} -function particles_ShapeFactory_constructor__P275031_mk(s) { +function sprites_BaseSprite___draw__P20975_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_constructor__P275031, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___draw__P20975, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_AreaFactory_constructor__P275019(s) { +function sprites_BaseSprite___drawCore__P20976(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29811,77 +29765,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_AreaFactory__C275014_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_constructor__P275009_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 40; - s.tmp_0.arg2 = 0; - s.tmp_0.arg3 = 90; - s.callLocIdx = 1292; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = (s.arg0).fields["xRange"] = (s.arg1); - r0 = (s.arg0).fields["yRange"] = (s.arg2); - r0 = pxsim_numops_toBoolDecr(s.arg3); - if (!r0) { step = 1; continue; } - r0 = s.arg3; - { step = 2; continue; } - case 1: - r0 = 150; - case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (s.arg0).fields["minLifespan"] = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(s.arg4); - if (!r0) { step = 3; continue; } - r0 = s.arg4; - { step = 4; continue; } - case 3: - r0 = 850; - case 4: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (s.arg0).fields["maxLifespan"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C274876_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P274878_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1293; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = (s.arg0).fields["galois"] = (s.tmp_0); + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_AreaFactory_constructor__P275019.info = {"start":3950,"length":374,"line":139,"column":8,"endLine":146,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this","xRange","yRange","minLifespan","maxLifespan"]} +sprites_BaseSprite___drawCore__P20976.info = {"start":981,"length":36,"line":43,"column":8,"endLine":43,"endColumn":44,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} -function particles_AreaFactory_constructor__P275019_mk(s) { +function sprites_BaseSprite___drawCore__P20976_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_constructor__P275019, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___drawCore__P20976, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function effects_ScreenEffect_constructor__P275084(s) { +function sprites_BaseSprite___visible__P20972(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29893,47 +29800,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ScreenEffect__C275083_VT)) failedCast(r0); - s.tmp_0 = effects_ParticleEffect_constructor__P275080_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg3; - s.tmp_0.arg3 = s.arg4; - s.callLocIdx = 1321; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = (s.arg0).fields["sceneDefaultRate"] = (s.arg2); - r0 = undefined; + if (!checkSubtype(r0, sprites_BaseSprite__C20971_VT)) failedCast(r0); + r0 = true; return leave(s, r0) default: oops() } } } -effects_ScreenEffect_constructor__P275084.info = {"start":2911,"length":332,"line":81,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this","anchorDefault","sceneDefault","defaultLifespan","sourceFactory"]} +sprites_BaseSprite___visible__P20972.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} -function effects_ScreenEffect_constructor__P275084_mk(s) { +function sprites_BaseSprite___visible__P20972_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_constructor__P275084, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___visible__P20972, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function effects_ParticleEffect_constructor__P275080(s) { +function sprites_SpriteMap_toString__P21341(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29945,38 +29834,80 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, effects_ParticleEffect__C275079_VT)) failedCast(r0); - r0 = (s.arg0).fields["sourceFactory"] = (s.arg3); - r0 = (s.arg0).fields["defaultRate"] = (s.arg1); - r0 = (s.arg0).fields["defaultLifespan"] = (s.arg2); - r0 = undefined; + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); + s.tmp_3 = r0; + r0 = s.arg0.fields["buckets"]; + s.tmp_6 = r0; + r0 = pxsim_Array__length(s.tmp_6); + s.tmp_5 = r0; + if ((s.tmp_5) && (s.tmp_5).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.tmp_5); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_5) + ""; } + case 1: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); + s.tmp_2 = r0; + r0 = pxsim_String__concat(s.tmp_2, " buckets, "); + s.tmp_1 = r0; + s.tmp_10 = helpers_arrayFilter__P20155_mk(s); + r0 = s.arg0.fields["buckets"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = length_inline__P34163; + s.callLocIdx = 515; s.pc = 2; return s.tmp_10; + case 2: + r0 = s.retval; + s.tmp_9 = r0; + r0 = pxsim_Array__length(s.tmp_9); + s.tmp_8 = r0; + if ((s.tmp_8) && (s.tmp_8).vtable) { + setupResume(s, 3); + pxsim_String__stringConv(s.tmp_8); + checkResumeConsumed(); + return; + } else { s.retval = (s.tmp_8) + ""; } + case 3: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_String__concat(s.tmp_1, s.tmp_7); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, " filled"); return leave(s, r0) default: oops() } } } -effects_ParticleEffect_constructor__P275080.info = {"start":384,"length":364,"line":13,"column":8,"endLine":18,"endColumn":9,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["this","defaultParticlesPerSecond","defaultLifespan","sourceFactory"]} +sprites_SpriteMap_toString__P21341.info = {"start":4109,"length":123,"line":112,"column":8,"endLine":114,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"toString","argumentNames":["this"]} -function effects_ParticleEffect_constructor__P275080_mk(s) { +function sprites_SpriteMap_toString__P21341_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_constructor__P275080, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_toString__P21341, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function music_melodyPlayable__P273740(s) { +function length_inline__P34163(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -29990,27 +29921,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayable__C273733_VT); + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - s.tmp_1 = music_MelodyPlayable_constructor__P273734_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 74; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = s.tmp_0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -music_melodyPlayable__P273740.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} +length_inline__P34163.info = {"start":4196,"length":8,"line":113,"column":74,"endLine":113,"endColumn":82,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["b"]} -function music_melodyPlayable__P273740_mk(s) { +function length_inline__P34163_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_melodyPlayable__P273740, depth: s.depth + 1, + parent: s, fn: length_inline__P34163, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -30018,7 +29948,7 @@ function music_melodyPlayable__P273740_mk(s) { -function music_MelodyPlayable_constructor__P273734(s) { +function scene_Camera_y__P21723(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30030,33 +29960,39 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_MelodyPlayable__C273733_VT)) failedCast(r0); - r0 = (s.arg0).fields["melody"] = (s.arg1); - r0 = undefined; - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -music_MelodyPlayable_constructor__P273734.info = {"start":1531,"length":67,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this","melody"]} +scene_Camera_y__P21723.info = {"start":1536,"length":75,"line":51,"column":8,"endLine":53,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"y","argumentNames":["this"]} +scene_Camera_y__P21723.isGetter = true; -function music_MelodyPlayable_constructor__P273734_mk(s) { +function scene_Camera_y__P21723_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayable_constructor__P273734, depth: s.depth + 1, + parent: s, fn: scene_Camera_y__P21723, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function music_Playable_constructor__P273730(s) { +function scene_Camera_x__P21722(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30071,18 +30007,28 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Playable__C273728_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -music_Playable_constructor__P273730.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} +scene_Camera_x__P21722.info = {"start":1453,"length":74,"line":48,"column":8,"endLine":50,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"x","argumentNames":["this"]} +scene_Camera_x__P21722.isGetter = true; -function music_Playable_constructor__P273730_mk(s) { +function scene_Camera_x__P21722_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Playable_constructor__P273730, depth: s.depth + 1, + parent: s, fn: scene_Camera_x__P21722, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, arg0: undefined, } } @@ -30090,7 +30036,7 @@ function music_Playable_constructor__P273730_mk(s) { -function music_Melody_constructor__P273446(s) { +function ArcadePhysicsEngine_moveSprite__P21454(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30100,34 +30046,206 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tm___34195 = undefined; + s.maxDist___34203 = undefined; + s.ms___34223 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C273443_VT)) failedCast(r0); - r0 = (s.arg0).fields["_text"] = (s.arg1); + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg1.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.arg1).fields["_lastX"] = (s.tmp_0); + r0 = s.arg1.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.arg1).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.arg2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["_y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.arg3); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 752; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___34195 = (r0); + s.tmp_0 = r0 = s.tm___34195; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.tm___34195.fields["_map"]; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 11; continue; } + r0 = s.arg0.fields["maxSingleStep"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 128); + s.tmp_7 = r0; + r0 = (s.tmp_7 >> 8); + s.maxDist___34203 = (r0); + s.tmp_2 = Math_abs__P20174_mk(s); + r0 = (s.arg2 + 128); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 756; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.maxDist___34203); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + s.tmp_5 = Math_abs__P20174_mk(s); + r0 = (s.arg3 + 128); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 8); + s.tmp_5.arg0 = r0; + s.callLocIdx = 758; s.pc = 15; return s.tmp_5; + case 15: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 <= s.maxDist___34203); + case 4: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 5; continue; } + r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C21433_VT); + s.tmp_8 = r0; + s.tmp_9 = MovingSprite_constructor__P21434_mk(s); + s.tmp_9.arg0 = s.tmp_8; + s.tmp_9.arg1 = s.arg1; + r0 = s.arg1.fields["_vx"]; + s.tmp_9.arg2 = r0; + r0 = s.arg1.fields["_vy"]; + s.tmp_9.arg3 = r0; + s.tmp_9.arg4 = s.arg2; + s.tmp_9.arg5 = s.arg3; + s.tmp_9.arg6 = s.arg2; + s.tmp_9.arg7 = s.arg3; + s.callLocIdx = 759; s.pc = 16; return s.tmp_9; + case 16: + r0 = s.retval; + s.ms___34223 = (s.tmp_8); + s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P21451_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ms___34223; + s.tmp_0.arg2 = s.tm___34195; + s.callLocIdx = 760; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } + case 5: + s.tmp_1 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_1.arg0 = s.tm___34195; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 761; s.pc = 18; return s.tmp_1; + case 18: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } + case 6: + s.tmp_4 = ArcadePhysicsEngine_canResolveClipping__P21455_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.arg1; + s.tmp_4.arg2 = s.tm___34195; + s.callLocIdx = 762; s.pc = 19; return s.tmp_4; + case 19: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + case 7: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 8; continue; } + s.tmp_6 = r0 = s.arg1; + r0 = s.tmp_6.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 | 256); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); + { step = 9; continue; } + case 8: + s.tmp_0 = r0 = s.arg1; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & -257); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 9: + case 10: + case 11: + case 12: r0 = undefined; return leave(s, r0) default: oops() } } } -music_Melody_constructor__P273446.info = {"start":6430,"length":67,"line":203,"column":8,"endLine":205,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} +ArcadePhysicsEngine_moveSprite__P21454.info = {"start":23898,"length":1208,"line":654,"column":4,"endLine":685,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"moveSprite","argumentNames":["this","s","dx","dy"]} -function music_Melody_constructor__P273446_mk(s) { +function ArcadePhysicsEngine_moveSprite__P21454_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_constructor__P273446, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_moveSprite__P21454, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tm___34195: undefined, + maxDist___34203: undefined, + ms___34223: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Fx8__P271965(s) { +function tiles_TileMap_isOnWall__P21693(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30137,32 +30255,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.hbox___34452 = undefined; + s.left___34455 = undefined; + s.right___34461 = undefined; + s.top___34467 = undefined; + s.bottom___34473 = undefined; + s.col___34479 = undefined; + s.row___34485 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 * 256); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg1.fields["_hitbox"]; + s.hbox___34452 = (r0); + s.tmp_1 = game_Hitbox_left__P21177_mk(s); + s.tmp_1.arg0 = s.hbox___34452; + s.callLocIdx = 862; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 8); + s.tmp_3 = r0; + r0 = (s.tmp_0 >> s.tmp_3); + s.left___34455 = (r0); + s.tmp_1 = game_Hitbox_right__P21179_mk(s); + s.tmp_1.arg0 = s.hbox___34452; + s.callLocIdx = 865; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 8); + s.tmp_3 = r0; + r0 = (s.tmp_0 >> s.tmp_3); + s.right___34461 = (r0); + s.tmp_1 = game_Hitbox_top__P21178_mk(s); + s.tmp_1.arg0 = s.hbox___34452; + s.callLocIdx = 868; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 8); + s.tmp_3 = r0; + r0 = (s.tmp_0 >> s.tmp_3); + s.top___34467 = (r0); + s.tmp_1 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_1.arg0 = s.hbox___34452; + s.callLocIdx = 871; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + s.tmp_0 = r0; + r0 = s.arg0.fields["_scale"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 8); + s.tmp_3 = r0; + r0 = (s.tmp_0 >> s.tmp_3); + s.bottom___34473 = (r0); + s.col___34479 = (s.left___34455); + case 1: + r0 = (s.col___34479 <= s.right___34461); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.row___34485 = (s.top___34467); + case 2: + r0 = (s.row___34485 <= s.bottom___34473); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = tiles_TileMap_isObstacle__P21691_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.col___34479; + s.tmp_2.arg2 = s.row___34485; + s.callLocIdx = 874; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = true; + { step = 7; continue; } + case 3: + case 4: + r0 = (s.row___34485 + 1); + s.row___34485 = (r0); + { step = 2; continue; } + case 5: + r0 = (s.col___34479 + 1); + s.col___34479 = (r0); + { step = 1; continue; } + case 6: + r0 = false; + case 7: return leave(s, r0) default: oops() } } } -Fx8__P271965.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} +tiles_TileMap_isOnWall__P21693.info = {"start":16873,"length":627,"line":534,"column":8,"endLine":551,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOnWall","argumentNames":["this","s"]} -function Fx8__P271965_mk(s) { +function tiles_TileMap_isOnWall__P21693_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx8__P271965, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isOnWall__P21693, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + hbox___34452: undefined, + left___34455: undefined, + right___34461: undefined, + top___34467: undefined, + bottom___34473: undefined, + col___34479: undefined, + row___34485: undefined, arg0: undefined, + arg1: undefined, } } -function SpriteKind_create__P274296(s) { +function tiles_TileMap_isObstacle__P21691(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30172,35 +30394,89 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.nextKind___276624 === undefined); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_Boolean__bang(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - globals.nextKind___276624 = (1000); + r0 = false; + { step = 5; continue; } case 1: case 2: - s.tmp_0 = r0 = globals.nextKind___276624; - r0 = (s.tmp_0 + 1); - globals.nextKind___276624 = (r0); - r0 = s.tmp_0; + s.tmp_8 = tiles_TileMapData_isOutsideMap__P21666_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_8.arg0 = r0; + s.tmp_8.arg1 = s.arg1; + s.tmp_8.arg2 = s.arg2; + s.callLocIdx = 853; s.pc = 6; return s.tmp_8; + case 6: + r0 = s.retval; + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 3; continue; } + r0 = true; + { step = 5; continue; } + case 3: + case 4: + r0 = s.arg0.fields["_map"]; + s.tmp_9 = r0; + r0 = s.tmp_9.fields["layers"]; + s.tmp_11 = r0; + r0 = pxsim_ImageMethods.getPixel(s.tmp_11, s.arg1, s.arg2); + s.tmp_10 = r0; + r0 = (s.tmp_10 === 2); + case 5: return leave(s, r0) default: oops() } } } -SpriteKind_create__P274296.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} +tiles_TileMap_isObstacle__P21691.info = {"start":16232,"length":211,"line":515,"column":8,"endLine":520,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isObstacle","argumentNames":["this","col","row"]} -function SpriteKind_create__P274296_mk(s) { +function tiles_TileMap_isObstacle__P21691_mk(s) { checkStack(s.depth); return { - parent: s, fn: SpriteKind_create__P274296, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isObstacle__P21691, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function controller_Button_constructor__P274012(s) { +function tiles_TileMapData_isWall__P21665(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30217,51 +30493,24 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = (s.arg0).fields["id"] = (s.arg1); - r0 = (s.arg0).fields["_pressed"] = (false); - r0 = (s.arg0).fields["repeatDelay"] = (undefined); - r0 = (s.arg0).fields["repeatInterval"] = (undefined); - r0 = (s.arg0).fields["_repeatCount"] = (0); - r0 = (s.arg1 > 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P287262); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - r0 = s.arg0.fields["id"]; - s.tmp_2 = r0; - r0 = pxsim.control.internalOnEvent(2050, s.tmp_2, s.tmp_1, 16); - r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P287269); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = s.arg0.fields["id"]; + if (!checkSubtype(r0, tiles_TileMapData__C21655_VT)) failedCast(r0); + r0 = s.arg0.fields["layers"]; s.tmp_1 = r0; - r0 = pxsim.control.internalOnEvent(2051, s.tmp_1, s.tmp_0, 16); - r0 = (s.arg2 > 0); + r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = undefined; - case 1: - case 2: - case 3: - case 4: - r0 = undefined; + r0 = (s.tmp_0 === 2); return leave(s, r0) default: oops() } } } -controller_Button_constructor__P274012.info = {"start":2004,"length":864,"line":77,"column":8,"endLine":94,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","id","configKey"]} +tiles_TileMapData_isWall__P21665.info = {"start":8218,"length":107,"line":274,"column":8,"endLine":276,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isWall","argumentNames":["this","col","row"]} -function controller_Button_constructor__P274012_mk(s) { +function tiles_TileMapData_isWall__P21665_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_constructor__P274012, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isWall__P21665, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -30271,7 +30520,7 @@ function controller_Button_constructor__P274012_mk(s) { -function controller_Button_inline__P287262(s) { +function game_Hitbox_bottom__P21180(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30281,31 +30530,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P274019_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 200; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + r0 = s.arg0.fields["height"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_top__P21178_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 226; s.pc = 1; return s.tmp_3; case 1: r0 = s.retval; - r0 = undefined; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 256); + return leaveAccessor(s, r0) default: oops() } } } -controller_Button_inline__P287262.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +game_Hitbox_bottom__P21180.info = {"start":786,"length":139,"line":33,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"bottom","argumentNames":["this"]} +game_Hitbox_bottom__P21180.isGetter = true; -function controller_Button_inline__P287262_mk(s) { +function game_Hitbox_bottom__P21180_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P287262, depth: s.depth + 1, + parent: s, fn: game_Hitbox_bottom__P21180, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, } } -function controller_Button_inline__P287269(s) { +function game_Hitbox_right__P21179(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30315,31 +30579,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P274019_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 201; s.pc = 1; return s.tmp_0; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + r0 = s.arg0.fields["width"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_left__P21177_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 223; s.pc = 1; return s.tmp_3; case 1: r0 = s.retval; - r0 = undefined; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 256); + return leaveAccessor(s, r0) default: oops() } } } -controller_Button_inline__P287269.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +game_Hitbox_right__P21179.info = {"start":638,"length":138,"line":26,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"right","argumentNames":["this"]} +game_Hitbox_right__P21179.isGetter = true; -function controller_Button_inline__P287269_mk(s) { +function game_Hitbox_right__P21179_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P287269, depth: s.depth + 1, + parent: s, fn: game_Hitbox_right__P21179, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + arg0: undefined, } } -function controller_setupButton__P276607(s) { +function game_Hitbox_top__P21178(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30351,29 +30630,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + r0 = s.arg0.fields["oy"]; + s.tmp_0 = r0; + r0 = s.arg0.fields["parent"]; + r0 = r0.fields["_y"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -controller_setupButton__P276607.info = {"start":861,"length":93,"line":39,"column":4,"endLine":41,"endColumn":6,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setupButton","argumentNames":["buttonId","key"]} +game_Hitbox_top__P21178.info = {"start":555,"length":73,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"top","argumentNames":["this"]} +game_Hitbox_top__P21178.isGetter = true; -function controller_setupButton__P276607_mk(s) { +function game_Hitbox_top__P21178_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_setupButton__P276607, depth: s.depth + 1, + parent: s, fn: game_Hitbox_top__P21178, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Button_setPressed__P274019(s) { +function game_Hitbox_left__P21177(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30385,117 +30672,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 != s.arg1); + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + r0 = s.arg0.fields["ox"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = power_poke__P273746_mk(s); - s.callLocIdx = 204; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = s.arg0.fields["_owner"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = controller_Controller_connected__P273973_mk(s); - r0 = s.arg0.fields["_owner"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = true; - s.callLocIdx = 205; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - case 1: - case 2: - r0 = (s.arg0).fields["_pressed"] = (s.arg1); - r0 = s.arg0.fields["_pressed"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["_pressedElasped"] = (0); - s.tmp_0 = controller_Button_raiseButtonDown__P276591_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 206; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = (s.arg0).fields["_repeatCount"] = (0); - s.tmp_0 = controller_Button_raiseButtonUp__P276590_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 207; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - case 4: - case 5: - case 6: - r0 = undefined; - return leave(s, r0) + r0 = s.arg0.fields["parent"]; + r0 = r0.fields["_x"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -controller_Button_setPressed__P274019.info = {"start":6774,"length":507,"line":201,"column":8,"endLine":215,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setPressed","argumentNames":["this","pressed"]} +game_Hitbox_left__P21177.info = {"start":471,"length":74,"line":18,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"left","argumentNames":["this"]} +game_Hitbox_left__P21177.isGetter = true; -function controller_Button_setPressed__P274019_mk(s) { +function game_Hitbox_left__P21177_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_setPressed__P274019, depth: s.depth + 1, + parent: s, fn: game_Hitbox_left__P21177, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function controller_Button_raiseButtonDown__P276591(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___276601); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2049, s.tmp_0); - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2053, s.tmp_0); - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Button_raiseButtonDown__P276591.info = {"start":3088,"length":205,"line":103,"column":8,"endLine":108,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonDown","argumentNames":["this"]} - -function controller_Button_raiseButtonDown__P276591_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Button_raiseButtonDown__P276591, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -30503,7 +30702,7 @@ function controller_Button_raiseButtonDown__P276591_mk(s) { -function controller_Button_raiseButtonUp__P276590(s) { +function ArcadePhysicsEngine_canResolveClipping__P21455(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30513,252 +30712,311 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.hbox___34268 = undefined; + s.sz___34271 = undefined; + s.maxMove___34276 = undefined; + s.origY___34278 = undefined; + s.origX___34281 = undefined; + s.l___34284 = undefined; + s.r___34289 = undefined; + s.t___34294 = undefined; + s.b___34299 = undefined; + s.offset___34304 = undefined; + s.offset___34329 = undefined; + s.offset___34360 = undefined; + s.offset___34385 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___276601); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2048, s.tmp_0); - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["id"]; - s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2052, s.tmp_0); - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller_Button_raiseButtonUp__P276590.info = {"start":2878,"length":200,"line":96,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonUp","argumentNames":["this"]} - -function controller_Button_raiseButtonUp__P276590_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Button_raiseButtonUp__P276590, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function game_addScenePushHandler__P274835(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___276807); + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg1.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.isStatic(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._scenePushHandlers___276807 = (r0); + s.tmp_4 = Sprite__C21242_v4_1_mk(s); + s.tmp_4.arg0 = s.arg1; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C21242_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; + s.pc = 20; return s.tmp_4; + case 20: + r0 = s.retval; case 1: case 2: - r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___276807, s.arg0, undefined); + r0 = s.arg1.fields["_hitbox"]; + s.hbox___34268 = (r0); + r0 = s.arg2.fields["_scale"]; + s.tmp_0 = r0; + r0 = (1 << s.tmp_0); + s.sz___34271 = (r0); + s.tmp_0 = ArcadePhysicsEngine_maxStep__P21441_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 765; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + s.maxMove___34276 = (r0); + r0 = s.arg1.fields["_y"]; + s.origY___34278 = (r0); + r0 = s.arg1.fields["_x"]; + s.origX___34281 = (r0); + s.tmp_1 = game_Hitbox_left__P21177_mk(s); + s.tmp_1.arg0 = s.hbox___34268; + s.callLocIdx = 766; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.l___34284 = (r0); + s.tmp_1 = game_Hitbox_right__P21179_mk(s); + s.tmp_1.arg0 = s.hbox___34268; + s.callLocIdx = 768; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.r___34289 = (r0); + s.tmp_1 = game_Hitbox_top__P21178_mk(s); + s.tmp_1.arg0 = s.hbox___34268; + s.callLocIdx = 770; s.pc = 24; return s.tmp_1; + case 24: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.t___34294 = (r0); + s.tmp_1 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_1.arg0 = s.hbox___34268; + s.callLocIdx = 772; s.pc = 25; return s.tmp_1; + case 25: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 8); + s.b___34299 = (r0); + r0 = (s.b___34299 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___34271); + s.offset___34304 = (r0); + r0 = (s.offset___34304 <= s.maxMove___34276); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_y"]; + s.tmp_3 = r0; + r0 = (s.offset___34304 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_y"] = (s.tmp_2); + s.tmp_3 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 776; s.pc = 26; return s.tmp_3; + case 26: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = pxsim_Array__push(globals._scenePushHandlers___276807, s.arg0); + r0 = true; + { step = 19; continue; } + { step = 4; continue; } case 3: + r0 = (s.arg1).fields["_y"] = (s.origY___34278); case 4: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_addScenePushHandler__P274835.info = {"start":16454,"length":242,"line":489,"column":4,"endLine":493,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePushHandler","argumentNames":["handler"]} - -function game_addScenePushHandler__P274835_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_addScenePushHandler__P274835, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function controller_Controller_id__P273958(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["_id"]; - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_id__P273958.info = {"start":3444,"length":49,"line":109,"column":8,"endLine":111,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"id","argumentNames":["this"]} -controller_Controller_id__P273958.isGetter = true; - -function controller_Controller_id__P273958_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_id__P273958, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function controller_Controller_connected__P273972(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C273951_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_connected__P273972.info = {"start":7723,"length":63,"line":250,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this"]} -controller_Controller_connected__P273972.isGetter = true; - -function controller_Controller_connected__P273972_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_connected__P273972, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function game_currentScene__P274816(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_0 = game_init__P276813_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 1009; s.pc = 1; return s.tmp_0; - case 1: + case 5: + case 6: + r0 = (s.t___34294 / s.sz___34271); + s.tmp_3 = r0; + r0 = pxsim.Math_.floor(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.sz___34271); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.t___34294); + s.offset___34329 = (r0); + r0 = (s.offset___34329 <= s.maxMove___34276); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_y"]; + s.tmp_3 = r0; + r0 = (s.offset___34329 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_y"] = (s.tmp_2); + s.tmp_3 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 779; s.pc = 27; return s.tmp_3; + case 27: r0 = s.retval; - r0 = globals._scene___276805; - return leave(s, r0) - default: oops() -} } } -game_currentScene__P274816.info = {"start":4025,"length":90,"line":118,"column":4,"endLine":121,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"currentScene","argumentNames":[]} - -function game_currentScene__P274816_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_currentScene__P274816, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function game_addScenePopHandler__P274837(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___276808); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._scenePopHandlers___276808 = (r0); - case 1: - case 2: - r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___276808, s.arg0, undefined); + if (!r0) { step = 7; continue; } + r0 = true; + { step = 19; continue; } + { step = 8; continue; } + case 7: + r0 = (s.arg1).fields["_y"] = (s.origY___34278); + case 8: + case 9: + case 10: + r0 = (s.r___34289 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___34271); + s.offset___34360 = (r0); + r0 = (s.offset___34360 <= s.maxMove___34276); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_3 = r0; + r0 = (s.offset___34360 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 - s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_x"] = (s.tmp_2); + s.tmp_3 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 782; s.pc = 28; return s.tmp_3; + case 28: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = pxsim_Array__push(globals._scenePopHandlers___276808, s.arg0); - case 3: - case 4: - r0 = undefined; + if (!r0) { step = 11; continue; } + r0 = true; + { step = 19; continue; } + { step = 12; continue; } + case 11: + r0 = (s.arg1).fields["_x"] = (s.origX___34281); + case 12: + case 13: + case 14: + r0 = (s.l___34284 / s.sz___34271); + s.tmp_3 = r0; + r0 = pxsim.Math_.floor(s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.sz___34271); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.l___34284); + s.offset___34385 = (r0); + r0 = (s.offset___34385 <= s.maxMove___34276); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 17; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_x"]; + s.tmp_3 = r0; + r0 = (s.offset___34385 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_x"] = (s.tmp_2); + s.tmp_3 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 785; s.pc = 29; return s.tmp_3; + case 29: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = true; + { step = 19; continue; } + { step = 16; continue; } + case 15: + r0 = (s.arg1).fields["_x"] = (s.origX___34281); + case 16: + case 17: + case 18: + r0 = false; + case 19: return leave(s, r0) default: oops() } } } -game_addScenePopHandler__P274837.info = {"start":17455,"length":237,"line":513,"column":4,"endLine":517,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePopHandler","argumentNames":["handler"]} +ArcadePhysicsEngine_canResolveClipping__P21455.info = {"start":25202,"length":2135,"line":688,"column":4,"endLine":759,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"canResolveClipping","argumentNames":["this","s","tm"]} -function game_addScenePopHandler__P274837_mk(s) { +function ArcadePhysicsEngine_canResolveClipping__P21455_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_addScenePopHandler__P274837, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P21455, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + hbox___34268: undefined, + sz___34271: undefined, + maxMove___34276: undefined, + origY___34278: undefined, + origX___34281: undefined, + l___34284: undefined, + r___34289: undefined, + t___34294: undefined, + b___34299: undefined, + offset___34304: undefined, + offset___34329: undefined, + offset___34360: undefined, + offset___34385: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function settings_initScopes__P276495(s) { +function Sprite_isStatic__P21274(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30768,53 +31026,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rn___287364 = undefined; - s.tmp_1 = settings_runNumber__P273875_mk(s); - s.callLocIdx = 120; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.rn___287364 = (r0); - s.tmp_0 = settings_writeNumber__P273880_mk(s); - s.tmp_0.arg0 = globals.RUN_KEY___276483; - s.tmp_0.arg1 = s.rn___287364; - s.callLocIdx = 121; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = pxsim.control.deviceSerialNumber(); - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2147483647); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; s.tmp_0 = r0; - r0 = pxsim_pxtcore.seedAddRandom(s.tmp_0); - r0 = pxsim_pxtcore.seedAddRandom(s.rn___287364); - s.tmp_0 = settings_setScope__P276494_mk(s); - r0 = pxsim_pxtcore.programName(); - s.tmp_0.arg0 = r0; - s.callLocIdx = 122; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_ImageMethods.isStatic(s.tmp_0); return leave(s, r0) default: oops() } } } -settings_initScopes__P276495.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} +Sprite_isStatic__P21274.info = {"start":9841,"length":57,"line":355,"column":4,"endLine":357,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isStatic","argumentNames":["this"]} -function settings_initScopes__P276495_mk(s) { +function Sprite_isStatic__P21274_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_initScopes__P276495, depth: s.depth + 1, + parent: s, fn: Sprite_isStatic__P21274, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - rn___287364: undefined, + arg0: undefined, } } -function settings_setScope__P276494(s) { +function ArcadePhysicsEngine_tilemapCollisions__P21451(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30824,4366 +31063,1011 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currScope___287393 = undefined; + s.s___34546 = undefined; + s.hbox___34571 = undefined; + s.tileScale___34574 = undefined; + s.tileSize___34577 = undefined; + s.xDiff___34581 = undefined; + s.yDiff___34588 = undefined; + s.right___34604 = undefined; + s.x0___34608 = undefined; + s.collidedTiles___34623 = undefined; + s.y___34625 = undefined; + s.y0___34639 = undefined; + s.obstacle___34655 = undefined; + s.collisionDirection___34684 = undefined; + s.tile___34712 = undefined; + s.unnamed172___U14 = undefined; + s.unnamed173___U15 = undefined; + s.down___34805 = undefined; + s.y0___34809 = undefined; + s.collidedTiles___34824 = undefined; + s.x___34826 = undefined; + s.x0___34836 = undefined; + s.obstacle___34850 = undefined; + s.collisionDirection___34877 = undefined; + s.tile___34905 = undefined; + s.unnamed174___U24 = undefined; + s.unnamed175___U25 = undefined; + s.overlappedTiles___34999 = undefined; + s.x___35001 = undefined; + s.x0___35011 = undefined; + s.y___35021 = undefined; + s.y0___35031 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___34546 = (r0); + r0 = s.s___34546.fields["flags"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 & 256); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_5 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_5.arg0 = s.arg2; + s.tmp_5.arg1 = s.s___34546; + s.callLocIdx = 648; s.pc = 97; return s.tmp_5; + case 97: + r0 = s.retval; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_6 = r0 = s.s___34546; + r0 = s.tmp_6.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & -257); + s.tmp_7 = r0; + r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); case 1: - r0 = pxsim_String_.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_2 > 100); case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = pxsim_pxtrt.panic(922); case 3: case 4: - s.tmp_0 = settings_readString__P273883_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___276484; - s.callLocIdx = 118; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.currScope___287393 = (r0); - r0 = (s.currScope___287393 != s.arg0); + r0 = s.s___34546.fields["_image"]; + s.tmp_3 = r0; + r0 = pxsim_ImageMethods.isStatic(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = pxsim.settings._userClean(); - s.tmp_0 = settings_writeString__P273878_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___276484; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 119; s.pc = 8; return s.tmp_0; - case 8: + s.tmp_4 = Sprite__C21242_v4_1_mk(s); + s.tmp_4.arg0 = s.s___34546; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C21242_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; + s.pc = 98; return s.tmp_4; + case 98: r0 = s.retval; case 5: case 6: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -settings_setScope__P276494.info = {"start":826,"length":272,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"setScope","argumentNames":["scope"]} - -function settings_setScope__P276494_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_setScope__P276494, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - currScope___287393: undefined, - arg0: undefined, -} } - - - - - -function settings_readString__P273883(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.buf___287414 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim.settings._get(s.arg0); - s.buf___287414 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___287414); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = undefined; - { step = 3; continue; } - { step = 2; continue; } - case 1: - r0 = pxsim.BufferMethods.toString(s.buf___287414); - { step = 3; continue; } - case 2: - r0 = undefined; - case 3: - return leave(s, r0) - default: oops() -} } } -settings_readString__P273883.info = {"start":2827,"length":177,"line":110,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readString","argumentNames":["key"]} - -function settings_readString__P273883_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_readString__P273883, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - buf___287414: undefined, - arg0: undefined, -} } - - - - - -function settings_writeString__P273878(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = settings_writeBuffer__P273877_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim.control.createBufferFromUTF8(s.arg1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 124; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -settings_writeString__P273878.info = {"start":1895,"length":125,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeString","argumentNames":["key","value"]} - -function settings_writeString__P273878_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_writeString__P273878, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function settings_runNumber__P273875(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tmp_1 = settings_readNumber__P273885_mk(s); - s.tmp_1.arg0 = globals.RUN_KEY___276483; - s.callLocIdx = 117; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = 0; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; - return leave(s, r0) - default: oops() -} } } -settings_runNumber__P273875.info = {"start":745,"length":75,"line":27,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"runNumber","argumentNames":[]} - -function settings_runNumber__P273875_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_runNumber__P273875, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, -} } - - - - - -function control___screen_setupUpdate__P273811(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - globals.__updated___276450 = (true); - globals.__update___276448 = (s.arg0); - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = s.arg0; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 111; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control___screen_setupUpdate__P273811.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"setupUpdate","argumentNames":["update"]} - -function control___screen_setupUpdate__P273811_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control___screen_setupUpdate__P273811, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function _screen_internal_getScreenHeight__P273854(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_pxtcore.getConfig(2103, s.arg0); - return leave(s, r0) - default: oops() -} } } -_screen_internal_getScreenHeight__P273854.info = {"start":960,"length":127,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenHeight","argumentNames":["defl"]} - -function _screen_internal_getScreenHeight__P273854_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: _screen_internal_getScreenHeight__P273854, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function _screen_internal_getScreenWidth__P273853(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_pxtcore.getConfig(2102, s.arg0); - return leave(s, r0) - default: oops() -} } } -_screen_internal_getScreenWidth__P273853.info = {"start":810,"length":125,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenWidth","argumentNames":["defl"]} - -function _screen_internal_getScreenWidth__P273853_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: _screen_internal_getScreenWidth__P273853, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function control___screen_update__P273810(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - r0 = pxsim_numops_toBoolDecr(globals.__update___276448); - if (!r0) { step = 1; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.__update___276448; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 110; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - case 1: - case 2: - globals.__updated___276450 = (true); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control___screen_update__P273810.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"update","argumentNames":[]} - -function control___screen_update__P273810_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control___screen_update__P273810, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function pause__P272229(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - setupResume(s, 1); - pxsim.loops.pause(s.arg0); - checkResumeConsumed(); - return; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -pause__P272229.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]} - -function pause__P272229_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: pause__P272229, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function music_Melody_toString__P273452(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C273443_VT)) failedCast(r0); - r0 = s.arg0.fields["_text"]; - return leave(s, r0) - default: oops() -} } } -music_Melody_toString__P273452.info = {"start":10223,"length":53,"line":318,"column":8,"endLine":320,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"toString","argumentNames":["this"]} - -function music_Melody_toString__P273452_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: music_Melody_toString__P273452, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function particles_ShapeFactory_createParticle__P275034(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.p___287452 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C275030_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_createParticle__P275020_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1312; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.p___287452 = (r0); - s.tmp_0 = r0 = s.p___287452; - s.tmp_2 = Math_FastRandom_randomRange__P274880_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 1; - s.tmp_2.arg2 = 14; - s.callLocIdx = 1313; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["color"] = (s.tmp_1); - r0 = s.p___287452; - return leave(s, r0) - default: oops() -} } } -particles_ShapeFactory_createParticle__P275034.info = {"start":7505,"length":178,"line":239,"column":8,"endLine":243,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} - -function particles_ShapeFactory_createParticle__P275034_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_ShapeFactory_createParticle__P275034, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - p___287452: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function particles_AreaFactory_createParticle__P275020(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.p___287464 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_AreaFactory__C275014_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_createParticle__P275010_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1294; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.p___287464 = (r0); - s.tmp_0 = r0 = s.p___287464; - s.tmp_2 = Math_FastRandom_randomRange__P274880_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_2.arg0 = r0; - r0 = s.arg0.fields["minLifespan"]; - s.tmp_2.arg1 = r0; - r0 = s.arg0.fields["maxLifespan"]; - s.tmp_2.arg2 = r0; - s.callLocIdx = 1295; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lifespan"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___287464; - s.tmp_4 = Math_FastRandom_randomRange__P274880_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = 0; - r0 = s.arg0.fields["xRange"]; - s.tmp_4.arg2 = r0; - s.callLocIdx = 1296; s.pc = 5; return s.tmp_4; - case 5: - r0 = s.retval; - s.tmp_3 = r0; - r0 = s.arg0.fields["xRange"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); - s.tmp_5 = r0; - r0 = (s.tmp_3 - s.tmp_5); - s.tmp_2 = r0; - r0 = s.p___287464.fields["_x"]; - s.tmp_7 = r0; - r0 = (s.tmp_2 << 8); - s.tmp_8 = r0; - r0 = (s.tmp_8 + s.tmp_7); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_1 = if_height_1_mk(s); - s.tmp_1.arg0 = s.arg1; - if (!s.tmp_1.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "height"); - } else { - s.tmp_1.fn = s.tmp_1.arg0.vtable.iface["height"]; - if (s.tmp_1.fn == null) { s.retval = s.tmp_1.arg0.fields["height"]; } - else if (!s.tmp_1.fn.isGetter) { s.retval = bind(s.tmp_1); } - else { s.callLocIdx = 1299; s.pc = 6; return s.tmp_1; } - } - case 6: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = if_height_1_mk(s); - s.tmp_3.arg0 = s.arg1; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "height"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["height"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["height"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 1300; s.pc = 7; return s.tmp_3; } - } - case 7: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - { step = 2; continue; } - case 1: - r0 = 0; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = r0 = s.p___287464; - s.tmp_9 = Math_FastRandom_randomRange__P274880_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_9.arg0 = r0; - s.tmp_9.arg1 = 0; - r0 = s.arg0.fields["yRange"]; - s.tmp_9.arg2 = r0; - s.callLocIdx = 1298; s.pc = 8; return s.tmp_9; - case 8: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 - s.tmp_4); - s.tmp_7 = r0; - r0 = s.p___287464.fields["_y"]; - s.tmp_10 = r0; - r0 = (s.tmp_7 << 8); - s.tmp_11 = r0; - r0 = (s.tmp_11 + s.tmp_10); - s.tmp_6 = r0; - r0 = (s.tmp_5).fields["_y"] = (s.tmp_6); - r0 = s.p___287464; - return leave(s, r0) - default: oops() -} } } -particles_AreaFactory_createParticle__P275020.info = {"start":4334,"length":426,"line":148,"column":8,"endLine":156,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} - -function particles_AreaFactory_createParticle__P275020_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_AreaFactory_createParticle__P275020, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - p___287464: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Fx_iadd__P271974(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = (s.arg0 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.arg1); - return leave(s, r0) - default: oops() -} } } -Fx_iadd__P271974.info = {"start":634,"length":110,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"iadd","argumentNames":["a","b"]} - -function Fx_iadd__P271974_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_iadd__P271974, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function particles_SprayFactory_createParticle__P275010(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.p___287520 = undefined; - s.angle___287524 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C275008_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory_createParticle__P275006_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1283; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.p___287520 = (r0); - r0 = s.arg0.fields["minAngle"]; - s.tmp_1 = r0; - s.tmp_3 = Math_FastRandom_randomRange__P274880_mk(s); - s.tmp_3.arg0 = globals.galois___277162; - s.tmp_3.arg1 = 0; - r0 = s.arg0.fields["spread"]; - s.tmp_3.arg2 = r0; - s.callLocIdx = 1284; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 % 100); - s.angle___287524 = (r0); - s.tmp_0 = r0 = s.p___287520; - r0 = pxsim_Array__getAt(globals.cachedSin___277157, s.angle___287524); - s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; - s.tmp_3 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___287520; - r0 = pxsim_Array__getAt(globals.cachedCos___277158, s.angle___287524); - s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; - s.tmp_3 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); - r0 = s.p___287520; - return leave(s, r0) - default: oops() -} } } -particles_SprayFactory_createParticle__P275010.info = {"start":2851,"length":333,"line":105,"column":8,"endLine":113,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} - -function particles_SprayFactory_createParticle__P275010_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_SprayFactory_createParticle__P275010, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - p___287520: undefined, - angle___287524: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function sprites_SpriteSet_toString__P274291(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - r0 = pxsim_String_.mkEmpty(); - s.tmp_1 = r0; - r0 = s.arg0.fields["_sprites"]; - s.tmp_4 = r0; - r0 = pxsim_Array__length(s.tmp_4); - s.tmp_3 = r0; - if ((s.tmp_3) && (s.tmp_3).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_3); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_3) + ""; } - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, " sprites"); - return leave(s, r0) - default: oops() -} } } -sprites_SpriteSet_toString__P274291.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} - -function sprites_SpriteSet_toString__P274291_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_SpriteSet_toString__P274291, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, -} } - - - - - -function sprites_SpriteSet_length__P274283(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C274280_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__length(s.tmp_0); - return leaveAccessor(s, r0) - default: oops() -} } } -sprites_SpriteSet_length__P274283.info = {"start":625,"length":65,"line":26,"column":8,"endLine":28,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"length","argumentNames":["this"]} -sprites_SpriteSet_length__P274283.isGetter = true; - -function sprites_SpriteSet_length__P274283_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_SpriteSet_length__P274283, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function sprites_SpriteMap_toString__P274271(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - r0 = pxsim_String_.mkEmpty(); - s.tmp_3 = r0; - r0 = s.arg0.fields["buckets"]; - s.tmp_6 = r0; - r0 = pxsim_Array__length(s.tmp_6); - s.tmp_5 = r0; - if ((s.tmp_5) && (s.tmp_5).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_5); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_5) + ""; } - case 1: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, " buckets, "); - s.tmp_1 = r0; - s.tmp_10 = helpers_arrayFilter__P271926_mk(s); - r0 = s.arg0.fields["buckets"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = length_inline__P287568; - s.callLocIdx = 515; s.pc = 2; return s.tmp_10; - case 2: - r0 = s.retval; - s.tmp_9 = r0; - r0 = pxsim_Array__length(s.tmp_9); - s.tmp_8 = r0; - if ((s.tmp_8) && (s.tmp_8).vtable) { - setupResume(s, 3); - pxsim_String__stringConv(s.tmp_8); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_8) + ""; } - case 3: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_7); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, " filled"); - return leave(s, r0) - default: oops() -} } } -sprites_SpriteMap_toString__P274271.info = {"start":4109,"length":123,"line":112,"column":8,"endLine":114,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"toString","argumentNames":["this"]} - -function sprites_SpriteMap_toString__P274271_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_SpriteMap_toString__P274271, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - arg0: undefined, -} } - - - - - -function length_inline__P287568(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leave(s, r0) - default: oops() -} } } -length_inline__P287568.info = {"start":4196,"length":8,"line":113,"column":74,"endLine":113,"endColumn":82,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["b"]} - -function length_inline__P287568_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: length_inline__P287568, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_moveSprite__P274358(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.tm___287600 = undefined; - s.maxDist___287608 = undefined; - s.ms___287628 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg1.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.arg1).fields["_lastX"] = (s.tmp_0); - r0 = s.arg1.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.arg1).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_x"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.arg2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["_y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.arg3); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 752; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___287600 = (r0); - s.tmp_0 = r0 = s.tm___287600; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.tm___287600.fields["_map"]; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 11; continue; } - r0 = s.arg0.fields["maxSingleStep"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 128); - s.tmp_7 = r0; - r0 = (s.tmp_7 >> 8); - s.maxDist___287608 = (r0); - s.tmp_2 = Math_abs__P271944_mk(s); - r0 = (s.arg2 + 128); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 756; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.maxDist___287608); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - s.tmp_5 = Math_abs__P271944_mk(s); - r0 = (s.arg3 + 128); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 8); - s.tmp_5.arg0 = r0; - s.callLocIdx = 758; s.pc = 15; return s.tmp_5; - case 15: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 <= s.maxDist___287608); - case 4: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 5; continue; } - r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C274342_VT); - s.tmp_8 = r0; - s.tmp_9 = MovingSprite_constructor__P274343_mk(s); - s.tmp_9.arg0 = s.tmp_8; - s.tmp_9.arg1 = s.arg1; - r0 = s.arg1.fields["_vx"]; - s.tmp_9.arg2 = r0; - r0 = s.arg1.fields["_vy"]; - s.tmp_9.arg3 = r0; - s.tmp_9.arg4 = s.arg2; - s.tmp_9.arg5 = s.arg3; - s.tmp_9.arg6 = s.arg2; - s.tmp_9.arg7 = s.arg3; - s.callLocIdx = 759; s.pc = 16; return s.tmp_9; - case 16: - r0 = s.retval; - s.ms___287628 = (s.tmp_8); - s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P276661_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ms___287628; - s.tmp_0.arg2 = s.tm___287600; - s.callLocIdx = 760; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } - case 5: - s.tmp_1 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_1.arg0 = s.tm___287600; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 761; s.pc = 18; return s.tmp_1; - case 18: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - s.tmp_4 = ArcadePhysicsEngine_canResolveClipping__P276663_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.arg1; - s.tmp_4.arg2 = s.tm___287600; - s.callLocIdx = 762; s.pc = 19; return s.tmp_4; - case 19: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 7: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 8; continue; } - s.tmp_6 = r0 = s.arg1; - r0 = s.tmp_6.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 | 256); - s.tmp_7 = r0; - r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); - { step = 9; continue; } - case 8: - s.tmp_0 = r0 = s.arg1; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & -257); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - case 9: - case 10: - case 11: - case 12: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_moveSprite__P274358.info = {"start":23898,"length":1208,"line":654,"column":4,"endLine":685,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"moveSprite","argumentNames":["this","s","dx","dy"]} - -function ArcadePhysicsEngine_moveSprite__P274358_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_moveSprite__P274358, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tm___287600: undefined, - maxDist___287608: undefined, - ms___287628: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function ArcadePhysicsEngine_canResolveClipping__P276663(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.hbox___287673 = undefined; - s.sz___287676 = undefined; - s.maxMove___287681 = undefined; - s.origY___287683 = undefined; - s.origX___287686 = undefined; - s.l___287689 = undefined; - s.r___287694 = undefined; - s.t___287699 = undefined; - s.b___287704 = undefined; - s.offset___287709 = undefined; - s.offset___287734 = undefined; - s.offset___287765 = undefined; - s.offset___287790 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg1.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_4 = Sprite__C274158_v4_1_mk(s); - s.tmp_4.arg0 = s.arg1; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C274158_VT)) failedCast(s.tmp_4.arg0); - s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; - s.pc = 20; return s.tmp_4; - case 20: - r0 = s.retval; - case 1: - case 2: - r0 = s.arg1.fields["_hitbox"]; - s.hbox___287673 = (r0); - r0 = s.arg2.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.sz___287676 = (r0); - s.tmp_0 = ArcadePhysicsEngine_maxStep__P274350_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 765; s.pc = 21; return s.tmp_0; - case 21: - r0 = s.retval; - s.maxMove___287681 = (r0); - r0 = s.arg1.fields["_y"]; - s.origY___287683 = (r0); - r0 = s.arg1.fields["_x"]; - s.origX___287686 = (r0); - s.tmp_1 = game_Hitbox_left__P274033_mk(s); - s.tmp_1.arg0 = s.hbox___287673; - s.callLocIdx = 766; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.l___287689 = (r0); - s.tmp_1 = game_Hitbox_right__P274035_mk(s); - s.tmp_1.arg0 = s.hbox___287673; - s.callLocIdx = 768; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.r___287694 = (r0); - s.tmp_1 = game_Hitbox_top__P274034_mk(s); - s.tmp_1.arg0 = s.hbox___287673; - s.callLocIdx = 770; s.pc = 24; return s.tmp_1; - case 24: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.t___287699 = (r0); - s.tmp_1 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_1.arg0 = s.hbox___287673; - s.callLocIdx = 772; s.pc = 25; return s.tmp_1; - case 25: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.b___287704 = (r0); - r0 = (s.b___287704 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___287676); - s.offset___287709 = (r0); - r0 = (s.offset___287709 <= s.maxMove___287681); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_y"]; - s.tmp_3 = r0; - r0 = (s.offset___287709 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_y"] = (s.tmp_2); - s.tmp_3 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 776; s.pc = 26; return s.tmp_3; - case 26: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 19; continue; } - { step = 4; continue; } - case 3: - r0 = (s.arg1).fields["_y"] = (s.origY___287683); - case 4: - case 5: - case 6: - r0 = (s.t___287699 / s.sz___287676); - s.tmp_3 = r0; - r0 = pxsim.Math_.floor(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.sz___287676); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.t___287699); - s.offset___287734 = (r0); - r0 = (s.offset___287734 <= s.maxMove___287681); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_y"]; - s.tmp_3 = r0; - r0 = (s.offset___287734 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_y"] = (s.tmp_2); - s.tmp_3 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 779; s.pc = 27; return s.tmp_3; - case 27: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = true; - { step = 19; continue; } - { step = 8; continue; } - case 7: - r0 = (s.arg1).fields["_y"] = (s.origY___287683); - case 8: - case 9: - case 10: - r0 = (s.r___287694 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___287676); - s.offset___287765 = (r0); - r0 = (s.offset___287765 <= s.maxMove___287681); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_x"]; - s.tmp_3 = r0; - r0 = (s.offset___287765 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 - s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_x"] = (s.tmp_2); - s.tmp_3 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 782; s.pc = 28; return s.tmp_3; - case 28: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = true; - { step = 19; continue; } - { step = 12; continue; } - case 11: - r0 = (s.arg1).fields["_x"] = (s.origX___287686); - case 12: - case 13: - case 14: - r0 = (s.l___287689 / s.sz___287676); - s.tmp_3 = r0; - r0 = pxsim.Math_.floor(s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.sz___287676); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.l___287689); - s.offset___287790 = (r0); - r0 = (s.offset___287790 <= s.maxMove___287681); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_x"]; - s.tmp_3 = r0; - r0 = (s.offset___287790 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_x"] = (s.tmp_2); - s.tmp_3 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 785; s.pc = 29; return s.tmp_3; - case 29: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = true; - { step = 19; continue; } - { step = 16; continue; } - case 15: - r0 = (s.arg1).fields["_x"] = (s.origX___287686); - case 16: - case 17: - case 18: - r0 = false; - case 19: - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_canResolveClipping__P276663.info = {"start":25202,"length":2135,"line":688,"column":4,"endLine":759,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"canResolveClipping","argumentNames":["this","s","tm"]} - -function ArcadePhysicsEngine_canResolveClipping__P276663_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P276663, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - hbox___287673: undefined, - sz___287676: undefined, - maxMove___287681: undefined, - origY___287683: undefined, - origX___287686: undefined, - l___287689: undefined, - r___287694: undefined, - t___287699: undefined, - b___287704: undefined, - offset___287709: undefined, - offset___287734: undefined, - offset___287765: undefined, - offset___287790: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function Sprite_isStatic__P274212(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_0); - return leave(s, r0) - default: oops() -} } } -Sprite_isStatic__P274212.info = {"start":9841,"length":57,"line":355,"column":4,"endLine":357,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isStatic","argumentNames":["this"]} - -function Sprite_isStatic__P274212_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_isStatic__P274212, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function game_Hitbox_bottom__P274036(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - r0 = s.arg0.fields["height"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_top__P274034_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 226; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 256); - return leaveAccessor(s, r0) - default: oops() -} } } -game_Hitbox_bottom__P274036.info = {"start":786,"length":139,"line":33,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"bottom","argumentNames":["this"]} -game_Hitbox_bottom__P274036.isGetter = true; - -function game_Hitbox_bottom__P274036_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Hitbox_bottom__P274036, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, -} } - - - - - -function game_Hitbox_right__P274035(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - r0 = s.arg0.fields["width"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_left__P274033_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 223; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 256); - return leaveAccessor(s, r0) - default: oops() -} } } -game_Hitbox_right__P274035.info = {"start":638,"length":138,"line":26,"column":8,"endLine":31,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"right","argumentNames":["this"]} -game_Hitbox_right__P274035.isGetter = true; - -function game_Hitbox_right__P274035_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Hitbox_right__P274035, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, -} } - - - - - -function game_Hitbox_top__P274034(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - r0 = s.arg0.fields["oy"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["parent"]; - r0 = r0.fields["_y"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -game_Hitbox_top__P274034.info = {"start":555,"length":73,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"top","argumentNames":["this"]} -game_Hitbox_top__P274034.isGetter = true; - -function game_Hitbox_top__P274034_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Hitbox_top__P274034, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function game_Hitbox_left__P274033(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - r0 = s.arg0.fields["ox"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["parent"]; - r0 = r0.fields["_x"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -game_Hitbox_left__P274033.info = {"start":471,"length":74,"line":18,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"left","argumentNames":["this"]} -game_Hitbox_left__P274033.isGetter = true; - -function game_Hitbox_left__P274033_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_Hitbox_left__P274033, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapCollisions__P276661(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.s___287950 = undefined; - s.hbox___287975 = undefined; - s.tileScale___287978 = undefined; - s.tileSize___287981 = undefined; - s.xDiff___287985 = undefined; - s.yDiff___287992 = undefined; - s.right___288008 = undefined; - s.x0___288012 = undefined; - s.collidedTiles___288027 = undefined; - s.y___288029 = undefined; - s.y0___288043 = undefined; - s.obstacle___288059 = undefined; - s.collisionDirection___288086 = undefined; - s.tile___288112 = undefined; - s.unnamed2140___U14 = undefined; - s.unnamed2141___U15 = undefined; - s.down___288203 = undefined; - s.y0___288207 = undefined; - s.collidedTiles___288222 = undefined; - s.x___288224 = undefined; - s.x0___288234 = undefined; - s.obstacle___288248 = undefined; - s.collisionDirection___288275 = undefined; - s.tile___288301 = undefined; - s.unnamed2142___U24 = undefined; - s.unnamed2143___U25 = undefined; - s.overlappedTiles___288395 = undefined; - s.x___288397 = undefined; - s.x0___288407 = undefined; - s.y___288417 = undefined; - s.y0___288427 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___287950 = (r0); - r0 = s.s___287950.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 256); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_5 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_5.arg0 = s.arg2; - s.tmp_5.arg1 = s.s___287950; - s.callLocIdx = 648; s.pc = 97; return s.tmp_5; - case 97: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 1; continue; } - s.tmp_6 = r0 = s.s___287950; - r0 = s.tmp_6.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & -257); - s.tmp_7 = r0; - r0 = (s.tmp_6).fields["flags"] = (s.tmp_7); - case 1: - case 2: - case 3: - case 4: - r0 = s.s___287950.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_4 = Sprite__C274158_v4_1_mk(s); - s.tmp_4.arg0 = s.s___287950; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C274158_VT)) failedCast(s.tmp_4.arg0); - s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; - s.pc = 98; return s.tmp_4; - case 98: - r0 = s.retval; - case 5: - case 6: - r0 = s.s___287950.fields["_hitbox"]; - s.hbox___287975 = (r0); - r0 = s.arg2.fields["_scale"]; - s.tileScale___287978 = (r0); - r0 = (1 << s.tileScale___287978); - s.tileSize___287981 = (r0); - r0 = s.s___287950.fields["_x"]; - s.tmp_0 = r0; - r0 = s.s___287950.fields["_lastX"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.xDiff___287985 = (r0); - r0 = s.s___287950.fields["_y"]; - s.tmp_0 = r0; - r0 = s.s___287950.fields["_lastY"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.yDiff___287992 = (r0); - r0 = s.s___287950.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 2818); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 83; continue; } - r0 = (s.xDiff___287985 !== 0); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 43; continue; } - r0 = (s.xDiff___287985 > 0); - s.right___288008 = (r0); - r0 = pxsim_numops_toBoolDecr(s.right___288008); - if (!r0) { step = 7; continue; } - s.tmp_1 = game_Hitbox_right__P274035_mk(s); - s.tmp_1.arg0 = s.hbox___287975; - s.callLocIdx = 653; s.pc = 99; return s.tmp_1; - case 99: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 256); - { step = 8; continue; } - case 7: - s.tmp_3 = game_Hitbox_left__P274033_mk(s); - s.tmp_3.arg0 = s.hbox___287975; - s.callLocIdx = 655; s.pc = 100; return s.tmp_3; - case 100: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 256); - case 8: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.tmp_4 + 128); - s.tmp_5 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_6 = r0; - r0 = (s.tmp_5 >> s.tmp_6); - s.x0___288012 = (r0); - r0 = pxsim_Array__mk(); - s.collidedTiles___288027 = (r0); - s.tmp_1 = game_Hitbox_top__P274034_mk(s); - s.tmp_1.arg0 = s.hbox___287975; - s.callLocIdx = 659; s.pc = 101; return s.tmp_1; - case 101: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.yDiff___287992); - s.y___288029 = (r0); - case 9: - s.tmp_1 = r0 = s.y___288029; - s.tmp_3 = r0 = s.tileSize___287981; - s.tmp_6 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_6.arg0 = s.hbox___287975; - s.callLocIdx = 661; s.pc = 102; return s.tmp_6; - case 102: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.yDiff___287992); - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_7 = r0; - r0 = (s.tmp_7 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_10 = Fx_min__P271982_mk(s); - s.tmp_10.arg0 = s.y___288029; - s.tmp_12 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_12.arg0 = s.hbox___287975; - s.callLocIdx = 664; s.pc = 104; return s.tmp_12; - case 104: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 - s.yDiff___287992); - s.tmp_10.arg1 = r0; - s.callLocIdx = 666; s.pc = 103; return s.tmp_10; - case 103: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_9 + 128); - s.tmp_8 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_13 = r0; - r0 = (s.tmp_8 >> s.tmp_13); - s.y0___288043 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P274573_mk(s); - s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___288012; - s.tmp_1.arg2 = s.y0___288043; - s.callLocIdx = 669; s.pc = 105; return s.tmp_1; - case 105: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - s.tmp_2 = tiles_TileMap_getObstacle__P274574_mk(s); - s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___288012; - s.tmp_2.arg2 = s.y0___288043; - s.callLocIdx = 670; s.pc = 106; return s.tmp_2; - case 106: - r0 = s.retval; - s.obstacle___288059 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P288067); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___288059); - s.tmp_4 = helpers_arraySome__P271923_mk(s); - s.tmp_4.arg0 = s.collidedTiles___288027; - s.tmp_4.arg1 = s.tmp_0; - s.callLocIdx = 671; s.pc = 107; return s.tmp_4; - case 107: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__push(s.collidedTiles___288027, s.obstacle___288059); - case 10: - case 11: - case 12: - case 13: - r0 = (s.tileSize___287981 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___288029); - s.y___288029 = (r0); - { step = 9; continue; } - case 14: - r0 = pxsim_Array__length(s.collidedTiles___288027); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 41; continue; } - r0 = pxsim_numops_toBoolDecr(s.right___288008); - if (!r0) { step = 15; continue; } - r0 = 2; - { step = 16; continue; } - case 15: - r0 = 0; - case 16: - // jmp value (already in r0) - s.tmp_1 = r0; - s.collisionDirection___288086 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.right___288008); - if (!r0) { step = 17; continue; } - r0 = (s.x0___288012 << s.tileScale___287978); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_0 = r0; - r0 = s.hbox___287975.fields["width"]; - s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); - { step = 18; continue; } - case 17: - r0 = (s.x0___288012 + 1); - s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___287978); - s.tmp_4 = r0; - r0 = (s.tmp_4 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - case 18: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___287950; - r0 = s.hbox___287975.fields["ox"]; - s.tmp_10 = r0; - r0 = (s.tmp_7 - s.tmp_10); - s.tmp_9 = r0; - r0 = (s.tmp_8).fields["_x"] = (s.tmp_9); - s.tile___288112 = (undefined); - s.unnamed2140___U14 = (s.collidedTiles___288027); - s.unnamed2141___U15 = (0); - case 19: - s.tmp_0 = r0 = s.unnamed2141___U15; - r0 = pxsim_Array__length(s.unnamed2140___U14); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 22; continue; } - r0 = pxsim_Array__getAt(s.unnamed2140___U14, s.unnamed2141___U15); - s.tile___288112 = (r0); - r0 = s.s___287950.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 20; continue; } - s.tmp_6 = Sprite_registerObstacle__P274243_mk(s); - s.tmp_6.arg0 = s.s___287950; - s.tmp_6.arg1 = s.collisionDirection___288086; - s.tmp_6.arg2 = s.tile___288112; - s.tmp_6.arg3 = s.arg2; - s.callLocIdx = 677; s.pc = 108; return s.tmp_6; - case 108: - r0 = s.retval; - case 20: - case 21: - r0 = (s.unnamed2141___U15 + 1); - s.unnamed2141___U15 = (r0); - { step = 19; continue; } - case 22: - s.unnamed2140___U14 = (undefined); - r0 = s.s___287950.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 16); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 23; continue; } - s.tmp_2 = Sprite_destroy__P274245_mk(s); - s.tmp_2.arg0 = s.s___287950; - s.tmp_2.arg1 = undefined; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 678; s.pc = 109; return s.tmp_2; - case 109: - r0 = s.retval; - { step = 40; continue; } - case 23: - r0 = s.s___287950.fields["_vx"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["cachedVx"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 24; continue; } - r0 = s.tmp_0; - { step = 25; continue; } - case 24: - r0 = s.s___287950.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 25: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 36; continue; } - r0 = s.s___287950.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & 32); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 34; continue; } - r0 = pxsim_numops_toBoolDecr(s.right___288008); - s.tmp_10 = r0; - r0 = pxsim_Boolean__bang(s.tmp_10); - s.tmp_9 = r0; - r0 = pxsim_numops_toBool(s.tmp_9); - if (r0) { step = 26; continue; } - r0 = s.tmp_9; - { step = 27; continue; } - case 26: - s.tmp_12 = Sprite_vx__P274175_mk(s); - s.tmp_12.arg0 = s.s___287950; - s.callLocIdx = 679; s.pc = 110; return s.tmp_12; - case 110: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 < 0); - case 27: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBool(s.tmp_13); - if (!r0) { step = 28; continue; } - r0 = s.tmp_13; - { step = 31; continue; } - case 28: - s.tmp_14 = r0 = s.right___288008; - r0 = pxsim_numops_toBool(s.tmp_14); - if (r0) { step = 29; continue; } - r0 = s.tmp_14; - { step = 30; continue; } - case 29: - s.tmp_16 = Sprite_vx__P274175_mk(s); - s.tmp_16.arg0 = s.s___287950; - s.callLocIdx = 680; s.pc = 111; return s.tmp_16; - case 111: - r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_15 > 0); - case 30: - // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; - case 31: - // jmp value (already in r0) - s.tmp_18 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_18); - if (!r0) { step = 32; continue; } - s.tmp_19 = r0 = s.s___287950; - r0 = s.s___287950.fields["_vx"]; - s.tmp_21 = r0; - r0 = (0 - s.tmp_21); - s.tmp_20 = r0; - r0 = (s.tmp_19).fields["_vx"] = (s.tmp_20); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["xStep"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["dx"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); - case 32: - case 33: - { step = 35; continue; } - case 34: - r0 = (s.arg1).fields["dx"] = (0); - r0 = (s.s___287950).fields["_vx"] = (0); - case 35: - { step = 39; continue; } - case 36: - s.tmp_2 = Math_sign__P271945_mk(s); - r0 = s.s___287950.fields["_vx"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 685; s.pc = 112; return s.tmp_2; - case 112: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_6 = Math_sign__P271945_mk(s); - r0 = s.arg1.fields["cachedVx"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 + 128); - s.tmp_8 = r0; - r0 = (s.tmp_8 >> 8); - s.tmp_6.arg0 = r0; - s.callLocIdx = 687; s.pc = 113; return s.tmp_6; - case 113: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_1 === s.tmp_5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 37; continue; } - r0 = (s.arg1).fields["dx"] = (0); - case 37: - case 38: - case 39: - case 40: - case 41: - case 42: - case 43: - case 44: - r0 = (s.yDiff___287992 !== 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 81; continue; } - r0 = (s.yDiff___287992 > 0); - s.down___288203 = (r0); - r0 = pxsim_numops_toBoolDecr(s.down___288203); - if (!r0) { step = 45; continue; } - s.tmp_1 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_1.arg0 = s.hbox___287975; - s.callLocIdx = 688; s.pc = 114; return s.tmp_1; - case 114: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 256); - { step = 46; continue; } - case 45: - s.tmp_3 = game_Hitbox_top__P274034_mk(s); - s.tmp_3.arg0 = s.hbox___287975; - s.callLocIdx = 690; s.pc = 115; return s.tmp_3; - case 115: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 - 256); - case 46: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = (s.tmp_4 + 128); - s.tmp_5 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_6 = r0; - r0 = (s.tmp_5 >> s.tmp_6); - s.y0___288207 = (r0); - r0 = pxsim_Array__mk(); - s.collidedTiles___288222 = (r0); - s.tmp_0 = game_Hitbox_left__P274033_mk(s); - s.tmp_0.arg0 = s.hbox___287975; - s.callLocIdx = 694; s.pc = 116; return s.tmp_0; - case 116: - r0 = s.retval; - s.x___288224 = (r0); - case 47: - s.tmp_1 = r0 = s.x___288224; - s.tmp_3 = r0 = s.tileSize___287981; - s.tmp_5 = game_Hitbox_right__P274035_mk(s); - s.tmp_5.arg0 = s.hbox___287975; - s.callLocIdx = 695; s.pc = 117; return s.tmp_5; - case 117: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 52; continue; } - s.tmp_9 = Fx_min__P271982_mk(s); - s.tmp_9.arg0 = s.x___288224; - s.tmp_10 = game_Hitbox_right__P274035_mk(s); - s.tmp_10.arg0 = s.hbox___287975; - s.callLocIdx = 697; s.pc = 119; return s.tmp_10; - case 119: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 698; s.pc = 118; return s.tmp_9; - case 118: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.x0___288234 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P274573_mk(s); - s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___288234; - s.tmp_1.arg2 = s.y0___288207; - s.callLocIdx = 701; s.pc = 120; return s.tmp_1; - case 120: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 50; continue; } - s.tmp_2 = tiles_TileMap_getObstacle__P274574_mk(s); - s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___288234; - s.tmp_2.arg2 = s.y0___288207; - s.callLocIdx = 702; s.pc = 121; return s.tmp_2; - case 121: - r0 = s.retval; - s.obstacle___288248 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P288256); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___288248); - s.tmp_4 = helpers_arraySome__P271923_mk(s); - s.tmp_4.arg0 = s.collidedTiles___288222; - s.tmp_4.arg1 = s.tmp_0; - s.callLocIdx = 703; s.pc = 122; return s.tmp_4; - case 122: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 48; continue; } - r0 = pxsim_Array__push(s.collidedTiles___288222, s.obstacle___288248); - case 48: - case 49: - case 50: - case 51: - r0 = (s.tileSize___287981 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___288224); - s.x___288224 = (r0); - { step = 47; continue; } - case 52: - r0 = pxsim_Array__length(s.collidedTiles___288222); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 79; continue; } - r0 = pxsim_numops_toBoolDecr(s.down___288203); - if (!r0) { step = 53; continue; } - r0 = 3; - { step = 54; continue; } - case 53: - r0 = 1; - case 54: - // jmp value (already in r0) - s.tmp_1 = r0; - s.collisionDirection___288275 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.down___288203); - if (!r0) { step = 55; continue; } - r0 = (s.y0___288207 << s.tileScale___287978); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_0 = r0; - r0 = s.hbox___287975.fields["height"]; - s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); - { step = 56; continue; } - case 55: - r0 = (s.y0___288207 + 1); - s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___287978); - s.tmp_4 = r0; - r0 = (s.tmp_4 * 256); - s.tmp_6 = r0; - r0 = (s.tmp_6 | 0); - case 56: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___287950; - r0 = s.hbox___287975.fields["oy"]; - s.tmp_10 = r0; - r0 = (s.tmp_7 - s.tmp_10); - s.tmp_9 = r0; - r0 = (s.tmp_8).fields["_y"] = (s.tmp_9); - s.tile___288301 = (undefined); - s.unnamed2142___U24 = (s.collidedTiles___288222); - s.unnamed2143___U25 = (0); - case 57: - s.tmp_0 = r0 = s.unnamed2143___U25; - r0 = pxsim_Array__length(s.unnamed2142___U24); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 60; continue; } - r0 = pxsim_Array__getAt(s.unnamed2142___U24, s.unnamed2143___U25); - s.tile___288301 = (r0); - r0 = s.s___287950.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 58; continue; } - s.tmp_6 = Sprite_registerObstacle__P274243_mk(s); - s.tmp_6.arg0 = s.s___287950; - s.tmp_6.arg1 = s.collisionDirection___288275; - s.tmp_6.arg2 = s.tile___288301; - s.tmp_6.arg3 = s.arg2; - s.callLocIdx = 709; s.pc = 123; return s.tmp_6; - case 123: - r0 = s.retval; - case 58: - case 59: - r0 = (s.unnamed2143___U25 + 1); - s.unnamed2143___U25 = (r0); - { step = 57; continue; } - case 60: - s.unnamed2142___U24 = (undefined); - r0 = s.s___287950.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 16); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 61; continue; } - s.tmp_2 = Sprite_destroy__P274245_mk(s); - s.tmp_2.arg0 = s.s___287950; - s.tmp_2.arg1 = undefined; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 710; s.pc = 124; return s.tmp_2; - case 124: - r0 = s.retval; - { step = 78; continue; } - case 61: - r0 = s.s___287950.fields["_vy"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["cachedVy"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 62; continue; } - r0 = s.tmp_0; - { step = 63; continue; } - case 62: - r0 = s.s___287950.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 & 2818); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 63: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 74; continue; } - r0 = s.s___287950.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & 32); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 72; continue; } - r0 = pxsim_numops_toBoolDecr(s.down___288203); - s.tmp_10 = r0; - r0 = pxsim_Boolean__bang(s.tmp_10); - s.tmp_9 = r0; - r0 = pxsim_numops_toBool(s.tmp_9); - if (r0) { step = 64; continue; } - r0 = s.tmp_9; - { step = 65; continue; } - case 64: - s.tmp_12 = Sprite_vy__P274177_mk(s); - s.tmp_12.arg0 = s.s___287950; - s.callLocIdx = 711; s.pc = 125; return s.tmp_12; - case 125: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_11 < 0); - case 65: - // jmp value (already in r0) - s.tmp_13 = r0; - r0 = pxsim_numops_toBool(s.tmp_13); - if (!r0) { step = 66; continue; } - r0 = s.tmp_13; - { step = 69; continue; } - case 66: - s.tmp_14 = r0 = s.down___288203; - r0 = pxsim_numops_toBool(s.tmp_14); - if (r0) { step = 67; continue; } - r0 = s.tmp_14; - { step = 68; continue; } - case 67: - s.tmp_16 = Sprite_vy__P274177_mk(s); - s.tmp_16.arg0 = s.s___287950; - s.callLocIdx = 712; s.pc = 126; return s.tmp_16; - case 126: - r0 = s.retval; - s.tmp_15 = r0; - r0 = (s.tmp_15 > 0); - case 68: - // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; - case 69: - // jmp value (already in r0) - s.tmp_18 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_18); - if (!r0) { step = 70; continue; } - s.tmp_19 = r0 = s.s___287950; - r0 = s.s___287950.fields["_vy"]; - s.tmp_21 = r0; - r0 = (0 - s.tmp_21); - s.tmp_20 = r0; - r0 = (s.tmp_19).fields["_vy"] = (s.tmp_20); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["yStep"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - r0 = s.arg1.fields["dy"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); - case 70: - case 71: - { step = 73; continue; } - case 72: - r0 = (s.arg1).fields["dy"] = (0); - r0 = (s.s___287950).fields["_vy"] = (0); - case 73: - { step = 77; continue; } - case 74: - s.tmp_2 = Math_sign__P271945_mk(s); - r0 = s.s___287950.fields["_vy"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 717; s.pc = 127; return s.tmp_2; - case 127: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_6 = Math_sign__P271945_mk(s); - r0 = s.arg1.fields["cachedVy"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 + 128); - s.tmp_8 = r0; - r0 = (s.tmp_8 >> 8); - s.tmp_6.arg0 = r0; - s.callLocIdx = 719; s.pc = 128; return s.tmp_6; - case 128: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_1 === s.tmp_5); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 75; continue; } - r0 = (s.arg1).fields["dy"] = (0); - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - r0 = s.s___287950.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 1538); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 95; continue; } - r0 = pxsim_Array__mk(); - s.overlappedTiles___288395 = (r0); - s.tmp_0 = game_Hitbox_left__P274033_mk(s); - s.tmp_0.arg0 = s.hbox___287975; - s.callLocIdx = 720; s.pc = 129; return s.tmp_0; - case 129: - r0 = s.retval; - s.x___288397 = (r0); - case 85: - s.tmp_1 = r0 = s.x___288397; - s.tmp_3 = r0 = s.tileSize___287981; - s.tmp_5 = game_Hitbox_right__P274035_mk(s); - s.tmp_5.arg0 = s.hbox___287975; - s.callLocIdx = 721; s.pc = 130; return s.tmp_5; - case 130: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 92; continue; } - s.tmp_9 = Fx_min__P271982_mk(s); - s.tmp_9.arg0 = s.x___288397; - s.tmp_10 = game_Hitbox_right__P274035_mk(s); - s.tmp_10.arg0 = s.hbox___287975; - s.callLocIdx = 723; s.pc = 132; return s.tmp_10; - case 132: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 724; s.pc = 131; return s.tmp_9; - case 131: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.x0___288407 = (r0); - s.tmp_0 = game_Hitbox_top__P274034_mk(s); - s.tmp_0.arg0 = s.hbox___287975; - s.callLocIdx = 727; s.pc = 133; return s.tmp_0; - case 133: - r0 = s.retval; - s.y___288417 = (r0); - case 86: - s.tmp_1 = r0 = s.y___288417; - s.tmp_3 = r0 = s.tileSize___287981; - s.tmp_5 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_5.arg0 = s.hbox___287975; - s.callLocIdx = 728; s.pc = 134; return s.tmp_5; - case 134: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_6 = r0; - r0 = (s.tmp_6 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 91; continue; } - s.tmp_9 = Fx_min__P271982_mk(s); - s.tmp_9.arg0 = s.y___288417; - s.tmp_10 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_10.arg0 = s.hbox___287975; - s.callLocIdx = 730; s.pc = 136; return s.tmp_10; - case 136: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.callLocIdx = 731; s.pc = 135; return s.tmp_9; - case 135: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 + 128); - s.tmp_7 = r0; - r0 = (s.tileScale___287978 + 8); - s.tmp_11 = r0; - r0 = (s.tmp_7 >> s.tmp_11); - s.y0___288427 = (r0); - s.tmp_3 = tiles_TileMap_isObstacle__P274573_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.x0___288407; - s.tmp_3.arg2 = s.y0___288427; - s.callLocIdx = 734; s.pc = 137; return s.tmp_3; - case 137: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 87; continue; } - r0 = s.tmp_0; - { step = 88; continue; } - case 87: - r0 = s.s___287950.fields["flags"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 & 2048); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - s.tmp_6 = r0; - r0 = pxsim_Boolean__bang(s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_Boolean__bang(s.tmp_4); - case 88: - // jmp value (already in r0) - s.tmp_9 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_9); - if (!r0) { step = 89; continue; } - s.tmp_10 = r0 = s.overlappedTiles___288395; - s.tmp_12 = tiles_TileMap_getTile__P274566_mk(s); - s.tmp_12.arg0 = s.arg2; - s.tmp_12.arg1 = s.x0___288407; - s.tmp_12.arg2 = s.y0___288427; - s.callLocIdx = 735; s.pc = 138; return s.tmp_12; - case 138: - r0 = s.retval; - s.tmp_11 = r0; - r0 = pxsim_Array__push(s.tmp_10, s.tmp_11); - case 89: - case 90: - r0 = (s.tileSize___287981 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___288417); - s.y___288417 = (r0); - { step = 86; continue; } - case 91: - r0 = (s.tileSize___287981 << 8); - s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___288397); - s.x___288397 = (r0); - { step = 85; continue; } - case 92: - r0 = pxsim_Array__length(s.overlappedTiles___288395); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 93; continue; } - s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P276662_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.s___287950; - s.tmp_1.arg2 = s.overlappedTiles___288395; - s.callLocIdx = 738; s.pc = 139; return s.tmp_1; - case 139: - r0 = s.retval; - case 93: - case 94: - case 95: - case 96: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapCollisions__P276661.info = {"start":12929,"length":9654,"line":379,"column":4,"endLine":618,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"tilemapCollisions","argumentNames":["this","movingSprite","tm"]} - -function ArcadePhysicsEngine_tilemapCollisions__P276661_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P276661, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - s___287950: undefined, - hbox___287975: undefined, - tileScale___287978: undefined, - tileSize___287981: undefined, - xDiff___287985: undefined, - yDiff___287992: undefined, - right___288008: undefined, - x0___288012: undefined, - collidedTiles___288027: undefined, - y___288029: undefined, - y0___288043: undefined, - obstacle___288059: undefined, - collisionDirection___288086: undefined, - tile___288112: undefined, - unnamed2140___U14: undefined, - unnamed2141___U15: undefined, - down___288203: undefined, - y0___288207: undefined, - collidedTiles___288222: undefined, - x___288224: undefined, - x0___288234: undefined, - obstacle___288248: undefined, - collisionDirection___288275: undefined, - tile___288301: undefined, - unnamed2142___U24: undefined, - unnamed2143___U25: undefined, - overlappedTiles___288395: undefined, - x___288397: undefined, - x0___288407: undefined, - y___288417: undefined, - y0___288427: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapCollisions_inline__P288067(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["tileIndex"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["tileIndex"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapCollisions_inline__P288067.info = {"start":15147,"length":39,"line":441,"column":48,"endLine":441,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} - -function ArcadePhysicsEngine_tilemapCollisions_inline__P288067_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P288067, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapCollisions_inline__P288256(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["tileIndex"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["tileIndex"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapCollisions_inline__P288256.info = {"start":18668,"length":39,"line":522,"column":48,"endLine":522,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} - -function ArcadePhysicsEngine_tilemapCollisions_inline__P288256_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P288256, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapOverlaps__P276662(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.alreadyHandled___288474 = undefined; - s.tile___288477 = undefined; - s.unnamed2144___U2 = undefined; - s.unnamed2145___U3 = undefined; - s.tileOverlapHandlers___288498 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.alreadyHandled___288474 = (r0); - s.tile___288477 = (undefined); - s.unnamed2144___U2 = (s.arg2); - s.unnamed2145___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2145___U3; - r0 = pxsim_Array__length(s.unnamed2144___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 7; continue; } - r0 = pxsim_Array__getAt(s.unnamed2144___U2, s.unnamed2145___U3); - s.tile___288477 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P288481); - s.tmp_2 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___288477); - s.tmp_4 = helpers_arraySome__P271923_mk(s); - s.tmp_4.arg0 = s.alreadyHandled___288474; - s.tmp_4.arg1 = s.tmp_2; - s.callLocIdx = 743; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 2; continue; } - { step = 6; continue; } - case 2: - case 3: - r0 = pxsim_Array__push(s.alreadyHandled___288474, s.tile___288477); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 744; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - r0 = r0.fields["tileOverlapHandlers"]; - s.tileOverlapHandlers___288498 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___288498); - if (!r0) { step = 4; continue; } - r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P288506); + r0 = s.s___34546.fields["_hitbox"]; + s.hbox___34571 = (r0); + r0 = s.arg2.fields["_scale"]; + s.tileScale___34574 = (r0); + r0 = (1 << s.tileScale___34574); + s.tileSize___34577 = (r0); + r0 = s.s___34546.fields["_x"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___288477); - r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P288522); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___288477); - s.tmp_2 = helpers_arrayForEach__P271925_mk(s); - s.tmp_3 = helpers_arrayFilter__P271926_mk(s); - s.tmp_3.arg0 = s.tileOverlapHandlers___288498; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 747; s.pc = 11; return s.tmp_3; - case 11: - r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 749; s.pc = 10; return s.tmp_2; - case 10: - r0 = s.retval; - case 4: - case 5: - case 6: - r0 = (s.unnamed2145___U3 + 1); - s.unnamed2145___U3 = (r0); - { step = 1; continue; } - case 7: - s.unnamed2144___U2 = (undefined); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapOverlaps__P276662.info = {"start":22860,"length":707,"line":626,"column":4,"endLine":642,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"tilemapOverlaps","argumentNames":["this","sprite","overlappedTiles"]} - -function ArcadePhysicsEngine_tilemapOverlaps__P276662_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P276662, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - alreadyHandled___288474: undefined, - tile___288477: undefined, - unnamed2144___U2: undefined, - unnamed2145___U3: undefined, - tileOverlapHandlers___288498: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapOverlaps_inline__P288481(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["_col"]; + r0 = s.s___34546.fields["_lastX"]; s.tmp_1 = r0; - r0 = s.caps[0].fields["_col"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 === s.tmp_2); + r0 = (s.tmp_0 - s.tmp_1); + s.xDiff___34581 = (r0); + r0 = s.s___34546.fields["_y"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["_row"]; - s.tmp_3 = r0; - r0 = s.caps[0].fields["_row"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 === s.tmp_4); - case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapOverlaps_inline__P288481.info = {"start":23075,"length":51,"line":630,"column":36,"endLine":630,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["l"]} - -function ArcadePhysicsEngine_tilemapOverlaps_inline__P288481_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P288481, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - arg0: undefined, -} } - - - - - -function forEach_inline__P288506(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["spriteKind"]; + r0 = s.s___34546.fields["_lastY"]; s.tmp_1 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 == s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["tileKind"]; + r0 = (s.tmp_0 - s.tmp_1); + s.yDiff___34588 = (r0); + r0 = s.s___34546.fields["flags"]; s.tmp_3 = r0; - s.tmp_5 = tiles_getTileImage__P274585_mk(s); - s.tmp_5.arg0 = s.caps[1]; - s.callLocIdx = 746; s.pc = 3; return s.tmp_5; - case 3: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.equals(s.tmp_3, s.tmp_4); - case 2: - // jmp value (already in r0) - s.tmp_6 = r0; - r0 = s.tmp_6; - return leave(s, r0) - default: oops() -} } } -forEach_inline__P288506.info = {"start":23395,"length":81,"line":638,"column":28,"endLine":638,"endColumn":109,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} - -function forEach_inline__P288506_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: forEach_inline__P288506, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_tilemapOverlaps_inline__P288522(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_handler_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.tmp_0.arg2 = s.caps[1]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 3); - s.callLocIdx = 748; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 3); s.callLocIdx = 748; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 748; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 748; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_tilemapOverlaps_inline__P288522.info = {"start":23507,"length":28,"line":639,"column":29,"endLine":639,"endColumn":57,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} - -function ArcadePhysicsEngine_tilemapOverlaps_inline__P288522_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P288522, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function tiles_getTileImage__P274585(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.scene___288530 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 877; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.scene___288530 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = (s.tmp_3 & 2818); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.scene___288530.fields["tileMap"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - case 2: - // jmp value (already in r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 83; continue; } + r0 = (s.xDiff___34581 !== 0); s.tmp_4 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - r0 = pxsim.image.ofBuffer(_hex288540); - { step = 5; continue; } - case 3: - case 4: - s.tmp_5 = tiles_TileMap_getTileImage__P274576_mk(s); - r0 = s.scene___288530.fields["tileMap"]; - s.tmp_5.arg0 = r0; - s.tmp_6 = tiles_Location_tileSet__P274521_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 878; s.pc = 8; return s.tmp_6; - case 8: + if (!r0) { step = 43; continue; } + r0 = (s.xDiff___34581 > 0); + s.right___34604 = (r0); + r0 = pxsim_numops_toBoolDecr(s.right___34604); + if (!r0) { step = 7; continue; } + s.tmp_1 = game_Hitbox_right__P21179_mk(s); + s.tmp_1.arg0 = s.hbox___34571; + s.callLocIdx = 653; s.pc = 99; return s.tmp_1; + case 99: r0 = s.retval; - s.tmp_5.arg1 = r0; - s.callLocIdx = 879; s.pc = 7; return s.tmp_5; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 256); + { step = 8; continue; } case 7: + s.tmp_3 = game_Hitbox_left__P21177_mk(s); + s.tmp_3.arg0 = s.hbox___34571; + s.callLocIdx = 655; s.pc = 100; return s.tmp_3; + case 100: r0 = s.retval; - case 5: - return leave(s, r0) - default: oops() -} } } -tiles_getTileImage__P274585.info = {"start":21871,"length":207,"line":673,"column":4,"endLine":677,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["loc"]} - -function tiles_getTileImage__P274585_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_getTileImage__P274585, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - scene___288530: undefined, - arg0: undefined, -} } - -const _hex288540 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") - - - - -function tiles_TileMap_getTileImage__P274576(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P274543_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 876; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_getTileImage__P274576.info = {"start":17510,"length":96,"line":553,"column":8,"endLine":555,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} - -function tiles_TileMap_getTileImage__P274576_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_getTileImage__P274576, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMapData_getTileImage__P274543(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.size___288595 = undefined; - s.cachedImage___288599 = undefined; - s.originalImage___288606 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.size___288595 = (r0); - r0 = s.arg0.fields["cachedTileView"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); - s.cachedImage___288599 = (r0); - r0 = pxsim_numops_toBoolDecr(s.cachedImage___288599); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["tileset"]; - s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); - s.originalImage___288606 = (r0); - r0 = pxsim_numops_toBoolDecr(s.originalImage___288606); - if (!r0) { step = 5; continue; } - r0 = pxsim_ImageMethods.width(s.originalImage___288606); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.size___288595); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = pxsim_ImageMethods.height(s.originalImage___288606); s.tmp_2 = r0; - r0 = (s.tmp_2 <= s.size___288595); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.cachedImage___288599 = (s.originalImage___288606); - { step = 4; continue; } - case 3: - r0 = pxsim.image.create(s.size___288595, s.size___288595); - s.cachedImage___288599 = (r0); - r0 = pxsim_ImageMethods.drawImage(s.cachedImage___288599, s.originalImage___288606, 0, 0); - case 4: - r0 = s.arg0.fields["cachedTileView"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___288599); - case 5: - case 6: - case 7: + r0 = (s.tmp_2 - 256); case 8: - r0 = s.cachedImage___288599; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_getTileImage__P274543.info = {"start":7354,"length":717,"line":251,"column":8,"endLine":268,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} - -function tiles_TileMapData_getTileImage__P274543_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_getTileImage__P274543, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - size___288595: undefined, - cachedImage___288599: undefined, - originalImage___288606: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMapData_scale__P274538(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMapData_scale__P274538.info = {"start":6564,"length":66,"line":222,"column":8,"endLine":224,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this"]} -tiles_TileMapData_scale__P274538.isGetter = true; - -function tiles_TileMapData_scale__P274538_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_scale__P274538, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function tiles_Location_tileSet__P274521(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMap_getTileIndex__P274567_mk(s); - s.tmp_1 = tiles_Location_tileMap__P274512_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 807; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["_col"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["_row"]; - s.tmp_0.arg2 = r0; - s.callLocIdx = 808; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_tileSet__P274521.info = {"start":2323,"length":101,"line":86,"column":8,"endLine":88,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"tileSet","argumentNames":["this"]} -tiles_Location_tileSet__P274521.isGetter = true; - -function tiles_Location_tileSet__P274521_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_tileSet__P274521, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function tiles_TileMap_getTileIndex__P274567(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTile__P274540_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 831; s.pc = 1; return s.tmp_0; - case 1: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = (s.tmp_4 + 128); + s.tmp_5 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_6 = r0; + r0 = (s.tmp_5 >> s.tmp_6); + s.x0___34608 = (r0); + r0 = pxsim_Array__mk(); + s.collidedTiles___34623 = (r0); + s.tmp_1 = game_Hitbox_top__P21178_mk(s); + s.tmp_1.arg0 = s.hbox___34571; + s.callLocIdx = 659; s.pc = 101; return s.tmp_1; + case 101: r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_getTileIndex__P274567.info = {"start":11191,"length":105,"line":384,"column":8,"endLine":386,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileIndex","argumentNames":["this","col","row"]} - -function tiles_TileMap_getTileIndex__P274567_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_getTileIndex__P274567, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMapData_getTile__P274540(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P274546_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 810; s.pc = 4; return s.tmp_1; - case 4: + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.yDiff___34588); + s.y___34625 = (r0); + case 9: + s.tmp_1 = r0 = s.y___34625; + s.tmp_3 = r0 = s.tileSize___34577; + s.tmp_6 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_6.arg0 = s.hbox___34571; + s.callLocIdx = 661; s.pc = 102; return s.tmp_6; + case 102: r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.yDiff___34588); + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_7 = r0; + r0 = (s.tmp_7 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } + if (!r0) { step = 14; continue; } + s.tmp_10 = Fx_min__P20221_mk(s); + s.tmp_10.arg0 = s.y___34625; + s.tmp_12 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_12.arg0 = s.hbox___34571; + s.callLocIdx = 664; s.pc = 104; return s.tmp_12; + case 104: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_11 - s.yDiff___34588); + s.tmp_10.arg1 = r0; + s.callLocIdx = 666; s.pc = 103; return s.tmp_10; + case 103: + r0 = s.retval; + s.tmp_9 = r0; + r0 = (s.tmp_9 + 128); + s.tmp_8 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_13 = r0; + r0 = (s.tmp_8 >> s.tmp_13); + s.y0___34639 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P21691_mk(s); + s.tmp_1.arg0 = s.arg2; + s.tmp_1.arg1 = s.x0___34608; + s.tmp_1.arg2 = s.y0___34639; + s.callLocIdx = 669; s.pc = 105; return s.tmp_1; + case 105: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 12; continue; } + s.tmp_2 = tiles_TileMap_getObstacle__P21692_mk(s); + s.tmp_2.arg0 = s.arg2; + s.tmp_2.arg1 = s.x0___34608; + s.tmp_2.arg2 = s.y0___34639; + s.callLocIdx = 670; s.pc = 106; return s.tmp_2; + case 106: + r0 = s.retval; + s.obstacle___34655 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P34663); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___34655); + s.tmp_4 = helpers_arraySome__P20152_mk(s); + s.tmp_4.arg0 = s.collidedTiles___34623; + s.tmp_4.arg1 = s.tmp_0; + s.callLocIdx = 671; s.pc = 107; return s.tmp_4; + case 107: + r0 = s.retval; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__push(s.collidedTiles___34623, s.obstacle___34655); + case 10: + case 11: + case 12: + case 13: + r0 = (s.tileSize___34577 << 8); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.y___34625); + s.y___34625 = (r0); + { step = 9; continue; } + case 14: + r0 = pxsim_Array__length(s.collidedTiles___34623); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 41; continue; } + r0 = pxsim_numops_toBoolDecr(s.right___34604); + if (!r0) { step = 15; continue; } + r0 = 2; + { step = 16; continue; } + case 15: r0 = 0; - { step = 3; continue; } - case 1: - case 2: - r0 = s.arg0.fields["data"]; + case 16: + // jmp value (already in r0) + s.tmp_1 = r0; + s.collisionDirection___34684 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.right___34604); + if (!r0) { step = 17; continue; } + r0 = (s.x0___34608 << s.tileScale___34574); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 256); s.tmp_2 = r0; - r0 = (s.arg1 | 0); + r0 = (s.tmp_2 | 0); + s.tmp_0 = r0; + r0 = s.hbox___34571.fields["width"]; + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); + { step = 18; continue; } + case 17: + r0 = (s.x0___34608 + 1); s.tmp_5 = r0; - r0 = (4 + s.tmp_5); + r0 = (s.tmp_5 << s.tileScale___34574); s.tmp_4 = r0; - r0 = (s.arg2 | 0); - s.tmp_7 = r0; - r0 = s.arg0.fields["_width"]; - s.tmp_8 = r0; - r0 = (s.tmp_7 * s.tmp_8); + r0 = (s.tmp_4 * 256); s.tmp_6 = r0; - r0 = (s.tmp_4 + s.tmp_6); + r0 = (s.tmp_6 | 0); + case 18: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.s___34546; + r0 = s.hbox___34571.fields["ox"]; + s.tmp_10 = r0; + r0 = (s.tmp_7 - s.tmp_10); + s.tmp_9 = r0; + r0 = (s.tmp_8).fields["_x"] = (s.tmp_9); + s.tile___34712 = (undefined); + s.unnamed172___U14 = (s.collidedTiles___34623); + s.unnamed173___U15 = (0); + case 19: + s.tmp_0 = r0 = s.unnamed173___U15; + r0 = pxsim_Array__length(s.unnamed172___U14); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 22; continue; } + r0 = pxsim_Array__getAt(s.unnamed172___U14, s.unnamed173___U15); + s.tile___34712 = (r0); + r0 = s.s___34546.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim.BufferMethods.getUint8(s.tmp_2, s.tmp_3); - case 3: - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_getTile__P274540.info = {"start":6752,"length":200,"line":231,"column":8,"endLine":235,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} - -function tiles_TileMapData_getTile__P274540_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_getTile__P274540, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMapData_isOutsideMap__P274546(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = (s.arg1 < 0); + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 20; continue; } + s.tmp_6 = Sprite_registerObstacle__P21307_mk(s); + s.tmp_6.arg0 = s.s___34546; + s.tmp_6.arg1 = s.collisionDirection___34684; + s.tmp_6.arg2 = s.tile___34712; + s.tmp_6.arg3 = s.arg2; + s.callLocIdx = 677; s.pc = 108; return s.tmp_6; + case 108: + r0 = s.retval; + case 20: + case 21: + r0 = (s.unnamed173___U15 + 1); + s.unnamed173___U15 = (r0); + { step = 19; continue; } + case 22: + s.unnamed172___U14 = (undefined); + r0 = s.s___34546.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 16); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 23; continue; } + s.tmp_2 = Sprite_destroy__P21309_mk(s); + s.tmp_2.arg0 = s.s___34546; + s.tmp_2.arg1 = undefined; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 678; s.pc = 109; return s.tmp_2; + case 109: + r0 = s.retval; + { step = 40; continue; } + case 23: + r0 = s.s___34546.fields["_vx"]; + s.tmp_1 = r0; + r0 = s.arg1.fields["cachedVx"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 === s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 24; continue; } r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_1 = r0 = s.arg1; - r0 = s.arg0.fields["_width"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 >= s.tmp_2); - case 2: - // jmp value (already in r0) + { step = 25; continue; } + case 24: + r0 = s.s___34546.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 4; continue; } - case 3: - r0 = (s.arg2 < 0); - case 4: + r0 = pxsim_Boolean__bang(s.tmp_3); + case 25: // jmp value (already in r0) - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (!r0) { step = 5; continue; } - r0 = s.tmp_4; - { step = 6; continue; } - case 5: - s.tmp_5 = r0 = s.arg2; - r0 = s.arg0.fields["_height"]; s.tmp_6 = r0; - r0 = (s.tmp_5 >= s.tmp_6); - case 6: + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 36; continue; } + r0 = s.s___34546.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & 32); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 34; continue; } + r0 = pxsim_numops_toBoolDecr(s.right___34604); + s.tmp_10 = r0; + r0 = pxsim_Boolean__bang(s.tmp_10); + s.tmp_9 = r0; + r0 = pxsim_numops_toBool(s.tmp_9); + if (r0) { step = 26; continue; } + r0 = s.tmp_9; + { step = 27; continue; } + case 26: + s.tmp_12 = Sprite_vx__P21248_mk(s); + s.tmp_12.arg0 = s.s___34546; + s.callLocIdx = 679; s.pc = 110; return s.tmp_12; + case 110: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_11 < 0); + case 27: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 28; continue; } + r0 = s.tmp_13; + { step = 31; continue; } + case 28: + s.tmp_14 = r0 = s.right___34604; + r0 = pxsim_numops_toBool(s.tmp_14); + if (r0) { step = 29; continue; } + r0 = s.tmp_14; + { step = 30; continue; } + case 29: + s.tmp_16 = Sprite_vx__P21248_mk(s); + s.tmp_16.arg0 = s.s___34546; + s.callLocIdx = 680; s.pc = 111; return s.tmp_16; + case 111: + r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_15 > 0); + case 30: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; + case 31: // jmp value (already in r0) + s.tmp_18 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_18); + if (!r0) { step = 32; continue; } + s.tmp_19 = r0 = s.s___34546; + r0 = s.s___34546.fields["_vx"]; + s.tmp_21 = r0; + r0 = (0 - s.tmp_21); + s.tmp_20 = r0; + r0 = (s.tmp_19).fields["_vx"] = (s.tmp_20); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["xStep"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["dx"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); + case 32: + case 33: + { step = 35; continue; } + case 34: + r0 = (s.arg1).fields["dx"] = (0); + r0 = (s.s___34546).fields["_vx"] = (0); + case 35: + { step = 39; continue; } + case 36: + s.tmp_2 = Math_sign__P20175_mk(s); + r0 = s.s___34546.fields["_vx"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 685; s.pc = 112; return s.tmp_2; + case 112: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_6 = Math_sign__P20175_mk(s); + r0 = s.arg1.fields["cachedVx"]; s.tmp_7 = r0; - r0 = s.tmp_7; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_isOutsideMap__P274546.info = {"start":8335,"length":132,"line":278,"column":8,"endLine":280,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOutsideMap","argumentNames":["this","col","row"]} - -function tiles_TileMapData_isOutsideMap__P274546_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_isOutsideMap__P274546, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_Location_tileMap__P274512(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 798; s.pc = 1; return s.tmp_0; - case 1: + r0 = (s.tmp_7 + 128); + s.tmp_8 = r0; + r0 = (s.tmp_8 >> 8); + s.tmp_6.arg0 = r0; + s.callLocIdx = 687; s.pc = 113; return s.tmp_6; + case 113: r0 = s.retval; - r0 = r0.fields["tileMap"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_tileMap__P274512.info = {"start":491,"length":73,"line":24,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"tileMap","argumentNames":["this"]} -tiles_Location_tileMap__P274512.isGetter = true; - -function tiles_Location_tileMap__P274512_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_tileMap__P274512, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function tiles_Location_row__P274514(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - r0 = s.arg0.fields["_row"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_row__P274514.info = {"start":877,"length":51,"line":38,"column":8,"endLine":40,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"row","argumentNames":["this"]} -tiles_Location_row__P274514.isGetter = true; - -function tiles_Location_row__P274514_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_row__P274514, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function tiles_Location_column__P274513(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - r0 = s.arg0.fields["_col"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_Location_column__P274513.info = {"start":695,"length":54,"line":31,"column":8,"endLine":33,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"column","argumentNames":["this"]} -tiles_Location_column__P274513.isGetter = true; - -function tiles_Location_column__P274513_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_column__P274513, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function tiles_TileMap_getObstacle__P274574(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.index___288769 = undefined; - s.tile___288781 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P274546_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.callLocIdx = 855; s.pc = 3; return s.tmp_1; - case 3: + s.tmp_5 = r0; + r0 = (s.tmp_1 === s.tmp_5); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 37; continue; } + r0 = (s.arg1).fields["dx"] = (0); + case 37: + case 38: + case 39: + case 40: + case 41: + case 42: + case 43: + case 44: + r0 = (s.yDiff___34588 !== 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 81; continue; } + r0 = (s.yDiff___34588 > 0); + s.down___34805 = (r0); + r0 = pxsim_numops_toBoolDecr(s.down___34805); + if (!r0) { step = 45; continue; } + s.tmp_1 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_1.arg0 = s.hbox___34571; + s.callLocIdx = 688; s.pc = 114; return s.tmp_1; + case 114: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 256); + { step = 46; continue; } + case 45: + s.tmp_3 = game_Hitbox_top__P21178_mk(s); + s.tmp_3.arg0 = s.hbox___34571; + s.callLocIdx = 690; s.pc = 115; return s.tmp_3; + case 115: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 - 256); + case 46: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = (s.tmp_4 + 128); + s.tmp_5 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_6 = r0; + r0 = (s.tmp_5 >> s.tmp_6); + s.y0___34809 = (r0); + r0 = pxsim_Array__mk(); + s.collidedTiles___34824 = (r0); + s.tmp_0 = game_Hitbox_left__P21177_mk(s); + s.tmp_0.arg0 = s.hbox___34571; + s.callLocIdx = 694; s.pc = 116; return s.tmp_0; + case 116: + r0 = s.retval; + s.x___34826 = (r0); + case 47: + s.tmp_1 = r0 = s.x___34826; + s.tmp_3 = r0 = s.tileSize___34577; + s.tmp_5 = game_Hitbox_right__P21179_mk(s); + s.tmp_5.arg0 = s.hbox___34571; + s.callLocIdx = 695; s.pc = 117; return s.tmp_5; + case 117: r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } - case 1: - s.tmp_2 = tiles_TileMapData_getTile__P274540_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.arg1; - s.tmp_2.arg2 = s.arg2; - s.callLocIdx = 856; s.pc = 4; return s.tmp_2; - case 4: + if (!r0) { step = 52; continue; } + s.tmp_9 = Fx_min__P20221_mk(s); + s.tmp_9.arg0 = s.x___34826; + s.tmp_10 = game_Hitbox_right__P21179_mk(s); + s.tmp_10.arg0 = s.hbox___34571; + s.callLocIdx = 697; s.pc = 119; return s.tmp_10; + case 119: r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - s.index___288769 = (s.tmp_3); - s.tmp_0 = tiles_TileMapData_getTileImage__P274543_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___288769; - s.callLocIdx = 857; s.pc = 5; return s.tmp_0; - case 5: + s.tmp_9.arg1 = r0; + s.callLocIdx = 698; s.pc = 118; return s.tmp_9; + case 118: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 + 128); + s.tmp_7 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_11 = r0; + r0 = (s.tmp_7 >> s.tmp_11); + s.x0___34836 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P21691_mk(s); + s.tmp_1.arg0 = s.arg2; + s.tmp_1.arg1 = s.x0___34836; + s.tmp_1.arg2 = s.y0___34809; + s.callLocIdx = 701; s.pc = 120; return s.tmp_1; + case 120: r0 = s.retval; - s.tile___288781 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C274315_VT); s.tmp_0 = r0; - s.tmp_1 = sprites_StaticObstacle_constructor__P274321_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.tile___288781; - s.tmp_2 = r0 = s.arg2; - r0 = s.arg0.fields["_scale"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 50; continue; } + s.tmp_2 = tiles_TileMap_getObstacle__P21692_mk(s); + s.tmp_2.arg0 = s.arg2; + s.tmp_2.arg1 = s.x0___34836; + s.tmp_2.arg2 = s.y0___34809; + s.callLocIdx = 702; s.pc = 121; return s.tmp_2; + case 121: + r0 = s.retval; + s.obstacle___34850 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P34858); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___34850); + s.tmp_4 = helpers_arraySome__P20152_mk(s); + s.tmp_4.arg0 = s.collidedTiles___34824; + s.tmp_4.arg1 = s.tmp_0; + s.callLocIdx = 703; s.pc = 122; return s.tmp_4; + case 122: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_2 << s.tmp_3); - s.tmp_1.arg2 = r0; - s.tmp_4 = r0 = s.arg1; - r0 = s.arg0.fields["_scale"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 48; continue; } + r0 = pxsim_Array__push(s.collidedTiles___34824, s.obstacle___34850); + case 48: + case 49: + case 50: + case 51: + r0 = (s.tileSize___34577 << 8); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.x___34826); + s.x___34826 = (r0); + { step = 47; continue; } + case 52: + r0 = pxsim_Array__length(s.collidedTiles___34824); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 79; continue; } + r0 = pxsim_numops_toBoolDecr(s.down___34805); + if (!r0) { step = 53; continue; } + r0 = 3; + { step = 54; continue; } + case 53: + r0 = 1; + case 54: + // jmp value (already in r0) + s.tmp_1 = r0; + s.collisionDirection___34877 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.down___34805); + if (!r0) { step = 55; continue; } + r0 = (s.y0___34809 << s.tileScale___34574); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 | 0); + s.tmp_0 = r0; + r0 = s.hbox___34571.fields["height"]; + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); + { step = 56; continue; } + case 55: + r0 = (s.y0___34809 + 1); s.tmp_5 = r0; - r0 = (s.tmp_4 << s.tmp_5); - s.tmp_1.arg3 = r0; - r0 = s.arg0.fields["_layer"]; - s.tmp_1.arg4 = r0; - s.tmp_1.arg5 = s.index___288769; - s.callLocIdx = 861; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = s.tmp_0; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_getObstacle__P274574.info = {"start":16453,"length":410,"line":522,"column":8,"endLine":532,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getObstacle","argumentNames":["this","col","row"]} - -function tiles_TileMap_getObstacle__P274574_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_getObstacle__P274574, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - index___288769: undefined, - tile___288781: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMap_layer__P274562(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_layer"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMap_layer__P274562.info = {"start":9967,"length":63,"line":341,"column":8,"endLine":343,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"layer","argumentNames":["this"]} -tiles_TileMap_layer__P274562.isGetter = true; - -function tiles_TileMap_layer__P274562_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_layer__P274562, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function sprites_StaticObstacle_constructor__P274321(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C274315_VT)) failedCast(r0); - r0 = (s.arg0).fields["image"] = (s.arg1); - r0 = (s.arg0).fields["layer"] = (s.arg4); - r0 = (s.arg0).fields["top"] = (s.arg2); - r0 = (s.arg0).fields["left"] = (s.arg3); - r0 = (s.arg0).fields["tileIndex"] = (s.arg5); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_StaticObstacle_constructor__P274321.info = {"start":563,"length":261,"line":28,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"inline","argumentNames":["this","image","top","left","layer","tileIndex"]} - -function sprites_StaticObstacle_constructor__P274321_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_StaticObstacle_constructor__P274321, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, -} } - - - - - -function tiles_TileMap_isObstacle__P274573(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + r0 = (s.tmp_5 << s.tileScale___34574); + s.tmp_4 = r0; + r0 = (s.tmp_4 * 256); s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); + r0 = (s.tmp_6 | 0); + case 56: + // jmp value (already in r0) + s.tmp_7 = r0; + s.tmp_8 = r0 = s.s___34546; + r0 = s.hbox___34571.fields["oy"]; + s.tmp_10 = r0; + r0 = (s.tmp_7 - s.tmp_10); + s.tmp_9 = r0; + r0 = (s.tmp_8).fields["_y"] = (s.tmp_9); + s.tile___34905 = (undefined); + s.unnamed174___U24 = (s.collidedTiles___34824); + s.unnamed175___U25 = (0); + case 57: + s.tmp_0 = r0 = s.unnamed175___U25; + r0 = pxsim_Array__length(s.unnamed174___U24); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 60; continue; } + r0 = pxsim_Array__getAt(s.unnamed174___U24, s.unnamed175___U25); + s.tile___34905 = (r0); + r0 = s.s___34546.fields["flags"]; s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); + r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; r0 = pxsim_Boolean__bang(s.tmp_3); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 58; continue; } + s.tmp_6 = Sprite_registerObstacle__P21307_mk(s); + s.tmp_6.arg0 = s.s___34546; + s.tmp_6.arg1 = s.collisionDirection___34877; + s.tmp_6.arg2 = s.tile___34905; + s.tmp_6.arg3 = s.arg2; + s.callLocIdx = 709; s.pc = 123; return s.tmp_6; + case 123: + r0 = s.retval; + case 58: + case 59: + r0 = (s.unnamed175___U25 + 1); + s.unnamed175___U25 = (r0); + { step = 57; continue; } + case 60: + s.unnamed174___U24 = (undefined); + r0 = s.s___34546.fields["flags"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 & 16); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } - case 1: - case 2: - s.tmp_8 = tiles_TileMapData_isOutsideMap__P274546_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_8.arg0 = r0; - s.tmp_8.arg1 = s.arg1; - s.tmp_8.arg2 = s.arg2; - s.callLocIdx = 853; s.pc = 6; return s.tmp_8; - case 6: + if (!r0) { step = 61; continue; } + s.tmp_2 = Sprite_destroy__P21309_mk(s); + s.tmp_2.arg0 = s.s___34546; + s.tmp_2.arg1 = undefined; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 710; s.pc = 124; return s.tmp_2; + case 124: r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 5; continue; } - case 3: - case 4: - r0 = s.arg0.fields["_map"]; - s.tmp_9 = r0; - r0 = s.tmp_9.fields["layers"]; - s.tmp_11 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_11, s.arg1, s.arg2); - s.tmp_10 = r0; - r0 = (s.tmp_10 === 2); - case 5: - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_isObstacle__P274573.info = {"start":16232,"length":211,"line":515,"column":8,"endLine":520,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isObstacle","argumentNames":["this","col","row"]} - -function tiles_TileMap_isObstacle__P274573_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_isObstacle__P274573, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMapData_isWall__P274545(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = s.arg0.fields["layers"]; + { step = 78; continue; } + case 61: + r0 = s.s___34546.fields["_vy"]; s.tmp_1 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); - s.tmp_0 = r0; - r0 = (s.tmp_0 === 2); - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_isWall__P274545.info = {"start":8218,"length":107,"line":274,"column":8,"endLine":276,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isWall","argumentNames":["this","col","row"]} - -function tiles_TileMapData_isWall__P274545_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_isWall__P274545, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_TileMap_getTile__P274566(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C274510_VT); + r0 = s.arg1.fields["cachedVy"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 === s.tmp_2); s.tmp_0 = r0; - s.tmp_1 = tiles_Location_constructor__P274511_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = s.arg2; - s.tmp_1.arg3 = s.arg0; - s.callLocIdx = 829; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 62; continue; } r0 = s.tmp_0; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_getTile__P274566.info = {"start":11070,"length":111,"line":380,"column":8,"endLine":382,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} - -function tiles_TileMap_getTile__P274566_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_getTile__P274566, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function tiles_Location_constructor__P274511(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - r0 = (s.arg0).fields["_col"] = (s.arg1); - r0 = (s.arg0).fields["_row"] = (s.arg2); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_Location_constructor__P274511.info = {"start":360,"length":121,"line":19,"column":8,"endLine":22,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","col","row","map"]} - -function tiles_Location_constructor__P274511_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_Location_constructor__P274511, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function Sprite_registerObstacle__P274243(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.collisionHandlers___288682 = undefined; - s.wallCollisionHandlers___288689 = undefined; - s.wallHandlersToRun___288714 = undefined; - s.asTileLocation___288727 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_obstacles"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.arg2); - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 415; s.pc = 9; return s.tmp_1; - case 9: + { step = 63; continue; } + case 62: + r0 = s.s___34546.fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 & 2818); + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + case 63: + // jmp value (already in r0) + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 74; continue; } + r0 = s.s___34546.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & 32); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 72; continue; } + r0 = pxsim_numops_toBoolDecr(s.down___34805); + s.tmp_10 = r0; + r0 = pxsim_Boolean__bang(s.tmp_10); + s.tmp_9 = r0; + r0 = pxsim_numops_toBool(s.tmp_9); + if (r0) { step = 64; continue; } + r0 = s.tmp_9; + { step = 65; continue; } + case 64: + s.tmp_12 = Sprite_vy__P21250_mk(s); + s.tmp_12.arg0 = s.s___34546; + s.callLocIdx = 711; s.pc = 125; return s.tmp_12; + case 125: r0 = s.retval; - r0 = r0.fields["collisionHandlers"]; - s.tmp_0 = r0; - s.tmp_3 = if_tileIndex_1_mk(s); - s.tmp_3.arg0 = s.arg2; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "tileIndex"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["tileIndex"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["tileIndex"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 416; s.pc = 10; return s.tmp_3; } - } - case 10: + s.tmp_11 = r0; + r0 = (s.tmp_11 < 0); + case 65: + // jmp value (already in r0) + s.tmp_13 = r0; + r0 = pxsim_numops_toBool(s.tmp_13); + if (!r0) { step = 66; continue; } + r0 = s.tmp_13; + { step = 69; continue; } + case 66: + s.tmp_14 = r0 = s.down___34805; + r0 = pxsim_numops_toBool(s.tmp_14); + if (r0) { step = 67; continue; } + r0 = s.tmp_14; + { step = 68; continue; } + case 67: + s.tmp_16 = Sprite_vy__P21250_mk(s); + s.tmp_16.arg0 = s.s___34546; + s.callLocIdx = 712; s.pc = 126; return s.tmp_16; + case 126: r0 = s.retval; + s.tmp_15 = r0; + r0 = (s.tmp_15 > 0); + case 68: + // jmp value (already in r0) + s.tmp_17 = r0; + r0 = s.tmp_17; + case 69: + // jmp value (already in r0) + s.tmp_18 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_18); + if (!r0) { step = 70; continue; } + s.tmp_19 = r0 = s.s___34546; + r0 = s.s___34546.fields["_vy"]; + s.tmp_21 = r0; + r0 = (0 - s.tmp_21); + s.tmp_20 = r0; + r0 = (s.tmp_19).fields["_vy"] = (s.tmp_20); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["yStep"]; s.tmp_2 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); - s.collisionHandlers___288682 = (r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 417; s.pc = 11; return s.tmp_0; - case 11: + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + r0 = s.arg1.fields["dy"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); + case 70: + case 71: + { step = 73; continue; } + case 72: + r0 = (s.arg1).fields["dy"] = (0); + r0 = (s.s___34546).fields["_vy"] = (0); + case 73: + { step = 77; continue; } + case 74: + s.tmp_2 = Math_sign__P20175_mk(s); + r0 = s.s___34546.fields["_vy"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 + 128); + s.tmp_4 = r0; + r0 = (s.tmp_4 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 717; s.pc = 127; return s.tmp_2; + case 127: r0 = s.retval; - r0 = r0.fields["wallCollisionHandlers"]; - s.wallCollisionHandlers___288689 = (r0); - r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___288682); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P288697); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P288703); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P271925_mk(s); - s.tmp_3 = helpers_arrayFilter__P271926_mk(s); - s.tmp_3.arg0 = s.collisionHandlers___288682; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 419; s.pc = 13; return s.tmp_3; - case 13: + s.tmp_6 = Math_sign__P20175_mk(s); + r0 = s.arg1.fields["cachedVy"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 + 128); + s.tmp_8 = r0; + r0 = (s.tmp_8 >> 8); + s.tmp_6.arg0 = r0; + s.callLocIdx = 719; s.pc = 128; return s.tmp_6; + case 128: r0 = s.retval; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 421; s.pc = 12; return s.tmp_2; - case 12: + s.tmp_5 = r0; + r0 = (s.tmp_1 === s.tmp_5); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 75; continue; } + r0 = (s.arg1).fields["dy"] = (0); + case 75: + case 76: + case 77: + case 78: + case 79: + case 80: + case 81: + case 82: + case 83: + case 84: + r0 = s.s___34546.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 1538); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 95; continue; } + r0 = pxsim_Array__mk(); + s.overlappedTiles___34999 = (r0); + s.tmp_0 = game_Hitbox_left__P21177_mk(s); + s.tmp_0.arg0 = s.hbox___34571; + s.callLocIdx = 720; s.pc = 129; return s.tmp_0; + case 129: r0 = s.retval; - case 1: - case 2: - r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___288689); - if (!r0) { step = 7; continue; } - s.tmp_0 = r0 = s.arg3; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - s.tmp_1 = game_currentScene__P274816_mk(s); - s.callLocIdx = 422; s.pc = 14; return s.tmp_1; - case 14: + s.x___35001 = (r0); + case 85: + s.tmp_1 = r0 = s.x___35001; + s.tmp_3 = r0 = s.tileSize___34577; + s.tmp_5 = game_Hitbox_right__P21179_mk(s); + s.tmp_5.arg0 = s.hbox___34571; + s.callLocIdx = 721; s.pc = 130; return s.tmp_5; + case 130: r0 = s.retval; - r0 = r0.fields["tileMap"]; - case 4: - // jmp value (already in r0) + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); s.tmp_2 = r0; - s.arg3 = (s.tmp_2); - r0 = pxsim_pxtcore_mkAction(1, wallHandlersToRun_inline__P288716); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayFilter__P271926_mk(s); - s.tmp_1.arg0 = s.wallCollisionHandlers___288689; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 424; s.pc = 15; return s.tmp_1; - case 15: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 92; continue; } + s.tmp_9 = Fx_min__P20221_mk(s); + s.tmp_9.arg0 = s.x___35001; + s.tmp_10 = game_Hitbox_right__P21179_mk(s); + s.tmp_10.arg0 = s.hbox___34571; + s.callLocIdx = 723; s.pc = 132; return s.tmp_10; + case 132: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.callLocIdx = 724; s.pc = 131; return s.tmp_9; + case 131: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 + 128); + s.tmp_7 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_11 = r0; + r0 = (s.tmp_7 >> s.tmp_11); + s.x0___35011 = (r0); + s.tmp_0 = game_Hitbox_top__P21178_mk(s); + s.tmp_0.arg0 = s.hbox___34571; + s.callLocIdx = 727; s.pc = 133; return s.tmp_0; + case 133: + r0 = s.retval; + s.y___35021 = (r0); + case 86: + s.tmp_1 = r0 = s.y___35021; + s.tmp_3 = r0 = s.tileSize___34577; + s.tmp_5 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_5.arg0 = s.hbox___34571; + s.callLocIdx = 728; s.pc = 134; return s.tmp_5; + case 134: r0 = s.retval; - s.wallHandlersToRun___288714 = (r0); - r0 = pxsim_Array__length(s.wallHandlersToRun___288714); + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_6 = r0; + r0 = (s.tmp_6 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = tiles_TileMap_getTile__P274566_mk(s); - s.tmp_1.arg0 = s.arg3; - s.tmp_3 = if_left_1_mk(s); + if (!r0) { step = 91; continue; } + s.tmp_9 = Fx_min__P20221_mk(s); + s.tmp_9.arg0 = s.y___35021; + s.tmp_10 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_10.arg0 = s.hbox___34571; + s.callLocIdx = 730; s.pc = 136; return s.tmp_10; + case 136: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.callLocIdx = 731; s.pc = 135; return s.tmp_9; + case 135: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 + 128); + s.tmp_7 = r0; + r0 = (s.tileScale___34574 + 8); + s.tmp_11 = r0; + r0 = (s.tmp_7 >> s.tmp_11); + s.y0___35031 = (r0); + s.tmp_3 = tiles_TileMap_isObstacle__P21691_mk(s); s.tmp_3.arg0 = s.arg2; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "left"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["left"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["left"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 425; s.pc = 17; return s.tmp_3; } - } - case 17: + s.tmp_3.arg1 = s.x0___35011; + s.tmp_3.arg2 = s.y0___35031; + s.callLocIdx = 734; s.pc = 137; return s.tmp_3; + case 137: r0 = s.retval; s.tmp_2 = r0; - r0 = s.arg3.fields["_scale"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 >> s.tmp_4); - s.tmp_1.arg1 = r0; - s.tmp_6 = if_top_1_mk(s); - s.tmp_6.arg0 = s.arg2; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "top"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["top"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["top"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 427; s.pc = 18; return s.tmp_6; } - } - case 18: - r0 = s.retval; - s.tmp_5 = r0; - r0 = s.arg3.fields["_scale"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 87; continue; } + r0 = s.tmp_0; + { step = 88; continue; } + case 87: + r0 = s.s___34546.fields["flags"]; + s.tmp_8 = r0; + r0 = (s.tmp_8 & 2048); s.tmp_7 = r0; - r0 = (s.tmp_5 >> s.tmp_7); - s.tmp_1.arg2 = r0; - s.callLocIdx = 429; s.pc = 16; return s.tmp_1; - case 16: + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + s.tmp_6 = r0; + r0 = pxsim_Boolean__bang(s.tmp_6); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + s.tmp_4 = r0; + r0 = pxsim_Boolean__bang(s.tmp_4); + case 88: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_9); + if (!r0) { step = 89; continue; } + s.tmp_10 = r0 = s.overlappedTiles___34999; + s.tmp_12 = tiles_TileMap_getTile__P21682_mk(s); + s.tmp_12.arg0 = s.arg2; + s.tmp_12.arg1 = s.x0___35011; + s.tmp_12.arg2 = s.y0___35031; + s.callLocIdx = 735; s.pc = 138; return s.tmp_12; + case 138: r0 = s.retval; - s.asTileLocation___288727 = (r0); - r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P288743); + s.tmp_11 = r0; + r0 = pxsim_Array__push(s.tmp_10, s.tmp_11); + case 89: + case 90: + r0 = (s.tileSize___34577 << 8); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___288727); - s.tmp_1 = helpers_arrayForEach__P271925_mk(s); - s.tmp_1.arg0 = s.wallHandlersToRun___288714; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 431; s.pc = 19; return s.tmp_1; - case 19: + r0 = (s.tmp_0 + s.y___35021); + s.y___35021 = (r0); + { step = 86; continue; } + case 91: + r0 = (s.tileSize___34577 << 8); + s.tmp_0 = r0; + r0 = (s.tmp_0 + s.x___35001); + s.x___35001 = (r0); + { step = 85; continue; } + case 92: + r0 = pxsim_Array__length(s.overlappedTiles___34999); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 93; continue; } + s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P21452_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.s___34546; + s.tmp_1.arg2 = s.overlappedTiles___34999; + s.callLocIdx = 738; s.pc = 139; return s.tmp_1; + case 139: r0 = s.retval; - case 5: - case 6: - case 7: - case 8: + case 93: + case 94: + case 95: + case 96: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_registerObstacle__P274243.info = {"start":24992,"length":965,"line":817,"column":4,"endLine":837,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"registerObstacle","argumentNames":["this","direction","other","tm"]} +ArcadePhysicsEngine_tilemapCollisions__P21451.info = {"start":12929,"length":9654,"line":379,"column":4,"endLine":618,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"tilemapCollisions","argumentNames":["this","movingSprite","tm"]} -function Sprite_registerObstacle__P274243_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions__P21451_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_registerObstacle__P274243, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P21451, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -35193,313 +32077,61 @@ function Sprite_registerObstacle__P274243_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - collisionHandlers___288682: undefined, - wallCollisionHandlers___288689: undefined, - wallHandlersToRun___288714: undefined, - asTileLocation___288727: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function forEach_inline__P288697(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["kind"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) - default: oops() -} } } -forEach_inline__P288697.info = {"start":25390,"length":26,"line":824,"column":24,"endLine":824,"endColumn":50,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} - -function forEach_inline__P288697_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: forEach_inline__P288697, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function Sprite_registerObstacle_inline__P288703(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_handler_2_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); - s.callLocIdx = 420; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 420; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 420; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 420; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_registerObstacle_inline__P288703.info = {"start":25443,"length":20,"line":825,"column":25,"endLine":825,"endColumn":45,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} - -function Sprite_registerObstacle_inline__P288703_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_registerObstacle_inline__P288703, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function wallHandlersToRun_inline__P288716(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0.fields["spriteKind"]; - s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 == s.tmp_1); - return leave(s, r0) - default: oops() -} } } -wallHandlersToRun_inline__P288716.info = {"start":25649,"length":32,"line":830,"column":24,"endLine":830,"endColumn":56,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} - -function wallHandlersToRun_inline__P288716_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: wallHandlersToRun_inline__P288716, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function Sprite_registerObstacle_inline__P288743(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.tmp_0 = if_handler_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.tmp_0.arg2 = s.caps[1]; - if (!s.tmp_0.arg0.vtable.iface) { - setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 3); - s.callLocIdx = 430; s.pc = 1; return s.tmp_0; - } else { - s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; - if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 3); s.callLocIdx = 430; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 430; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 430; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_registerObstacle_inline__P288743.info = {"start":25889,"length":36,"line":834,"column":29,"endLine":834,"endColumn":65,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} - -function Sprite_registerObstacle_inline__P288743_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_registerObstacle_inline__P288743, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Math_sign__P271945(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = (s.arg0 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 5; continue; } - case 1: - case 2: - r0 = (s.arg0 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = 1; - { step = 5; continue; } - case 3: - case 4: - r0 = -1; - case 5: - return leave(s, r0) - default: oops() -} } } -Math_sign__P271945.info = {"start":16355,"length":125,"line":547,"column":4,"endLine":551,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"sign","argumentNames":["x"]} - -function Math_sign__P271945_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_sign__P271945, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function helpers_arraySome__P271923(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.len___288751 = undefined; - s.i___288754 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = pxsim_Array__length(s.arg0); - s.len___288751 = (r0); - s.i___288754 = (0); - case 1: - r0 = (s.i___288754 < s.len___288751); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = lambda_3_mk(s); - s.tmp_2.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___288754); - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.i___288754; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 5; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = true; - { step = 5; continue; } - case 2: - case 3: - r0 = (s.i___288754 + 1); - s.i___288754 = (r0); - { step = 1; continue; } - case 4: - r0 = false; - case 5: - return leave(s, r0) - default: oops() -} } } -helpers_arraySome__P271923.info = {"start":6833,"length":296,"line":238,"column":4,"endLine":244,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySome","argumentNames":["arr","callbackfn"]} - -function helpers_arraySome__P271923_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_arraySome__P271923, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - len___288751: undefined, - i___288754: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + s___34546: undefined, + hbox___34571: undefined, + tileScale___34574: undefined, + tileSize___34577: undefined, + xDiff___34581: undefined, + yDiff___34588: undefined, + right___34604: undefined, + x0___34608: undefined, + collidedTiles___34623: undefined, + y___34625: undefined, + y0___34639: undefined, + obstacle___34655: undefined, + collisionDirection___34684: undefined, + tile___34712: undefined, + unnamed172___U14: undefined, + unnamed173___U15: undefined, + down___34805: undefined, + y0___34809: undefined, + collidedTiles___34824: undefined, + x___34826: undefined, + x0___34836: undefined, + obstacle___34850: undefined, + collisionDirection___34877: undefined, + tile___34905: undefined, + unnamed174___U24: undefined, + unnamed175___U25: undefined, + overlappedTiles___34999: undefined, + x___35001: undefined, + x0___35011: undefined, + y___35021: undefined, + y0___35031: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function tiles_TileMap_isOnWall__P274575(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P34663(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35509,136 +32141,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.hbox___287856 = undefined; - s.left___287859 = undefined; - s.right___287865 = undefined; - s.top___287871 = undefined; - s.bottom___287877 = undefined; - s.col___287883 = undefined; - s.row___287889 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg1.fields["_hitbox"]; - s.hbox___287856 = (r0); - s.tmp_1 = game_Hitbox_left__P274033_mk(s); - s.tmp_1.arg0 = s.hbox___287856; - s.callLocIdx = 862; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); - s.tmp_3 = r0; - r0 = (s.tmp_0 >> s.tmp_3); - s.left___287859 = (r0); - s.tmp_1 = game_Hitbox_right__P274035_mk(s); - s.tmp_1.arg0 = s.hbox___287856; - s.callLocIdx = 865; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); - s.tmp_3 = r0; - r0 = (s.tmp_0 >> s.tmp_3); - s.right___287865 = (r0); - s.tmp_1 = game_Hitbox_top__P274034_mk(s); - s.tmp_1.arg0 = s.hbox___287856; - s.callLocIdx = 868; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); - s.tmp_3 = r0; - r0 = (s.tmp_0 >> s.tmp_3); - s.top___287871 = (r0); - s.tmp_1 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_1.arg0 = s.hbox___287856; - s.callLocIdx = 871; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); - s.tmp_3 = r0; - r0 = (s.tmp_0 >> s.tmp_3); - s.bottom___287877 = (r0); - s.col___287883 = (s.left___287859); - case 1: - r0 = (s.col___287883 <= s.right___287865); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.row___287889 = (s.top___287871); - case 2: - r0 = (s.row___287889 <= s.bottom___287877); + r0 = s.arg0.fields["tileIndex"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = tiles_TileMap_isObstacle__P274573_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.col___287883; - s.tmp_2.arg2 = s.row___287889; - s.callLocIdx = 874; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; + r0 = s.caps[0].fields["tileIndex"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 7; continue; } - case 3: - case 4: - r0 = (s.row___287889 + 1); - s.row___287889 = (r0); - { step = 2; continue; } - case 5: - r0 = (s.col___287883 + 1); - s.col___287883 = (r0); - { step = 1; continue; } - case 6: - r0 = false; - case 7: + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -tiles_TileMap_isOnWall__P274575.info = {"start":16873,"length":627,"line":534,"column":8,"endLine":551,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOnWall","argumentNames":["this","s"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P34663.info = {"start":15147,"length":39,"line":441,"column":48,"endLine":441,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} -function tiles_TileMap_isOnWall__P274575_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P34663_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isOnWall__P274575, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P34663, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - hbox___287856: undefined, - left___287859: undefined, - right___287865: undefined, - top___287871: undefined, - bottom___287877: undefined, - col___287883: undefined, - row___287889: undefined, arg0: undefined, - arg1: undefined, } } -function MovingSprite_constructor__P274343(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P34858(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35650,50 +32181,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); - s.arg7 = (s.lambdaArgs[7]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, MovingSprite__C274342_VT)) failedCast(r0); - r0 = (s.arg0).fields["sprite"] = (s.arg1); - r0 = (s.arg0).fields["cachedVx"] = (s.arg2); - r0 = (s.arg0).fields["cachedVy"] = (s.arg3); - r0 = (s.arg0).fields["dx"] = (s.arg4); - r0 = (s.arg0).fields["dy"] = (s.arg5); - r0 = (s.arg0).fields["xStep"] = (s.arg6); - r0 = (s.arg0).fields["yStep"] = (s.arg7); - r0 = undefined; + r0 = s.arg0.fields["tileIndex"]; + s.tmp_0 = r0; + r0 = s.caps[0].fields["tileIndex"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -MovingSprite_constructor__P274343.info = {"start":949,"length":313,"line":33,"column":4,"endLine":44,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","sprite","cachedVx","cachedVy","dx","dy","xStep","yStep"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P34858.info = {"start":18668,"length":39,"line":522,"column":48,"endLine":522,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} -function MovingSprite_constructor__P274343_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P34858_mk(s) { checkStack(s.depth); return { - parent: s, fn: MovingSprite_constructor__P274343, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P34858, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, - arg7: undefined, } } -function ArcadePhysicsEngine_move__P274356(s) { +function tiles_TileMap_getObstacle__P21692(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35703,587 +32217,184 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtMs___288826 = undefined; - s.dt2___288832 = undefined; - s.scene___288836 = undefined; - s.tileMap___288839 = undefined; - s.movingSprites___288842 = undefined; - s.MAX_STEP_COUNT___288873 = undefined; - s.overlapHandlers___288885 = undefined; - s.selected___288892 = undefined; - s.buffers___288893 = undefined; - s.count___288897 = undefined; - s.currMovers___288907 = undefined; - s.remainingMovers___288914 = undefined; - s.ms___288919 = undefined; - s.unnamed2134___U13 = undefined; - s.unnamed2135___U14 = undefined; - s.s___288921 = undefined; - s.stepX___289014 = undefined; - s.stepY___289028 = undefined; - s.bounce___289091 = undefined; + s.index___35378 = undefined; + s.tile___35390 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = Math_min__P271947_mk(s); - s.tmp_0.arg0 = 100; - r0 = (s.arg1 * 1000); - s.tmp_0.arg1 = r0; - s.callLocIdx = 540; s.pc = 53; return s.tmp_0; - case 53: - r0 = s.retval; - s.dtMs___288826 = (r0); - r0 = pxsim.Math_.idiv(s.dtMs___288826, 2); - s.dt2___288832 = (r0); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 541; s.pc = 54; return s.tmp_0; - case 54: - r0 = s.retval; - s.scene___288836 = (r0); - r0 = s.scene___288836.fields["tileMap"]; - s.tileMap___288839 = (r0); - r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P288844); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___288826); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___288832); - s.tmp_1 = helpers_arrayMap__P271922_mk(s); - r0 = s.arg0.fields["sprites"]; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P21666_mk(s); + r0 = s.arg0.fields["_map"]; s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 543; s.pc = 55; return s.tmp_1; - case 55: - r0 = s.retval; - s.movingSprites___288842 = (r0); - s.tmp_0 = helpers_arrayForEach__P271925_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P288856; - s.callLocIdx = 547; s.pc = 56; return s.tmp_0; - case 56: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_clear__P274269_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 548; s.pc = 57; return s.tmp_0; - case 57: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_resizeBuckets__P274268_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["sprites"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 549; s.pc = 58; return s.tmp_0; - case 58: - r0 = s.retval; - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_3 = r0; - r0 = s.arg0.fields["minSingleStep"]; - s.tmp_4 = r0; - r0 = (s.tmp_3 << 8); - s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(s.tmp_5, s.tmp_4); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.dtMs___288826); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 1000); - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 8); - s.MAX_STEP_COUNT___288873 = (r0); - s.tmp_0 = helpers_arraySlice__P271931_mk(s); - r0 = s.scene___288836.fields["overlapHandlers"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 554; s.pc = 59; return s.tmp_0; - case 59: - r0 = s.retval; - s.overlapHandlers___288885 = (r0); - s.selected___288892 = (0); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___288842); - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.buffers___288893 = (s.tmp_0); - s.count___288897 = (0); - case 1: - r0 = (s.count___288897 < s.MAX_STEP_COUNT___288873); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = pxsim_Array__getAt(s.buffers___288893, s.selected___288892); - s.tmp_2 = r0; - r0 = pxsim_Array__length(s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_1 !== 0); + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.callLocIdx = 855; s.pc = 3; return s.tmp_1; case 3: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 52; continue; } - r0 = pxsim_Array__getAt(s.buffers___288893, s.selected___288892); - s.currMovers___288907 = (r0); - r0 = (s.selected___288892 ^ 1); - s.selected___288892 = (r0); - r0 = pxsim_Array__getAt(s.buffers___288893, s.selected___288892); - s.remainingMovers___288914 = (r0); - s.ms___288919 = (undefined); - s.unnamed2134___U13 = (s.currMovers___288907); - s.unnamed2135___U14 = (0); - case 4: - s.tmp_0 = r0 = s.unnamed2135___U14; - r0 = pxsim_Array__length(s.unnamed2134___U13); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 49; continue; } - r0 = pxsim_Array__getAt(s.unnamed2134___U13, s.unnamed2135___U14); - s.ms___288919 = (r0); - r0 = s.ms___288919.fields["sprite"]; - s.s___288921 = (r0); - r0 = s.ms___288919.fields["cachedVx"]; - s.tmp_1 = r0; - r0 = s.s___288921.fields["_vx"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 !== s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = s.s___288921.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 == 0); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = (s.ms___288919).fields["dx"] = (0); - { step = 14; continue; } - case 5: - r0 = s.s___288921.fields["_vx"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 6: - r0 = s.ms___288919.fields["cachedVx"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - case 7: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 8; continue; } - r0 = s.tmp_3; - { step = 11; continue; } - case 8: - r0 = s.s___288921.fields["_vx"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 > 0); - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 9; continue; } - r0 = s.tmp_4; - { step = 10; continue; } - case 9: - r0 = s.ms___288919.fields["cachedVx"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 < 0); - case 10: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 11: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 12; continue; } - s.tmp_9 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["dx"]; - s.tmp_11 = r0; - r0 = (0 - s.tmp_11); - s.tmp_10 = r0; - r0 = (s.tmp_9).fields["dx"] = (s.tmp_10); - s.tmp_0 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["xStep"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); - case 12: - case 13: - case 14: - r0 = s.s___288921.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.ms___288919).fields["cachedVx"] = (s.tmp_0); - case 15: - case 16: - r0 = s.ms___288919.fields["cachedVy"]; - s.tmp_1 = r0; - r0 = s.s___288921.fields["_vy"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 !== s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 27; continue; } - r0 = s.s___288921.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 == 0); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 17; continue; } - r0 = (s.ms___288919).fields["dy"] = (0); - { step = 26; continue; } - case 17: - r0 = s.s___288921.fields["_vy"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 18; continue; } - r0 = s.tmp_0; - { step = 19; continue; } - case 18: - r0 = s.ms___288919.fields["cachedVy"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - case 19: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 20; continue; } - r0 = s.tmp_3; - { step = 23; continue; } - case 20: - r0 = s.s___288921.fields["_vy"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 > 0); - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 21; continue; } - r0 = s.tmp_4; - { step = 22; continue; } - case 21: - r0 = s.ms___288919.fields["cachedVy"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 < 0); - case 22: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 23: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 24; continue; } - s.tmp_9 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["dy"]; - s.tmp_11 = r0; - r0 = (0 - s.tmp_11); - s.tmp_10 = r0; - r0 = (s.tmp_9).fields["dy"] = (s.tmp_10); - s.tmp_0 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["yStep"]; - s.tmp_2 = r0; - r0 = (0 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); - case 24: - case 25: - case 26: - r0 = s.s___288921.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.ms___288919).fields["cachedVy"] = (s.tmp_0); - case 27: - case 28: - s.tmp_2 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["xStep"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 559; s.pc = 60; return s.tmp_2; - case 60: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["dx"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 560; s.pc = 61; return s.tmp_4; - case 61: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 29; continue; } - r0 = s.ms___288919.fields["dx"]; - { step = 30; continue; } - case 29: - r0 = s.ms___288919.fields["xStep"]; - case 30: - // jmp value (already in r0) - s.tmp_5 = r0; - s.stepX___289014 = (s.tmp_5); - s.tmp_2 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["yStep"]; + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + s.tmp_2 = tiles_TileMapData_getTile__P21660_mk(s); + r0 = s.arg0.fields["_map"]; s.tmp_2.arg0 = r0; - s.callLocIdx = 561; s.pc = 62; return s.tmp_2; - case 62: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 562; s.pc = 63; return s.tmp_4; - case 63: + s.tmp_2.arg1 = s.arg1; + s.tmp_2.arg2 = s.arg2; + s.callLocIdx = 856; s.pc = 4; return s.tmp_2; + case 4: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 31; continue; } - r0 = s.ms___288919.fields["dy"]; - { step = 32; continue; } - case 31: - r0 = s.ms___288919.fields["yStep"]; - case 32: + case 2: // jmp value (already in r0) - s.tmp_5 = r0; - s.stepY___289028 = (s.tmp_5); - s.tmp_0 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["dx"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepX___289014); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); - s.tmp_0 = r0 = s.ms___288919; - r0 = s.ms___288919.fields["dy"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepY___289028); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); - r0 = s.s___288921.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.s___288921).fields["_lastX"] = (s.tmp_0); - r0 = s.s___288921.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.s___288921).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = r0 = s.s___288921; - r0 = s.s___288921.fields["_x"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepX___289014); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.s___288921; - r0 = s.s___288921.fields["_y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepY___289028); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - r0 = s.s___288921.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 4610); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 33; continue; } - s.tmp_4 = sprites_SpriteMap_insertAABB__P274270_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.s___288921; - s.callLocIdx = 567; s.pc = 64; return s.tmp_4; - case 64: - r0 = s.retval; - case 33: - case 34: - s.tmp_0 = r0 = s.tileMap___288839; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 35; continue; } - r0 = s.tmp_0; - { step = 36; continue; } - case 35: - r0 = s.tileMap___288839.fields["_map"]; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - case 36: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 37; continue; } - s.tmp_6 = ArcadePhysicsEngine_tilemapCollisions__P276661_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___288919; - s.tmp_6.arg2 = s.tileMap___288839; - s.callLocIdx = 569; s.pc = 65; return s.tmp_6; - case 65: + s.index___35378 = (s.tmp_3); + s.tmp_0 = tiles_TileMapData_getTileImage__P21663_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___35378; + s.callLocIdx = 857; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - case 37: - case 38: - r0 = s.s___288921.fields["flags"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & 32); - s.bounce___289091 = (r0); - r0 = s.s___288921.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 8); + s.tile___35390 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C21376_VT); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 39; continue; } - r0 = s.tmp_0; - { step = 42; continue; } - case 39: - s.tmp_2 = r0 = s.bounce___289091; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 40; continue; } - r0 = s.tmp_2; - { step = 41; continue; } - case 40: - r0 = pxsim_numops_toBoolDecr(s.tileMap___288839); + s.tmp_1 = sprites_StaticObstacle_constructor__P21383_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.tile___35390; + s.tmp_2 = r0 = s.arg2; + r0 = s.arg0.fields["_scale"]; s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - case 41: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; - case 42: - // jmp value (already in r0) + r0 = (s.tmp_2 << s.tmp_3); + s.tmp_1.arg2 = r0; + s.tmp_4 = r0 = s.arg1; + r0 = s.arg0.fields["_scale"]; s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 43; continue; } - s.tmp_6 = ArcadePhysicsEngine_screenEdgeCollisions__P276660_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___288919; - s.tmp_6.arg2 = s.bounce___289091; - r0 = s.scene___288836.fields["camera"]; - s.tmp_6.arg3 = r0; - s.callLocIdx = 570; s.pc = 66; return s.tmp_6; - case 66: - r0 = s.retval; - case 43: - case 44: - s.tmp_2 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["dx"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 571; s.pc = 67; return s.tmp_2; - case 67: + r0 = (s.tmp_4 << s.tmp_5); + s.tmp_1.arg3 = r0; + r0 = s.arg0.fields["_layer"]; + s.tmp_1.arg4 = r0; + s.tmp_1.arg5 = s.index___35378; + s.callLocIdx = 861; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___274338); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 45; continue; } r0 = s.tmp_0; - { step = 46; continue; } - case 45: - s.tmp_4 = Fx_abs__P271981_mk(s); - r0 = s.ms___288919.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 572; s.pc = 68; return s.tmp_4; - case 68: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___274338); - case 46: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 47; continue; } - r0 = pxsim_Array__push(s.remainingMovers___288914, s.ms___288919); - case 47: - case 48: - r0 = (s.unnamed2135___U14 + 1); - s.unnamed2135___U14 = (r0); - { step = 4; continue; } - case 49: - s.unnamed2134___U13 = (undefined); - s.tmp_0 = ArcadePhysicsEngine_spriteCollisions__P276659_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.currMovers___288907; - s.tmp_0.arg2 = s.overlapHandlers___288885; - s.callLocIdx = 573; s.pc = 69; return s.tmp_0; - case 69: - r0 = s.retval; - case 50: - r0 = pxsim_Array__length(s.currMovers___288907); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 51; continue; } - r0 = pxsim_Array_.pop(s.currMovers___288907); - { step = 50; continue; } - case 51: - r0 = (s.count___288897 + 1); - s.count___288897 = (r0); - { step = 1; continue; } - case 52: + return leave(s, r0) + default: oops() +} } } +tiles_TileMap_getObstacle__P21692.info = {"start":16453,"length":410,"line":522,"column":8,"endLine":532,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getObstacle","argumentNames":["this","col","row"]} + +function tiles_TileMap_getObstacle__P21692_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_getObstacle__P21692, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + index___35378: undefined, + tile___35390: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function tiles_TileMap_layer__P21678(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = s.arg0.fields["_layer"]; + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_TileMap_layer__P21678.info = {"start":9967,"length":63,"line":341,"column":8,"endLine":343,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"layer","argumentNames":["this"]} +tiles_TileMap_layer__P21678.isGetter = true; + +function tiles_TileMap_layer__P21678_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_layer__P21678, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function sprites_StaticObstacle_constructor__P21383(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_StaticObstacle__C21376_VT)) failedCast(r0); + r0 = (s.arg0).fields["image"] = (s.arg1); + r0 = (s.arg0).fields["layer"] = (s.arg4); + r0 = (s.arg0).fields["top"] = (s.arg2); + r0 = (s.arg0).fields["left"] = (s.arg3); + r0 = (s.arg0).fields["tileIndex"] = (s.arg5); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_move__P274356.info = {"start":2822,"length":4105,"line":112,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +sprites_StaticObstacle_constructor__P21383.info = {"start":563,"length":261,"line":28,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"inline","argumentNames":["this","image","top","left","layer","tileIndex"]} -function ArcadePhysicsEngine_move__P274356_mk(s) { +function sprites_StaticObstacle_constructor__P21383_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move__P274356, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_constructor__P21383, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - dtMs___288826: undefined, - dt2___288832: undefined, - scene___288836: undefined, - tileMap___288839: undefined, - movingSprites___288842: undefined, - MAX_STEP_COUNT___288873: undefined, - overlapHandlers___288885: undefined, - selected___288892: undefined, - buffers___288893: undefined, - count___288897: undefined, - currMovers___288907: undefined, - remainingMovers___288914: undefined, - ms___288919: undefined, - unnamed2134___U13: undefined, - unnamed2135___U14: undefined, - s___288921: undefined, - stepX___289014: undefined, - stepY___289028: undefined, - bounce___289091: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function movingSprites_inline__P288844(s) { +function tiles_TileMap_getTile__P21682(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36295,35 +32406,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - s.tmp_0 = ArcadePhysicsEngine_createMovingSprite__P276658_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.caps[1]; - s.tmp_0.arg3 = s.caps[2]; - s.callLocIdx = 542; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C21627_VT); + s.tmp_0 = r0; + s.tmp_1 = tiles_Location_constructor__P21644_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = s.arg2; + s.tmp_1.arg3 = s.arg0; + s.callLocIdx = 829; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -movingSprites_inline__P288844.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} +tiles_TileMap_getTile__P21682.info = {"start":11070,"length":111,"line":380,"column":8,"endLine":382,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTile","argumentNames":["this","col","row"]} -function movingSprites_inline__P288844_mk(s) { +function tiles_TileMap_getTile__P21682_mk(s) { checkStack(s.depth); return { - parent: s, fn: movingSprites_inline__P288844, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTile__P21682, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function ArcadePhysicsEngine_move_inline__P288856(s) { +function tiles_Location_constructor__P21644(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36335,60 +32456,37 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - s.tmp_1 = Sprite_vx__P274175_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 544; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_2 = Sprite_vy__P274177_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 545; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.tmp_4 = Sprite_clearObstacles__P274242_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 546; s.pc = 7; return s.tmp_4; - case 7: - r0 = s.retval; - case 3: - case 4: + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + r0 = (s.arg0).fields["_col"] = (s.arg1); + r0 = (s.arg0).fields["_row"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_move_inline__P288856.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} +tiles_Location_constructor__P21644.info = {"start":360,"length":121,"line":19,"column":8,"endLine":22,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","col","row","map"]} -function ArcadePhysicsEngine_move_inline__P288856_mk(s) { +function tiles_Location_constructor__P21644_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move_inline__P288856, depth: s.depth + 1, + parent: s, fn: tiles_Location_constructor__P21644, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function ArcadePhysicsEngine_screenEdgeCollisions__P276660(s) { +function ArcadePhysicsEngine_tilemapOverlaps__P21452(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36398,280 +32496,157 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___289674 = undefined; - s.offset___289689 = undefined; + s.alreadyHandled___35078 = undefined; + s.tile___35081 = undefined; + s.unnamed176___U2 = undefined; + s.unnamed177___U3 = undefined; + s.tileOverlapHandlers___35102 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___289674 = (r0); - r0 = s.s___289674.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_4 = Sprite__C274158_v4_1_mk(s); - s.tmp_4.arg0 = s.s___289674; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C274158_VT)) failedCast(s.tmp_4.arg0); - s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; - s.pc = 21; return s.tmp_4; - case 21: - r0 = s.retval; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.alreadyHandled___35078 = (r0); + s.tile___35081 = (undefined); + s.unnamed176___U2 = (s.arg2); + s.unnamed177___U3 = (0); case 1: - case 2: - s.tmp_3 = scene_Camera_isUpdated__P274614_mk(s); - s.tmp_3.arg0 = s.arg3; - s.callLocIdx = 618; s.pc = 22; return s.tmp_3; - case 22: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_4 = scene_Camera_update__P274615_mk(s); - s.tmp_4.arg0 = s.arg3; - s.callLocIdx = 619; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - case 3: - case 4: - s.tmp_2 = game_Hitbox_left__P274033_mk(s); - r0 = s.s___289674.fields["_hitbox"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 620; s.pc = 24; return s.tmp_2; - case 24: - r0 = s.retval; + s.tmp_0 = r0 = s.unnamed177___U3; + r0 = pxsim_Array__length(s.unnamed176___U2); s.tmp_1 = r0; - r0 = (s.tmp_1 / 256); - s.tmp_0 = r0; - r0 = s.arg3.fields["_offsetX"]; - s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); - s.offset___289689 = (r0); - r0 = (s.offset___289689 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 7; continue; } - s.tmp_1 = Sprite_left__P274217_mk(s); - s.tmp_2 = r0 = s.s___289674; - s.tmp_1.arg0 = r0; - s.tmp_4 = Sprite_left__P274216_mk(s); - s.tmp_4.arg0 = s.tmp_2; - s.callLocIdx = 623; s.pc = 26; return s.tmp_4; - case 26: + r0 = pxsim_Array__getAt(s.unnamed176___U2, s.unnamed177___U3); + s.tile___35081 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P35085); + s.tmp_2 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___35081); + s.tmp_4 = helpers_arraySome__P20152_mk(s); + s.tmp_4.arg0 = s.alreadyHandled___35078; + s.tmp_4.arg1 = s.tmp_2; + s.callLocIdx = 743; s.pc = 8; return s.tmp_4; + case 8: r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 - s.offset___289689); - s.tmp_1.arg1 = r0; - s.callLocIdx = 624; s.pc = 25; return s.tmp_1; - case 25: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 5; continue; } - s.tmp_0 = Sprite_vx__P274176_mk(s); - s.tmp_0.arg0 = s.s___289674; - s.tmp_2 = Sprite_vx__P274175_mk(s); - s.tmp_2.arg0 = s.s___289674; - s.callLocIdx = 625; s.pc = 28; return s.tmp_2; - case 28: + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 2; continue; } + { step = 6; continue; } + case 2: + case 3: + r0 = pxsim_Array__push(s.alreadyHandled___35078, s.tile___35081); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 744; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + r0 = r0.fields["tileOverlapHandlers"]; + s.tileOverlapHandlers___35102 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___35102); + if (!r0) { step = 4; continue; } + r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P35110); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___35081); + r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P35127); s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 626; s.pc = 27; return s.tmp_0; - case 27: + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg1); + r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___35081); + s.tmp_2 = helpers_arrayForEach__P20154_mk(s); + s.tmp_3 = helpers_arrayFilter__P20155_mk(s); + s.tmp_3.arg0 = s.tileOverlapHandlers___35102; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 747; s.pc = 11; return s.tmp_3; + case 11: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 749; s.pc = 10; return s.tmp_2; + case 10: r0 = s.retval; + case 4: case 5: case 6: - { step = 12; continue; } + r0 = (s.unnamed177___U3 + 1); + s.unnamed177___U3 = (r0); + { step = 1; continue; } case 7: - s.tmp_4 = game_Hitbox_right__P274035_mk(s); - r0 = s.s___289674.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 627; s.pc = 29; return s.tmp_4; - case 29: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / 256); - s.tmp_2 = r0; - r0 = s.arg3.fields["_offsetX"]; - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.offset___289689 = (r0); - r0 = (s.tmp_0 > 0); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 10; continue; } - s.tmp_8 = Sprite_right__P274219_mk(s); - s.tmp_9 = r0 = s.s___289674; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_right__P274218_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 630; s.pc = 31; return s.tmp_11; - case 31: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___289689); - s.tmp_8.arg1 = r0; - s.callLocIdx = 631; s.pc = 30; return s.tmp_8; - case 30: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 8; continue; } - s.tmp_0 = Sprite_vx__P274176_mk(s); - s.tmp_0.arg0 = s.s___289674; - s.tmp_2 = Sprite_vx__P274175_mk(s); - s.tmp_2.arg0 = s.s___289674; - s.callLocIdx = 632; s.pc = 33; return s.tmp_2; - case 33: - r0 = s.retval; + s.unnamed176___U2 = (undefined); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_tilemapOverlaps__P21452.info = {"start":22860,"length":707,"line":626,"column":4,"endLine":642,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"tilemapOverlaps","argumentNames":["this","sprite","overlappedTiles"]} + +function ArcadePhysicsEngine_tilemapOverlaps__P21452_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P21452, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + alreadyHandled___35078: undefined, + tile___35081: undefined, + unnamed176___U2: undefined, + unnamed177___U3: undefined, + tileOverlapHandlers___35102: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function ArcadePhysicsEngine_tilemapOverlaps_inline__P35085(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["_col"]; s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 633; s.pc = 32; return s.tmp_0; - case 32: - r0 = s.retval; - case 8: - case 9: - case 10: - case 11: - case 12: - s.tmp_3 = game_Hitbox_top__P274034_mk(s); - r0 = s.s___289674.fields["_hitbox"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 634; s.pc = 34; return s.tmp_3; - case 34: - r0 = s.retval; + r0 = s.caps[0].fields["_col"]; s.tmp_2 = r0; - r0 = (s.tmp_2 / 256); - s.tmp_1 = r0; - r0 = s.arg3.fields["_offsetY"]; - s.tmp_4 = r0; - r0 = (s.tmp_1 - s.tmp_4); + r0 = (s.tmp_1 === s.tmp_2); s.tmp_0 = r0; - s.offset___289689 = (r0); - r0 = (s.tmp_0 < 0); - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 15; continue; } - s.tmp_6 = Sprite_top__P274221_mk(s); - s.tmp_7 = r0 = s.s___289674; - s.tmp_6.arg0 = r0; - s.tmp_9 = Sprite_top__P274220_mk(s); - s.tmp_9.arg0 = s.tmp_7; - s.callLocIdx = 637; s.pc = 36; return s.tmp_9; - case 36: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 - s.offset___289689); - s.tmp_6.arg1 = r0; - s.callLocIdx = 638; s.pc = 35; return s.tmp_6; - case 35: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 13; continue; } - s.tmp_0 = Sprite_vy__P274178_mk(s); - s.tmp_0.arg0 = s.s___289674; - s.tmp_2 = Sprite_vy__P274177_mk(s); - s.tmp_2.arg0 = s.s___289674; - s.callLocIdx = 639; s.pc = 38; return s.tmp_2; - case 38: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 640; s.pc = 37; return s.tmp_0; - case 37: - r0 = s.retval; - case 13: - case 14: - { step = 20; continue; } - case 15: - s.tmp_4 = game_Hitbox_bottom__P274036_mk(s); - r0 = s.s___289674.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 641; s.pc = 39; return s.tmp_4; - case 39: - r0 = s.retval; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.arg0.fields["_row"]; s.tmp_3 = r0; - r0 = (s.tmp_3 / 256); - s.tmp_2 = r0; - r0 = s.arg3.fields["_offsetY"]; + r0 = s.caps[0].fields["_row"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 === s.tmp_4); + case 2: + // jmp value (already in r0) s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); - s.tmp_0 = r0; - s.offset___289689 = (r0); - r0 = (s.tmp_0 > 0); - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 18; continue; } - s.tmp_8 = Sprite_bottom__P274223_mk(s); - s.tmp_9 = r0 = s.s___289674; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_bottom__P274222_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 644; s.pc = 41; return s.tmp_11; - case 41: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___289689); - s.tmp_8.arg1 = r0; - s.callLocIdx = 645; s.pc = 40; return s.tmp_8; - case 40: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 16; continue; } - s.tmp_0 = Sprite_vy__P274178_mk(s); - s.tmp_0.arg0 = s.s___289674; - s.tmp_2 = Sprite_vy__P274177_mk(s); - s.tmp_2.arg0 = s.s___289674; - s.callLocIdx = 646; s.pc = 43; return s.tmp_2; - case 43: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 647; s.pc = 42; return s.tmp_0; - case 42: - r0 = s.retval; - case 16: - case 17: - case 18: - case 19: - case 20: - r0 = undefined; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_screenEdgeCollisions__P276660.info = {"start":12018,"length":905,"line":355,"column":4,"endLine":377,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"screenEdgeCollisions","argumentNames":["this","movingSprite","bounce","camera"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P35085.info = {"start":23075,"length":51,"line":630,"column":36,"endLine":630,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["l"]} -function ArcadePhysicsEngine_screenEdgeCollisions__P276660_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P35085_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P276660, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P35085, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -36679,25 +32654,14 @@ function ArcadePhysicsEngine_screenEdgeCollisions__P276660_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - s___289674: undefined, - offset___289689: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function scene_Camera_isUpdated__P274614(s) { +function forEach_inline__P35110(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36711,62 +32675,39 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["sprite"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = s.arg0.fields["spriteKind"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.caps[0].fields["_kind"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 == s.tmp_2); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } + if (r0) { step = 1; continue; } r0 = s.tmp_0; - { step = 4; continue; } + { step = 2; continue; } case 1: - s.tmp_5 = Sprite_x__P274171_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_5.arg0 = r0; - s.callLocIdx = 890; s.pc = 5; return s.tmp_5; - case 5: + r0 = s.arg0.fields["tileKind"]; + s.tmp_3 = r0; + s.tmp_5 = tiles_getTileImage__P21705_mk(s); + s.tmp_5.arg0 = s.caps[1]; + s.callLocIdx = 746; s.pc = 3; return s.tmp_5; + case 3: r0 = s.retval; s.tmp_4 = r0; - r0 = s.arg0.fields["_lastUpdatedSpriteX"]; - s.tmp_6 = r0; - r0 = (s.tmp_4 === s.tmp_6); - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (r0) { step = 2; continue; } - r0 = s.tmp_3; - { step = 3; continue; } + r0 = pxsim_ImageMethods.equals(s.tmp_3, s.tmp_4); case 2: - s.tmp_8 = Sprite_y__P274173_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_8.arg0 = r0; - s.callLocIdx = 891; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - s.tmp_7 = r0; - r0 = s.arg0.fields["_lastUpdatedSpriteY"]; - s.tmp_9 = r0; - r0 = (s.tmp_7 === s.tmp_9); - case 3: - // jmp value (already in r0) - s.tmp_10 = r0; - r0 = s.tmp_10; - case 4: // jmp value (already in r0) - s.tmp_11 = r0; - r0 = s.tmp_11; + s.tmp_6 = r0; + r0 = s.tmp_6; return leave(s, r0) default: oops() } } } -scene_Camera_isUpdated__P274614.info = {"start":2403,"length":150,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"isUpdated","argumentNames":["this"]} +forEach_inline__P35110.info = {"start":23395,"length":81,"line":638,"column":28,"endLine":638,"endColumn":109,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function scene_Camera_isUpdated__P274614_mk(s) { +function forEach_inline__P35110_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_isUpdated__P274614, depth: s.depth + 1, + parent: s, fn: forEach_inline__P35110, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -36775,11 +32716,6 @@ function scene_Camera_isUpdated__P274614_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, arg0: undefined, } } @@ -36787,7 +32723,7 @@ function scene_Camera_isUpdated__P274614_mk(s) { -function Sprite_bottom__P274223(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P35127(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36799,49 +32735,43 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P274221_mk(s); + s.tmp_0 = if_handler_3_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_height__P274215_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 365; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 366; s.pc = 1; return s.tmp_0; + s.tmp_0.arg1 = s.caps[0]; + s.tmp_0.arg2 = s.caps[1]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 3); + s.callLocIdx = 748; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 3); s.callLocIdx = 748; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 748; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 748; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_bottom__P274223.info = {"start":12204,"length":73,"line":440,"column":4,"endLine":442,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P35127.info = {"start":23507,"length":28,"line":639,"column":29,"endLine":639,"endColumn":57,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function Sprite_bottom__P274223_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P35127_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P274223, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P35127, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_bottom__P274222(s) { +function tiles_getTileImage__P21705(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36851,48 +32781,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___35135 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_1 = Sprite_top__P274220_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 363; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 877; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; + s.scene___35135 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - s.tmp_3 = Sprite_height__P274215_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 364; s.pc = 2; return s.tmp_3; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.scene___35135.fields["tileMap"]; + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + r0 = pxsim.image.ofBuffer(_hex35145); + { step = 5; continue; } + case 3: + case 4: + s.tmp_5 = tiles_TileMap_getTileImage__P21694_mk(s); + r0 = s.scene___35135.fields["tileMap"]; + s.tmp_5.arg0 = r0; + s.tmp_6 = tiles_Location_tileSet__P21637_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 878; s.pc = 8; return s.tmp_6; + case 8: + r0 = s.retval; + s.tmp_5.arg1 = r0; + s.callLocIdx = 879; s.pc = 7; return s.tmp_5; + case 7: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + case 5: + return leave(s, r0) default: oops() } } } -Sprite_bottom__P274222.info = {"start":12052,"length":59,"line":435,"column":4,"endLine":437,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this"]} -Sprite_bottom__P274222.isGetter = true; +tiles_getTileImage__P21705.info = {"start":21871,"length":207,"line":673,"column":4,"endLine":677,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["loc"]} -function Sprite_bottom__P274222_mk(s) { +function tiles_getTileImage__P21705_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P274222, depth: s.depth + 1, + parent: s, fn: tiles_getTileImage__P21705, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + scene___35135: undefined, arg0: undefined, } } +const _hex35145 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") -function Sprite_right__P274219(s) { +function tiles_TileMap_getTileImage__P21694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36908,36 +32869,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P274217_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_width__P274214_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 357; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 358; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P21663_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 876; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_right__P274219.info = {"start":11367,"length":71,"line":410,"column":4,"endLine":412,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this","value"]} +tiles_TileMap_getTileImage__P21694.info = {"start":17510,"length":96,"line":553,"column":8,"endLine":555,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} -function Sprite_right__P274219_mk(s) { +function tiles_TileMap_getTileImage__P21694_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P274219, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileImage__P21694, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, arg1: undefined, } } @@ -36946,7 +32896,7 @@ function Sprite_right__P274219_mk(s) { -function Sprite_right__P274218(s) { +function tiles_Location_tileSet__P21637(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36961,35 +32911,34 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_1 = Sprite_left__P274216_mk(s); + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMap_getTileIndex__P21683_mk(s); + s.tmp_1 = tiles_Location_tileMap__P21628_mk(s); s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 355; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_width__P274214_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 356; s.pc = 2; return s.tmp_3; + s.callLocIdx = 807; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["_col"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["_row"]; + s.tmp_0.arg2 = r0; + s.callLocIdx = 808; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leaveAccessor(s, r0) default: oops() } } } -Sprite_right__P274218.info = {"start":11218,"length":57,"line":405,"column":4,"endLine":407,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this"]} -Sprite_right__P274218.isGetter = true; +tiles_Location_tileSet__P21637.info = {"start":2323,"length":101,"line":86,"column":8,"endLine":88,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"tileSet","argumentNames":["this"]} +tiles_Location_tileSet__P21637.isGetter = true; -function Sprite_right__P274218_mk(s) { +function tiles_Location_tileSet__P21637_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P274218, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileSet__P21637, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, } } @@ -36997,7 +32946,7 @@ function Sprite_right__P274218_mk(s) { -function ArcadePhysicsEngine_spriteCollisions__P276659(s) { +function tiles_TileMap_getTileIndex__P21683(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37007,18 +32956,6 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ms___289148 = undefined; - s.unnamed2136___U1 = undefined; - s.unnamed2137___U2 = undefined; - s.sprite___289150 = undefined; - s.overSprites___289157 = undefined; - s.overlapper___289165 = undefined; - s.unnamed2138___U6 = undefined; - s.unnamed2139___U7 = undefined; - s.thisKind___289171 = undefined; - s.otherKind___289175 = undefined; - s.higher___289188 = undefined; - s.lower___289197 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -37026,191 +32963,26 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = pxsim_Array__length(s.arg2); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 21; continue; } + if (!checkSubtype(r0, tiles_TileMap__C21670_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTile__P21660_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 831; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.ms___289148 = (undefined); - s.unnamed2136___U1 = (s.arg1); - s.unnamed2137___U2 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed2137___U2; - r0 = pxsim_Array__length(s.unnamed2136___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 20; continue; } - r0 = pxsim_Array__getAt(s.unnamed2136___U1, s.unnamed2137___U2); - s.ms___289148 = (r0); - r0 = s.ms___289148.fields["sprite"]; - s.sprite___289150 = (r0); - r0 = s.sprite___289150.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4610); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - { step = 19; continue; } - case 4: - case 5: - s.tmp_2 = sprites_SpriteMap_overlaps__P274266_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_2.arg0 = r0; - r0 = s.ms___289148.fields["sprite"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 611; s.pc = 22; return s.tmp_2; - case 22: - r0 = s.retval; - s.overSprites___289157 = (r0); - s.overlapper___289165 = (undefined); - s.unnamed2138___U6 = (s.overSprites___289157); - s.unnamed2139___U7 = (0); - case 6: - s.tmp_0 = r0 = s.unnamed2139___U7; - r0 = pxsim_Array__length(s.unnamed2138___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 18; continue; } - r0 = pxsim_Array__getAt(s.unnamed2138___U6, s.unnamed2139___U7); - s.overlapper___289165 = (r0); - r0 = s.overlapper___289165.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & 4610); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 7; continue; } - { step = 17; continue; } - case 7: - case 8: - r0 = s.sprite___289150.fields["_kind"]; - s.thisKind___289171 = (r0); - r0 = s.overlapper___289165.fields["_kind"]; - s.otherKind___289175 = (r0); - r0 = s.sprite___289150.fields["_kindsOverlappedWith"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___289175, undefined); - s.tmp_1 = r0; - r0 = (s.tmp_1 === -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - { step = 17; continue; } - case 9: - case 10: - r0 = s.sprite___289150.fields["id"]; - s.tmp_4 = r0; - r0 = s.overlapper___289165.fields["id"]; - s.tmp_5 = r0; - r0 = (s.tmp_4 > s.tmp_5); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 11; continue; } - r0 = s.sprite___289150; - { step = 12; continue; } - case 11: - r0 = s.overlapper___289165; - case 12: - // jmp value (already in r0) - s.tmp_6 = r0; - s.higher___289188 = (s.tmp_6); - r0 = (s.higher___289188 === s.sprite___289150); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = s.overlapper___289165; - { step = 14; continue; } - case 13: - r0 = s.sprite___289150; - case 14: - // jmp value (already in r0) - s.tmp_1 = r0; - s.lower___289197 = (s.tmp_1); - r0 = s.higher___289188.fields["_overlappers"]; - s.tmp_2 = r0; - r0 = s.lower___289197.fields["id"]; - s.tmp_3 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.tmp_3, undefined); - s.tmp_1 = r0; - r0 = (s.tmp_1 === -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P289217); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___289171); - r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___289175); - r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P289241); - s.tmp_5 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___289188); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___289197); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___289150); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___289165); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___289171); - s.tmp_6 = helpers_arrayForEach__P271925_mk(s); - s.tmp_7 = helpers_arrayFilter__P271926_mk(s); - s.tmp_7.arg0 = s.arg2; - s.tmp_7.arg1 = s.tmp_4; - s.callLocIdx = 614; s.pc = 24; return s.tmp_7; - case 24: - r0 = s.retval; - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = s.tmp_5; - s.callLocIdx = 616; s.pc = 23; return s.tmp_6; - case 23: r0 = s.retval; - case 15: - case 16: - case 17: - r0 = (s.unnamed2139___U7 + 1); - s.unnamed2139___U7 = (r0); - { step = 6; continue; } - case 18: - s.unnamed2138___U6 = (undefined); - case 19: - r0 = (s.unnamed2137___U2 + 1); - s.unnamed2137___U2 = (r0); - { step = 3; continue; } - case 20: - s.unnamed2136___U1 = (undefined); - case 21: - r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions__P276659.info = {"start":9744,"length":2268,"line":309,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"spriteCollisions","argumentNames":["this","movedSprites","handlers"]} +tiles_TileMap_getTileIndex__P21683.info = {"start":11191,"length":105,"line":384,"column":8,"endLine":386,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileIndex","argumentNames":["this","col","row"]} -function ArcadePhysicsEngine_spriteCollisions__P276659_mk(s) { +function tiles_TileMap_getTileIndex__P21683_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P276659, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileIndex__P21683, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - ms___289148: undefined, - unnamed2136___U1: undefined, - unnamed2137___U2: undefined, - sprite___289150: undefined, - overSprites___289157: undefined, - overlapper___289165: undefined, - unnamed2138___U6: undefined, - unnamed2139___U7: undefined, - thisKind___289171: undefined, - otherKind___289175: undefined, - higher___289188: undefined, - lower___289197: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -37220,7 +32992,7 @@ function ArcadePhysicsEngine_spriteCollisions__P276659_mk(s) { -function forEach_inline__P289217(s) { +function tiles_Location_tileMap__P21628(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37234,65 +33006,25 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 === s.caps[0]); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 798; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg0.fields["otherKind"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 === s.caps[1]); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBool(s.tmp_3); - if (!r0) { step = 3; continue; } - r0 = s.tmp_3; - { step = 6; continue; } - case 3: - r0 = s.arg0.fields["kind"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 === s.caps[1]); - s.tmp_4 = r0; - r0 = pxsim_numops_toBool(s.tmp_4); - if (r0) { step = 4; continue; } - r0 = s.tmp_4; - { step = 5; continue; } - case 4: - r0 = s.arg0.fields["otherKind"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 === s.caps[0]); - case 5: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = s.tmp_7; - case 6: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = s.tmp_8; - return leave(s, r0) + r0 = s.retval; + r0 = r0.fields["tileMap"]; + return leaveAccessor(s, r0) default: oops() } } } -forEach_inline__P289217.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +tiles_Location_tileMap__P21628.info = {"start":491,"length":73,"line":24,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"tileMap","argumentNames":["this"]} +tiles_Location_tileMap__P21628.isGetter = true; -function forEach_inline__P289217_mk(s) { +function tiles_Location_tileMap__P21628_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P289217, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileMap__P21628, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, arg0: undefined, } } @@ -37300,7 +33032,7 @@ function forEach_inline__P289217_mk(s) { -function ArcadePhysicsEngine_spriteCollisions_inline__P289241(s) { +function tiles_Location_row__P21630(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37314,33 +33046,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.caps[0].fields["_overlappers"]; - s.tmp_0 = r0; - r0 = s.caps[1].fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtcore_mkAction(6, ArcadePhysicsEngine_spriteCollisions_inline__P289251); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[2]); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.caps[3]); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.caps[4]); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.caps[0]); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.caps[1]); - r0 = pxsim.control.runInParallel(s.tmp_0); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + r0 = s.arg0.fields["_row"]; + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions_inline__P289241.info = {"start":11310,"length":652,"line":338,"column":33,"endLine":349,"endColumn":25,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +tiles_Location_row__P21630.info = {"start":877,"length":51,"line":38,"column":8,"endLine":40,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"row","argumentNames":["this"]} +tiles_Location_row__P21630.isGetter = true; -function ArcadePhysicsEngine_spriteCollisions_inline__P289241_mk(s) { +function tiles_Location_row__P21630_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P289241, depth: s.depth + 1, + parent: s, fn: tiles_Location_row__P21630, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -37348,7 +33067,7 @@ function ArcadePhysicsEngine_spriteCollisions_inline__P289241_mk(s) { -function ArcadePhysicsEngine_spriteCollisions_inline__P289251(s) { +function tiles_Location_column__P21629(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37358,99 +33077,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["flags"]; - s.tmp_4 = r0; - r0 = s.caps[1].fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_4 | s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 & 4610); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.caps[2].fields["kind"]; - s.tmp_7 = r0; - r0 = (s.caps[3] === s.tmp_7); - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - if (!r0) { step = 1; continue; } - r0 = s.caps[0]; - { step = 2; continue; } - case 1: - r0 = s.caps[1]; - case 2: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = s.caps[2].fields["kind"]; - s.tmp_10 = r0; - r0 = (s.caps[3] === s.tmp_10); - s.tmp_9 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_9); - if (!r0) { step = 3; continue; } - r0 = s.caps[1]; - { step = 4; continue; } - case 3: - r0 = s.caps[0]; - case 4: - // jmp value (already in r0) - s.tmp_11 = r0; - s.tmp_12 = if_handler_3_mk(s); - s.tmp_12.arg0 = s.caps[2]; - s.tmp_12.arg1 = s.tmp_8; - s.tmp_12.arg2 = s.tmp_11; - if (!s.tmp_12.arg0.vtable.iface) { - setupLambda(s.tmp_12, pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "handler"), 3); - s.callLocIdx = 615; s.pc = 7; return s.tmp_12; - } else { - s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["handler"]; - if (s.tmp_12.fn == null) { setupLambda(s.tmp_12, s.tmp_12.arg0.fields["handler"], 3); s.callLocIdx = 615; s.pc = 7; return s.tmp_12; } - else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 615; s.pc = 7; return s.tmp_12;; } - else { s.callLocIdx = 615; s.pc = 7; return s.tmp_12; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; } - case 7: - r0 = s.retval; - case 5: - case 6: - r0 = s.caps[4].fields["_overlappers"]; - s.tmp_0 = r0; - r0 = s.caps[5].fields["id"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + r0 = s.arg0.fields["_col"]; + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions_inline__P289251.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} +tiles_Location_column__P21629.info = {"start":695,"length":54,"line":31,"column":8,"endLine":33,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"column","argumentNames":["this"]} +tiles_Location_column__P21629.isGetter = true; -function ArcadePhysicsEngine_spriteCollisions_inline__P289251_mk(s) { +function tiles_Location_column__P21629_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P289251, depth: s.depth + 1, + parent: s, fn: tiles_Location_column__P21629, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, + arg0: undefined, } } -function sprites_SpriteMap_overlaps__P274266(s) { +function Sprite_registerObstacle__P21307(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37460,56 +33112,190 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___289285 = undefined; - s.o___289289 = undefined; + s.collisionHandlers___35288 = undefined; + s.wallCollisionHandlers___35296 = undefined; + s.wallHandlersToRun___35321 = undefined; + s.asTileLocation___35334 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_neighbors__P274265_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 488; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_obstacles"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.arg2); + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 415; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = r0.fields["collisionHandlers"]; + s.tmp_0 = r0; + s.tmp_3 = if_tileIndex_1_mk(s); + s.tmp_3.arg0 = s.arg2; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "tileIndex"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["tileIndex"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["tileIndex"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 416; s.pc = 10; return s.tmp_3; } + } + case 10: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_2); + s.collisionHandlers___35288 = (r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 417; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + r0 = r0.fields["wallCollisionHandlers"]; + s.wallCollisionHandlers___35296 = (r0); + r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___35288); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P35304); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P35310); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P20154_mk(s); + s.tmp_3 = helpers_arrayFilter__P20155_mk(s); + s.tmp_3.arg0 = s.collisionHandlers___35288; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 419; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 421; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; case 1: + case 2: + r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___35296); + if (!r0) { step = 7; continue; } + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + s.tmp_1 = game_currentScene__P21034_mk(s); + s.callLocIdx = 422; s.pc = 14; return s.tmp_1; + case 14: r0 = s.retval; - s.n___289285 = (r0); - r0 = pxsim_pxtcore_mkAction(1, o_inline__P289291); + r0 = r0.fields["tileMap"]; + case 4: + // jmp value (already in r0) + s.tmp_2 = r0; + s.arg3 = (s.tmp_2); + r0 = pxsim_pxtcore_mkAction(1, wallHandlersToRun_inline__P35323); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayFilter__P271926_mk(s); - s.tmp_1.arg0 = s.n___289285; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayFilter__P20155_mk(s); + s.tmp_1.arg0 = s.wallCollisionHandlers___35296; s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 490; s.pc = 2; return s.tmp_1; - case 2: + s.callLocIdx = 424; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.wallHandlersToRun___35321 = (r0); + r0 = pxsim_Array__length(s.wallHandlersToRun___35321); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_1 = tiles_TileMap_getTile__P21682_mk(s); + s.tmp_1.arg0 = s.arg3; + s.tmp_3 = if_left_1_mk(s); + s.tmp_3.arg0 = s.arg2; + if (!s.tmp_3.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "left"); + } else { + s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["left"]; + if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["left"]; } + else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } + else { s.callLocIdx = 425; s.pc = 17; return s.tmp_3; } + } + case 17: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.arg3.fields["_scale"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 >> s.tmp_4); + s.tmp_1.arg1 = r0; + s.tmp_6 = if_top_1_mk(s); + s.tmp_6.arg0 = s.arg2; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "top"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["top"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["top"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 427; s.pc = 18; return s.tmp_6; } + } + case 18: + r0 = s.retval; + s.tmp_5 = r0; + r0 = s.arg3.fields["_scale"]; + s.tmp_7 = r0; + r0 = (s.tmp_5 >> s.tmp_7); + s.tmp_1.arg2 = r0; + s.callLocIdx = 429; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + s.asTileLocation___35334 = (r0); + r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P35352); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___35334); + s.tmp_1 = helpers_arrayForEach__P20154_mk(s); + s.tmp_1.arg0 = s.wallHandlersToRun___35321; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 431; s.pc = 19; return s.tmp_1; + case 19: r0 = s.retval; - s.o___289289 = (r0); - r0 = s.o___289289; + case 5: + case 6: + case 7: + case 8: + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_overlaps__P274266.info = {"start":923,"length":189,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"overlaps","argumentNames":["this","sprite"]} +Sprite_registerObstacle__P21307.info = {"start":24992,"length":965,"line":817,"column":4,"endLine":837,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"registerObstacle","argumentNames":["this","direction","other","tm"]} -function sprites_SpriteMap_overlaps__P274266_mk(s) { +function Sprite_registerObstacle__P21307_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_overlaps__P274266, depth: s.depth + 1, + parent: s, fn: Sprite_registerObstacle__P21307, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - n___289285: undefined, - o___289289: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + collisionHandlers___35288: undefined, + wallCollisionHandlers___35296: undefined, + wallHandlersToRun___35321: undefined, + asTileLocation___35334: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function o_inline__P289291(s) { +function forEach_inline__P35304(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37523,23 +33309,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Sprite_overlapsWith__P274237_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 489; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0.fields["kind"]; + s.tmp_0 = r0; + r0 = s.caps[0].fields["_kind"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -o_inline__P289291.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} +forEach_inline__P35304.info = {"start":25390,"length":26,"line":824,"column":24,"endLine":824,"endColumn":50,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function o_inline__P289291_mk(s) { +function forEach_inline__P35304_mk(s) { checkStack(s.depth); return { - parent: s, fn: o_inline__P289291, depth: s.depth + 1, + parent: s, fn: forEach_inline__P35304, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -37547,7 +33333,7 @@ function o_inline__P289291_mk(s) { -function sprites_SpriteMap_neighbors__P274265(s) { +function Sprite_registerObstacle_inline__P35310(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37557,121 +33343,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___289556 = undefined; - s.layer___289558 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.n___289556 = (r0); - r0 = s.arg1.fields["layer"]; - s.layer___289558 = (r0); - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P276623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P274216_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 476; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P274220_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 477; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___289558; - s.tmp_0.arg4 = s.n___289556; - s.callLocIdx = 478; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P276623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P274216_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 479; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P274222_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 480; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___289558; - s.tmp_0.arg4 = s.n___289556; - s.callLocIdx = 481; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P276623_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P274218_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 482; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P274220_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 483; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___289558; - s.tmp_0.arg4 = s.n___289556; - s.callLocIdx = 484; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P276623_mk(s); + s.tmp_0 = if_handler_2_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P274218_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 485; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P274222_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 486; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___289558; - s.tmp_0.arg4 = s.n___289556; - s.callLocIdx = 487; s.pc = 10; return s.tmp_0; - case 10: + s.tmp_0.arg1 = s.caps[0]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 2); + s.callLocIdx = 420; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 2); s.callLocIdx = 420; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 420; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 420; s.pc = 1; return s.tmp_0; } + } + case 1: r0 = s.retval; - r0 = pxsim_Array_.removeElement(s.n___289556, s.arg1); - r0 = s.n___289556; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_neighbors__P274265.info = {"start":376,"length":442,"line":15,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"neighbors","argumentNames":["this","sprite"]} +Sprite_registerObstacle_inline__P35310.info = {"start":25443,"length":20,"line":825,"column":25,"endLine":825,"endColumn":45,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function sprites_SpriteMap_neighbors__P274265_mk(s) { +function Sprite_registerObstacle_inline__P35310_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_neighbors__P274265, depth: s.depth + 1, + parent: s, fn: Sprite_registerObstacle_inline__P35310, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - n___289556: undefined, - layer___289558: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_SpriteMap_mergeAtKey__P276623(s) { +function wallHandlersToRun_inline__P35323(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37681,107 +33390,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___289607 = undefined; - s.bucket___289612 = undefined; - s.sprite___289619 = undefined; - s.unnamed2132___U3 = undefined; - s.unnamed2133___U4 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P276621_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 514; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.k___289607 = (r0); - r0 = s.arg0.fields["buckets"]; + r0 = s.arg0.fields["spriteKind"]; s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___289607); - s.bucket___289612 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___289612); - if (!r0) { step = 7; continue; } - s.sprite___289619 = (undefined); - s.unnamed2132___U3 = (s.bucket___289612); - s.unnamed2133___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2133___U4; - r0 = pxsim_Array__length(s.unnamed2132___U3); + r0 = s.caps[0].fields["_kind"]; s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed2132___U3, s.unnamed2133___U4); - s.sprite___289619 = (r0); - r0 = s.sprite___289619.fields["layer"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 & s.arg3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 2; continue; } - r0 = s.tmp_2; - { step = 3; continue; } - case 2: - r0 = pxsim_Array_.indexOf(s.arg4, s.sprite___289619, undefined); - s.tmp_4 = r0; - r0 = (s.tmp_4 < 0); - case 3: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__push(s.arg4, s.sprite___289619); - case 4: - case 5: - r0 = (s.unnamed2133___U4 + 1); - s.unnamed2133___U4 = (r0); - { step = 1; continue; } - case 6: - s.unnamed2132___U3 = (undefined); - case 7: - case 8: - r0 = undefined; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -sprites_SpriteMap_mergeAtKey__P276623.info = {"start":3715,"length":384,"line":101,"column":8,"endLine":110,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"mergeAtKey","argumentNames":["this","x","y","layer","n"]} +wallHandlersToRun_inline__P35323.info = {"start":25649,"length":32,"line":830,"column":24,"endLine":830,"endColumn":56,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function sprites_SpriteMap_mergeAtKey__P276623_mk(s) { +function wallHandlersToRun_inline__P35323_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_mergeAtKey__P276623, depth: s.depth + 1, + parent: s, fn: wallHandlersToRun_inline__P35323, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - k___289607: undefined, - bucket___289612: undefined, - sprite___289619: undefined, - unnamed2132___U3: undefined, - unnamed2133___U4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function sprites_SpriteMap_key__P276621(s) { +function Sprite_registerObstacle_inline__P35352(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37791,71 +33428,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.xi___289640 = undefined; - s.yi___289652 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg0.fields["columnCount"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.arg1, s.tmp_1); - s.tmp_0.arg2 = r0; - s.callLocIdx = 502; s.pc = 1; return s.tmp_0; + s.tmp_0 = if_handler_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.tmp_0.arg2 = s.caps[1]; + if (!s.tmp_0.arg0.vtable.iface) { + setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 3); + s.callLocIdx = 430; s.pc = 1; return s.tmp_0; + } else { + s.tmp_0.fn = s.tmp_0.arg0.vtable.iface["handler"]; + if (s.tmp_0.fn == null) { setupLambda(s.tmp_0, s.tmp_0.arg0.fields["handler"], 3); s.callLocIdx = 430; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 430; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 430; s.pc = 1; return s.tmp_0; } + } case 1: r0 = s.retval; - s.xi___289640 = (r0); - s.tmp_0 = Math_clamp__P271943_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg0.fields["rowCount"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.arg2, s.tmp_1); - s.tmp_0.arg2 = r0; - s.callLocIdx = 503; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.yi___289652 = (r0); - s.tmp_0 = r0 = s.xi___289640; - r0 = s.arg0.fields["columnCount"]; - s.tmp_2 = r0; - r0 = (s.yi___289652 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_key__P276621.info = {"start":2592,"length":270,"line":76,"column":8,"endLine":80,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"key","argumentNames":["this","x","y"]} +Sprite_registerObstacle_inline__P35352.info = {"start":25889,"length":36,"line":834,"column":29,"endLine":834,"endColumn":65,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function sprites_SpriteMap_key__P276621_mk(s) { +function Sprite_registerObstacle_inline__P35352_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_key__P276621, depth: s.depth + 1, + parent: s, fn: Sprite_registerObstacle_inline__P35352, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - xi___289640: undefined, - yi___289652: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Sprite_overlapsWith__P274237(s) { +function Math_sign__P20175(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37865,418 +33476,109 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___289369 = undefined; - s.B___289370 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = (s.arg1 == s.arg0); + r0 = (s.arg0 == 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = false; - { step = 27; continue; } + r0 = 0; + { step = 5; continue; } case 1: case 2: - r0 = s.arg0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & 4610); + r0 = (s.arg0 > 0); s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = false; - { step = 27; continue; } + r0 = 1; + { step = 5; continue; } case 3: case 4: - r0 = s.arg1.fields["flags"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 & 4610); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 5; continue; } - r0 = false; - { step = 27; continue; } + r0 = -1; case 5: + return leave(s, r0) + default: oops() +} } } +Math_sign__P20175.info = {"start":16355,"length":125,"line":547,"column":4,"endLine":551,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"sign","argumentNames":["x"]} + +function Math_sign__P20175_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Math_sign__P20175, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function helpers_arraySome__P20152(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.len___35360 = undefined; + s.i___35363 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = pxsim_Array__length(s.arg0); + s.len___35360 = (r0); + s.i___35363 = (0); + case 1: + r0 = (s.i___35363 < s.len___35360); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_2 = lambda_3_mk(s); + s.tmp_2.argL = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.i___35363); + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.i___35363; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 5; s.pc = 6; return s.tmp_2; case 6: - r0 = s.arg0.fields["flags"]; - s.tmp_6 = r0; - r0 = (s.tmp_6 & 8192); - s.tmp_5 = r0; - r0 = pxsim_numops_toBool(s.tmp_5); - if (!r0) { step = 7; continue; } - r0 = s.tmp_5; - { step = 8; continue; } - case 7: - r0 = s.arg1.fields["flags"]; - s.tmp_7 = r0; - r0 = (s.tmp_7 & 8192); - case 8: - // jmp value (already in r0) - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 9; continue; } - s.tmp_9 = game_Hitbox_overlapsWith__P274040_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_9.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_9.arg1 = r0; - s.callLocIdx = 384; s.pc = 28; return s.tmp_9; - case 28: - r0 = s.retval; - { step = 27; continue; } - case 9: - case 10: - s.tmp_13 = game_Hitbox_overlapsWith__P274040_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_13.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_13.arg1 = r0; - s.callLocIdx = 385; s.pc = 29; return s.tmp_13; - case 29: - r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_12); - s.tmp_11 = r0; - r0 = pxsim_Boolean__bang(s.tmp_11); - s.tmp_10 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_10); - if (!r0) { step = 11; continue; } - r0 = false; - { step = 27; continue; } - case 11: - case 12: - s.tmp_17 = Sprite_isScaled__P276614_mk(s); - s.tmp_17.arg0 = s.arg0; - s.callLocIdx = 386; s.pc = 30; return s.tmp_17; - case 30: - r0 = s.retval; - s.tmp_16 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_16); - s.tmp_15 = r0; - r0 = pxsim_Boolean__bang(s.tmp_15); - s.tmp_14 = r0; - r0 = pxsim_numops_toBool(s.tmp_14); - if (r0) { step = 13; continue; } - r0 = s.tmp_14; - { step = 14; continue; } - case 13: - s.tmp_20 = Sprite_isScaled__P276614_mk(s); - s.tmp_20.arg0 = s.arg1; - s.callLocIdx = 387; s.pc = 31; return s.tmp_20; - case 31: - r0 = s.retval; - s.tmp_19 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_19); - s.tmp_18 = r0; - r0 = pxsim_Boolean__bang(s.tmp_18); - case 14: - // jmp value (already in r0) - s.tmp_21 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_21); - if (!r0) { step = 15; continue; } - r0 = s.arg1.fields["_image"]; - s.tmp_22 = r0; - r0 = s.arg0.fields["_image"]; - s.tmp_23 = r0; - s.tmp_26 = Sprite_left__P274216_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 388; s.pc = 32; return s.tmp_26; - case 32: - r0 = s.retval; - s.tmp_25 = r0; - s.tmp_28 = Sprite_left__P274216_mk(s); - s.tmp_28.arg0 = s.arg1; - s.callLocIdx = 389; s.pc = 33; return s.tmp_28; - case 33: - r0 = s.retval; - s.tmp_27 = r0; - r0 = (s.tmp_25 - s.tmp_27); - s.tmp_24 = r0; - s.tmp_31 = Sprite_top__P274220_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 390; s.pc = 34; return s.tmp_31; - case 34: - r0 = s.retval; - s.tmp_30 = r0; - s.tmp_33 = Sprite_top__P274220_mk(s); - s.tmp_33.arg0 = s.arg1; - s.callLocIdx = 391; s.pc = 35; return s.tmp_33; - case 35: - r0 = s.retval; - s.tmp_32 = r0; - r0 = (s.tmp_30 - s.tmp_32); - s.tmp_29 = r0; - r0 = pxsim_ImageMethods.overlapsWith(s.tmp_22, s.tmp_23, s.tmp_24, s.tmp_29); - { step = 27; continue; } - { step = 26; continue; } - case 15: - s.tmp_36 = Sprite_sx__P274187_mk(s); - s.tmp_36.arg0 = s.arg0; - s.callLocIdx = 392; s.pc = 36; return s.tmp_36; - case 36: - r0 = s.retval; - s.tmp_35 = r0; - r0 = (s.tmp_35 == 0); - s.tmp_34 = r0; - r0 = pxsim_numops_toBool(s.tmp_34); - if (!r0) { step = 16; continue; } - r0 = s.tmp_34; - { step = 17; continue; } - case 16: - s.tmp_38 = Sprite_sy__P274189_mk(s); - s.tmp_38.arg0 = s.arg0; - s.callLocIdx = 393; s.pc = 37; return s.tmp_38; - case 37: - r0 = s.retval; - s.tmp_37 = r0; - r0 = (s.tmp_37 == 0); - case 17: - // jmp value (already in r0) - s.tmp_39 = r0; - r0 = pxsim_numops_toBool(s.tmp_39); - if (!r0) { step = 18; continue; } - r0 = s.tmp_39; - { step = 19; continue; } - case 18: - s.tmp_41 = Sprite_sx__P274187_mk(s); - s.tmp_41.arg0 = s.arg1; - s.callLocIdx = 394; s.pc = 38; return s.tmp_41; - case 38: - r0 = s.retval; - s.tmp_40 = r0; - r0 = (s.tmp_40 == 0); - case 19: - // jmp value (already in r0) - s.tmp_42 = r0; - r0 = pxsim_numops_toBool(s.tmp_42); - if (!r0) { step = 20; continue; } - r0 = s.tmp_42; - { step = 21; continue; } - case 20: - s.tmp_44 = Sprite_sy__P274189_mk(s); - s.tmp_44.arg0 = s.arg1; - s.callLocIdx = 395; s.pc = 39; return s.tmp_44; - case 39: - r0 = s.retval; - s.tmp_43 = r0; - r0 = (s.tmp_43 == 0); - case 21: - // jmp value (already in r0) - s.tmp_45 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_45); - if (!r0) { step = 22; continue; } - r0 = false; - { step = 27; continue; } - case 22: - case 23: - s.tmp_49 = Sprite_sx__P274187_mk(s); - s.tmp_49.arg0 = s.arg0; - s.callLocIdx = 396; s.pc = 40; return s.tmp_49; - case 40: - r0 = s.retval; - s.tmp_48 = r0; - s.tmp_51 = Sprite_sy__P274189_mk(s); - s.tmp_51.arg0 = s.arg0; - s.callLocIdx = 397; s.pc = 41; return s.tmp_51; - case 41: - r0 = s.retval; - s.tmp_50 = r0; - r0 = (s.tmp_48 * s.tmp_50); - s.tmp_47 = r0; - s.tmp_54 = Sprite_sx__P274187_mk(s); - s.tmp_54.arg0 = s.arg1; - s.callLocIdx = 398; s.pc = 42; return s.tmp_54; - case 42: - r0 = s.retval; - s.tmp_53 = r0; - s.tmp_56 = Sprite_sy__P274189_mk(s); - s.tmp_56.arg0 = s.arg1; - s.callLocIdx = 399; s.pc = 43; return s.tmp_56; - case 43: - r0 = s.retval; - s.tmp_55 = r0; - r0 = (s.tmp_53 * s.tmp_55); - s.tmp_52 = r0; - r0 = (s.tmp_47 < s.tmp_52); - s.tmp_46 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_46); - if (!r0) { step = 24; continue; } - s.A___289369 = (s.arg0); - s.B___289370 = (s.arg1); - { step = 25; continue; } - case 24: - s.A___289369 = (s.arg1); - s.B___289370 = (s.arg0); - case 25: - s.tmp_0 = helpers_imageBlit__P273770_mk(s); - r0 = s.A___289369.fields["_image"]; - s.tmp_0.arg0 = r0; - s.tmp_3 = Sprite_left__P274216_mk(s); - s.tmp_3.arg0 = s.B___289370; - s.callLocIdx = 401; s.pc = 45; return s.tmp_3; - case 45: - r0 = s.retval; - s.tmp_2 = r0; - s.tmp_5 = Sprite_left__P274216_mk(s); - s.tmp_5.arg0 = s.A___289369; - s.callLocIdx = 402; s.pc = 46; return s.tmp_5; - case 46: r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); s.tmp_1 = r0; - s.tmp_7 = Sprite_sx__P274187_mk(s); - s.tmp_7.arg0 = s.A___289369; - s.callLocIdx = 403; s.pc = 47; return s.tmp_7; - case 47: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_1 / s.tmp_6); - s.tmp_0.arg1 = r0; - s.tmp_10 = Sprite_top__P274220_mk(s); - s.tmp_10.arg0 = s.B___289370; - s.callLocIdx = 404; s.pc = 48; return s.tmp_10; - case 48: - r0 = s.retval; - s.tmp_9 = r0; - s.tmp_12 = Sprite_top__P274220_mk(s); - s.tmp_12.arg0 = s.A___289369; - s.callLocIdx = 405; s.pc = 49; return s.tmp_12; - case 49: - r0 = s.retval; - s.tmp_11 = r0; - r0 = (s.tmp_9 - s.tmp_11); - s.tmp_8 = r0; - s.tmp_14 = Sprite_sy__P274189_mk(s); - s.tmp_14.arg0 = s.A___289369; - s.callLocIdx = 406; s.pc = 50; return s.tmp_14; - case 50: - r0 = s.retval; - s.tmp_13 = r0; - r0 = (s.tmp_8 / s.tmp_13); - s.tmp_0.arg2 = r0; - s.tmp_16 = Sprite_width__P274214_mk(s); - s.tmp_16.arg0 = s.B___289370; - s.callLocIdx = 407; s.pc = 51; return s.tmp_16; - case 51: - r0 = s.retval; - s.tmp_15 = r0; - s.tmp_18 = Sprite_sx__P274187_mk(s); - s.tmp_18.arg0 = s.A___289369; - s.callLocIdx = 408; s.pc = 52; return s.tmp_18; - case 52: - r0 = s.retval; - s.tmp_17 = r0; - r0 = (s.tmp_15 / s.tmp_17); - s.tmp_0.arg3 = r0; - s.tmp_20 = Sprite_height__P274215_mk(s); - s.tmp_20.arg0 = s.B___289370; - s.callLocIdx = 409; s.pc = 53; return s.tmp_20; - case 53: - r0 = s.retval; - s.tmp_19 = r0; - s.tmp_22 = Sprite_sy__P274189_mk(s); - s.tmp_22.arg0 = s.A___289369; - s.callLocIdx = 410; s.pc = 54; return s.tmp_22; - case 54: - r0 = s.retval; - s.tmp_21 = r0; - r0 = (s.tmp_19 / s.tmp_21); - s.tmp_0.arg4 = r0; - r0 = s.B___289370.fields["_image"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = 0; - s.tmp_0.arg7 = 0; - r0 = s.B___289370.fields["_image"]; - s.tmp_23 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_23); - s.tmp_0.arg8 = r0; - r0 = s.B___289370.fields["_image"]; - s.tmp_24 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_24); - s.tmp_0.arg9 = r0; - s.tmp_0.arg10 = true; - s.tmp_0.arg11 = true; - s.callLocIdx = 414; s.pc = 44; return s.tmp_0; - case 44: - r0 = s.retval; - { step = 27; continue; } - case 26: - r0 = undefined; - case 27: + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = true; + { step = 5; continue; } + case 2: + case 3: + r0 = (s.i___35363 + 1); + s.i___35363 = (r0); + { step = 1; continue; } + case 4: + r0 = false; + case 5: return leave(s, r0) default: oops() } } } -Sprite_overlapsWith__P274237.info = {"start":20623,"length":1735,"line":689,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +helpers_arraySome__P20152.info = {"start":6833,"length":296,"line":238,"column":4,"endLine":244,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arraySome","argumentNames":["arr","callbackfn"]} -function Sprite_overlapsWith__P274237_mk(s) { +function helpers_arraySome__P20152_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_overlapsWith__P274237, depth: s.depth + 1, + parent: s, fn: helpers_arraySome__P20152, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, - tmp_24: undefined, - tmp_25: undefined, - tmp_26: undefined, - tmp_27: undefined, - tmp_28: undefined, - tmp_29: undefined, - tmp_30: undefined, - tmp_31: undefined, - tmp_32: undefined, - tmp_33: undefined, - tmp_34: undefined, - tmp_35: undefined, - tmp_36: undefined, - tmp_37: undefined, - tmp_38: undefined, - tmp_39: undefined, - tmp_40: undefined, - tmp_41: undefined, - tmp_42: undefined, - tmp_43: undefined, - tmp_44: undefined, - tmp_45: undefined, - tmp_46: undefined, - tmp_47: undefined, - tmp_48: undefined, - tmp_49: undefined, - tmp_50: undefined, - tmp_51: undefined, - tmp_52: undefined, - tmp_53: undefined, - tmp_54: undefined, - tmp_55: undefined, - tmp_56: undefined, - A___289369: undefined, - B___289370: undefined, + len___35360: undefined, + i___35363: undefined, arg0: undefined, arg1: undefined, } } @@ -38285,7 +33587,7 @@ function Sprite_overlapsWith__P274237_mk(s) { -function Sprite_isScaled__P276614(s) { +function MovingSprite_constructor__P21434(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38297,48 +33599,50 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== 256); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["_sy"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 !== 256); - case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); + s.arg7 = (s.lambdaArgs[7]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, MovingSprite__C21433_VT)) failedCast(r0); + r0 = (s.arg0).fields["sprite"] = (s.arg1); + r0 = (s.arg0).fields["cachedVx"] = (s.arg2); + r0 = (s.arg0).fields["cachedVy"] = (s.arg3); + r0 = (s.arg0).fields["dx"] = (s.arg4); + r0 = (s.arg0).fields["dy"] = (s.arg5); + r0 = (s.arg0).fields["xStep"] = (s.arg6); + r0 = (s.arg0).fields["yStep"] = (s.arg7); + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_isScaled__P276614.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} +MovingSprite_constructor__P21434.info = {"start":949,"length":313,"line":33,"column":4,"endLine":44,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this","sprite","cachedVx","cachedVy","dx","dy","xStep","yStep"]} -function Sprite_isScaled__P276614_mk(s) { +function MovingSprite_constructor__P21434_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isScaled__P276614, depth: s.depth + 1, + parent: s, fn: MovingSprite_constructor__P21434, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, } } -function game_Hitbox_overlapsWith__P274040(s) { +function ArcadePhysicsEngine_move__P21447(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38348,226 +33652,546 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.dtMs___35439 = undefined; + s.dt2___35445 = undefined; + s.scene___35449 = undefined; + s.tileMap___35452 = undefined; + s.movingSprites___35455 = undefined; + s.MAX_STEP_COUNT___35487 = undefined; + s.overlapHandlers___35499 = undefined; + s.selected___35506 = undefined; + s.buffers___35507 = undefined; + s.count___35511 = undefined; + s.currMovers___35521 = undefined; + s.remainingMovers___35528 = undefined; + s.ms___35533 = undefined; + s.unnamed166___U13 = undefined; + s.unnamed167___U14 = undefined; + s.s___35535 = undefined; + s.stepX___35628 = undefined; + s.stepY___35642 = undefined; + s.bounce___35705 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - s.tmp_0 = game_Hitbox_updateIfInvalid__P274039_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 250; s.pc = 18; return s.tmp_0; - case 18: + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = Math_min__P20177_mk(s); + s.tmp_0.arg0 = 100; + r0 = (s.arg1 * 1000); + s.tmp_0.arg1 = r0; + s.callLocIdx = 540; s.pc = 53; return s.tmp_0; + case 53: r0 = s.retval; - s.tmp_0 = game_Hitbox_updateIfInvalid__P274039_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 251; s.pc = 19; return s.tmp_0; - case 19: + s.dtMs___35439 = (r0); + r0 = pxsim.Math_.idiv(s.dtMs___35439, 2); + s.dt2___35445 = (r0); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 541; s.pc = 54; return s.tmp_0; + case 54: r0 = s.retval; - s.tmp_1 = game_Hitbox_contains__P274038_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = game_Hitbox_left__P274033_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 252; s.pc = 21; return s.tmp_2; - case 21: + s.scene___35449 = (r0); + r0 = s.scene___35449.fields["tileMap"]; + s.tileMap___35452 = (r0); + r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P35457); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___35439); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___35445); + s.tmp_1 = helpers_arrayMap__P20151_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 543; s.pc = 55; return s.tmp_1; + case 55: r0 = s.retval; - s.tmp_1.arg1 = r0; - s.tmp_3 = game_Hitbox_top__P274034_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 253; s.pc = 22; return s.tmp_3; - case 22: + s.movingSprites___35455 = (r0); + s.tmp_0 = helpers_arrayForEach__P20154_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P35470; + s.callLocIdx = 547; s.pc = 56; return s.tmp_0; + case 56: r0 = s.retval; - s.tmp_1.arg2 = r0; - s.callLocIdx = 254; s.pc = 20; return s.tmp_1; - case 20: + s.tmp_0 = sprites_SpriteMap_clear__P21336_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 548; s.pc = 57; return s.tmp_0; + case 57: r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_resizeBuckets__P21335_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 549; s.pc = 58; return s.tmp_0; + case 58: + r0 = s.retval; + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_3 = r0; + r0 = s.arg0.fields["minSingleStep"]; + s.tmp_4 = r0; + r0 = (s.tmp_3 << 8); + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_5, s.tmp_4); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.dtMs___35439); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = true; - { step = 17; continue; } + r0 = (s.tmp_0 + 128); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 8); + s.MAX_STEP_COUNT___35487 = (r0); + s.tmp_0 = helpers_arraySlice__P20160_mk(s); + r0 = s.scene___35449.fields["overlapHandlers"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 554; s.pc = 59; return s.tmp_0; + case 59: + r0 = s.retval; + s.overlapHandlers___35499 = (r0); + s.selected___35506 = (0); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___35455); + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.buffers___35507 = (s.tmp_0); + s.count___35511 = (0); case 1: + r0 = (s.count___35511 < s.MAX_STEP_COUNT___35487); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 2; continue; } + r0 = s.tmp_0; + { step = 3; continue; } case 2: - s.tmp_5 = game_Hitbox_contains__P274038_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_6 = game_Hitbox_left__P274033_mk(s); - s.tmp_6.arg0 = s.arg1; - s.callLocIdx = 255; s.pc = 24; return s.tmp_6; - case 24: - r0 = s.retval; - s.tmp_5.arg1 = r0; - s.tmp_7 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_7.arg0 = s.arg1; - s.callLocIdx = 256; s.pc = 25; return s.tmp_7; - case 25: - r0 = s.retval; - s.tmp_5.arg2 = r0; - s.callLocIdx = 257; s.pc = 23; return s.tmp_5; - case 23: - r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 17; continue; } + r0 = pxsim_Array__getAt(s.buffers___35507, s.selected___35506); + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 0); case 3: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 52; continue; } + r0 = pxsim_Array__getAt(s.buffers___35507, s.selected___35506); + s.currMovers___35521 = (r0); + r0 = (s.selected___35506 ^ 1); + s.selected___35506 = (r0); + r0 = pxsim_Array__getAt(s.buffers___35507, s.selected___35506); + s.remainingMovers___35528 = (r0); + s.ms___35533 = (undefined); + s.unnamed166___U13 = (s.currMovers___35521); + s.unnamed167___U14 = (0); case 4: - s.tmp_9 = game_Hitbox_contains__P274038_mk(s); - s.tmp_9.arg0 = s.arg0; - s.tmp_10 = game_Hitbox_right__P274035_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 258; s.pc = 27; return s.tmp_10; - case 27: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.tmp_11 = game_Hitbox_top__P274034_mk(s); - s.tmp_11.arg0 = s.arg1; - s.callLocIdx = 259; s.pc = 28; return s.tmp_11; - case 28: - r0 = s.retval; - s.tmp_9.arg2 = r0; - s.callLocIdx = 260; s.pc = 26; return s.tmp_9; - case 26: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); + s.tmp_0 = r0 = s.unnamed167___U14; + r0 = pxsim_Array__length(s.unnamed166___U13); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 49; continue; } + r0 = pxsim_Array__getAt(s.unnamed166___U13, s.unnamed167___U14); + s.ms___35533 = (r0); + r0 = s.ms___35533.fields["sprite"]; + s.s___35535 = (r0); + r0 = s.ms___35533.fields["cachedVx"]; + s.tmp_1 = r0; + r0 = s.s___35535.fields["_vx"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 !== s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = s.s___35535.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 5; continue; } - r0 = true; - { step = 17; continue; } + r0 = (s.ms___35533).fields["dx"] = (0); + { step = 14; continue; } case 5: + r0 = s.s___35535.fields["_vx"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } case 6: - s.tmp_13 = game_Hitbox_contains__P274038_mk(s); - s.tmp_13.arg0 = s.arg0; - s.tmp_14 = game_Hitbox_right__P274035_mk(s); - s.tmp_14.arg0 = s.arg1; - s.callLocIdx = 261; s.pc = 30; return s.tmp_14; - case 30: + r0 = s.ms___35533.fields["cachedVx"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); + case 7: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 8; continue; } + r0 = s.tmp_3; + { step = 11; continue; } + case 8: + r0 = s.s___35535.fields["_vx"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 > 0); + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 9; continue; } + r0 = s.tmp_4; + { step = 10; continue; } + case 9: + r0 = s.ms___35533.fields["cachedVx"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 < 0); + case 10: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 11: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 12; continue; } + s.tmp_9 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["dx"]; + s.tmp_11 = r0; + r0 = (0 - s.tmp_11); + s.tmp_10 = r0; + r0 = (s.tmp_9).fields["dx"] = (s.tmp_10); + s.tmp_0 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["xStep"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["xStep"] = (s.tmp_1); + case 12: + case 13: + case 14: + r0 = s.s___35535.fields["_vx"]; + s.tmp_0 = r0; + r0 = (s.ms___35533).fields["cachedVx"] = (s.tmp_0); + case 15: + case 16: + r0 = s.ms___35533.fields["cachedVy"]; + s.tmp_1 = r0; + r0 = s.s___35535.fields["_vy"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 !== s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 27; continue; } + r0 = s.s___35535.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == 0); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 17; continue; } + r0 = (s.ms___35533).fields["dy"] = (0); + { step = 26; continue; } + case 17: + r0 = s.s___35535.fields["_vy"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 18; continue; } + r0 = s.tmp_0; + { step = 19; continue; } + case 18: + r0 = s.ms___35533.fields["cachedVy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); + case 19: + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (!r0) { step = 20; continue; } + r0 = s.tmp_3; + { step = 23; continue; } + case 20: + r0 = s.s___35535.fields["_vy"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 > 0); + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 21; continue; } + r0 = s.tmp_4; + { step = 22; continue; } + case 21: + r0 = s.ms___35533.fields["cachedVy"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 < 0); + case 22: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 23: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 24; continue; } + s.tmp_9 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["dy"]; + s.tmp_11 = r0; + r0 = (0 - s.tmp_11); + s.tmp_10 = r0; + r0 = (s.tmp_9).fields["dy"] = (s.tmp_10); + s.tmp_0 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["yStep"]; + s.tmp_2 = r0; + r0 = (0 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["yStep"] = (s.tmp_1); + case 24: + case 25: + case 26: + r0 = s.s___35535.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.ms___35533).fields["cachedVy"] = (s.tmp_0); + case 27: + case 28: + s.tmp_2 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["xStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 559; s.pc = 60; return s.tmp_2; + case 60: r0 = s.retval; - s.tmp_13.arg1 = r0; - s.tmp_15 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_15.arg0 = s.arg1; - s.callLocIdx = 262; s.pc = 31; return s.tmp_15; - case 31: + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["dx"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 560; s.pc = 61; return s.tmp_4; + case 61: r0 = s.retval; - s.tmp_13.arg2 = r0; - s.callLocIdx = 263; s.pc = 29; return s.tmp_13; + s.tmp_3 = r0; + r0 = (s.tmp_1 > s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 29; continue; } + r0 = s.ms___35533.fields["dx"]; + { step = 30; continue; } case 29: + r0 = s.ms___35533.fields["xStep"]; + case 30: + // jmp value (already in r0) + s.tmp_5 = r0; + s.stepX___35628 = (s.tmp_5); + s.tmp_2 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["yStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 561; s.pc = 62; return s.tmp_2; + case 62: r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_12); - if (!r0) { step = 7; continue; } - r0 = true; - { step = 17; continue; } - case 7: - case 8: - s.tmp_17 = game_Hitbox_contains__P274038_mk(s); - s.tmp_17.arg0 = s.arg1; - s.tmp_18 = game_Hitbox_left__P274033_mk(s); - s.tmp_18.arg0 = s.arg0; - s.callLocIdx = 264; s.pc = 33; return s.tmp_18; - case 33: - r0 = s.retval; - s.tmp_17.arg1 = r0; - s.tmp_19 = game_Hitbox_top__P274034_mk(s); - s.tmp_19.arg0 = s.arg0; - s.callLocIdx = 265; s.pc = 34; return s.tmp_19; - case 34: + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 562; s.pc = 63; return s.tmp_4; + case 63: r0 = s.retval; - s.tmp_17.arg2 = r0; - s.callLocIdx = 266; s.pc = 32; return s.tmp_17; + s.tmp_3 = r0; + r0 = (s.tmp_1 > s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 31; continue; } + r0 = s.ms___35533.fields["dy"]; + { step = 32; continue; } + case 31: + r0 = s.ms___35533.fields["yStep"]; case 32: + // jmp value (already in r0) + s.tmp_5 = r0; + s.stepY___35642 = (s.tmp_5); + s.tmp_0 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["dx"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.stepX___35628); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); + s.tmp_0 = r0 = s.ms___35533; + r0 = s.ms___35533.fields["dy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.stepY___35642); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); + r0 = s.s___35535.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.s___35535).fields["_lastX"] = (s.tmp_0); + r0 = s.s___35535.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.s___35535).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = r0 = s.s___35535; + r0 = s.s___35535.fields["_x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepX___35628); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.s___35535; + r0 = s.s___35535.fields["_y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepY___35642); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.s___35535.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 4610); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 33; continue; } + s.tmp_4 = sprites_SpriteMap_insertAABB__P21339_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.s___35535; + s.callLocIdx = 567; s.pc = 64; return s.tmp_4; + case 64: r0 = s.retval; - s.tmp_16 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_16); - if (!r0) { step = 9; continue; } - r0 = true; - { step = 17; continue; } - case 9: - case 10: - s.tmp_21 = game_Hitbox_contains__P274038_mk(s); - s.tmp_21.arg0 = s.arg1; - s.tmp_22 = game_Hitbox_left__P274033_mk(s); - s.tmp_22.arg0 = s.arg0; - s.callLocIdx = 267; s.pc = 36; return s.tmp_22; + case 33: + case 34: + s.tmp_0 = r0 = s.tileMap___35452; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 35; continue; } + r0 = s.tmp_0; + { step = 36; continue; } + case 35: + r0 = s.tileMap___35452.fields["_map"]; + s.tmp_4 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); case 36: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 37; continue; } + s.tmp_6 = ArcadePhysicsEngine_tilemapCollisions__P21451_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___35533; + s.tmp_6.arg2 = s.tileMap___35452; + s.callLocIdx = 569; s.pc = 65; return s.tmp_6; + case 65: r0 = s.retval; - s.tmp_21.arg1 = r0; - s.tmp_23 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_23.arg0 = s.arg0; - s.callLocIdx = 268; s.pc = 37; return s.tmp_23; case 37: - r0 = s.retval; - s.tmp_21.arg2 = r0; - s.callLocIdx = 269; s.pc = 35; return s.tmp_21; - case 35: - r0 = s.retval; - s.tmp_20 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_20); - if (!r0) { step = 11; continue; } - r0 = true; - { step = 17; continue; } - case 11: - case 12: - s.tmp_25 = game_Hitbox_contains__P274038_mk(s); - s.tmp_25.arg0 = s.arg1; - s.tmp_26 = game_Hitbox_right__P274035_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 270; s.pc = 39; return s.tmp_26; + case 38: + r0 = s.s___35535.fields["flags"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & 32); + s.bounce___35705 = (r0); + r0 = s.s___35535.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 8); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 39; continue; } + r0 = s.tmp_0; + { step = 42; continue; } case 39: - r0 = s.retval; - s.tmp_25.arg1 = r0; - s.tmp_27 = game_Hitbox_top__P274034_mk(s); - s.tmp_27.arg0 = s.arg0; - s.callLocIdx = 271; s.pc = 40; return s.tmp_27; + s.tmp_2 = r0 = s.bounce___35705; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 40; continue; } + r0 = s.tmp_2; + { step = 41; continue; } case 40: - r0 = s.retval; - s.tmp_25.arg2 = r0; - s.callLocIdx = 272; s.pc = 38; return s.tmp_25; - case 38: - r0 = s.retval; - s.tmp_24 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_24); - if (!r0) { step = 13; continue; } - r0 = true; - { step = 17; continue; } - case 13: - case 14: - s.tmp_29 = game_Hitbox_contains__P274038_mk(s); - s.tmp_29.arg0 = s.arg1; - s.tmp_30 = game_Hitbox_right__P274035_mk(s); - s.tmp_30.arg0 = s.arg0; - s.callLocIdx = 273; s.pc = 42; return s.tmp_30; + r0 = pxsim_numops_toBoolDecr(s.tileMap___35452); + s.tmp_3 = r0; + r0 = pxsim_Boolean__bang(s.tmp_3); + case 41: + // jmp value (already in r0) + s.tmp_4 = r0; + r0 = s.tmp_4; case 42: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 43; continue; } + s.tmp_6 = ArcadePhysicsEngine_screenEdgeCollisions__P21450_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___35533; + s.tmp_6.arg2 = s.bounce___35705; + r0 = s.scene___35449.fields["camera"]; + s.tmp_6.arg3 = r0; + s.callLocIdx = 570; s.pc = 66; return s.tmp_6; + case 66: r0 = s.retval; - s.tmp_29.arg1 = r0; - s.tmp_31 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 274; s.pc = 43; return s.tmp_31; case 43: + case 44: + s.tmp_2 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["dx"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 571; s.pc = 67; return s.tmp_2; + case 67: r0 = s.retval; - s.tmp_29.arg2 = r0; - s.callLocIdx = 275; s.pc = 41; return s.tmp_29; - case 41: + s.tmp_1 = r0; + r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___21397); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 45; continue; } + r0 = s.tmp_0; + { step = 46; continue; } + case 45: + s.tmp_4 = Fx_abs__P20220_mk(s); + r0 = s.ms___35533.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 572; s.pc = 68; return s.tmp_4; + case 68: r0 = s.retval; - s.tmp_28 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_28); - if (!r0) { step = 15; continue; } - r0 = true; - { step = 17; continue; } - case 15: - case 16: - r0 = false; - case 17: + s.tmp_3 = r0; + r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___21397); + case 46: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 47; continue; } + r0 = pxsim_Array__push(s.remainingMovers___35528, s.ms___35533); + case 47: + case 48: + r0 = (s.unnamed167___U14 + 1); + s.unnamed167___U14 = (r0); + { step = 4; continue; } + case 49: + s.unnamed166___U13 = (undefined); + s.tmp_0 = ArcadePhysicsEngine_spriteCollisions__P21449_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.currMovers___35521; + s.tmp_0.arg2 = s.overlapHandlers___35499; + s.callLocIdx = 573; s.pc = 69; return s.tmp_0; + case 69: + r0 = s.retval; + case 50: + r0 = pxsim_Array__length(s.currMovers___35521); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 51; continue; } + r0 = pxsim_Array_.pop(s.currMovers___35521); + { step = 50; continue; } + case 51: + r0 = (s.count___35511 + 1); + s.count___35511 = (r0); + { step = 1; continue; } + case 52: + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_overlapsWith__P274040.info = {"start":2515,"length":695,"line":87,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +ArcadePhysicsEngine_move__P21447.info = {"start":2822,"length":4105,"line":112,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} -function game_Hitbox_overlapsWith__P274040_mk(s) { +function ArcadePhysicsEngine_move__P21447_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_overlapsWith__P274040, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_move__P21447, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38581,26 +34205,25 @@ function game_Hitbox_overlapsWith__P274040_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, - tmp_24: undefined, - tmp_25: undefined, - tmp_26: undefined, - tmp_27: undefined, - tmp_28: undefined, - tmp_29: undefined, - tmp_30: undefined, - tmp_31: undefined, + dtMs___35439: undefined, + dt2___35445: undefined, + scene___35449: undefined, + tileMap___35452: undefined, + movingSprites___35455: undefined, + MAX_STEP_COUNT___35487: undefined, + overlapHandlers___35499: undefined, + selected___35506: undefined, + buffers___35507: undefined, + count___35511: undefined, + currMovers___35521: undefined, + remainingMovers___35528: undefined, + ms___35533: undefined, + unnamed166___U13: undefined, + unnamed167___U14: undefined, + s___35535: undefined, + stepX___35628: undefined, + stepY___35642: undefined, + bounce___35705: undefined, arg0: undefined, arg1: undefined, } } @@ -38609,7 +34232,7 @@ function game_Hitbox_overlapsWith__P274040_mk(s) { -function game_Hitbox_contains__P274038(s) { +function movingSprites_inline__P35457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38621,106 +34244,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C274025_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = game_Hitbox_left__P274033_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 230; s.pc = 7; return s.tmp_3; - case 7: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 >= s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + s.tmp_0 = ArcadePhysicsEngine_createMovingSprite__P21448_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.caps[1]; + s.tmp_0.arg3 = s.caps[2]; + s.callLocIdx = 542; s.pc = 1; return s.tmp_0; case 1: - s.tmp_4 = r0 = s.arg1; - s.tmp_6 = game_Hitbox_right__P274035_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 231; s.pc = 8; return s.tmp_6; - case 8: - r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 <= s.tmp_5); - case 2: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBool(s.tmp_7); - if (r0) { step = 3; continue; } - r0 = s.tmp_7; - { step = 4; continue; } - case 3: - s.tmp_8 = r0 = s.arg2; - s.tmp_10 = game_Hitbox_top__P274034_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 232; s.pc = 9; return s.tmp_10; - case 9: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_8 >= s.tmp_9); - case 4: - // jmp value (already in r0) - s.tmp_11 = r0; - r0 = pxsim_numops_toBool(s.tmp_11); - if (r0) { step = 5; continue; } - r0 = s.tmp_11; - { step = 6; continue; } - case 5: - s.tmp_12 = r0 = s.arg2; - s.tmp_14 = game_Hitbox_bottom__P274036_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 233; s.pc = 10; return s.tmp_14; - case 10: r0 = s.retval; - s.tmp_13 = r0; - r0 = (s.tmp_12 <= s.tmp_13); - case 6: - // jmp value (already in r0) - s.tmp_15 = r0; - r0 = s.tmp_15; return leave(s, r0) default: oops() } } } -game_Hitbox_contains__P274038.info = {"start":1034,"length":144,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"contains","argumentNames":["this","x","y"]} +movingSprites_inline__P35457.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} -function game_Hitbox_contains__P274038_mk(s) { +function movingSprites_inline__P35457_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_contains__P274038, depth: s.depth + 1, + parent: s, fn: movingSprites_inline__P35457, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_imageBlit__P273770(s) { +function ArcadePhysicsEngine_move_inline__P35470(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38732,114 +34284,60 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); - s.arg5 = (s.lambdaArgs[5]); - s.arg6 = (s.lambdaArgs[6]); - s.arg7 = (s.lambdaArgs[7]); - s.arg8 = (s.lambdaArgs[8]); - s.arg9 = (s.lambdaArgs[9]); - s.arg10 = (s.lambdaArgs[10]); - s.arg11 = (s.lambdaArgs[11]); s.lambdaArgs = null; } - s.tmp_0 = r0 = globals._blitArgs___276443; + s.tmp_1 = Sprite_vx__P21248_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 544; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array__mk(); + s.tmp_2 = Sprite_vy__P21250_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 545; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; case 2: // jmp value (already in r0) - s.tmp_1 = r0; - globals._blitArgs___276443 = (s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg1 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 0, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg2 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 1, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg3 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 2, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg4 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 3, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg6 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 4, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg7 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 5, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg8 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 6, s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___276443; - r0 = (s.arg9 | 0); - s.tmp_1 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, 7, s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.arg10); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = 1; - { step = 4; continue; } + s.tmp_4 = Sprite_clearObstacles__P21306_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 546; s.pc = 7; return s.tmp_4; + case 7: + r0 = s.retval; case 3: - r0 = 0; case 4: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___276443, 8, s.tmp_0); - r0 = pxsim_numops_toBoolDecr(s.arg11); - if (!r0) { step = 5; continue; } - r0 = 1; - { step = 6; continue; } - case 5: - r0 = 0; - case 6: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___276443, 9, s.tmp_0); - r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___276443); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageBlit__P273770.info = {"start":4459,"length":642,"line":154,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageBlit","argumentNames":["img","xDst","yDst","wDst","hDst","src","xSrc","ySrc","wSrc","hSrc","transparent","check"]} +ArcadePhysicsEngine_move_inline__P35470.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} -function helpers_imageBlit__P273770_mk(s) { +function ArcadePhysicsEngine_move_inline__P35470_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageBlit__P273770, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_move_inline__P35470, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, - arg7: undefined, - arg8: undefined, - arg9: undefined, - arg10: undefined, - arg11: undefined, } } -function ArcadePhysicsEngine_createMovingSprite__P276658(s) { +function ArcadePhysicsEngine_screenEdgeCollisions__P21450(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38849,16 +34347,8 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ovx___289995 = undefined; - s.ovy___290000 = undefined; - s.fx___290027 = undefined; - s.c___290034 = undefined; - s.fy___290077 = undefined; - s.c___290084 = undefined; - s.dx___290123 = undefined; - s.dy___290136 = undefined; - s.xStep___290149 = undefined; - s.yStep___290151 = undefined; + s.s___36291 = undefined; + s.offset___36306 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -38867,317 +34357,365 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P276664_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 574; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.ovx___289995 = (r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P276664_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 575; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - s.ovy___290000 = (r0); - r0 = s.arg1.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.arg1).fields["_lastX"] = (s.tmp_0); - r0 = s.arg1.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.arg1).fields["_lastY"] = (s.tmp_0); - r0 = s.arg1.fields["_ax"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_vx"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___36291 = (r0); + r0 = s.s___36291.fields["_image"]; s.tmp_3 = r0; - r0 = s.arg1.fields["_ax"]; - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); - s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(s.tmp_5, 1000); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); - { step = 8; continue; } - case 1: - r0 = s.arg1.fields["_fx"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg1.fields["_fx"]; + r0 = pxsim_ImageMethods.isStatic(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 1000); - s.fx___290027 = (r0); - r0 = s.arg1.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fx___290027); - s.c___290034 = (r0); - r0 = (s.c___290034 < 0); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Fx_min__P271982_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fx___290027); - s.tmp_3.arg1 = r0; - s.callLocIdx = 583; s.pc = 27; return s.tmp_3; - case 27: + if (!r0) { step = 1; continue; } + s.tmp_4 = Sprite__C21242_v4_1_mk(s); + s.tmp_4.arg0 = s.s___36291; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C21242_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4.fn = s.tmp_4.arg0.vtable.methods.setHitbox; + s.pc = 21; return s.tmp_4; + case 21: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); - { step = 5; continue; } + case 1: case 2: - r0 = (s.c___290034 > 0); + s.tmp_3 = scene_Camera_isUpdated__P21729_mk(s); + s.tmp_3.arg0 = s.arg3; + s.callLocIdx = 618; s.pc = 22; return s.tmp_3; + case 22: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Fx_max__P271983_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fx___290027); - s.tmp_3.arg1 = r0; - s.callLocIdx = 585; s.pc = 28; return s.tmp_3; - case 28: + s.tmp_4 = scene_Camera_update__P21730_mk(s); + s.tmp_4.arg0 = s.arg3; + s.callLocIdx = 619; s.pc = 23; return s.tmp_4; + case 23: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); - { step = 4; continue; } case 3: - r0 = (s.arg1).fields["_vx"] = (0); case 4: - case 5: - case 6: - case 7: - case 8: - r0 = s.arg1.fields["_ay"]; + s.tmp_2 = game_Hitbox_left__P21177_mk(s); + r0 = s.s___36291.fields["_hitbox"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 620; s.pc = 24; return s.tmp_2; + case 24: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 / 256); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_1 = r0 = s.arg1; - r0 = s.arg1.fields["_vy"]; + r0 = s.arg3.fields["_offsetX"]; s.tmp_3 = r0; - r0 = s.arg1.fields["_ay"]; - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); - s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(s.tmp_5, 1000); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); - { step = 16; continue; } - case 9: - r0 = s.arg1.fields["_fy"]; + r0 = (s.tmp_0 - s.tmp_3); + s.offset___36306 = (r0); + r0 = (s.offset___36306 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = s.arg1.fields["_fy"]; - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); + if (!r0) { step = 7; continue; } + s.tmp_1 = Sprite_left__P21281_mk(s); + s.tmp_2 = r0 = s.s___36291; + s.tmp_1.arg0 = r0; + s.tmp_4 = Sprite_left__P21280_mk(s); + s.tmp_4.arg0 = s.tmp_2; + s.callLocIdx = 623; s.pc = 26; return s.tmp_4; + case 26: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 - s.offset___36306); + s.tmp_1.arg1 = r0; + s.callLocIdx = 624; s.pc = 25; return s.tmp_1; + case 25: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 5; continue; } + s.tmp_0 = Sprite_vx__P21249_mk(s); + s.tmp_0.arg0 = s.s___36291; + s.tmp_2 = Sprite_vx__P21248_mk(s); + s.tmp_2.arg0 = s.s___36291; + s.callLocIdx = 625; s.pc = 28; return s.tmp_2; + case 28: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 1000); - s.fy___290077 = (r0); - r0 = s.arg1.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fy___290077); - s.c___290084 = (r0); - r0 = (s.c___290084 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 10; continue; } - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Fx_min__P271982_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fy___290077); - s.tmp_3.arg1 = r0; - s.callLocIdx = 593; s.pc = 29; return s.tmp_3; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 626; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + case 5: + case 6: + { step = 12; continue; } + case 7: + s.tmp_4 = game_Hitbox_right__P21179_mk(s); + r0 = s.s___36291.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 627; s.pc = 29; return s.tmp_4; case 29: r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); - { step = 13; continue; } - case 10: - r0 = (s.c___290084 > 0); + r0 = s.arg3.fields["_offsetX"]; + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20904); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Fx_max__P271983_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fy___290077); - s.tmp_3.arg1 = r0; - s.callLocIdx = 595; s.pc = 30; return s.tmp_3; + s.offset___36306 = (r0); + r0 = (s.tmp_0 > 0); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 10; continue; } + s.tmp_8 = Sprite_right__P21283_mk(s); + s.tmp_9 = r0 = s.s___36291; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_right__P21282_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 630; s.pc = 31; return s.tmp_11; + case 31: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 - s.offset___36306); + s.tmp_8.arg1 = r0; + s.callLocIdx = 631; s.pc = 30; return s.tmp_8; case 30: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); - { step = 12; continue; } - case 11: - r0 = (s.arg1).fields["_vy"] = (0); - case 12: - case 13: - case 14: - case 15: - case 16: - s.tmp_0 = r0 = s.arg1; - s.tmp_2 = ArcadePhysicsEngine_constrain__P276664_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 596; s.pc = 31; return s.tmp_2; - case 31: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 8; continue; } + s.tmp_0 = Sprite_vx__P21249_mk(s); + s.tmp_0.arg0 = s.s___36291; + s.tmp_2 = Sprite_vx__P21248_mk(s); + s.tmp_2.arg0 = s.s___36291; + s.callLocIdx = 632; s.pc = 33; return s.tmp_2; + case 33: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg1; - s.tmp_2 = ArcadePhysicsEngine_constrain__P276664_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 597; s.pc = 32; return s.tmp_2; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 633; s.pc = 32; return s.tmp_0; case 32: r0 = s.retval; + case 8: + case 9: + case 10: + case 11: + case 12: + s.tmp_3 = game_Hitbox_top__P21178_mk(s); + r0 = s.s___36291.fields["_hitbox"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 634; s.pc = 34; return s.tmp_3; + case 34: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 / 256); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - r0 = s.arg1.fields["_vx"]; + r0 = s.arg3.fields["_offsetY"]; s.tmp_4 = r0; - r0 = (s.tmp_4 + s.ovx___289995); + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0 = r0; + s.offset___36306 = (r0); + r0 = (s.tmp_0 < 0); + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 15; continue; } + s.tmp_6 = Sprite_top__P21285_mk(s); + s.tmp_7 = r0 = s.s___36291; + s.tmp_6.arg0 = r0; + s.tmp_9 = Sprite_top__P21284_mk(s); + s.tmp_9.arg0 = s.tmp_7; + s.callLocIdx = 637; s.pc = 36; return s.tmp_9; + case 36: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 - s.offset___36306); + s.tmp_6.arg1 = r0; + s.callLocIdx = 638; s.pc = 35; return s.tmp_6; + case 35: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 13; continue; } + s.tmp_0 = Sprite_vy__P21251_mk(s); + s.tmp_0.arg0 = s.s___36291; + s.tmp_2 = Sprite_vy__P21250_mk(s); + s.tmp_2.arg0 = s.s___36291; + s.callLocIdx = 639; s.pc = 38; return s.tmp_2; + case 38: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 640; s.pc = 37; return s.tmp_0; + case 37: + r0 = s.retval; + case 13: + case 14: + { step = 20; continue; } + case 15: + s.tmp_4 = game_Hitbox_bottom__P21180_mk(s); + r0 = s.s___36291.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 641; s.pc = 39; return s.tmp_4; + case 39: + r0 = s.retval; s.tmp_3 = r0; r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = (s.tmp_2 * s.arg3); + r0 = s.arg3.fields["_offsetY"]; + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); s.tmp_1 = r0; - r0 = (s.tmp_1 / 1000); + r0 = pxsim_ImageMethods.height(globals.screen___20904); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.dx___290123 = (r0); - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.ovy___290000); - s.tmp_3 = r0; - r0 = (s.tmp_3 / 256); + s.offset___36306 = (r0); + r0 = (s.tmp_0 > 0); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 18; continue; } + s.tmp_8 = Sprite_bottom__P21287_mk(s); + s.tmp_9 = r0 = s.s___36291; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_bottom__P21286_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 644; s.pc = 41; return s.tmp_11; + case 41: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 - s.offset___36306); + s.tmp_8.arg1 = r0; + s.callLocIdx = 645; s.pc = 40; return s.tmp_8; + case 40: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 16; continue; } + s.tmp_0 = Sprite_vy__P21251_mk(s); + s.tmp_0.arg0 = s.s___36291; + s.tmp_2 = Sprite_vy__P21250_mk(s); + s.tmp_2.arg0 = s.s___36291; + s.callLocIdx = 646; s.pc = 43; return s.tmp_2; + case 43: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 647; s.pc = 42; return s.tmp_0; + case 42: + r0 = s.retval; + case 16: + case 17: + case 18: + case 19: + case 20: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_screenEdgeCollisions__P21450.info = {"start":12018,"length":905,"line":355,"column":4,"endLine":377,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"screenEdgeCollisions","argumentNames":["this","movingSprite","bounce","camera"]} + +function ArcadePhysicsEngine_screenEdgeCollisions__P21450_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P21450, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + s___36291: undefined, + offset___36306: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function scene_Camera_isUpdated__P21729(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); + r0 = s.arg0.fields["sprite"]; s.tmp_2 = r0; - r0 = (s.tmp_2 * s.arg3); - s.tmp_1 = r0; - r0 = (s.tmp_1 / 1000); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.dy___290136 = (r0); - s.xStep___290149 = (s.dx___290123); - s.yStep___290151 = (s.dy___290136); - case 17: - s.tmp_2 = Fx_abs__P271981_mk(s); - s.tmp_2.arg0 = s.xStep___290149; - s.callLocIdx = 604; s.pc = 33; return s.tmp_2; - case 33: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = s.arg0.fields["maxSingleStep"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 18; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; - { step = 19; continue; } - case 18: - s.tmp_5 = Fx_abs__P271981_mk(s); - s.tmp_5.arg0 = s.yStep___290151; - s.callLocIdx = 605; s.pc = 34; return s.tmp_5; - case 34: + { step = 4; continue; } + case 1: + s.tmp_5 = Sprite_x__P21244_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_5.arg0 = r0; + s.callLocIdx = 890; s.pc = 5; return s.tmp_5; + case 5: r0 = s.retval; s.tmp_4 = r0; - r0 = s.arg0.fields["maxSingleStep"]; + r0 = s.arg0.fields["_lastUpdatedSpriteX"]; s.tmp_6 = r0; - r0 = (s.tmp_4 > s.tmp_6); - case 19: - // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); - if (!r0) { step = 24; continue; } - s.tmp_10 = Fx_abs__P271981_mk(s); - s.tmp_10.arg0 = s.xStep___290149; - s.callLocIdx = 606; s.pc = 35; return s.tmp_10; - case 35: + r0 = (s.tmp_4 === s.tmp_6); + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 2; continue; } + r0 = s.tmp_3; + { step = 3; continue; } + case 2: + s.tmp_8 = Sprite_y__P21246_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_8.arg0 = r0; + s.callLocIdx = 891; s.pc = 6; return s.tmp_8; + case 6: r0 = s.retval; + s.tmp_7 = r0; + r0 = s.arg0.fields["_lastUpdatedSpriteY"]; s.tmp_9 = r0; - r0 = s.arg0.fields["minSingleStep"]; + r0 = (s.tmp_7 === s.tmp_9); + case 3: + // jmp value (already in r0) + s.tmp_10 = r0; + r0 = s.tmp_10; + case 4: + // jmp value (already in r0) s.tmp_11 = r0; - r0 = (s.tmp_9 > s.tmp_11); - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 20; continue; } - r0 = pxsim.Math_.idiv(s.xStep___290149, 2); - s.xStep___290149 = (r0); - case 20: - case 21: - s.tmp_2 = Fx_abs__P271981_mk(s); - s.tmp_2.arg0 = s.yStep___290151; - s.callLocIdx = 608; s.pc = 36; return s.tmp_2; - case 36: - r0 = s.retval; - s.tmp_1 = r0; - r0 = s.arg0.fields["minSingleStep"]; - s.tmp_3 = r0; - r0 = (s.tmp_1 > s.tmp_3); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = pxsim.Math_.idiv(s.yStep___290151, 2); - s.yStep___290151 = (r0); - case 22: - case 23: - { step = 17; continue; } - case 24: - r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C274342_VT); - s.tmp_0 = r0; - s.tmp_1 = MovingSprite_constructor__P274343_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - r0 = s.arg1.fields["_vx"]; - s.tmp_1.arg2 = r0; - r0 = s.arg1.fields["_vy"]; - s.tmp_1.arg3 = r0; - s.tmp_1.arg4 = s.dx___290123; - s.tmp_1.arg5 = s.dy___290136; - s.tmp_1.arg6 = s.xStep___290149; - s.tmp_1.arg7 = s.yStep___290151; - s.callLocIdx = 610; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; - r0 = s.tmp_0; + r0 = s.tmp_11; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_createMovingSprite__P276658.info = {"start":6933,"length":2805,"line":217,"column":4,"endLine":307,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"createMovingSprite","argumentNames":["this","sprite","dtMs","dt2"]} +scene_Camera_isUpdated__P21729.info = {"start":2403,"length":150,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"isUpdated","argumentNames":["this"]} -function ArcadePhysicsEngine_createMovingSprite__P276658_mk(s) { +function scene_Camera_isUpdated__P21729_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P276658, depth: s.depth + 1, + parent: s, fn: scene_Camera_isUpdated__P21729, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39191,27 +34729,14 @@ function ArcadePhysicsEngine_createMovingSprite__P276658_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - ovx___289995: undefined, - ovy___290000: undefined, - fx___290027: undefined, - c___290034: undefined, - fy___290077: undefined, - c___290084: undefined, - dx___290123: undefined, - dy___290136: undefined, - xStep___290149: undefined, - yStep___290151: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_constrain__P276664(s) { +function Sprite_bottom__P21287(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39227,33 +34752,36 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = Fx_max__P271983_mk(s); - s.tmp_1 = Fx_min__P271982_mk(s); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 786; s.pc = 2; return s.tmp_1; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P21285_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_height__P21279_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 365; s.pc = 2; return s.tmp_3; case 2: r0 = s.retval; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["maxNegativeVelocity"]; + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); s.tmp_0.arg1 = r0; - s.callLocIdx = 787; s.pc = 1; return s.tmp_0; + s.callLocIdx = 366; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_constrain__P276664.info = {"start":27343,"length":193,"line":761,"column":4,"endLine":769,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"constrain","argumentNames":["this","v"]} +Sprite_bottom__P21287.info = {"start":12204,"length":73,"line":440,"column":4,"endLine":442,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"bottom","argumentNames":["this","value"]} -function ArcadePhysicsEngine_constrain__P276664_mk(s) { +function Sprite_bottom__P21287_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constrain__P276664, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P21287, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, arg1: undefined, } } @@ -39262,7 +34790,7 @@ function ArcadePhysicsEngine_constrain__P276664_mk(s) { -function Fx_compare__P271980(s) { +function Sprite_right__P21283(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39277,17 +34805,37 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 - s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P21281_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_width__P21278_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 357; s.pc = 2; return s.tmp_3; + case 2: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 358; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_compare__P271980.info = {"start":1395,"length":106,"line":41,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"compare","argumentNames":["a","b"]} +Sprite_right__P21283.info = {"start":11367,"length":71,"line":410,"column":4,"endLine":412,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this","value"]} -function Fx_compare__P271980_mk(s) { +function Sprite_right__P21283_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_compare__P271980, depth: s.depth + 1, + parent: s, fn: Sprite_right__P21283, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, arg1: undefined, } } @@ -39296,7 +34844,7 @@ function Fx_compare__P271980_mk(s) { -function sprites_SpriteMap_insertAABB__P274270(s) { +function ArcadePhysicsEngine_spriteCollisions__P21449(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39306,135 +34854,189 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.left___289815 = undefined; - s.top___289818 = undefined; - s.xn___289821 = undefined; - s.yn___289832 = undefined; - s.x___289843 = undefined; - s.y___289848 = undefined; + s.ms___35763 = undefined; + s.unnamed168___U1 = undefined; + s.unnamed169___U2 = undefined; + s.sprite___35765 = undefined; + s.overSprites___35772 = undefined; + s.overlapper___35780 = undefined; + s.unnamed170___U6 = undefined; + s.unnamed171___U7 = undefined; + s.thisKind___35786 = undefined; + s.otherKind___35790 = undefined; + s.higher___35803 = undefined; + s.lower___35812 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P274216_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 505; s.pc = 5; return s.tmp_0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = pxsim_Array__length(s.arg2); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 21; continue; } + case 1: + case 2: + s.ms___35763 = (undefined); + s.unnamed168___U1 = (s.arg1); + s.unnamed169___U2 = (0); + case 3: + s.tmp_0 = r0 = s.unnamed169___U2; + r0 = pxsim_Array__length(s.unnamed168___U1); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 20; continue; } + r0 = pxsim_Array__getAt(s.unnamed168___U1, s.unnamed169___U2); + s.ms___35763 = (r0); + r0 = s.ms___35763.fields["sprite"]; + s.sprite___35765 = (r0); + r0 = s.sprite___35765.fields["flags"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 & 4610); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + { step = 19; continue; } + case 4: case 5: + s.tmp_2 = sprites_SpriteMap_overlaps__P21333_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_2.arg0 = r0; + r0 = s.ms___35763.fields["sprite"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 611; s.pc = 22; return s.tmp_2; + case 22: r0 = s.retval; - s.left___289815 = (r0); - s.tmp_0 = Sprite_top__P274220_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 506; s.pc = 6; return s.tmp_0; + s.overSprites___35772 = (r0); + s.overlapper___35780 = (undefined); + s.unnamed170___U6 = (s.overSprites___35772); + s.unnamed171___U7 = (0); case 6: - r0 = s.retval; - s.top___289818 = (r0); - s.tmp_3 = Sprite_width__P274214_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 507; s.pc = 7; return s.tmp_3; - case 7: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); + s.tmp_0 = r0 = s.unnamed171___U7; + r0 = pxsim_Array__length(s.unnamed170___U6); s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); - s.tmp_0 = r0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_5); - s.xn___289821 = (r0); - s.tmp_3 = Sprite_height__P274215_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 508; s.pc = 8; return s.tmp_3; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 18; continue; } + r0 = pxsim_Array__getAt(s.unnamed170___U6, s.unnamed171___U7); + s.overlapper___35780 = (r0); + r0 = s.overlapper___35780.fields["flags"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & 4610); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 7; continue; } + { step = 17; continue; } + case 7: case 8: - r0 = s.retval; + r0 = s.sprite___35765.fields["_kind"]; + s.thisKind___35786 = (r0); + r0 = s.overlapper___35780.fields["_kind"]; + s.otherKind___35790 = (r0); + r0 = s.sprite___35765.fields["_kindsOverlappedWith"]; s.tmp_2 = r0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_4 = r0; - r0 = (s.tmp_2 + s.tmp_4); + r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___35790, undefined); s.tmp_1 = r0; - r0 = (s.tmp_1 - 1); + r0 = (s.tmp_1 === -1); s.tmp_0 = r0; - r0 = s.arg0.fields["cellHeight"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + { step = 17; continue; } + case 9: + case 10: + r0 = s.sprite___35765.fields["id"]; + s.tmp_4 = r0; + r0 = s.overlapper___35780.fields["id"]; s.tmp_5 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_5); - s.yn___289832 = (r0); - s.x___289843 = (0); - case 1: - r0 = (s.x___289843 <= s.xn___289821); + r0 = (s.tmp_4 > s.tmp_5); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 11; continue; } + r0 = s.sprite___35765; + { step = 12; continue; } + case 11: + r0 = s.overlapper___35780; + case 12: + // jmp value (already in r0) + s.tmp_6 = r0; + s.higher___35803 = (s.tmp_6); + r0 = (s.higher___35803 === s.sprite___35765); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.y___289848 = (0); - case 2: - r0 = (s.y___289848 <= s.yn___289832); + if (!r0) { step = 13; continue; } + r0 = s.overlapper___35780; + { step = 14; continue; } + case 13: + r0 = s.sprite___35765; + case 14: + // jmp value (already in r0) + s.tmp_1 = r0; + s.lower___35812 = (s.tmp_1); + r0 = s.higher___35803.fields["_overlappers"]; + s.tmp_2 = r0; + r0 = s.lower___35812.fields["id"]; + s.tmp_3 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.tmp_3, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 === -1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = sprites_SpriteMap_insertAtKey__P276622_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = r0 = s.left___289815; - s.tmp_4 = Math_min__P271947_mk(s); - s.tmp_5 = Sprite_width__P274214_mk(s); - s.tmp_5.arg0 = s.arg1; - s.callLocIdx = 509; s.pc = 11; return s.tmp_5; - case 11: - r0 = s.retval; - s.tmp_4.arg0 = r0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_6 = r0; - r0 = (s.x___289843 * s.tmp_6); - s.tmp_4.arg1 = r0; - s.callLocIdx = 510; s.pc = 10; return s.tmp_4; - case 10: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 + s.tmp_3); - s.tmp_1.arg1 = r0; - s.tmp_7 = r0 = s.top___289818; - s.tmp_9 = Math_min__P271947_mk(s); - s.tmp_10 = Sprite_height__P274215_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 511; s.pc = 13; return s.tmp_10; - case 13: - r0 = s.retval; - s.tmp_9.arg0 = r0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_11 = r0; - r0 = (s.y___289848 * s.tmp_11); - s.tmp_9.arg1 = r0; - s.callLocIdx = 512; s.pc = 12; return s.tmp_9; - case 12: + if (!r0) { step = 15; continue; } + r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P35832); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___35786); + r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___35790); + r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P35856); + s.tmp_5 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___35803); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___35812); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___35765); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___35780); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___35786); + s.tmp_6 = helpers_arrayForEach__P20154_mk(s); + s.tmp_7 = helpers_arrayFilter__P20155_mk(s); + s.tmp_7.arg0 = s.arg2; + s.tmp_7.arg1 = s.tmp_4; + s.callLocIdx = 614; s.pc = 24; return s.tmp_7; + case 24: r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_7 + s.tmp_8); - s.tmp_1.arg2 = r0; - s.tmp_1.arg3 = s.arg1; - s.callLocIdx = 513; s.pc = 9; return s.tmp_1; - case 9: + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = s.tmp_5; + s.callLocIdx = 616; s.pc = 23; return s.tmp_6; + case 23: r0 = s.retval; - r0 = (s.y___289848 + 1); - s.y___289848 = (r0); - { step = 2; continue; } - case 3: - r0 = (s.x___289843 + 1); - s.x___289843 = (r0); - { step = 1; continue; } - case 4: + case 15: + case 16: + case 17: + r0 = (s.unnamed171___U7 + 1); + s.unnamed171___U7 = (r0); + { step = 6; continue; } + case 18: + s.unnamed170___U6 = (undefined); + case 19: + r0 = (s.unnamed169___U2 + 1); + s.unnamed169___U2 = (r0); + { step = 3; continue; } + case 20: + s.unnamed168___U1 = (undefined); + case 21: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAABB__P274270.info = {"start":3184,"length":521,"line":91,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAABB","argumentNames":["this","sprite"]} +ArcadePhysicsEngine_spriteCollisions__P21449.info = {"start":9744,"length":2268,"line":309,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"spriteCollisions","argumentNames":["this","movedSprites","handlers"]} -function sprites_SpriteMap_insertAABB__P274270_mk(s) { +function ArcadePhysicsEngine_spriteCollisions__P21449_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAABB__P274270, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P21449, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39444,25 +35046,28 @@ function sprites_SpriteMap_insertAABB__P274270_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - left___289815: undefined, - top___289818: undefined, - xn___289821: undefined, - yn___289832: undefined, - x___289843: undefined, - y___289848: undefined, + ms___35763: undefined, + unnamed168___U1: undefined, + unnamed169___U2: undefined, + sprite___35765: undefined, + overSprites___35772: undefined, + overlapper___35780: undefined, + unnamed170___U6: undefined, + unnamed171___U7: undefined, + thisKind___35786: undefined, + otherKind___35790: undefined, + higher___35803: undefined, + lower___35812: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function sprites_SpriteMap_insertAtKey__P276622(s) { +function forEach_inline__P35832(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39472,82 +35077,77 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___289883 = undefined; - s.bucket___289888 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P276621_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 504; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.k___289883 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___289883); - s.bucket___289888 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___289888); + r0 = s.arg0.fields["kind"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 === s.caps[0]); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["buckets"]; - s.tmp_2 = r0; - s.tmp_3 = r0 = s.k___289883; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); - s.bucket___289888 = (s.tmp_4); + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = s.arg0.fields["otherKind"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 === s.caps[1]); case 2: - r0 = pxsim_Array_.indexOf(s.bucket___289888, s.arg3, undefined); - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBool(s.tmp_3); if (!r0) { step = 3; continue; } - r0 = pxsim_Array__push(s.bucket___289888, s.arg3); + r0 = s.tmp_3; + { step = 6; continue; } case 3: + r0 = s.arg0.fields["kind"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 === s.caps[1]); + s.tmp_4 = r0; + r0 = pxsim_numops_toBool(s.tmp_4); + if (r0) { step = 4; continue; } + r0 = s.tmp_4; + { step = 5; continue; } case 4: - r0 = undefined; + r0 = s.arg0.fields["otherKind"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 === s.caps[0]); + case 5: + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = s.tmp_7; + case 6: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = s.tmp_8; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAtKey__P276622.info = {"start":2872,"length":302,"line":82,"column":8,"endLine":89,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAtKey","argumentNames":["this","x","y","sprite"]} +forEach_inline__P35832.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function sprites_SpriteMap_insertAtKey__P276622_mk(s) { +function forEach_inline__P35832_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAtKey__P276622, depth: s.depth + 1, + parent: s, fn: forEach_inline__P35832, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - k___289883: undefined, - bucket___289888: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function sprites_SpriteMap_clear__P274269(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P35856(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39561,22 +35161,30 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + r0 = s.caps[0].fields["_overlappers"]; + s.tmp_0 = r0; + r0 = s.caps[1].fields["id"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtcore_mkAction(6, ArcadePhysicsEngine_spriteCollisions_inline__P35866); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.caps[2]); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.caps[3]); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.caps[4]); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.caps[0]); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 5, s.caps[1]); + r0 = pxsim.control.runInParallel(s.tmp_0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_clear__P274269.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} +ArcadePhysicsEngine_spriteCollisions_inline__P35856.info = {"start":11310,"length":652,"line":338,"column":33,"endLine":349,"endColumn":25,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function sprites_SpriteMap_clear__P274269_mk(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P35856_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_clear__P274269, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P35856, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39587,7 +35195,7 @@ function sprites_SpriteMap_clear__P274269_mk(s) { -function sprites_SpriteMap_resizeBuckets__P274268(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P35866(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39597,155 +35205,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.maxWidth___289918 = undefined; - s.maxHeight___289919 = undefined; - s.sprite___289921 = undefined; - s.unnamed2130___U3 = undefined; - s.unnamed2131___U4 = undefined; - s.tMap___289937 = undefined; - s.areaWidth___289941 = undefined; - s.areaHeight___289948 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.maxWidth___289918 = (0); - s.maxHeight___289919 = (0); - s.sprite___289921 = (undefined); - s.unnamed2130___U3 = (s.arg1); - s.unnamed2131___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed2131___U4; - r0 = pxsim_Array__length(s.unnamed2130___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed2130___U3, s.unnamed2131___U4); - s.sprite___289921 = (r0); - s.tmp_4 = Sprite_width__P274214_mk(s); - s.tmp_4.arg0 = s.sprite___289921; - s.callLocIdx = 493; s.pc = 11; return s.tmp_4; - case 11: - r0 = s.retval; + r0 = s.caps[0].fields["flags"]; + s.tmp_4 = r0; + r0 = s.caps[1].fields["flags"]; + s.tmp_5 = r0; + r0 = (s.tmp_4 | s.tmp_5); s.tmp_3 = r0; - r0 = (s.tmp_3 > s.maxWidth___289918); + r0 = (s.tmp_3 & 4610); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - s.tmp_5 = Sprite_width__P274214_mk(s); - s.tmp_5.arg0 = s.sprite___289921; - s.callLocIdx = 494; s.pc = 12; return s.tmp_5; - case 12: - r0 = s.retval; - s.maxWidth___289918 = (r0); - case 2: - case 3: - s.tmp_2 = Sprite_height__P274215_mk(s); - s.tmp_2.arg0 = s.sprite___289921; - s.callLocIdx = 495; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 > s.maxHeight___289919); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_3 = Sprite_height__P274215_mk(s); - s.tmp_3.arg0 = s.sprite___289921; - s.callLocIdx = 496; s.pc = 14; return s.tmp_3; - case 14: - r0 = s.retval; - s.maxHeight___289919 = (r0); - case 4: - case 5: - r0 = (s.unnamed2131___U4 + 1); - s.unnamed2131___U4 = (r0); - { step = 1; continue; } - case 6: - s.unnamed2130___U3 = (undefined); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 497; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tMap___289937 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tMap___289937); - if (!r0) { step = 7; continue; } - s.tmp_0 = tiles_TileMap_areaWidth__P274560_mk(s); - s.tmp_0.arg0 = s.tMap___289937; - s.callLocIdx = 498; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - { step = 8; continue; } - case 7: - r0 = pxsim_ImageMethods.width(globals.screen___273849); - case 8: + if (!r0) { step = 5; continue; } + r0 = s.caps[2].fields["kind"]; + s.tmp_7 = r0; + r0 = (s.caps[3] === s.tmp_7); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 1; continue; } + r0 = s.caps[0]; + { step = 2; continue; } + case 1: + r0 = s.caps[1]; + case 2: // jmp value (already in r0) - s.tmp_1 = r0; - s.areaWidth___289941 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.tMap___289937); - if (!r0) { step = 9; continue; } - s.tmp_0 = tiles_TileMap_areaHeight__P274561_mk(s); - s.tmp_0.arg0 = s.tMap___289937; - s.callLocIdx = 499; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } - case 9: - r0 = pxsim_ImageMethods.height(globals.screen___273849); - case 10: + s.tmp_8 = r0; + r0 = s.caps[2].fields["kind"]; + s.tmp_10 = r0; + r0 = (s.caps[3] === s.tmp_10); + s.tmp_9 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_9); + if (!r0) { step = 3; continue; } + r0 = s.caps[1]; + { step = 4; continue; } + case 3: + r0 = s.caps[0]; + case 4: // jmp value (already in r0) + s.tmp_11 = r0; + s.tmp_12 = if_handler_3_mk(s); + s.tmp_12.arg0 = s.caps[2]; + s.tmp_12.arg1 = s.tmp_8; + s.tmp_12.arg2 = s.tmp_11; + if (!s.tmp_12.arg0.vtable.iface) { + setupLambda(s.tmp_12, pxsim_pxtrt.mapGetByString(s.tmp_12.arg0, "handler"), 3); + s.callLocIdx = 615; s.pc = 7; return s.tmp_12; + } else { + s.tmp_12.fn = s.tmp_12.arg0.vtable.iface["handler"]; + if (s.tmp_12.fn == null) { setupLambda(s.tmp_12, s.tmp_12.arg0.fields["handler"], 3); s.callLocIdx = 615; s.pc = 7; return s.tmp_12; } + else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 615; s.pc = 7; return s.tmp_12;; } + else { s.callLocIdx = 615; s.pc = 7; return s.tmp_12; } + } + case 7: + r0 = s.retval; + case 5: + case 6: + r0 = s.caps[4].fields["_overlappers"]; + s.tmp_0 = r0; + r0 = s.caps[5].fields["id"]; s.tmp_1 = r0; - s.areaHeight___289948 = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_clamp__P271943_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaWidth___289941 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxWidth___289918 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 500; s.pc = 18; return s.tmp_2; - case 18: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cellWidth"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_clamp__P271943_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaHeight___289948 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxHeight___289919 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 501; s.pc = 19; return s.tmp_2; - case 19: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cellHeight"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_2 = r0; - r0 = pxsim.Math_.idiv(s.areaHeight___289948, s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["rowCount"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_2 = r0; - r0 = pxsim.Math_.idiv(s.areaWidth___289941, s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_resizeBuckets__P274268.info = {"start":1696,"length":826,"line":52,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"resizeBuckets","argumentNames":["this","sprites"]} +ArcadePhysicsEngine_spriteCollisions_inline__P35866.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} -function sprites_SpriteMap_resizeBuckets__P274268_mk(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P35866_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_resizeBuckets__P274268, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P35866, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39753,23 +35284,20 @@ function sprites_SpriteMap_resizeBuckets__P274268_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - maxWidth___289918: undefined, - maxHeight___289919: undefined, - sprite___289921: undefined, - unnamed2130___U3: undefined, - unnamed2131___U4: undefined, - tMap___289937: undefined, - areaWidth___289941: undefined, - areaHeight___289948: undefined, - arg0: undefined, - arg1: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, } } -function Sprite_clearObstacles__P274242(s) { +function sprites_SpriteMap_overlaps__P21333(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39779,37 +35307,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.n___35900 = undefined; + s.o___35904 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_obstacles"] = (s.tmp_1); - r0 = undefined; + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_neighbors__P21332_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 488; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.n___35900 = (r0); + r0 = pxsim_pxtcore_mkAction(1, o_inline__P35906); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayFilter__P20155_mk(s); + s.tmp_1.arg0 = s.n___35900; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 490; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.o___35904 = (r0); + r0 = s.o___35904; return leave(s, r0) default: oops() } } } -Sprite_clearObstacles__P274242.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} +sprites_SpriteMap_overlaps__P21333.info = {"start":923,"length":189,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"overlaps","argumentNames":["this","sprite"]} -function Sprite_clearObstacles__P274242_mk(s) { +function sprites_SpriteMap_overlaps__P21333_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_clearObstacles__P274242, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_overlaps__P21333, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + n___35900: undefined, + o___35904: undefined, arg0: undefined, + arg1: undefined, } } -function Fx_idiv__P271979(s) { +function o_inline__P35906(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39821,29 +35368,33 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim.Math_.idiv(s.arg0, s.arg1); + s.tmp_0 = Sprite_overlapsWith__P21301_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 489; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -Fx_idiv__P271979.info = {"start":1279,"length":111,"line":38,"column":4,"endLine":40,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"idiv","argumentNames":["a","b"]} +o_inline__P35906.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} -function Fx_idiv__P271979_mk(s) { +function o_inline__P35906_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_idiv__P271979, depth: s.depth + 1, + parent: s, fn: o_inline__P35906, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_arrayMap__P271922(s) { +function sprites_SpriteMap_neighbors__P21332(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39853,58 +35404,112 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___290213 = undefined; - s.len___290215 = undefined; - s.i___290218 = undefined; + s.n___36173 = undefined; + s.layer___36175 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); r0 = pxsim_Array__mk(); - s.res___290213 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___290215 = (r0); - s.i___290218 = (0); - case 1: - r0 = (s.i___290218 < s.len___290215); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.res___290213; - s.tmp_3 = lambda_3_mk(s); - s.tmp_3.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___290218); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.i___290218; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 4; s.pc = 3; return s.tmp_3; + s.n___36173 = (r0); + r0 = s.arg1.fields["layer"]; + s.layer___36175 = (r0); + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P21340_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P21280_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 476; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P21284_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 477; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___290218 + 1); - s.i___290218 = (r0); - { step = 1; continue; } - case 2: - r0 = s.res___290213; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___36175; + s.tmp_0.arg4 = s.n___36173; + s.callLocIdx = 478; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P21340_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P21280_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 479; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P21286_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 480; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___36175; + s.tmp_0.arg4 = s.n___36173; + s.callLocIdx = 481; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P21340_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P21282_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 482; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P21284_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 483; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___36175; + s.tmp_0.arg4 = s.n___36173; + s.callLocIdx = 484; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P21340_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P21282_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 485; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P21286_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 486; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___36175; + s.tmp_0.arg4 = s.n___36173; + s.callLocIdx = 487; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + r0 = pxsim_Array_.removeElement(s.n___36173, s.arg1); + r0 = s.n___36173; return leave(s, r0) default: oops() } } } -helpers_arrayMap__P271922.info = {"start":6528,"length":299,"line":229,"column":4,"endLine":236,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayMap","argumentNames":["arr","callbackfn"]} +sprites_SpriteMap_neighbors__P21332.info = {"start":376,"length":442,"line":15,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"neighbors","argumentNames":["this","sprite"]} -function helpers_arrayMap__P271922_mk(s) { +function sprites_SpriteMap_neighbors__P21332_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayMap__P271922, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_neighbors__P21332, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - tmp_3: undefined, - res___290213: undefined, - len___290215: undefined, - i___290218: undefined, + n___36173: undefined, + layer___36175: undefined, arg0: undefined, arg1: undefined, } } @@ -39913,7 +35518,7 @@ function helpers_arrayMap__P271922_mk(s) { -function ArcadePhysicsEngine_draw__P274355(s) { +function sprites_SpriteMap_mergeAtKey__P21340(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39923,38 +35528,107 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.k___36224 = undefined; + s.bucket___36229 = undefined; + s.sprite___36236 = undefined; + s.unnamed164___U3 = undefined; + s.unnamed165___U4 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_draw__P274267_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 539; s.pc = 1; return s.tmp_0; - case 1: + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P21337_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 514; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + s.k___36224 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___36224); + s.bucket___36229 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___36229); + if (!r0) { step = 7; continue; } + s.sprite___36236 = (undefined); + s.unnamed164___U3 = (s.bucket___36229); + s.unnamed165___U4 = (0); + case 1: + s.tmp_0 = r0 = s.unnamed165___U4; + r0 = pxsim_Array__length(s.unnamed164___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed164___U3, s.unnamed165___U4); + s.sprite___36236 = (r0); + r0 = s.sprite___36236.fields["layer"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 & s.arg3); + s.tmp_2 = r0; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 2; continue; } + r0 = s.tmp_2; + { step = 3; continue; } + case 2: + r0 = pxsim_Array_.indexOf(s.arg4, s.sprite___36236, undefined); + s.tmp_4 = r0; + r0 = (s.tmp_4 < 0); + case 3: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__push(s.arg4, s.sprite___36236); + case 4: + case 5: + r0 = (s.unnamed165___U4 + 1); + s.unnamed165___U4 = (r0); + { step = 1; continue; } + case 6: + s.unnamed164___U3 = (undefined); + case 7: + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_draw__P274355.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +sprites_SpriteMap_mergeAtKey__P21340.info = {"start":3715,"length":384,"line":101,"column":8,"endLine":110,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"mergeAtKey","argumentNames":["this","x","y","layer","n"]} -function ArcadePhysicsEngine_draw__P274355_mk(s) { +function sprites_SpriteMap_mergeAtKey__P21340_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_draw__P274355, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_mergeAtKey__P21340, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + k___36224: undefined, + bucket___36229: undefined, + sprite___36236: undefined, + unnamed164___U3: undefined, + unnamed165___U4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function sprites_SpriteMap_draw__P274267(s) { +function sprites_SpriteMap_key__P21337(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39964,147 +35638,492 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x___290239 = undefined; - s.y___290245 = undefined; - s.left___290251 = undefined; - s.top___290256 = undefined; - s.k___290261 = undefined; - s.b___290266 = undefined; + s.xi___36257 = undefined; + s.yi___36269 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C274263_VT)) failedCast(r0); - s.x___290239 = (0); + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg0.fields["columnCount"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["cellWidth"]; + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.arg1, s.tmp_1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 502; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.xi___36257 = (r0); + s.tmp_0 = Math_clamp__P20173_mk(s); + s.tmp_0.arg0 = 0; + r0 = s.arg0.fields["rowCount"]; + s.tmp_0.arg1 = r0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.arg2, s.tmp_1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 503; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.yi___36269 = (r0); + s.tmp_0 = r0 = s.xi___36257; r0 = s.arg0.fields["columnCount"]; + s.tmp_2 = r0; + r0 = (s.yi___36269 * s.tmp_2); s.tmp_1 = r0; - r0 = (s.x___290239 < s.tmp_1); + r0 = (s.tmp_0 + s.tmp_1); + return leave(s, r0) + default: oops() +} } } +sprites_SpriteMap_key__P21337.info = {"start":2592,"length":270,"line":76,"column":8,"endLine":80,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"key","argumentNames":["this","x","y"]} + +function sprites_SpriteMap_key__P21337_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_SpriteMap_key__P21337, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + xi___36257: undefined, + yi___36269: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function Sprite_overlapsWith__P21301(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.A___35986 = undefined; + s.B___35987 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = (s.arg1 == s.arg0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___290245 = (0); + if (!r0) { step = 1; continue; } + r0 = false; + { step = 27; continue; } + case 1: case 2: - r0 = s.arg0.fields["rowCount"]; + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 4610); s.tmp_1 = r0; - r0 = (s.y___290245 < s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = false; + { step = 27; continue; } + case 3: + case 4: + r0 = s.arg1.fields["flags"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 & 4610); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 5; continue; } + r0 = false; + { step = 27; continue; } + case 5: + case 6: + r0 = s.arg0.fields["flags"]; + s.tmp_6 = r0; + r0 = (s.tmp_6 & 8192); + s.tmp_5 = r0; + r0 = pxsim_numops_toBool(s.tmp_5); if (!r0) { step = 7; continue; } - r0 = s.arg0.fields["cellWidth"]; - s.tmp_2 = r0; - r0 = (s.x___290239 * s.tmp_2); - s.left___290251 = (r0); - r0 = s.arg0.fields["cellHeight"]; - s.tmp_0 = r0; - r0 = (s.y___290245 * s.tmp_0); - s.top___290256 = (r0); - s.tmp_0 = sprites_SpriteMap_key__P276621_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.left___290251; - s.tmp_0.arg2 = s.top___290256; - s.callLocIdx = 491; s.pc = 9; return s.tmp_0; + r0 = s.tmp_5; + { step = 8; continue; } + case 7: + r0 = s.arg1.fields["flags"]; + s.tmp_7 = r0; + r0 = (s.tmp_7 & 8192); + case 8: + // jmp value (already in r0) + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 9; continue; } + s.tmp_9 = game_Hitbox_overlapsWith__P21184_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_9.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_9.arg1 = r0; + s.callLocIdx = 384; s.pc = 28; return s.tmp_9; + case 28: + r0 = s.retval; + { step = 27; continue; } case 9: + case 10: + s.tmp_13 = game_Hitbox_overlapsWith__P21184_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_13.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_13.arg1 = r0; + s.callLocIdx = 385; s.pc = 29; return s.tmp_13; + case 29: r0 = s.retval; - s.k___290261 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___290261); - s.b___290266 = (r0); - s.tmp_0 = r0 = s.b___290266; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } - case 3: - r0 = pxsim_Array__length(s.b___290266); - case 4: + s.tmp_12 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_12); + s.tmp_11 = r0; + r0 = pxsim_Boolean__bang(s.tmp_11); + s.tmp_10 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_10); + if (!r0) { step = 11; continue; } + r0 = false; + { step = 27; continue; } + case 11: + case 12: + s.tmp_17 = Sprite_isScaled__P21277_mk(s); + s.tmp_17.arg0 = s.arg0; + s.callLocIdx = 386; s.pc = 30; return s.tmp_17; + case 30: + r0 = s.retval; + s.tmp_16 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_16); + s.tmp_15 = r0; + r0 = pxsim_Boolean__bang(s.tmp_15); + s.tmp_14 = r0; + r0 = pxsim_numops_toBool(s.tmp_14); + if (r0) { step = 13; continue; } + r0 = s.tmp_14; + { step = 14; continue; } + case 13: + s.tmp_20 = Sprite_isScaled__P21277_mk(s); + s.tmp_20.arg0 = s.arg1; + s.callLocIdx = 387; s.pc = 31; return s.tmp_20; + case 31: + r0 = s.retval; + s.tmp_19 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_19); + s.tmp_18 = r0; + r0 = pxsim_Boolean__bang(s.tmp_18); + case 14: + // jmp value (already in r0) + s.tmp_21 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_21); + if (!r0) { step = 15; continue; } + r0 = s.arg1.fields["_image"]; + s.tmp_22 = r0; + r0 = s.arg0.fields["_image"]; + s.tmp_23 = r0; + s.tmp_26 = Sprite_left__P21280_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 388; s.pc = 32; return s.tmp_26; + case 32: + r0 = s.retval; + s.tmp_25 = r0; + s.tmp_28 = Sprite_left__P21280_mk(s); + s.tmp_28.arg0 = s.arg1; + s.callLocIdx = 389; s.pc = 33; return s.tmp_28; + case 33: + r0 = s.retval; + s.tmp_27 = r0; + r0 = (s.tmp_25 - s.tmp_27); + s.tmp_24 = r0; + s.tmp_31 = Sprite_top__P21284_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 390; s.pc = 34; return s.tmp_31; + case 34: + r0 = s.retval; + s.tmp_30 = r0; + s.tmp_33 = Sprite_top__P21284_mk(s); + s.tmp_33.arg0 = s.arg1; + s.callLocIdx = 391; s.pc = 35; return s.tmp_33; + case 35: + r0 = s.retval; + s.tmp_32 = r0; + r0 = (s.tmp_30 - s.tmp_32); + s.tmp_29 = r0; + r0 = pxsim_ImageMethods.overlapsWith(s.tmp_22, s.tmp_23, s.tmp_24, s.tmp_29); + { step = 27; continue; } + { step = 26; continue; } + case 15: + s.tmp_36 = Sprite_sx__P21260_mk(s); + s.tmp_36.arg0 = s.arg0; + s.callLocIdx = 392; s.pc = 36; return s.tmp_36; + case 36: + r0 = s.retval; + s.tmp_35 = r0; + r0 = (s.tmp_35 == 0); + s.tmp_34 = r0; + r0 = pxsim_numops_toBool(s.tmp_34); + if (!r0) { step = 16; continue; } + r0 = s.tmp_34; + { step = 17; continue; } + case 16: + s.tmp_38 = Sprite_sy__P21262_mk(s); + s.tmp_38.arg0 = s.arg0; + s.callLocIdx = 393; s.pc = 37; return s.tmp_38; + case 37: + r0 = s.retval; + s.tmp_37 = r0; + r0 = (s.tmp_37 == 0); + case 17: // jmp value (already in r0) + s.tmp_39 = r0; + r0 = pxsim_numops_toBool(s.tmp_39); + if (!r0) { step = 18; continue; } + r0 = s.tmp_39; + { step = 19; continue; } + case 18: + s.tmp_41 = Sprite_sx__P21260_mk(s); + s.tmp_41.arg0 = s.arg1; + s.callLocIdx = 394; s.pc = 38; return s.tmp_41; + case 38: + r0 = s.retval; + s.tmp_40 = r0; + r0 = (s.tmp_40 == 0); + case 19: + // jmp value (already in r0) + s.tmp_42 = r0; + r0 = pxsim_numops_toBool(s.tmp_42); + if (!r0) { step = 20; continue; } + r0 = s.tmp_42; + { step = 21; continue; } + case 20: + s.tmp_44 = Sprite_sy__P21262_mk(s); + s.tmp_44.arg0 = s.arg1; + s.callLocIdx = 395; s.pc = 39; return s.tmp_44; + case 39: + r0 = s.retval; + s.tmp_43 = r0; + r0 = (s.tmp_43 == 0); + case 21: + // jmp value (already in r0) + s.tmp_45 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_45); + if (!r0) { step = 22; continue; } + r0 = false; + { step = 27; continue; } + case 22: + case 23: + s.tmp_49 = Sprite_sx__P21260_mk(s); + s.tmp_49.arg0 = s.arg0; + s.callLocIdx = 396; s.pc = 40; return s.tmp_49; + case 40: + r0 = s.retval; + s.tmp_48 = r0; + s.tmp_51 = Sprite_sy__P21262_mk(s); + s.tmp_51.arg0 = s.arg0; + s.callLocIdx = 397; s.pc = 41; return s.tmp_51; + case 41: + r0 = s.retval; + s.tmp_50 = r0; + r0 = (s.tmp_48 * s.tmp_50); + s.tmp_47 = r0; + s.tmp_54 = Sprite_sx__P21260_mk(s); + s.tmp_54.arg0 = s.arg1; + s.callLocIdx = 398; s.pc = 42; return s.tmp_54; + case 42: + r0 = s.retval; + s.tmp_53 = r0; + s.tmp_56 = Sprite_sy__P21262_mk(s); + s.tmp_56.arg0 = s.arg1; + s.callLocIdx = 399; s.pc = 43; return s.tmp_56; + case 43: + r0 = s.retval; + s.tmp_55 = r0; + r0 = (s.tmp_53 * s.tmp_55); + s.tmp_52 = r0; + r0 = (s.tmp_47 < s.tmp_52); + s.tmp_46 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_46); + if (!r0) { step = 24; continue; } + s.A___35986 = (s.arg0); + s.B___35987 = (s.arg1); + { step = 25; continue; } + case 24: + s.A___35986 = (s.arg1); + s.B___35987 = (s.arg0); + case 25: + s.tmp_0 = helpers_imageBlit__P20838_mk(s); + r0 = s.A___35986.fields["_image"]; + s.tmp_0.arg0 = r0; + s.tmp_3 = Sprite_left__P21280_mk(s); + s.tmp_3.arg0 = s.B___35987; + s.callLocIdx = 401; s.pc = 45; return s.tmp_3; + case 45: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = Sprite_left__P21280_mk(s); + s.tmp_5.arg0 = s.A___35986; + s.callLocIdx = 402; s.pc = 46; return s.tmp_5; + case 46: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_imageDrawRect__P273776_mk(s); - s.tmp_2.arg0 = globals.screen___273849; - s.tmp_2.arg1 = s.left___290251; - s.tmp_2.arg2 = s.top___290256; - r0 = s.arg0.fields["cellWidth"]; - s.tmp_2.arg3 = r0; - r0 = s.arg0.fields["cellHeight"]; - s.tmp_2.arg4 = r0; - s.tmp_2.arg5 = 5; - s.callLocIdx = 492; s.pc = 10; return s.tmp_2; - case 10: + s.tmp_7 = Sprite_sx__P21260_mk(s); + s.tmp_7.arg0 = s.A___35986; + s.callLocIdx = 403; s.pc = 47; return s.tmp_7; + case 47: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_1 / s.tmp_6); + s.tmp_0.arg1 = r0; + s.tmp_10 = Sprite_top__P21284_mk(s); + s.tmp_10.arg0 = s.B___35987; + s.callLocIdx = 404; s.pc = 48; return s.tmp_10; + case 48: + r0 = s.retval; + s.tmp_9 = r0; + s.tmp_12 = Sprite_top__P21284_mk(s); + s.tmp_12.arg0 = s.A___35986; + s.callLocIdx = 405; s.pc = 49; return s.tmp_12; + case 49: + r0 = s.retval; + s.tmp_11 = r0; + r0 = (s.tmp_9 - s.tmp_11); + s.tmp_8 = r0; + s.tmp_14 = Sprite_sy__P21262_mk(s); + s.tmp_14.arg0 = s.A___35986; + s.callLocIdx = 406; s.pc = 50; return s.tmp_14; + case 50: + r0 = s.retval; + s.tmp_13 = r0; + r0 = (s.tmp_8 / s.tmp_13); + s.tmp_0.arg2 = r0; + s.tmp_16 = Sprite_width__P21278_mk(s); + s.tmp_16.arg0 = s.B___35987; + s.callLocIdx = 407; s.pc = 51; return s.tmp_16; + case 51: + r0 = s.retval; + s.tmp_15 = r0; + s.tmp_18 = Sprite_sx__P21260_mk(s); + s.tmp_18.arg0 = s.A___35986; + s.callLocIdx = 408; s.pc = 52; return s.tmp_18; + case 52: + r0 = s.retval; + s.tmp_17 = r0; + r0 = (s.tmp_15 / s.tmp_17); + s.tmp_0.arg3 = r0; + s.tmp_20 = Sprite_height__P21279_mk(s); + s.tmp_20.arg0 = s.B___35987; + s.callLocIdx = 409; s.pc = 53; return s.tmp_20; + case 53: + r0 = s.retval; + s.tmp_19 = r0; + s.tmp_22 = Sprite_sy__P21262_mk(s); + s.tmp_22.arg0 = s.A___35986; + s.callLocIdx = 410; s.pc = 54; return s.tmp_22; + case 54: + r0 = s.retval; + s.tmp_21 = r0; + r0 = (s.tmp_19 / s.tmp_21); + s.tmp_0.arg4 = r0; + r0 = s.B___35987.fields["_image"]; + s.tmp_0.arg5 = r0; + s.tmp_0.arg6 = 0; + s.tmp_0.arg7 = 0; + r0 = s.B___35987.fields["_image"]; + s.tmp_23 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_23); + s.tmp_0.arg8 = r0; + r0 = s.B___35987.fields["_image"]; + s.tmp_24 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_24); + s.tmp_0.arg9 = r0; + s.tmp_0.arg10 = true; + s.tmp_0.arg11 = true; + s.callLocIdx = 414; s.pc = 44; return s.tmp_0; + case 44: r0 = s.retval; - case 5: - case 6: - r0 = (s.y___290245 + 1); - s.y___290245 = (r0); - { step = 2; continue; } - case 7: - r0 = (s.x___290239 + 1); - s.x___290239 = (r0); - { step = 1; continue; } - case 8: + { step = 27; continue; } + case 26: r0 = undefined; + case 27: return leave(s, r0) default: oops() } } } -sprites_SpriteMap_draw__P274267.info = {"start":1122,"length":496,"line":36,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"draw","argumentNames":["this"]} +Sprite_overlapsWith__P21301.info = {"start":20623,"length":1735,"line":689,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"overlapsWith","argumentNames":["this","other"]} -function sprites_SpriteMap_draw__P274267_mk(s) { +function Sprite_overlapsWith__P21301_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_draw__P274267, depth: s.depth + 1, + parent: s, fn: Sprite_overlapsWith__P21301, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - x___290239: undefined, - y___290245: undefined, - left___290251: undefined, - top___290256: undefined, - k___290261: undefined, - b___290266: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_removeSprite__P274354(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_removeSprite__P274354.info = {"start":2691,"length":80,"line":104,"column":4,"endLine":106,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} - -function ArcadePhysicsEngine_removeSprite__P274354_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_removeSprite__P274354, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, + tmp_24: undefined, + tmp_25: undefined, + tmp_26: undefined, + tmp_27: undefined, + tmp_28: undefined, + tmp_29: undefined, + tmp_30: undefined, + tmp_31: undefined, + tmp_32: undefined, + tmp_33: undefined, + tmp_34: undefined, + tmp_35: undefined, + tmp_36: undefined, + tmp_37: undefined, + tmp_38: undefined, + tmp_39: undefined, + tmp_40: undefined, + tmp_41: undefined, + tmp_42: undefined, + tmp_43: undefined, + tmp_44: undefined, + tmp_45: undefined, + tmp_46: undefined, + tmp_47: undefined, + tmp_48: undefined, + tmp_49: undefined, + tmp_50: undefined, + tmp_51: undefined, + tmp_52: undefined, + tmp_53: undefined, + tmp_54: undefined, + tmp_55: undefined, + tmp_56: undefined, + A___35986: undefined, + B___35987: undefined, arg0: undefined, arg1: undefined, } } @@ -40113,7 +36132,7 @@ function ArcadePhysicsEngine_removeSprite__P274354_mk(s) { -function ArcadePhysicsEngine_addSprite__P274353(s) { +function Sprite_isScaled__P21277(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40123,75 +36142,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___290303 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C274344_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 256); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = game_currentScene__P274816_mk(s); - s.callLocIdx = 537; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___290303 = (r0); - s.tmp_0 = r0 = s.tm___290303; r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } + if (!r0) { step = 1; continue; } r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_1 = tiles_TileMap_isOnWall__P274575_mk(s); - s.tmp_1.arg0 = s.tm___290303; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 538; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; + r0 = s.arg0.fields["_sy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 !== 256); case 2: // jmp value (already in r0) - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 3; continue; } - s.tmp_3 = r0 = s.arg1; - r0 = s.tmp_3.fields["flags"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 | 256); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["flags"] = (s.tmp_4); - case 3: - case 4: - r0 = undefined; + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_addSprite__P274353.info = {"start":2465,"length":220,"line":96,"column":4,"endLine":102,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +Sprite_isScaled__P21277.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} -function ArcadePhysicsEngine_addSprite__P274353_mk(s) { +function Sprite_isScaled__P21277_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_addSprite__P274353, depth: s.depth + 1, + parent: s, fn: Sprite_isScaled__P21277, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, - tm___290303: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMapData_constructor__P274535(s) { +function game_Hitbox_overlapsWith__P21184(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40204,500 +36198,223 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.arg4 = (s.lambdaArgs[4]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = (s.arg0).fields["data"] = (s.arg1); - r0 = (s.arg0).fields["layers"] = (s.arg2); - r0 = (s.arg0).fields["tileset"] = (s.arg3); - s.tmp_0 = tiles_TileMapData_scale__P274539_mk(s); + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + s.tmp_0 = game_Hitbox_updateIfInvalid__P21183_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg4; - s.callLocIdx = 809; s.pc = 1; return s.tmp_0; - case 1: + s.callLocIdx = 250; s.pc = 18; return s.tmp_0; + case 18: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_constructor__P274535.info = {"start":6048,"length":358,"line":204,"column":8,"endLine":212,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","data","layers","tileset","scale"]} - -function tiles_TileMapData_constructor__P274535_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_constructor__P274535, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, -} } - - - - - -function tiles_TileMapData_scale__P274539(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C274534_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["cachedTileView"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_scale__P274539.info = {"start":6640,"length":102,"line":226,"column":8,"endLine":229,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} - -function tiles_TileMapData_scale__P274539_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_scale__P274539, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMap_constructor__P274554(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = (s.arg0).fields["_layer"] = (1); - s.tmp_0 = tiles_TileMap_scale__P274556_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 815; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0 = game_Hitbox_updateIfInvalid__P21183_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 251; s.pc = 19; return s.tmp_0; + case 19: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P290364); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = r0 = s.arg0; - s.tmp_3 = scene_createRenderable__P274622_mk(s); - s.tmp_3.arg0 = -1; - s.tmp_3.arg1 = s.tmp_0; - s.tmp_3.arg2 = undefined; - s.callLocIdx = 817; s.pc = 2; return s.tmp_3; - case 2: + s.tmp_1 = game_Hitbox_contains__P21182_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = game_Hitbox_left__P21177_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 252; s.pc = 21; return s.tmp_2; + case 21: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["renderable"] = (s.tmp_2); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_constructor__P274554.info = {"start":8927,"length":268,"line":300,"column":8,"endLine":308,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","scale"]} - -function tiles_TileMap_constructor__P274554_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_constructor__P274554, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMap_inline__P290364(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - s.tmp_0 = tiles_TileMap_draw__P276734_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 816; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_1.arg1 = r0; + s.tmp_3 = game_Hitbox_top__P21178_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 253; s.pc = 22; return s.tmp_3; + case 22: + r0 = s.retval; + s.tmp_1.arg2 = r0; + s.callLocIdx = 254; s.pc = 20; return s.tmp_1; + case 20: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_inline__P290364.info = {"start":9145,"length":25,"line":306,"column":16,"endLine":306,"endColumn":41,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["t","c"]} - -function tiles_TileMap_inline__P290364_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_inline__P290364, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMap_draw__P276734(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - s.bitmask___290375 = undefined; - s.offsetX___290381 = undefined; - s.offsetY___290386 = undefined; - s.x0___290391 = undefined; - s.xn___290398 = undefined; - s.y0___290415 = undefined; - s.yn___290422 = undefined; - s.x___290439 = undefined; - s.y___290445 = undefined; - s.index___290451 = undefined; - s.tile___290458 = undefined; - s.x___290494 = undefined; - s.xLine___290500 = undefined; - s.y___290526 = undefined; - s.yLine___290532 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_6 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_6); - s.tmp_5 = r0; - r0 = pxsim_Boolean__bang(s.tmp_5); - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 23; continue; } + r0 = true; + { step = 17; continue; } case 1: case 2: - r0 = s.arg0.fields["_scale"]; - s.tmp_8 = r0; - r0 = (1 << s.tmp_8); - s.tmp_7 = r0; - r0 = (s.tmp_7 - 1); - s.bitmask___290375 = (r0); - r0 = s.arg2.fields["drawOffsetX"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___290375); - s.offsetX___290381 = (r0); - r0 = s.arg2.fields["drawOffsetY"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___290375); - s.offsetY___290386 = (r0); - s.tmp_0 = Math_max__P271946_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg2.fields["drawOffsetX"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 >> s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 835; s.pc = 24; return s.tmp_0; + s.tmp_5 = game_Hitbox_contains__P21182_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_6 = game_Hitbox_left__P21177_mk(s); + s.tmp_6.arg0 = s.arg1; + s.callLocIdx = 255; s.pc = 24; return s.tmp_6; case 24: r0 = s.retval; - s.x0___290391 = (r0); - s.tmp_0 = Math_min__P271947_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["_width"]; - s.tmp_0.arg0 = r0; - r0 = s.arg2.fields["drawOffsetX"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_3 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_6 = r0; - r0 = (s.tmp_3 >> s.tmp_6); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 838; s.pc = 25; return s.tmp_0; + s.tmp_5.arg1 = r0; + s.tmp_7 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_7.arg0 = s.arg1; + s.callLocIdx = 256; s.pc = 25; return s.tmp_7; case 25: r0 = s.retval; - s.xn___290398 = (r0); - s.tmp_0 = Math_max__P271946_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg2.fields["drawOffsetY"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 >> s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 840; s.pc = 26; return s.tmp_0; - case 26: + s.tmp_5.arg2 = r0; + s.callLocIdx = 257; s.pc = 23; return s.tmp_5; + case 23: r0 = s.retval; - s.y0___290415 = (r0); - s.tmp_0 = Math_min__P271947_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1 = r0; - r0 = s.tmp_1.fields["_height"]; - s.tmp_0.arg0 = r0; - r0 = s.arg2.fields["drawOffsetY"]; s.tmp_4 = r0; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_3 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_6 = r0; - r0 = (s.tmp_3 >> s.tmp_6); - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 843; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - s.yn___290422 = (r0); - s.x___290439 = (s.x0___290391); + r0 = pxsim_numops_toBoolDecr(s.tmp_4); + if (!r0) { step = 3; continue; } + r0 = true; + { step = 17; continue; } case 3: - r0 = (s.x___290439 <= s.xn___290398); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___290445 = (s.y0___290415); case 4: - r0 = (s.y___290445 <= s.yn___290422); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = tiles_TileMapData_getTile__P274540_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.x___290439; - s.tmp_1.arg2 = s.y___290445; - s.callLocIdx = 844; s.pc = 28; return s.tmp_1; + s.tmp_9 = game_Hitbox_contains__P21182_mk(s); + s.tmp_9.arg0 = s.arg0; + s.tmp_10 = game_Hitbox_right__P21179_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 258; s.pc = 27; return s.tmp_10; + case 27: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.tmp_11 = game_Hitbox_top__P21178_mk(s); + s.tmp_11.arg0 = s.arg1; + s.callLocIdx = 259; s.pc = 28; return s.tmp_11; case 28: r0 = s.retval; - s.index___290451 = (r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P274543_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___290451; - s.callLocIdx = 845; s.pc = 29; return s.tmp_0; - case 29: + s.tmp_9.arg2 = r0; + s.callLocIdx = 260; s.pc = 26; return s.tmp_9; + case 26: r0 = s.retval; - s.tile___290458 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tile___290458); - if (!r0) { step = 5; continue; } - s.tmp_0 = r0 = s.arg1; - s.tmp_1 = r0 = s.tile___290458; - r0 = (s.x___290439 - s.x0___290391); - s.tmp_4 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_5 = r0; - r0 = (s.tmp_4 << s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_3 - s.offsetX___290381); - s.tmp_2 = r0; - r0 = (s.y___290445 - s.y0___290415); s.tmp_8 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_9 = r0; - r0 = (s.tmp_8 << s.tmp_9); - s.tmp_7 = r0; - r0 = (s.tmp_7 - s.offsetY___290386); - s.tmp_6 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(s.tmp_0, s.tmp_1, s.tmp_2, s.tmp_6); + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 5; continue; } + r0 = true; + { step = 17; continue; } case 5: case 6: - r0 = (s.y___290445 + 1); - s.y___290445 = (r0); - { step = 4; continue; } + s.tmp_13 = game_Hitbox_contains__P21182_mk(s); + s.tmp_13.arg0 = s.arg0; + s.tmp_14 = game_Hitbox_right__P21179_mk(s); + s.tmp_14.arg0 = s.arg1; + s.callLocIdx = 261; s.pc = 30; return s.tmp_14; + case 30: + r0 = s.retval; + s.tmp_13.arg1 = r0; + s.tmp_15 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_15.arg0 = s.arg1; + s.callLocIdx = 262; s.pc = 31; return s.tmp_15; + case 31: + r0 = s.retval; + s.tmp_13.arg2 = r0; + s.callLocIdx = 263; s.pc = 29; return s.tmp_13; + case 29: + r0 = s.retval; + s.tmp_12 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_12); + if (!r0) { step = 7; continue; } + r0 = true; + { step = 17; continue; } case 7: - r0 = (s.x___290439 + 1); - s.x___290439 = (r0); - { step = 3; continue; } case 8: - r0 = pxsim_numops_toBoolDecr(globals.debug___274784); - if (!r0) { step = 21; continue; } - s.x___290494 = (s.x0___290391); + s.tmp_17 = game_Hitbox_contains__P21182_mk(s); + s.tmp_17.arg0 = s.arg1; + s.tmp_18 = game_Hitbox_left__P21177_mk(s); + s.tmp_18.arg0 = s.arg0; + s.callLocIdx = 264; s.pc = 33; return s.tmp_18; + case 33: + r0 = s.retval; + s.tmp_17.arg1 = r0; + s.tmp_19 = game_Hitbox_top__P21178_mk(s); + s.tmp_19.arg0 = s.arg0; + s.callLocIdx = 265; s.pc = 34; return s.tmp_19; + case 34: + r0 = s.retval; + s.tmp_17.arg2 = r0; + s.callLocIdx = 266; s.pc = 32; return s.tmp_17; + case 32: + r0 = s.retval; + s.tmp_16 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_16); + if (!r0) { step = 9; continue; } + r0 = true; + { step = 17; continue; } case 9: - r0 = (s.x___290494 <= s.xn___290398); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.x___290494 - s.x0___290391); - s.tmp_2 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 << s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.offsetX___290381); - s.xLine___290500 = (r0); - r0 = (s.xLine___290500 >= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 10; continue; } - r0 = s.tmp_0; - { step = 11; continue; } case 10: - s.tmp_1 = r0 = s.xLine___290500; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_2 = r0; - r0 = (s.tmp_1 <= s.tmp_2); - case 11: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 12; continue; } - s.tmp_4 = helpers_imageDrawLine__P273775_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = s.xLine___290500; - s.tmp_4.arg2 = 0; - s.tmp_4.arg3 = s.xLine___290500; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_4.arg4 = r0; - s.tmp_4.arg5 = 1; - s.callLocIdx = 849; s.pc = 30; return s.tmp_4; - case 30: + s.tmp_21 = game_Hitbox_contains__P21182_mk(s); + s.tmp_21.arg0 = s.arg1; + s.tmp_22 = game_Hitbox_left__P21177_mk(s); + s.tmp_22.arg0 = s.arg0; + s.callLocIdx = 267; s.pc = 36; return s.tmp_22; + case 36: r0 = s.retval; + s.tmp_21.arg1 = r0; + s.tmp_23 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_23.arg0 = s.arg0; + s.callLocIdx = 268; s.pc = 37; return s.tmp_23; + case 37: + r0 = s.retval; + s.tmp_21.arg2 = r0; + s.callLocIdx = 269; s.pc = 35; return s.tmp_21; + case 35: + r0 = s.retval; + s.tmp_20 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_20); + if (!r0) { step = 11; continue; } + r0 = true; + { step = 17; continue; } + case 11: case 12: + s.tmp_25 = game_Hitbox_contains__P21182_mk(s); + s.tmp_25.arg0 = s.arg1; + s.tmp_26 = game_Hitbox_right__P21179_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 270; s.pc = 39; return s.tmp_26; + case 39: + r0 = s.retval; + s.tmp_25.arg1 = r0; + s.tmp_27 = game_Hitbox_top__P21178_mk(s); + s.tmp_27.arg0 = s.arg0; + s.callLocIdx = 271; s.pc = 40; return s.tmp_27; + case 40: + r0 = s.retval; + s.tmp_25.arg2 = r0; + s.callLocIdx = 272; s.pc = 38; return s.tmp_25; + case 38: + r0 = s.retval; + s.tmp_24 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_24); + if (!r0) { step = 13; continue; } + r0 = true; + { step = 17; continue; } case 13: - r0 = (s.x___290494 + 1); - s.x___290494 = (r0); - { step = 9; continue; } case 14: - s.y___290526 = (s.y0___290415); - case 15: - r0 = (s.y___290526 <= s.yn___290422); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.y___290526 - s.y0___290415); - s.tmp_2 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_3 = r0; - r0 = (s.tmp_2 << s.tmp_3); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.offsetY___290386); - s.yLine___290532 = (r0); - r0 = (s.yLine___290532 >= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; + s.tmp_29 = game_Hitbox_contains__P21182_mk(s); + s.tmp_29.arg0 = s.arg1; + s.tmp_30 = game_Hitbox_right__P21179_mk(s); + s.tmp_30.arg0 = s.arg0; + s.callLocIdx = 273; s.pc = 42; return s.tmp_30; + case 42: + r0 = s.retval; + s.tmp_29.arg1 = r0; + s.tmp_31 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 274; s.pc = 43; return s.tmp_31; + case 43: + r0 = s.retval; + s.tmp_29.arg2 = r0; + s.callLocIdx = 275; s.pc = 41; return s.tmp_29; + case 41: + r0 = s.retval; + s.tmp_28 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_28); + if (!r0) { step = 15; continue; } + r0 = true; { step = 17; continue; } + case 15: case 16: - s.tmp_1 = r0 = s.yLine___290532; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_2 = r0; - r0 = (s.tmp_1 <= s.tmp_2); + r0 = false; case 17: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 18; continue; } - s.tmp_4 = helpers_imageDrawLine__P273775_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = 0; - s.tmp_4.arg2 = s.yLine___290532; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_4.arg3 = r0; - s.tmp_4.arg4 = s.yLine___290532; - s.tmp_4.arg5 = 1; - s.callLocIdx = 851; s.pc = 31; return s.tmp_4; - case 31: - r0 = s.retval; - case 18: - case 19: - r0 = (s.y___290526 + 1); - s.y___290526 = (r0); - { step = 15; continue; } - case 20: - case 21: - case 22: - case 23: - r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_draw__P276734.info = {"start":13998,"length":2224,"line":458,"column":8,"endLine":513,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"draw","argumentNames":["this","target","camera"]} +game_Hitbox_overlapsWith__P21184.info = {"start":2515,"length":695,"line":87,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"overlapsWith","argumentNames":["this","other"]} -function tiles_TileMap_draw__P276734_mk(s) { +function game_Hitbox_overlapsWith__P21184_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_draw__P276734, depth: s.depth + 1, + parent: s, fn: game_Hitbox_overlapsWith__P21184, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -40709,31 +36426,37 @@ function tiles_TileMap_draw__P276734_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - bitmask___290375: undefined, - offsetX___290381: undefined, - offsetY___290386: undefined, - x0___290391: undefined, - xn___290398: undefined, - y0___290415: undefined, - yn___290422: undefined, - x___290439: undefined, - y___290445: undefined, - index___290451: undefined, - tile___290458: undefined, - x___290494: undefined, - xLine___290500: undefined, - y___290526: undefined, - yLine___290532: undefined, + tmp_10: undefined, + tmp_11: undefined, + tmp_12: undefined, + tmp_13: undefined, + tmp_14: undefined, + tmp_15: undefined, + tmp_16: undefined, + tmp_17: undefined, + tmp_18: undefined, + tmp_19: undefined, + tmp_20: undefined, + tmp_21: undefined, + tmp_22: undefined, + tmp_23: undefined, + tmp_24: undefined, + tmp_25: undefined, + tmp_26: undefined, + tmp_27: undefined, + tmp_28: undefined, + tmp_29: undefined, + tmp_30: undefined, + tmp_31: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMap_scale__P274556(s) { +function game_Hitbox_contains__P21182(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40746,197 +36469,78 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); - r0 = s.arg0.fields["_map"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = tiles_TileMapData_scale__P274539_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 818; s.pc = 3; return s.tmp_1; - case 3: + if (!checkSubtype(r0, game_Hitbox__C21176_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = game_Hitbox_left__P21177_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 230; s.pc = 7; return s.tmp_3; + case 7: r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1 >= s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_scale__P274556.info = {"start":9270,"length":144,"line":314,"column":8,"endLine":319,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} - -function tiles_TileMap_scale__P274556_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_scale__P274556, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function tiles_TileMap_data__P274557(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C274552_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - return leaveAccessor(s, r0) - default: oops() -} } } -tiles_TileMap_data__P274557.info = {"start":9424,"length":65,"line":321,"column":8,"endLine":323,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"data","argumentNames":["this"]} -tiles_TileMap_data__P274557.isGetter = true; - -function tiles_TileMap_data__P274557_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_data__P274557, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function Sprite_toString__P274251(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = pxsim_String_.mkEmpty(); - s.tmp_9 = r0; - r0 = s.arg0.fields["id"]; - s.tmp_11 = r0; - if ((s.tmp_11) && (s.tmp_11).vtable) { - setupResume(s, 1); - pxsim_String__stringConv(s.tmp_11); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_11) + ""; } - case 1: + s.tmp_4 = r0 = s.arg1; + s.tmp_6 = game_Hitbox_right__P21179_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 231; s.pc = 8; return s.tmp_6; + case 8: r0 = s.retval; - s.tmp_10 = r0; - r0 = pxsim_String__concat(s.tmp_9, s.tmp_10); - s.tmp_8 = r0; - r0 = pxsim_String__concat(s.tmp_8, "("); - s.tmp_7 = r0; - s.tmp_14 = Sprite_x__P274171_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 444; s.pc = 2; return s.tmp_14; + s.tmp_5 = r0; + r0 = (s.tmp_4 <= s.tmp_5); case 2: - r0 = s.retval; - s.tmp_13 = r0; - if ((s.tmp_13) && (s.tmp_13).vtable) { - setupResume(s, 3); - pxsim_String__stringConv(s.tmp_13); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_13) + ""; } + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBool(s.tmp_7); + if (r0) { step = 3; continue; } + r0 = s.tmp_7; + { step = 4; continue; } case 3: + s.tmp_8 = r0 = s.arg2; + s.tmp_10 = game_Hitbox_top__P21178_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 232; s.pc = 9; return s.tmp_10; + case 9: r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_String__concat(s.tmp_7, s.tmp_12); - s.tmp_6 = r0; - r0 = pxsim_String__concat(s.tmp_6, ","); - s.tmp_5 = r0; - s.tmp_17 = Sprite_y__P274173_mk(s); - s.tmp_17.arg0 = s.arg0; - s.callLocIdx = 445; s.pc = 4; return s.tmp_17; + s.tmp_9 = r0; + r0 = (s.tmp_8 >= s.tmp_9); case 4: - r0 = s.retval; - s.tmp_16 = r0; - if ((s.tmp_16) && (s.tmp_16).vtable) { - setupResume(s, 5); - pxsim_String__stringConv(s.tmp_16); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_16) + ""; } + // jmp value (already in r0) + s.tmp_11 = r0; + r0 = pxsim_numops_toBool(s.tmp_11); + if (r0) { step = 5; continue; } + r0 = s.tmp_11; + { step = 6; continue; } case 5: + s.tmp_12 = r0 = s.arg2; + s.tmp_14 = game_Hitbox_bottom__P21180_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 233; s.pc = 10; return s.tmp_14; + case 10: r0 = s.retval; - s.tmp_15 = r0; - r0 = pxsim_String__concat(s.tmp_5, s.tmp_15); - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_4, ")->("); - s.tmp_3 = r0; - s.tmp_20 = Sprite_vx__P274175_mk(s); - s.tmp_20.arg0 = s.arg0; - s.callLocIdx = 446; s.pc = 6; return s.tmp_20; + s.tmp_13 = r0; + r0 = (s.tmp_12 <= s.tmp_13); case 6: - r0 = s.retval; - s.tmp_19 = r0; - if ((s.tmp_19) && (s.tmp_19).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.tmp_19); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_19) + ""; } - case 7: - r0 = s.retval; - s.tmp_18 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_18); - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_2, ","); - s.tmp_1 = r0; - s.tmp_23 = Sprite_vy__P274177_mk(s); - s.tmp_23.arg0 = s.arg0; - s.callLocIdx = 447; s.pc = 8; return s.tmp_23; - case 8: - r0 = s.retval; - s.tmp_22 = r0; - if ((s.tmp_22) && (s.tmp_22).vtable) { - setupResume(s, 9); - pxsim_String__stringConv(s.tmp_22); - checkResumeConsumed(); - return; - } else { s.retval = (s.tmp_22) + ""; } - case 9: - r0 = s.retval; - s.tmp_21 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_21); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + // jmp value (already in r0) + s.tmp_15 = r0; + r0 = s.tmp_15; return leave(s, r0) default: oops() } } } -Sprite_toString__P274251.info = {"start":34111,"length":93,"line":1066,"column":4,"endLine":1068,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"toString","argumentNames":["this"]} +game_Hitbox_contains__P21182.info = {"start":1034,"length":144,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"contains","argumentNames":["this","x","y"]} -function Sprite_toString__P274251_mk(s) { +function game_Hitbox_contains__P21182_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_toString__P274251, depth: s.depth + 1, + parent: s, fn: game_Hitbox_contains__P21182, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -40954,22 +36558,16 @@ function Sprite_toString__P274251_mk(s) { tmp_13: undefined, tmp_14: undefined, tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - tmp_18: undefined, - tmp_19: undefined, - tmp_20: undefined, - tmp_21: undefined, - tmp_22: undefined, - tmp_23: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite___update__P274233(s) { +function helpers_imageBlit__P20838(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -40983,113 +36581,112 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.arg4 = (s.lambdaArgs[4]); + s.arg5 = (s.lambdaArgs[5]); + s.arg6 = (s.lambdaArgs[6]); + s.arg7 = (s.lambdaArgs[7]); + s.arg8 = (s.lambdaArgs[8]); + s.arg9 = (s.lambdaArgs[9]); + s.arg10 = (s.lambdaArgs[10]); + s.arg11 = (s.lambdaArgs[11]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["lifespan"]; - s.tmp_4 = r0; - r0 = (s.arg2 * 1000); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["lifespan"] = (s.tmp_3); - r0 = s.arg0.fields["lifespan"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = Sprite__destroyCore__P274246_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 381; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_Array__mk(); case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + globals._blitArgs___20837 = (s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg1 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 0, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg2 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 1, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg3 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 2, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg4 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 3, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg6 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 4, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg7 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 5, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg8 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 6, s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___20837; + r0 = (s.arg9 | 0); + s.tmp_1 = r0; + r0 = pxsim_Array_.setAt(s.tmp_0, 7, s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.arg10); + if (!r0) { step = 3; continue; } + r0 = 1; + { step = 4; continue; } case 3: + r0 = 0; case 4: - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); + // jmp value (already in r0) s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; + r0 = pxsim_Array_.setAt(globals._blitArgs___20837, 8, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg11); + if (!r0) { step = 5; continue; } + r0 = 1; { step = 6; continue; } case 5: - s.tmp_2 = Sprite_isOutOfScreen__P274231_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 382; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; + r0 = 0; case 6: // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = Sprite_destroy__P274245_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = undefined; - s.tmp_4.arg2 = undefined; - s.callLocIdx = 383; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - case 7: - case 8: - r0 = s.arg0.fields["sayRenderer"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - s.tmp_1 = sprites_BaseSpriteSayRenderer__C274076_v1_4_mk(s); - r0 = s.arg0.fields["sayRenderer"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg2; - s.tmp_1.arg2 = s.arg1; - s.tmp_1.arg3 = s.arg0; - if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.update; - s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - case 9: - case 10: - r0 = undefined; + r0 = pxsim_Array_.setAt(globals._blitArgs___20837, 9, s.tmp_0); + r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___20837); return leave(s, r0) default: oops() } } } -Sprite___update__P274233.info = {"start":18662,"length":483,"line":628,"column":4,"endLine":642,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__update","argumentNames":["this","camera","dt"]} +helpers_imageBlit__P20838.info = {"start":4459,"length":642,"line":154,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"imageBlit","argumentNames":["img","xDst","yDst","wDst","hDst","src","xSrc","ySrc","wSrc","hSrc","transparent","check"]} -function Sprite___update__P274233_mk(s) { +function helpers_imageBlit__P20838_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___update__P274233, depth: s.depth + 1, + parent: s, fn: helpers_imageBlit__P20838, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - tmp_5: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, + arg7: undefined, + arg8: undefined, + arg9: undefined, + arg10: undefined, + arg11: undefined, } } -function Sprite_isOutOfScreen__P274231(s) { +function ArcadePhysicsEngine_createMovingSprite__P21448(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41099,118 +36696,335 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___290721 = undefined; - s.oy___290729 = undefined; + s.ovx___36612 = undefined; + s.ovy___36617 = undefined; + s.fx___36644 = undefined; + s.c___36651 = undefined; + s.fy___36694 = undefined; + s.c___36701 = undefined; + s.dx___36740 = undefined; + s.dy___36753 = undefined; + s.xStep___36766 = undefined; + s.yStep___36768 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = ArcadePhysicsEngine_constrain__P21456_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 574; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.ovx___36612 = (r0); + s.tmp_0 = ArcadePhysicsEngine_constrain__P21456_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 575; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + s.ovy___36617 = (r0); + r0 = s.arg1.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.arg1).fields["_lastX"] = (s.tmp_0); + r0 = s.arg1.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.arg1).fields["_lastY"] = (s.tmp_0); + r0 = s.arg1.fields["_ax"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_vx"]; + s.tmp_3 = r0; + r0 = s.arg1.fields["_ax"]; + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_5, 1000); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); + { step = 8; continue; } + case 1: + r0 = s.arg1.fields["_fx"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } - case 1: - r0 = s.arg1.fields["drawOffsetX"]; - case 2: - // jmp value (already in r0) + if (!r0) { step = 6; continue; } + r0 = s.arg1.fields["_fx"]; s.tmp_2 = r0; - s.ox___290721 = (s.tmp_2); - r0 = s.arg0.fields["flags"]; + r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); s.tmp_1 = r0; - r0 = (s.tmp_1 & 512); + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); + s.fx___36644 = (r0); + r0 = s.arg1.fields["_vx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fx___36644); + s.c___36651 = (r0); + r0 = (s.c___36651 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_min__P20221_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.fx___36644); + s.tmp_3.arg1 = r0; + s.callLocIdx = 583; s.pc = 27; return s.tmp_3; + case 27: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); + { step = 5; continue; } + case 2: + r0 = (s.c___36651 > 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = 0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P20222_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fx___36644); + s.tmp_3.arg1 = r0; + s.callLocIdx = 585; s.pc = 28; return s.tmp_3; + case 28: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); { step = 4; continue; } case 3: - r0 = s.arg1.fields["drawOffsetY"]; + r0 = (s.arg1).fields["_vx"] = (0); case 4: - // jmp value (already in r0) + case 5: + case 6: + case 7: + case 8: + r0 = s.arg1.fields["_ay"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + s.tmp_1 = r0 = s.arg1; + r0 = s.arg1.fields["_vy"]; + s.tmp_3 = r0; + r0 = s.arg1.fields["_ay"]; + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.arg2); + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_5, 1000); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); s.tmp_2 = r0; - s.oy___290729 = (s.tmp_2); - s.tmp_3 = Sprite_right__P274218_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 372; s.pc = 11; return s.tmp_3; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 16; continue; } + case 9: + r0 = s.arg1.fields["_fy"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = s.arg1.fields["_fy"]; + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); + s.fy___36694 = (r0); + r0 = s.arg1.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fy___36694); + s.c___36701 = (r0); + r0 = (s.c___36701 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 10; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_min__P20221_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.fy___36694); + s.tmp_3.arg1 = r0; + s.callLocIdx = 593; s.pc = 29; return s.tmp_3; + case 29: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 13; continue; } + case 10: + r0 = (s.c___36701 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P20222_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fy___36694); + s.tmp_3.arg1 = r0; + s.callLocIdx = 595; s.pc = 30; return s.tmp_3; + case 30: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 12; continue; } case 11: + r0 = (s.arg1).fields["_vy"] = (0); + case 12: + case 13: + case 14: + case 15: + case 16: + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = ArcadePhysicsEngine_constrain__P21456_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 596; s.pc = 31; return s.tmp_2; + case 31: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = ArcadePhysicsEngine_constrain__P21456_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 597; s.pc = 32; return s.tmp_2; + case 32: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.ovx___36612); + s.tmp_3 = r0; + r0 = (s.tmp_3 / 256); s.tmp_2 = r0; - r0 = (s.tmp_2 - s.ox___290721); + r0 = (s.tmp_2 * s.arg3); s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); + r0 = (s.tmp_1 / 1000); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.dx___36740 = (r0); + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.ovy___36617); + s.tmp_3 = r0; + r0 = (s.tmp_3 / 256); + s.tmp_2 = r0; + r0 = (s.tmp_2 * s.arg3); + s.tmp_1 = r0; + r0 = (s.tmp_1 / 1000); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_5 = r0; + r0 = (s.tmp_5 | 0); + s.dy___36753 = (r0); + s.xStep___36766 = (s.dx___36740); + s.yStep___36768 = (s.dy___36753); + case 17: + s.tmp_2 = Fx_abs__P20220_mk(s); + s.tmp_2.arg0 = s.xStep___36766; + s.callLocIdx = 604; s.pc = 33; return s.tmp_2; + case 33: + r0 = s.retval; + s.tmp_1 = r0; + r0 = s.arg0.fields["maxSingleStep"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 > s.tmp_3); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 5; continue; } + if (!r0) { step = 18; continue; } r0 = s.tmp_0; - { step = 6; continue; } - case 5: - s.tmp_6 = Sprite_bottom__P274222_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 373; s.pc = 12; return s.tmp_6; - case 12: + { step = 19; continue; } + case 18: + s.tmp_5 = Fx_abs__P20220_mk(s); + s.tmp_5.arg0 = s.yStep___36768; + s.callLocIdx = 605; s.pc = 34; return s.tmp_5; + case 34: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.oy___290729); s.tmp_4 = r0; - r0 = (s.tmp_4 < 0); - case 6: + r0 = s.arg0.fields["maxSingleStep"]; + s.tmp_6 = r0; + r0 = (s.tmp_4 > s.tmp_6); + case 19: // jmp value (already in r0) s.tmp_7 = r0; - r0 = pxsim_numops_toBool(s.tmp_7); - if (!r0) { step = 7; continue; } - r0 = s.tmp_7; - { step = 8; continue; } - case 7: - s.tmp_10 = Sprite_left__P274216_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 374; s.pc = 13; return s.tmp_10; - case 13: + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 24; continue; } + s.tmp_10 = Fx_abs__P20220_mk(s); + s.tmp_10.arg0 = s.xStep___36766; + s.callLocIdx = 606; s.pc = 35; return s.tmp_10; + case 35: r0 = s.retval; s.tmp_9 = r0; - r0 = (s.tmp_9 - s.ox___290721); - s.tmp_8 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); + r0 = s.arg0.fields["minSingleStep"]; s.tmp_11 = r0; - r0 = (s.tmp_8 > s.tmp_11); - case 8: - // jmp value (already in r0) - s.tmp_12 = r0; - r0 = pxsim_numops_toBool(s.tmp_12); - if (!r0) { step = 9; continue; } - r0 = s.tmp_12; - { step = 10; continue; } - case 9: - s.tmp_15 = Sprite_top__P274220_mk(s); - s.tmp_15.arg0 = s.arg0; - s.callLocIdx = 375; s.pc = 14; return s.tmp_15; - case 14: + r0 = (s.tmp_9 > s.tmp_11); + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 20; continue; } + r0 = pxsim.Math_.idiv(s.xStep___36766, 2); + s.xStep___36766 = (r0); + case 20: + case 21: + s.tmp_2 = Fx_abs__P20220_mk(s); + s.tmp_2.arg0 = s.yStep___36768; + s.callLocIdx = 608; s.pc = 36; return s.tmp_2; + case 36: r0 = s.retval; - s.tmp_14 = r0; - r0 = (s.tmp_14 - s.oy___290729); - s.tmp_13 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_16 = r0; - r0 = (s.tmp_13 > s.tmp_16); - case 10: - // jmp value (already in r0) - s.tmp_17 = r0; - r0 = s.tmp_17; + s.tmp_1 = r0; + r0 = s.arg0.fields["minSingleStep"]; + s.tmp_3 = r0; + r0 = (s.tmp_1 > s.tmp_3); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = pxsim.Math_.idiv(s.yStep___36768, 2); + s.yStep___36768 = (r0); + case 22: + case 23: + { step = 17; continue; } + case 24: + r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C21433_VT); + s.tmp_0 = r0; + s.tmp_1 = MovingSprite_constructor__P21434_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + r0 = s.arg1.fields["_vx"]; + s.tmp_1.arg2 = r0; + r0 = s.arg1.fields["_vy"]; + s.tmp_1.arg3 = r0; + s.tmp_1.arg4 = s.dx___36740; + s.tmp_1.arg5 = s.dy___36753; + s.tmp_1.arg6 = s.xStep___36766; + s.tmp_1.arg7 = s.yStep___36768; + s.callLocIdx = 610; s.pc = 37; return s.tmp_1; + case 37: + r0 = s.retval; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -Sprite_isOutOfScreen__P274231.info = {"start":17830,"length":358,"line":607,"column":4,"endLine":611,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isOutOfScreen","argumentNames":["this","camera"]} +ArcadePhysicsEngine_createMovingSprite__P21448.info = {"start":6933,"length":2805,"line":217,"column":4,"endLine":307,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"createMovingSprite","argumentNames":["this","sprite","dtMs","dt2"]} -function Sprite_isOutOfScreen__P274231_mk(s) { +function ArcadePhysicsEngine_createMovingSprite__P21448_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isOutOfScreen__P274231, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P21448, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -41224,23 +37038,27 @@ function Sprite_isOutOfScreen__P274231_mk(s) { tmp_9: undefined, tmp_10: undefined, tmp_11: undefined, - tmp_12: undefined, - tmp_13: undefined, - tmp_14: undefined, - tmp_15: undefined, - tmp_16: undefined, - tmp_17: undefined, - ox___290721: undefined, - oy___290729: undefined, + ovx___36612: undefined, + ovy___36617: undefined, + fx___36644: undefined, + c___36651: undefined, + fy___36694: undefined, + c___36701: undefined, + dx___36740: undefined, + dy___36753: undefined, + xStep___36766: undefined, + yStep___36768: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function sprites_BaseSpriteSayRenderer_update__P274079(s) { +function ArcadePhysicsEngine_constrain__P21456(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41253,34 +37071,45 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(r0); - r0 = undefined; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = Fx_max__P20222_mk(s); + s.tmp_1 = Fx_min__P20221_mk(s); + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 786; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["maxNegativeVelocity"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 787; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_update__P274079.info = {"start":250,"length":68,"line":9,"column":8,"endLine":11,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"update","argumentNames":["this","dt","camera","owner"]} +ArcadePhysicsEngine_constrain__P21456.info = {"start":27343,"length":193,"line":761,"column":4,"endLine":769,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"constrain","argumentNames":["this","v"]} -function sprites_BaseSpriteSayRenderer_update__P274079_mk(s) { +function ArcadePhysicsEngine_constrain__P21456_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_update__P274079, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_constrain__P21456, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function Sprite_data__P274194(s) { +function Fx_compare__P20219(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41295,19 +37124,16 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = (s.arg0).fields["_data"] = (s.arg1); - r0 = undefined; + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -Sprite_data__P274194.info = {"start":6536,"length":56,"line":241,"column":4,"endLine":243,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this","value"]} +Fx_compare__P20219.info = {"start":1395,"length":106,"line":41,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"compare","argumentNames":["a","b"]} -function Sprite_data__P274194_mk(s) { +function Fx_compare__P20219_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_data__P274194, depth: s.depth + 1, + parent: s, fn: Fx_compare__P20219, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -41317,7 +37143,7 @@ function Sprite_data__P274194_mk(s) { -function Sprite_data__P274193(s) { +function sprites_SpriteMap_insertAABB__P21339(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41327,51 +37153,163 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.left___36432 = undefined; + s.top___36435 = undefined; + s.xn___36438 = undefined; + s.yn___36449 = undefined; + s.x___36460 = undefined; + s.y___36465 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P21280_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 505; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.left___36432 = (r0); + s.tmp_0 = Sprite_top__P21284_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 506; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.top___36435 = (r0); + s.tmp_3 = Sprite_width__P21278_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 507; s.pc = 7; return s.tmp_3; + case 7: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = s.arg0.fields["cellWidth"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 - 1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = r0 = s.arg0; - r0 = pxsim_pxtrt.mkMap(); + r0 = s.arg0.fields["cellWidth"]; + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_5); + s.xn___36438 = (r0); + s.tmp_3 = Sprite_height__P21279_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 508; s.pc = 8; return s.tmp_3; + case 8: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.arg0.fields["cellHeight"]; s.tmp_4 = r0; - r0 = (s.tmp_3).fields["_data"] = (s.tmp_4); + r0 = (s.tmp_2 + s.tmp_4); + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0 = r0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_5 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_5); + s.yn___36449 = (r0); + s.x___36460 = (0); case 1: + r0 = (s.x___36460 <= s.xn___36438); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.y___36465 = (0); case 2: - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + r0 = (s.y___36465 <= s.yn___36449); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = sprites_SpriteMap_insertAtKey__P21338_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = r0 = s.left___36432; + s.tmp_4 = Math_min__P20177_mk(s); + s.tmp_5 = Sprite_width__P21278_mk(s); + s.tmp_5.arg0 = s.arg1; + s.callLocIdx = 509; s.pc = 11; return s.tmp_5; + case 11: + r0 = s.retval; + s.tmp_4.arg0 = r0; + r0 = s.arg0.fields["cellWidth"]; + s.tmp_6 = r0; + r0 = (s.x___36460 * s.tmp_6); + s.tmp_4.arg1 = r0; + s.callLocIdx = 510; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1.arg1 = r0; + s.tmp_7 = r0 = s.top___36435; + s.tmp_9 = Math_min__P20177_mk(s); + s.tmp_10 = Sprite_height__P21279_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 511; s.pc = 13; return s.tmp_10; + case 13: + r0 = s.retval; + s.tmp_9.arg0 = r0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_11 = r0; + r0 = (s.y___36465 * s.tmp_11); + s.tmp_9.arg1 = r0; + s.callLocIdx = 512; s.pc = 12; return s.tmp_9; + case 12: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_7 + s.tmp_8); + s.tmp_1.arg2 = r0; + s.tmp_1.arg3 = s.arg1; + s.callLocIdx = 513; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = (s.y___36465 + 1); + s.y___36465 = (r0); + { step = 2; continue; } + case 3: + r0 = (s.x___36460 + 1); + s.x___36460 = (r0); + { step = 1; continue; } + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_data__P274193.info = {"start":6438,"length":92,"line":236,"column":4,"endLine":239,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"data","argumentNames":["this"]} -Sprite_data__P274193.isGetter = true; +sprites_SpriteMap_insertAABB__P21339.info = {"start":3184,"length":521,"line":91,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAABB","argumentNames":["this","sprite"]} -function Sprite_data__P274193_mk(s) { +function sprites_SpriteMap_insertAABB__P21339_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_data__P274193, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAABB__P21339, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + left___36432: undefined, + top___36435: undefined, + xn___36438: undefined, + yn___36449: undefined, + x___36460: undefined, + y___36465: undefined, arg0: undefined, + arg1: undefined, } } -function scene_BackgroundLayer_constructor__P274503(s) { +function sprites_SpriteMap_insertAtKey__P21338(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41381,6 +37319,8 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.k___36500 = undefined; + s.bucket___36505 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -41389,64 +37329,61 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_BackgroundLayer__C274496_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_max__P271946_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 795; s.pc = 7; return s.tmp_2; - case 7: + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P21337_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 504; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; + s.k___36500 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___36500); + s.bucket___36505 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___36505); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["distance"] = (s.tmp_1); - r0 = (s.arg0).fields["img"] = (s.arg3); - s.tmp_0 = r0 = s.arg2; - r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); - if (r0) { step = 1; continue; } - r0 = pxsim_pxtcore.switch_eq(1, s.tmp_0); - if (r0) { step = 2; continue; } - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); - if (r0) { step = 3; continue; } - r0 = pxsim_pxtcore.switch_eq(3, s.tmp_0); - if (r0) { step = 4; continue; } - r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); - if (r0) { step = 5; continue; } - r0 = s.tmp_0; - { step = 6; continue; } + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0.fields["buckets"]; + s.tmp_2 = r0; + s.tmp_3 = r0 = s.k___36500; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); + s.bucket___36505 = (s.tmp_4); case 1: - r0 = (s.arg0).fields["repeatX"] = (true); - r0 = (s.arg0).fields["repeatY"] = (true); - r0 = (s.arg0).fields["alignX"] = (5); - r0 = (s.arg0).fields["alignY"] = (5); - { step = 6; continue; } case 2: + r0 = pxsim_Array_.indexOf(s.bucket___36505, s.arg3, undefined); + s.tmp_1 = r0; + r0 = (s.tmp_1 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array__push(s.bucket___36505, s.arg3); case 3: - r0 = (s.arg0).fields["repeatX"] = (false); - r0 = (s.arg0).fields["repeatY"] = (true); - r0 = (s.arg0).fields["alignX"] = (s.arg2); - r0 = (s.arg0).fields["alignY"] = (5); - { step = 6; continue; } case 4: - case 5: - r0 = (s.arg0).fields["repeatX"] = (true); - r0 = (s.arg0).fields["repeatY"] = (false); - r0 = (s.arg0).fields["alignX"] = (5); - r0 = (s.arg0).fields["alignY"] = (s.arg2); - case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_constructor__P274503.info = {"start":1936,"length":1117,"line":72,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","distance","alignment","img"]} +sprites_SpriteMap_insertAtKey__P21338.info = {"start":2872,"length":302,"line":82,"column":8,"endLine":89,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAtKey","argumentNames":["this","x","y","sprite"]} -function scene_BackgroundLayer_constructor__P274503_mk(s) { +function sprites_SpriteMap_insertAtKey__P21338_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_constructor__P274503, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAtKey__P21338, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + k___36500: undefined, + bucket___36505: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -41457,95 +37394,7 @@ function scene_BackgroundLayer_constructor__P274503_mk(s) { -function scene_Camera_y__P274608(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___273849); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_y__P274608.info = {"start":1536,"length":75,"line":51,"column":8,"endLine":53,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"y","argumentNames":["this"]} -scene_Camera_y__P274608.isGetter = true; - -function scene_Camera_y__P274608_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_y__P274608, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, -} } - - - - - -function scene_Camera_x__P274607(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___273849); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_x__P274607.info = {"start":1453,"length":74,"line":48,"column":8,"endLine":50,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"x","argumentNames":["this"]} -scene_Camera_x__P274607.isGetter = true; - -function scene_Camera_x__P274607_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_x__P274607, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - arg0: undefined, -} } - - - - - -function scene_Scene_data__P274685(s) { +function sprites_SpriteMap_clear__P21336(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41560,19 +37409,24 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C274660_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Scene_data__P274685.info = {"start":7014,"length":53,"line":189,"column":8,"endLine":191,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"data","argumentNames":["this"]} -scene_Scene_data__P274685.isGetter = true; +sprites_SpriteMap_clear__P21336.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} -function scene_Scene_data__P274685_mk(s) { +function sprites_SpriteMap_clear__P21336_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_data__P274685, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_clear__P21336, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -41580,7 +37434,7 @@ function scene_Scene_data__P274685_mk(s) { -function particles_ParticleSource___draw__P274974(s) { +function sprites_SpriteMap_resizeBuckets__P21335(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41590,96 +37444,170 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___290776 = undefined; - s.left___290779 = undefined; - s.top___290789 = undefined; + s.maxWidth___36535 = undefined; + s.maxHeight___36536 = undefined; + s.sprite___36538 = undefined; + s.unnamed162___U3 = undefined; + s.unnamed163___U4 = undefined; + s.tMap___36554 = undefined; + s.areaWidth___36558 = undefined; + s.areaHeight___36565 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - r0 = s.arg0.fields["head"]; - s.current___290776 = (r0); - r0 = s.arg0.fields["pFlags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = 0; - { step = 2; continue; } + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.maxWidth___36535 = (0); + s.maxHeight___36536 = (0); + s.sprite___36538 = (undefined); + s.unnamed162___U3 = (s.arg1); + s.unnamed163___U4 = (0); case 1: - r0 = s.arg1.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + s.tmp_0 = r0 = s.unnamed163___U4; + r0 = pxsim_Array__length(s.unnamed162___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed162___U3, s.unnamed163___U4); + s.sprite___36538 = (r0); + s.tmp_4 = Sprite_width__P21278_mk(s); + s.tmp_4.arg0 = s.sprite___36538; + s.callLocIdx = 493; s.pc = 11; return s.tmp_4; + case 11: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); + r0 = (s.tmp_3 > s.maxWidth___36535); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + s.tmp_5 = Sprite_width__P21278_mk(s); + s.tmp_5.arg0 = s.sprite___36538; + s.callLocIdx = 494; s.pc = 12; return s.tmp_5; + case 12: + r0 = s.retval; + s.maxWidth___36535 = (r0); case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.left___290779 = (s.tmp_4); - r0 = s.arg0.fields["pFlags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = 0; - { step = 4; continue; } case 3: - r0 = s.arg1.fields["drawOffsetY"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); - case 4: - // jmp value (already in r0) - s.tmp_4 = r0; - s.top___290789 = (s.tmp_4); - case 5: - r0 = pxsim_numops_toBoolDecr(s.current___290776); - if (!r0) { step = 8; continue; } - r0 = s.current___290776.fields["lifespan"]; + s.tmp_2 = Sprite_height__P21279_mk(s); + s.tmp_2.arg0 = s.sprite___36538; + s.callLocIdx = 495; s.pc = 13; return s.tmp_2; + case 13: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); + r0 = (s.tmp_1 > s.maxHeight___36536); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.tmp_2 = particles_ParticleSource_drawParticle__P277148_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.current___290776; - s.tmp_2.arg2 = s.left___290779; - s.tmp_2.arg3 = s.top___290789; - s.callLocIdx = 1218; s.pc = 9; return s.tmp_2; - case 9: + if (!r0) { step = 4; continue; } + s.tmp_3 = Sprite_height__P21279_mk(s); + s.tmp_3.arg0 = s.sprite___36538; + s.callLocIdx = 496; s.pc = 14; return s.tmp_3; + case 14: r0 = s.retval; + s.maxHeight___36536 = (r0); + case 4: + case 5: + r0 = (s.unnamed163___U4 + 1); + s.unnamed163___U4 = (r0); + { step = 1; continue; } case 6: + s.unnamed162___U3 = (undefined); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 497; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tMap___36554 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tMap___36554); + if (!r0) { step = 7; continue; } + s.tmp_0 = tiles_TileMap_areaWidth__P21676_mk(s); + s.tmp_0.arg0 = s.tMap___36554; + s.callLocIdx = 498; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + { step = 8; continue; } case 7: - r0 = s.current___290776.fields["next"]; - s.current___290776 = (r0); - { step = 5; continue; } + r0 = pxsim_ImageMethods.width(globals.screen___20904); case 8: + // jmp value (already in r0) + s.tmp_1 = r0; + s.areaWidth___36558 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tMap___36554); + if (!r0) { step = 9; continue; } + s.tmp_0 = tiles_TileMap_areaHeight__P21677_mk(s); + s.tmp_0.arg0 = s.tMap___36554; + s.callLocIdx = 499; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } + case 9: + r0 = pxsim_ImageMethods.height(globals.screen___20904); + case 10: + // jmp value (already in r0) + s.tmp_1 = r0; + s.areaHeight___36565 = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_clamp__P20173_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaWidth___36558 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxWidth___36535 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 500; s.pc = 18; return s.tmp_2; + case 18: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cellWidth"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_clamp__P20173_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaHeight___36565 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxHeight___36536 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 501; s.pc = 19; return s.tmp_2; + case 19: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cellHeight"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_2 = r0; + r0 = pxsim.Math_.idiv(s.areaHeight___36565, s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["rowCount"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["cellWidth"]; + s.tmp_2 = r0; + r0 = pxsim.Math_.idiv(s.areaWidth___36558, s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource___draw__P274974.info = {"start":3216,"length":468,"line":112,"column":8,"endLine":122,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"__draw","argumentNames":["this","camera"]} +sprites_SpriteMap_resizeBuckets__P21335.info = {"start":1696,"length":826,"line":52,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"resizeBuckets","argumentNames":["this","sprites"]} -function particles_ParticleSource___draw__P274974_mk(s) { +function sprites_SpriteMap_resizeBuckets__P21335_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource___draw__P274974, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_resizeBuckets__P21335, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - current___290776: undefined, - left___290779: undefined, - top___290789: undefined, + tmp_5: undefined, + maxWidth___36535: undefined, + maxHeight___36536: undefined, + sprite___36538: undefined, + unnamed162___U3: undefined, + unnamed163___U4: undefined, + tMap___36554: undefined, + areaWidth___36558: undefined, + areaHeight___36565: undefined, arg0: undefined, arg1: undefined, } } @@ -41688,7 +37616,7 @@ function particles_ParticleSource___draw__P274974_mk(s) { -function particles_ParticleSource_drawParticle__P277148(s) { +function Sprite_clearObstacles__P21306(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41700,55 +37628,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C274968_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory__C275004_v1_4_mk(s); - r0 = s.arg0.fields["_factory"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - r0 = s.arg1.fields["_x"]; + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_1 - s.arg2); - s.tmp_0.arg2 = r0; - r0 = s.arg1.fields["_y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.arg3); - s.tmp_0.arg3 = r0; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleFactory__C275004_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawParticle; - s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = (s.tmp_0).fields["_obstacles"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_drawParticle__P277148.info = {"start":8615,"length":174,"line":287,"column":8,"endLine":289,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"drawParticle","argumentNames":["this","p","screenLeft","screenTop"]} +Sprite_clearObstacles__P21306.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} -function particles_ParticleSource_drawParticle__P277148_mk(s) { +function Sprite_clearObstacles__P21306_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_drawParticle__P277148, depth: s.depth + 1, + parent: s, fn: Sprite_clearObstacles__P21306, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_ParticleFactory_drawParticle__P275007(s) { +function Fx_idiv__P20218(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41761,49 +37669,28 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleFactory__C275004_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___273849; - r0 = (s.arg2 + 128); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 8); - s.tmp_1 = r0; - r0 = (s.arg3 + 128); - s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, 1); - r0 = undefined; + r0 = pxsim.Math_.idiv(s.arg0, s.arg1); return leave(s, r0) default: oops() } } } -particles_ParticleFactory_drawParticle__P275007.info = {"start":2265,"length":118,"line":85,"column":8,"endLine":87,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","particle","x","y"]} +Fx_idiv__P20218.info = {"start":1279,"length":111,"line":38,"column":4,"endLine":40,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"idiv","argumentNames":["a","b"]} -function particles_ParticleFactory_drawParticle__P275007_mk(s) { +function Fx_idiv__P20218_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_drawParticle__P275007, depth: s.depth + 1, + parent: s, fn: Fx_idiv__P20218, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function sprites_BaseSprite___update__P273919(s) { +function helpers_arrayMap__P20151(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41813,35 +37700,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___36830 = undefined; + s.len___36832 = undefined; + s.i___36835 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - r0 = undefined; + r0 = pxsim_Array__mk(); + s.res___36830 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___36832 = (r0); + s.i___36835 = (0); + case 1: + r0 = (s.i___36835 < s.len___36832); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.res___36830; + s.tmp_3 = lambda_3_mk(s); + s.tmp_3.argL = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.i___36835); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.i___36835; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 4; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___36835 + 1); + s.i___36835 = (r0); + { step = 1; continue; } + case 2: + r0 = s.res___36830; return leave(s, r0) default: oops() } } } -sprites_BaseSprite___update__P273919.info = {"start":1027,"length":46,"line":45,"column":8,"endLine":45,"endColumn":54,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__update","argumentNames":["this","camera","dt"]} +helpers_arrayMap__P20151.info = {"start":6528,"length":299,"line":229,"column":4,"endLine":236,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayMap","argumentNames":["arr","callbackfn"]} -function sprites_BaseSprite___update__P273919_mk(s) { +function helpers_arrayMap__P20151_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___update__P273919, depth: s.depth + 1, + parent: s, fn: helpers_arrayMap__P20151, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + res___36830: undefined, + len___36832: undefined, + i___36835: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function sprites_BaseSprite___draw__P273917(s) { +function ArcadePhysicsEngine_draw__P21446(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41853,54 +37772,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - s.tmp_1 = sprites_BaseSprite__C273911_v0_1_mk(s); - s.tmp_1.arg0 = s.arg0; - if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C273911_VT)) failedCast(s.tmp_1.arg0); - s.tmp_1.fn = s.tmp_1.arg0.vtable.methods.__visible; - s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_2 = sprites_BaseSprite__C273911_v2_2_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C273911_VT)) failedCast(s.tmp_2.arg0); - s.tmp_2.fn = s.tmp_2.arg0.vtable.methods.__drawCore; - s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_draw__P21334_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 539; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite___draw__P273917.info = {"start":840,"length":131,"line":37,"column":8,"endLine":41,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__draw","argumentNames":["this","camera"]} +ArcadePhysicsEngine_draw__P21446.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} -function sprites_BaseSprite___draw__P273917_mk(s) { +function ArcadePhysicsEngine_draw__P21446_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___draw__P273917, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_draw__P21446, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_BaseSprite___drawCore__P273918(s) { +function sprites_SpriteMap_draw__P21334(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41910,33 +37811,116 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x___36856 = undefined; + s.y___36862 = undefined; + s.left___36868 = undefined; + s.top___36873 = undefined; + s.k___36878 = undefined; + s.b___36883 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_SpriteMap__C21331_VT)) failedCast(r0); + s.x___36856 = (0); + case 1: + r0 = s.arg0.fields["columnCount"]; + s.tmp_1 = r0; + r0 = (s.x___36856 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.y___36862 = (0); + case 2: + r0 = s.arg0.fields["rowCount"]; + s.tmp_1 = r0; + r0 = (s.y___36862 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["cellWidth"]; + s.tmp_2 = r0; + r0 = (s.x___36856 * s.tmp_2); + s.left___36868 = (r0); + r0 = s.arg0.fields["cellHeight"]; + s.tmp_0 = r0; + r0 = (s.y___36862 * s.tmp_0); + s.top___36873 = (r0); + s.tmp_0 = sprites_SpriteMap_key__P21337_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.left___36868; + s.tmp_0.arg2 = s.top___36873; + s.callLocIdx = 491; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.k___36878 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___36878); + s.b___36883 = (r0); + s.tmp_0 = r0 = s.b___36883; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 3: + r0 = pxsim_Array__length(s.b___36883); + case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 5; continue; } + s.tmp_2 = helpers_imageDrawRect__P20844_mk(s); + s.tmp_2.arg0 = globals.screen___20904; + s.tmp_2.arg1 = s.left___36868; + s.tmp_2.arg2 = s.top___36873; + r0 = s.arg0.fields["cellWidth"]; + s.tmp_2.arg3 = r0; + r0 = s.arg0.fields["cellHeight"]; + s.tmp_2.arg4 = r0; + s.tmp_2.arg5 = 5; + s.callLocIdx = 492; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; + case 5: + case 6: + r0 = (s.y___36862 + 1); + s.y___36862 = (r0); + { step = 2; continue; } + case 7: + r0 = (s.x___36856 + 1); + s.x___36856 = (r0); + { step = 1; continue; } + case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite___drawCore__P273918.info = {"start":981,"length":36,"line":43,"column":8,"endLine":43,"endColumn":44,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +sprites_SpriteMap_draw__P21334.info = {"start":1122,"length":496,"line":36,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"draw","argumentNames":["this"]} -function sprites_BaseSprite___drawCore__P273918_mk(s) { +function sprites_SpriteMap_draw__P21334_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___drawCore__P273918, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_draw__P21334, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + x___36856: undefined, + y___36862: undefined, + left___36868: undefined, + top___36873: undefined, + k___36878: undefined, + b___36883: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_BaseSprite___visible__P273914(s) { +function ArcadePhysicsEngine_removeSprite__P21445(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41948,29 +37932,35 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C273911_VT)) failedCast(r0); - r0 = true; + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite___visible__P273914.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} +ArcadePhysicsEngine_removeSprite__P21445.info = {"start":2691,"length":80,"line":104,"column":4,"endLine":106,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} -function sprites_BaseSprite___visible__P273914_mk(s) { +function ArcadePhysicsEngine_removeSprite__P21445_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___visible__P273914, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_removeSprite__P21445, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function game_SplashDialog_drawTextCore__P274759(s) { +function ArcadePhysicsEngine_addSprite__P21444(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -41980,277 +37970,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scrollMax___290850 = undefined; - s.left___290893 = undefined; - s.ysub___290938 = undefined; - s.left___290949 = undefined; + s.tm___36920 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_SplashDialog__C274749_VT)) failedCast(r0); - s.tmp_0 = Math_max__P271946_mk(s); - r0 = s.arg0.fields["maxOffset"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["maxSubOffset"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 980; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.scrollMax___290850 = (r0); - r0 = s.arg0.fields["timer"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 > 0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C21435_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = r0 = s.arg0; - r0 = s.tmp_2.fields["timer"]; - s.tmp_4 = r0; - s.tmp_7 = game_eventContext__P274819_mk(s); - s.callLocIdx = 981; s.pc = 16; return s.tmp_7; - case 16: + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = game_currentScene__P21034_mk(s); + s.callLocIdx = 537; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_6 = r0; - r0 = s.tmp_6.fields["deltaTimeMillis"]; - s.tmp_8 = r0; - r0 = (s.tmp_8 / 1000); - s.tmp_5 = r0; - r0 = (s.tmp_4 - s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_2).fields["timer"] = (s.tmp_3); - r0 = s.arg0.fields["timer"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = s.arg0.fields["offset"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 > 0); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 1; continue; } - r0 = (s.arg0).fields["offset"] = (0); - r0 = (s.arg0).fields["timer"] = (2); + r0 = r0.fields["tileMap"]; + s.tm___36920 = (r0); + s.tmp_0 = r0 = s.tm___36920; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: - case 2: - case 3: - case 4: - { step = 8; continue; } - case 5: - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["offset"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["offset"] = (s.tmp_1); - r0 = s.arg0.fields["offset"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 >= s.scrollMax___290850); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = (s.arg0).fields["offset"] = (s.scrollMax___290850); - r0 = (s.arg0).fields["timer"] = (2); + s.tmp_1 = tiles_TileMap_isOnWall__P21693_mk(s); + s.tmp_1.arg0 = s.tm___36920; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 538; s.pc = 6; return s.tmp_1; case 6: - case 7: - case 8: - r0 = s.arg0.fields["maxOffset"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.arg0.fields["image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = s.arg0.fields["text"]; - s.tmp_8 = r0; - r0 = pxsim_String_.length(s.tmp_8); - s.tmp_7 = r0; - s.tmp_10 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_10.arg0 = r0; - if (!s.tmp_10.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_10.arg0, "charWidth"); - } else { - s.tmp_10.fn = s.tmp_10.arg0.vtable.iface["charWidth"]; - if (s.tmp_10.fn == null) { s.retval = s.tmp_10.arg0.fields["charWidth"]; } - else if (!s.tmp_10.fn.isGetter) { s.retval = bind(s.tmp_10); } - else { s.callLocIdx = 983; s.pc = 17; return s.tmp_10; } - } - case 17: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_7 * s.tmp_9); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.left___290893 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["text"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.left___290893; - s.tmp_0.arg3 = 10; - r0 = s.arg0.fields["textColor"]; - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["font"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 984; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - { step = 10; continue; } - case 9: - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["text"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["offset"]; - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = 10; - r0 = s.arg0.fields["textColor"]; - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["font"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 985; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - case 10: - r0 = s.arg0.fields["subtext"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - s.tmp_3 = if_charHeight_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_3.arg0 = r0; - if (!s.tmp_3.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "charHeight"); - } else { - s.tmp_3.fn = s.tmp_3.arg0.vtable.iface["charHeight"]; - if (s.tmp_3.fn == null) { s.retval = s.tmp_3.arg0.fields["charHeight"]; } - else if (!s.tmp_3.fn.isGetter) { s.retval = bind(s.tmp_3); } - else { s.callLocIdx = 986; s.pc = 20; return s.tmp_3; } - } - case 20: r0 = s.retval; + case 2: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = (10 + s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_1 + 2); - s.ysub___290938 = (r0); - r0 = s.arg0.fields["maxSubOffset"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = s.arg0.fields["image"]; - s.tmp_4 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_4); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 1); - s.tmp_2 = r0; - r0 = s.arg0.fields["subtext"]; - s.tmp_8 = r0; - r0 = pxsim_String_.length(s.tmp_8); - s.tmp_7 = r0; - s.tmp_10 = if_charWidth_1_mk(s); - r0 = s.arg0.fields["font"]; - s.tmp_10.arg0 = r0; - if (!s.tmp_10.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_10.arg0, "charWidth"); - } else { - s.tmp_10.fn = s.tmp_10.arg0.vtable.iface["charWidth"]; - if (s.tmp_10.fn == null) { s.retval = s.tmp_10.arg0.fields["charWidth"]; } - else if (!s.tmp_10.fn.isGetter) { s.retval = bind(s.tmp_10); } - else { s.callLocIdx = 987; s.pc = 21; return s.tmp_10; } - } - case 21: - r0 = s.retval; - s.tmp_9 = r0; - r0 = (s.tmp_7 * s.tmp_9); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + s.tmp_3 = r0 = s.arg1; + r0 = s.tmp_3.fields["flags"]; s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); - s.left___290949 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["subtext"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.left___290949; - s.tmp_0.arg3 = s.ysub___290938; - r0 = s.arg0.fields["textColor"]; - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["font"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 988; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; - { step = 12; continue; } - case 11: - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - r0 = s.arg0.fields["image"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["subtext"]; - s.tmp_0.arg1 = r0; - r0 = s.arg0.fields["unit"]; - s.tmp_1 = r0; - s.tmp_3 = Math_min__P271947_mk(s); - r0 = s.arg0.fields["offset"]; - s.tmp_3.arg0 = r0; - r0 = s.arg0.fields["maxSubOffset"]; - s.tmp_3.arg1 = r0; - s.callLocIdx = 989; s.pc = 24; return s.tmp_3; - case 24: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.ysub___290938; - r0 = s.arg0.fields["textColor"]; - s.tmp_0.arg4 = r0; - r0 = s.arg0.fields["font"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 990; s.pc = 23; return s.tmp_0; - case 23: - r0 = s.retval; - case 12: - case 13: - case 14: - s.tmp_0 = game_BaseDialog_drawBorder__P276767_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 991; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; + r0 = (s.tmp_5 | 256); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["flags"] = (s.tmp_4); + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -game_SplashDialog_drawTextCore__P274759.info = {"start":9958,"length":1616,"line":306,"column":8,"endLine":344,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} +ArcadePhysicsEngine_addSprite__P21444.info = {"start":2465,"length":220,"line":96,"column":4,"endLine":102,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} -function game_SplashDialog_drawTextCore__P274759_mk(s) { +function ArcadePhysicsEngine_addSprite__P21444_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_SplashDialog_drawTextCore__P274759, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_addSprite__P21444, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -42258,23 +38029,16 @@ function game_SplashDialog_drawTextCore__P274759_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - scrollMax___290850: undefined, - left___290893: undefined, - ysub___290938: undefined, - left___290949: undefined, + tm___36920: undefined, arg0: undefined, + arg1: undefined, } } -function game_BaseDialog_setText__P274735(s) { +function scene_Scene_data__P21028(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42286,31 +38050,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_BaseDialog__C274720_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, scene_Scene__C21026_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) default: oops() } } } -game_BaseDialog_setText__P274735.info = {"start":2302,"length":77,"line":80,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","rawString"]} +scene_Scene_data__P21028.info = {"start":7014,"length":53,"line":189,"column":8,"endLine":191,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"data","argumentNames":["this"]} +scene_Scene_data__P21028.isGetter = true; -function game_BaseDialog_setText__P274735_mk(s) { +function scene_Scene_data__P21028_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_BaseDialog_setText__P274735, depth: s.depth + 1, + parent: s, fn: scene_Scene_data__P21028, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, } } -function controller_AnyButton_isPressed__P276595(s) { +function controller_AnyButton_isPressed__P21154(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42320,36 +38083,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctrl___290999 = undefined; - s.b___291003 = undefined; - s.unnamed2122___U2 = undefined; - s.unnamed2123___U3 = undefined; + s.ctrl___37621 = undefined; + s.b___37625 = undefined; + s.unnamed154___U2 = undefined; + s.unnamed155___U3 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_AnyButton__C276587_VT)) failedCast(r0); - s.tmp_0 = controller__player1__P273945_mk(s); + if (!checkSubtype(r0, controller_AnyButton__C21136_VT)) failedCast(r0); + s.tmp_0 = controller__player1__P21099_mk(s); s.callLocIdx = 197; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - s.ctrl___290999 = (r0); - s.b___291003 = (undefined); - r0 = s.ctrl___290999.fields["buttons"]; - s.unnamed2122___U2 = (r0); - s.unnamed2123___U3 = (0); + s.ctrl___37621 = (r0); + s.b___37625 = (undefined); + r0 = s.ctrl___37621.fields["buttons"]; + s.unnamed154___U2 = (r0); + s.unnamed155___U3 = (0); case 1: - s.tmp_0 = r0 = s.unnamed2123___U3; - r0 = pxsim_Array__length(s.unnamed2122___U2); + s.tmp_0 = r0 = s.unnamed155___U3; + r0 = pxsim_Array__length(s.unnamed154___U2); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed2122___U2, s.unnamed2123___U3); - s.b___291003 = (r0); - s.tmp_3 = controller_Button__C274006_v0_1_mk(s); - s.tmp_3.arg0 = s.b___291003; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C274006_VT)) failedCast(s.tmp_3.arg0); + r0 = pxsim_Array__getAt(s.unnamed154___U2, s.unnamed155___U3); + s.b___37625 = (r0); + s.tmp_3 = controller_Button__C21138_v0_1_mk(s); + s.tmp_3.arg0 = s.b___37625; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C21138_VT)) failedCast(s.tmp_3.arg0); s.tmp_3.fn = s.tmp_3.arg0.vtable.methods.isPressed; s.pc = 7; return s.tmp_3; case 7: @@ -42361,31 +38124,31 @@ switch (step) { { step = 5; continue; } case 2: case 3: - r0 = (s.unnamed2123___U3 + 1); - s.unnamed2123___U3 = (r0); + r0 = (s.unnamed155___U3 + 1); + s.unnamed155___U3 = (r0); { step = 1; continue; } case 4: - s.unnamed2122___U2 = (undefined); + s.unnamed154___U2 = (undefined); r0 = false; case 5: return leave(s, r0) default: oops() } } } -controller_AnyButton_isPressed__P276595.info = {"start":15724,"length":202,"line":469,"column":8,"endLine":476,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"isPressed","argumentNames":["this"]} +controller_AnyButton_isPressed__P21154.info = {"start":15724,"length":202,"line":469,"column":8,"endLine":476,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"isPressed","argumentNames":["this"]} -function controller_AnyButton_isPressed__P276595_mk(s) { +function controller_AnyButton_isPressed__P21154_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_AnyButton_isPressed__P276595, depth: s.depth + 1, + parent: s, fn: controller_AnyButton_isPressed__P21154, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - ctrl___290999: undefined, - b___291003: undefined, - unnamed2122___U2: undefined, - unnamed2123___U3: undefined, + ctrl___37621: undefined, + b___37625: undefined, + unnamed154___U2: undefined, + unnamed155___U3: undefined, arg0: undefined, } } @@ -42393,7 +38156,7 @@ function controller_AnyButton_isPressed__P276595_mk(s) { -function controller_Button_toString__P274011(s) { +function controller_Button_toString__P21140(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42408,7 +38171,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C274006_VT)) failedCast(r0); + if (!checkSubtype(r0, controller_Button__C21138_VT)) failedCast(r0); r0 = s.arg0.fields["_pressed"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); @@ -42448,12 +38211,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_Button_toString__P274011.info = {"start":1894,"length":100,"line":73,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"toString","argumentNames":["this"]} +controller_Button_toString__P21140.info = {"start":1894,"length":100,"line":73,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"toString","argumentNames":["this"]} -function controller_Button_toString__P274011_mk(s) { +function controller_Button_toString__P21140_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_toString__P274011, depth: s.depth + 1, + parent: s, fn: controller_Button_toString__P21140, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -42469,50 +38232,7 @@ function controller_Button_toString__P274011_mk(s) { -function sprites_BaseSpriteSayRenderer_constructor__P274077(s) { -let r0 = s.r0, step = s.pc; -s.pc = -1; - - -while (true) { -if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; -switch (step) { - case 0: - - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(r0); - r0 = (s.arg0).fields["text"] = (s.arg1); - r0 = (s.arg0).fields["fgColor"] = (s.arg2); - r0 = (s.arg0).fields["bgColor"] = (s.arg3); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_BaseSpriteSayRenderer_constructor__P274077.info = {"start":69,"length":92,"line":2,"column":8,"endLine":3,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"inline","argumentNames":["this","text","fgColor","bgColor"]} - -function sprites_BaseSpriteSayRenderer_constructor__P274077_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P274077, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function sprites_StaticObstacle_width__P274325(s) { +function tiles_Location_top__P21634(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42527,22 +38247,33 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C274315_VT)) failedCast(r0); - r0 = s.arg0.fields["image"]; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + r0 = s.arg0.fields["_row"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_0); + s.tmp_3 = tiles_Location_tileMap__P21628_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 805; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_scale"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 << s.tmp_1); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_width__P274325.info = {"start":1088,"length":68,"line":48,"column":8,"endLine":50,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"width","argumentNames":["this"]} -sprites_StaticObstacle_width__P274325.isGetter = true; +tiles_Location_top__P21634.info = {"start":1791,"length":83,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"top","argumentNames":["this"]} +tiles_Location_top__P21634.isGetter = true; -function sprites_StaticObstacle_width__P274325_mk(s) { +function tiles_Location_top__P21634_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_width__P274325, depth: s.depth + 1, + parent: s, fn: tiles_Location_top__P21634, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, } } @@ -42550,7 +38281,7 @@ function sprites_StaticObstacle_width__P274325_mk(s) { -function sprites_StaticObstacle_height__P274324(s) { +function tiles_Location_left__P21633(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42565,22 +38296,33 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C274315_VT)) failedCast(r0); - r0 = s.arg0.fields["image"]; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + r0 = s.arg0.fields["_col"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_0); + s.tmp_3 = tiles_Location_tileMap__P21628_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 803; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; + s.tmp_2 = r0; + r0 = s.tmp_2.fields["_scale"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 << s.tmp_1); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_height__P274324.info = {"start":1008,"length":70,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"height","argumentNames":["this"]} -sprites_StaticObstacle_height__P274324.isGetter = true; +tiles_Location_left__P21633.info = {"start":1579,"length":84,"line":61,"column":8,"endLine":63,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"left","argumentNames":["this"]} +tiles_Location_left__P21633.isGetter = true; -function sprites_StaticObstacle_height__P274324_mk(s) { +function tiles_Location_left__P21633_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_height__P274324, depth: s.depth + 1, + parent: s, fn: tiles_Location_left__P21633, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, } } @@ -42588,7 +38330,7 @@ function sprites_StaticObstacle_height__P274324_mk(s) { -function sprites_StaticObstacle_y__P274323(s) { +function tiles_Location_y__P21632(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42598,36 +38340,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scale___37681 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C274315_VT)) failedCast(r0); - r0 = s.arg0.fields["top"]; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P21628_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 801; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; s.tmp_0 = r0; - r0 = s.arg0.fields["image"]; + r0 = s.tmp_0.fields["_scale"]; + s.scale___37681 = (r0); + r0 = s.arg0.fields["_row"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 << s.scale___37681); + s.tmp_0 = r0; + r0 = (s.scale___37681 - 1); s.tmp_3 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_3); + r0 = (1 << s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); + r0 = (s.tmp_0 + s.tmp_2); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_y__P274323.info = {"start":921,"length":77,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"y","argumentNames":["this"]} -sprites_StaticObstacle_y__P274323.isGetter = true; +tiles_Location_y__P21632.info = {"start":1315,"length":135,"line":53,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"y","argumentNames":["this"]} +tiles_Location_y__P21632.isGetter = true; -function sprites_StaticObstacle_y__P274323_mk(s) { +function tiles_Location_y__P21632_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_y__P274323, depth: s.depth + 1, + parent: s, fn: tiles_Location_y__P21632, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + scale___37681: undefined, arg0: undefined, } } @@ -42635,7 +38387,7 @@ function sprites_StaticObstacle_y__P274323_mk(s) { -function sprites_StaticObstacle_x__P274322(s) { +function tiles_Location_x__P21631(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42645,36 +38397,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scale___37697 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C274315_VT)) failedCast(r0); - r0 = s.arg0.fields["left"]; + if (!checkSubtype(r0, tiles_Location__C21627_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P21628_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 799; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; s.tmp_0 = r0; - r0 = s.arg0.fields["image"]; + r0 = s.tmp_0.fields["_scale"]; + s.scale___37697 = (r0); + r0 = s.arg0.fields["_col"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 << s.scale___37697); + s.tmp_0 = r0; + r0 = (s.scale___37697 - 1); s.tmp_3 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_3); + r0 = (1 << s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); + r0 = (s.tmp_0 + s.tmp_2); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_x__P274322.info = {"start":834,"length":77,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"x","argumentNames":["this"]} -sprites_StaticObstacle_x__P274322.isGetter = true; +tiles_Location_x__P21631.info = {"start":1054,"length":135,"line":45,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"x","argumentNames":["this"]} +tiles_Location_x__P21631.isGetter = true; -function sprites_StaticObstacle_x__P274322_mk(s) { +function tiles_Location_x__P21631_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_x__P274322, depth: s.depth + 1, + parent: s, fn: tiles_Location_x__P21631, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, + scale___37697: undefined, arg0: undefined, } } @@ -42682,7 +38444,7 @@ function sprites_StaticObstacle_x__P274322_mk(s) { -function tiles_Location_top__P274518(s) { +function sprites_StaticObstacle_width__P21380(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42697,33 +38459,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - r0 = s.arg0.fields["_row"]; + if (!checkSubtype(r0, sprites_StaticObstacle__C21376_VT)) failedCast(r0); + r0 = s.arg0.fields["image"]; s.tmp_0 = r0; - s.tmp_3 = tiles_Location_tileMap__P274512_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 805; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_scale"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 << s.tmp_1); + r0 = pxsim_ImageMethods.width(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_top__P274518.info = {"start":1791,"length":83,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"top","argumentNames":["this"]} -tiles_Location_top__P274518.isGetter = true; +sprites_StaticObstacle_width__P21380.info = {"start":1088,"length":68,"line":48,"column":8,"endLine":50,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"width","argumentNames":["this"]} +sprites_StaticObstacle_width__P21380.isGetter = true; -function tiles_Location_top__P274518_mk(s) { +function sprites_StaticObstacle_width__P21380_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_top__P274518, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_width__P21380, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, } } @@ -42731,7 +38482,7 @@ function tiles_Location_top__P274518_mk(s) { -function tiles_Location_left__P274517(s) { +function sprites_StaticObstacle_height__P21379(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42746,33 +38497,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - r0 = s.arg0.fields["_col"]; + if (!checkSubtype(r0, sprites_StaticObstacle__C21376_VT)) failedCast(r0); + r0 = s.arg0.fields["image"]; s.tmp_0 = r0; - s.tmp_3 = tiles_Location_tileMap__P274512_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 803; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_scale"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 << s.tmp_1); + r0 = pxsim_ImageMethods.height(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_left__P274517.info = {"start":1579,"length":84,"line":61,"column":8,"endLine":63,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"left","argumentNames":["this"]} -tiles_Location_left__P274517.isGetter = true; +sprites_StaticObstacle_height__P21379.info = {"start":1008,"length":70,"line":44,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"height","argumentNames":["this"]} +sprites_StaticObstacle_height__P21379.isGetter = true; -function tiles_Location_left__P274517_mk(s) { +function sprites_StaticObstacle_height__P21379_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_left__P274517, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_height__P21379, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, arg0: undefined, } } @@ -42780,7 +38520,7 @@ function tiles_Location_left__P274517_mk(s) { -function tiles_Location_y__P274516(s) { +function sprites_StaticObstacle_y__P21378(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42790,46 +38530,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___291059 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P274512_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 801; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___291059 = (r0); - r0 = s.arg0.fields["_row"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___291059); + if (!checkSubtype(r0, sprites_StaticObstacle__C21376_VT)) failedCast(r0); + r0 = s.arg0.fields["top"]; s.tmp_0 = r0; - r0 = (s.scale___291059 - 1); + r0 = s.arg0.fields["image"]; s.tmp_3 = r0; - r0 = (1 << s.tmp_3); + r0 = pxsim_ImageMethods.height(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_y__P274516.info = {"start":1315,"length":135,"line":53,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"y","argumentNames":["this"]} -tiles_Location_y__P274516.isGetter = true; +sprites_StaticObstacle_y__P21378.info = {"start":921,"length":77,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"y","argumentNames":["this"]} +sprites_StaticObstacle_y__P21378.isGetter = true; -function tiles_Location_y__P274516_mk(s) { +function sprites_StaticObstacle_y__P21378_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_y__P274516, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_y__P21378, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - scale___291059: undefined, arg0: undefined, } } @@ -42837,7 +38567,7 @@ function tiles_Location_y__P274516_mk(s) { -function tiles_Location_x__P274515(s) { +function sprites_StaticObstacle_x__P21377(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42847,46 +38577,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___291075 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C274510_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P274512_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 799; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_scale"]; - s.scale___291075 = (r0); - r0 = s.arg0.fields["_col"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___291075); + if (!checkSubtype(r0, sprites_StaticObstacle__C21376_VT)) failedCast(r0); + r0 = s.arg0.fields["left"]; s.tmp_0 = r0; - r0 = (s.scale___291075 - 1); + r0 = s.arg0.fields["image"]; s.tmp_3 = r0; - r0 = (1 << s.tmp_3); + r0 = pxsim_ImageMethods.width(s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_x__P274515.info = {"start":1054,"length":135,"line":45,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"x","argumentNames":["this"]} -tiles_Location_x__P274515.isGetter = true; +sprites_StaticObstacle_x__P21377.info = {"start":834,"length":77,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/game/obstacle.ts","functionName":"x","argumentNames":["this"]} +sprites_StaticObstacle_x__P21377.isGetter = true; -function tiles_Location_x__P274515_mk(s) { +function sprites_StaticObstacle_x__P21377_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_x__P274515, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_x__P21377, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, - scale___291075: undefined, arg0: undefined, } } @@ -42894,7 +38614,7 @@ function tiles_Location_x__P274515_mk(s) { -function particles_ShapeFactory_drawParticle__P275033(s) { +function sprites_BaseSpriteSayRenderer_constructor__P21221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42904,7 +38624,6 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pImage___291094 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -42913,8 +38632,52 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C275030_VT)) failedCast(r0); - s.tmp_1 = Math_FastRandom_pickRandom__P274881_mk(s); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(r0); + r0 = (s.arg0).fields["text"] = (s.arg1); + r0 = (s.arg0).fields["fgColor"] = (s.arg2); + r0 = (s.arg0).fields["bgColor"] = (s.arg3); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_BaseSpriteSayRenderer_constructor__P21221.info = {"start":69,"length":92,"line":2,"column":8,"endLine":3,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"inline","argumentNames":["this","text","fgColor","bgColor"]} + +function sprites_BaseSpriteSayRenderer_constructor__P21221_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P21221, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function particles_ShapeFactory_drawParticle__P22425(s) { +let r0 = s.r0, step = s.pc; +s.pc = -1; + + +while (true) { +if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) return null; +switch (step) { + case 0: + + s.pImage___37716 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); + s.arg3 = (s.lambdaArgs[3]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ShapeFactory__C22422_VT)) failedCast(r0); + s.tmp_1 = Math_FastRandom_pickRandom__P22206_mk(s); r0 = s.arg0.fields["galois"]; s.tmp_1.arg0 = r0; r0 = s.arg0.fields["sources"]; @@ -42924,12 +38687,12 @@ switch (step) { r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.pImage___291094 = (r0); + s.pImage___37716 = (r0); r0 = s.arg1.fields["color"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.pImage___291094, 15, s.tmp_0); - s.tmp_0 = r0 = globals.screen___273849; - s.tmp_1 = r0 = s.pImage___291094; + r0 = pxsim_ImageMethods.replace(s.pImage___37716, 15, s.tmp_0); + s.tmp_0 = r0 = globals.screen___20904; + s.tmp_1 = r0 = s.pImage___37716; r0 = s.arg0.fields["ox"]; s.tmp_4 = r0; r0 = (s.arg2 - s.tmp_4); @@ -42951,12 +38714,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -particles_ShapeFactory_drawParticle__P275033.info = {"start":7172,"length":323,"line":229,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","p","x","y"]} +particles_ShapeFactory_drawParticle__P22425.info = {"start":7172,"length":323,"line":229,"column":8,"endLine":237,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","p","x","y"]} -function particles_ShapeFactory_drawParticle__P275033_mk(s) { +function particles_ShapeFactory_drawParticle__P22425_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_drawParticle__P275033, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_drawParticle__P22425, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -42968,7 +38731,7 @@ function particles_ShapeFactory_drawParticle__P275033_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - pImage___291094: undefined, + pImage___37716: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -42979,7 +38742,7 @@ function particles_ShapeFactory_drawParticle__P275033_mk(s) { -function Math_FastRandom_pickRandom__P274881(s) { +function Math_FastRandom_pickRandom__P22206(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -42995,7 +38758,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C274876_VT)) failedCast(r0); + if (!checkSubtype(r0, Math_FastRandom__C22203_VT)) failedCast(r0); r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); @@ -43018,7 +38781,7 @@ switch (step) { case 3: case 4: s.tmp_4 = r0 = s.arg1; - s.tmp_6 = Math_FastRandom_randomRange__P274880_mk(s); + s.tmp_6 = Math_FastRandom_randomRange__P22205_mk(s); s.tmp_6.arg0 = s.arg0; s.tmp_6.arg1 = 0; r0 = pxsim_Array__length(s.arg1); @@ -43034,12 +38797,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Math_FastRandom_pickRandom__P274881.info = {"start":2358,"length":192,"line":70,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"pickRandom","argumentNames":["this","list"]} +Math_FastRandom_pickRandom__P22206.info = {"start":2358,"length":192,"line":70,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"pickRandom","argumentNames":["this","list"]} -function Math_FastRandom_pickRandom__P274881_mk(s) { +function Math_FastRandom_pickRandom__P22206_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_pickRandom__P274881, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_pickRandom__P22206, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43057,7 +38820,7 @@ function Math_FastRandom_pickRandom__P274881_mk(s) { -function particles_AreaFactory_drawParticle__P275021(s) { +function particles_AreaFactory_drawParticle__P22415(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43067,7 +38830,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.col___291140 = undefined; + s.col___37763 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -43076,7 +38839,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_AreaFactory__C275014_VT)) failedCast(r0); + if (!checkSubtype(r0, particles_AreaFactory__C22412_VT)) failedCast(r0); r0 = s.arg1.fields["lifespan"]; s.tmp_1 = r0; r0 = (s.tmp_1 > 500); @@ -43103,8 +38866,8 @@ switch (step) { case 4: // jmp value (already in r0) s.tmp_5 = r0; - s.col___291140 = (s.tmp_5); - s.tmp_0 = r0 = globals.screen___273849; + s.col___37763 = (s.tmp_5); + s.tmp_0 = r0 = globals.screen___20904; r0 = (s.arg2 + 128); s.tmp_2 = r0; r0 = (s.tmp_2 >> 8); @@ -43113,17 +38876,17 @@ switch (step) { s.tmp_4 = r0; r0 = (s.tmp_4 >> 8); s.tmp_3 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, s.col___291140); + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, s.col___37763); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_AreaFactory_drawParticle__P275021.info = {"start":4770,"length":222,"line":158,"column":8,"endLine":163,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","p","x","y"]} +particles_AreaFactory_drawParticle__P22415.info = {"start":4770,"length":222,"line":158,"column":8,"endLine":163,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","p","x","y"]} -function particles_AreaFactory_drawParticle__P275021_mk(s) { +function particles_AreaFactory_drawParticle__P22415_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_drawParticle__P275021, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_drawParticle__P22415, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43131,7 +38894,7 @@ function particles_AreaFactory_drawParticle__P275021_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - col___291140: undefined, + col___37763: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -43142,7 +38905,7 @@ function particles_AreaFactory_drawParticle__P275021_mk(s) { -function particles_SprayFactory_drawParticle__P275011(s) { +function particles_SprayFactory_drawParticle__P22408(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43160,8 +38923,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C275008_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___273849; + if (!checkSubtype(r0, particles_SprayFactory__C22405_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___20904; r0 = (s.arg2 + 128); s.tmp_2 = r0; r0 = (s.tmp_2 >> 8); @@ -43175,12 +38938,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -particles_SprayFactory_drawParticle__P275011.info = {"start":3194,"length":118,"line":115,"column":8,"endLine":117,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","particle","x","y"]} +particles_SprayFactory_drawParticle__P22408.info = {"start":3194,"length":118,"line":115,"column":8,"endLine":117,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"drawParticle","argumentNames":["this","particle","x","y"]} -function particles_SprayFactory_drawParticle__P275011_mk(s) { +function particles_SprayFactory_drawParticle__P22408_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_drawParticle__P275011, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_drawParticle__P22408, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43197,7 +38960,7 @@ function particles_SprayFactory_drawParticle__P275011_mk(s) { -function scene_Renderable___drawCore__P274620(s) { +function scene_Renderable___drawCore__P21735(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43213,10 +38976,10 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C274617_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Renderable__C21732_VT)) failedCast(r0); s.tmp_0 = if_handler_3_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.screen___273849; + s.tmp_0.arg1 = globals.screen___20904; s.tmp_0.arg2 = s.arg1; if (!s.tmp_0.arg0.vtable.iface) { setupLambda(s.tmp_0, pxsim_pxtrt.mapGetByString(s.tmp_0.arg0, "handler"), 3); @@ -43233,12 +38996,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Renderable___drawCore__P274620.info = {"start":390,"length":86,"line":14,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +scene_Renderable___drawCore__P21735.info = {"start":390,"length":86,"line":14,"column":8,"endLine":16,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__drawCore","argumentNames":["this","camera"]} -function scene_Renderable___drawCore__P274620_mk(s) { +function scene_Renderable___drawCore__P21735_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___drawCore__P274620, depth: s.depth + 1, + parent: s, fn: scene_Renderable___drawCore__P21735, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -43249,7 +39012,7 @@ function scene_Renderable___drawCore__P274620_mk(s) { -function scene_Renderable___visible__P274619(s) { +function scene_Renderable___visible__P21734(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43264,7 +39027,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C274617_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Renderable__C21732_VT)) failedCast(r0); s.tmp_0 = if_shouldBeVisible_1_mk(s); s.tmp_0.arg0 = s.arg0; if (!s.tmp_0.arg0.vtable.iface) { @@ -43281,12 +39044,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Renderable___visible__P274619.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} +scene_Renderable___visible__P21734.info = {"start":305,"length":75,"line":10,"column":8,"endLine":12,"endColumn":9,"fileName":"pxt_modules/game/renderable.ts","functionName":"__visible","argumentNames":["this"]} -function scene_Renderable___visible__P274619_mk(s) { +function scene_Renderable___visible__P21734_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___visible__P274619, depth: s.depth + 1, + parent: s, fn: scene_Renderable___visible__P21734, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -43296,7 +39059,7 @@ function scene_Renderable___visible__P274619_mk(s) { -function Sprite___drawCore__P274232(s) { +function Sprite___drawCore__P21296(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43306,24 +39069,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___291184 = undefined; - s.oy___291192 = undefined; - s.l___291200 = undefined; - s.t___291206 = undefined; + s.ox___37807 = undefined; + s.oy___37815 = undefined; + s.l___37823 = undefined; + s.t___37829 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_0 = Sprite_drawSay__P276615_mk(s); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_0 = Sprite_drawSay__P21316_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; s.callLocIdx = 376; s.pc = 8; return s.tmp_0; case 8: r0 = s.retval; - s.tmp_1 = Sprite_isOutOfScreen__P274231_mk(s); + s.tmp_1 = Sprite_isOutOfScreen__P21295_mk(s); s.tmp_1.arg0 = s.arg0; s.tmp_1.arg1 = s.arg1; s.callLocIdx = 377; s.pc = 9; return s.tmp_1; @@ -43348,7 +39111,7 @@ switch (step) { case 4: // jmp value (already in r0) s.tmp_4 = r0; - s.ox___291184 = (s.tmp_4); + s.ox___37807 = (s.tmp_4); r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 512); @@ -43362,42 +39125,42 @@ switch (step) { case 6: // jmp value (already in r0) s.tmp_2 = r0; - s.oy___291192 = (s.tmp_2); - s.tmp_2 = Sprite_left__P274216_mk(s); + s.oy___37815 = (s.tmp_2); + s.tmp_2 = Sprite_left__P21280_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 378; s.pc = 10; return s.tmp_2; case 10: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 - s.ox___291184); + r0 = (s.tmp_1 - s.ox___37807); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - s.l___291200 = (r0); - s.tmp_2 = Sprite_top__P274220_mk(s); + s.l___37823 = (r0); + s.tmp_2 = Sprite_top__P21284_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 379; s.pc = 11; return s.tmp_2; case 11: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 - s.oy___291192); + r0 = (s.tmp_1 - s.oy___37815); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - s.t___291206 = (r0); - s.tmp_0 = Sprite__C274158_v6_3_mk(s); + s.t___37829 = (r0); + s.tmp_0 = Sprite__C21242_v6_3_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___291200; - s.tmp_0.arg2 = s.t___291206; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C274158_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.arg1 = s.l___37823; + s.tmp_0.arg2 = s.t___37829; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C21242_VT)) failedCast(s.tmp_0.arg0); s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawSprite; s.pc = 12; return s.tmp_0; case 12: r0 = s.retval; - s.tmp_0 = Sprite_drawDebug__P276616_mk(s); + s.tmp_0 = Sprite_drawDebug__P21317_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___291200; - s.tmp_0.arg2 = s.t___291206; - s.tmp_0.arg3 = s.ox___291184; - s.tmp_0.arg4 = s.oy___291192; + s.tmp_0.arg1 = s.l___37823; + s.tmp_0.arg2 = s.t___37829; + s.tmp_0.arg3 = s.ox___37807; + s.tmp_0.arg4 = s.oy___37815; s.callLocIdx = 380; s.pc = 13; return s.tmp_0; case 13: r0 = s.retval; @@ -43406,22 +39169,22 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite___drawCore__P274232.info = {"start":18194,"length":462,"line":613,"column":4,"endLine":626,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +Sprite___drawCore__P21296.info = {"start":18194,"length":462,"line":613,"column":4,"endLine":626,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} -function Sprite___drawCore__P274232_mk(s) { +function Sprite___drawCore__P21296_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___drawCore__P274232, depth: s.depth + 1, + parent: s, fn: Sprite___drawCore__P21296, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, tmp_3: undefined, tmp_4: undefined, - ox___291184: undefined, - oy___291192: undefined, - l___291200: undefined, - t___291206: undefined, + ox___37807: undefined, + oy___37815: undefined, + l___37823: undefined, + t___37829: undefined, arg0: undefined, arg1: undefined, } } @@ -43430,7 +39193,7 @@ function Sprite___drawCore__P274232_mk(s) { -function Sprite_drawSprite__P276617(s) { +function Sprite_drawSprite__P21318(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43447,8 +39210,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); - s.tmp_3 = Sprite_isScaled__P276614_mk(s); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); + s.tmp_3 = Sprite_isScaled__P21277_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 472; s.pc = 3; return s.tmp_3; case 3: @@ -43462,20 +39225,20 @@ switch (step) { if (!r0) { step = 1; continue; } r0 = s.arg0.fields["_image"]; s.tmp_4 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___273849, s.tmp_4, s.arg1, s.arg2); + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___20904, s.tmp_4, s.arg1, s.arg2); { step = 2; continue; } case 1: - s.tmp_0 = helpers_imageBlit__P273770_mk(s); - s.tmp_0.arg0 = globals.screen___273849; + s.tmp_0 = helpers_imageBlit__P20838_mk(s); + s.tmp_0.arg0 = globals.screen___20904; s.tmp_0.arg1 = s.arg1; s.tmp_0.arg2 = s.arg2; - s.tmp_1 = Sprite_width__P274214_mk(s); + s.tmp_1 = Sprite_width__P21278_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 473; s.pc = 5; return s.tmp_1; case 5: r0 = s.retval; s.tmp_0.arg3 = r0; - s.tmp_2 = Sprite_height__P274215_mk(s); + s.tmp_2 = Sprite_height__P21279_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 474; s.pc = 6; return s.tmp_2; case 6: @@ -43503,12 +39266,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawSprite__P276617.info = {"start":35888,"length":514,"line":1118,"column":4,"endLine":1132,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawSprite","argumentNames":["this","drawLeft","drawTop"]} +Sprite_drawSprite__P21318.info = {"start":35888,"length":514,"line":1118,"column":4,"endLine":1132,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawSprite","argumentNames":["this","drawLeft","drawTop"]} -function Sprite_drawSprite__P276617_mk(s) { +function Sprite_drawSprite__P21318_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSprite__P276617, depth: s.depth + 1, + parent: s, fn: Sprite_drawSprite__P21318, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43524,7 +39287,7 @@ function Sprite_drawSprite__P276617_mk(s) { -function Sprite_drawDebug__P276616(s) { +function Sprite_drawDebug__P21317(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43534,9 +39297,9 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.font___291230 = undefined; - s.tx___291234 = undefined; - s.ty___291236 = undefined; + s.font___37855 = undefined; + s.tx___37859 = undefined; + s.ty___37861 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -43546,17 +39309,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 64); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - s.font___291230 = (globals.font5___273797); - s.tx___291234 = (s.arg1); + s.font___37855 = (globals.font5___20863); + s.tx___37859 = (s.arg1); s.tmp_1 = r0 = s.arg2; - s.tmp_3 = Sprite_height__P274215_mk(s); + s.tmp_3 = Sprite_height__P21279_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 448; s.pc = 13; return s.tmp_3; case 13: @@ -43565,12 +39328,12 @@ switch (step) { r0 = (s.tmp_1 + s.tmp_2); s.tmp_0 = r0; r0 = (s.tmp_0 + 2); - s.ty___291236 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = globals.screen___273849; + s.ty___37861 = (r0); + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = globals.screen___20904; r0 = pxsim_String_.mkEmpty(); s.tmp_3 = r0; - s.tmp_7 = Sprite_x__P274171_mk(s); + s.tmp_7 = Sprite_x__P21244_mk(s); s.tmp_7.arg0 = s.arg0; s.callLocIdx = 449; s.pc = 15; return s.tmp_7; case 15: @@ -43591,7 +39354,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_11 = Sprite_y__P274173_mk(s); + s.tmp_11 = Sprite_y__P21246_mk(s); s.tmp_11.arg0 = s.arg0; s.callLocIdx = 450; s.pc = 17; return s.tmp_11; case 17: @@ -43610,17 +39373,17 @@ switch (step) { s.tmp_8 = r0; r0 = pxsim_String__concat(s.tmp_1, s.tmp_8); s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.tx___291234; - s.tmp_0.arg3 = s.ty___291236; + s.tmp_0.arg2 = s.tx___37859; + s.tmp_0.arg3 = s.ty___37861; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___291230; + s.tmp_0.arg5 = s.font___37855; s.tmp_0.arg6 = undefined; s.callLocIdx = 451; s.pc = 14; return s.tmp_0; case 14: r0 = s.retval; - s.tmp_0 = r0 = s.tx___291234; + s.tmp_0 = r0 = s.tx___37859; s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___291230; + s.tmp_2.arg0 = s.font___37855; if (!s.tmp_2.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); } else { @@ -43633,8 +39396,8 @@ switch (step) { r0 = s.retval; s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.tx___291234 = (r0); - s.tmp_1 = Sprite_vx__P274175_mk(s); + s.tx___37859 = (r0); + s.tmp_1 = Sprite_vx__P21248_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 453; s.pc = 20; return s.tmp_1; case 20: @@ -43645,7 +39408,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_2 = Sprite_vy__P274177_mk(s); + s.tmp_2 = Sprite_vy__P21250_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 454; s.pc = 21; return s.tmp_2; case 21: @@ -43655,9 +39418,9 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - s.tmp_4 = r0 = s.ty___291236; + s.tmp_4 = r0 = s.ty___37861; s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___291230; + s.tmp_7.arg0 = s.font___37855; if (!s.tmp_7.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); } else { @@ -43672,10 +39435,10 @@ switch (step) { r0 = (s.tmp_6 + 2); s.tmp_5 = r0; r0 = (s.tmp_4 + s.tmp_5); - s.ty___291236 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_6 = Sprite_vx__P274175_mk(s); + s.ty___37861 = (r0); + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_6 = Sprite_vx__P21248_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 456; s.pc = 24; return s.tmp_6; case 24: @@ -43696,7 +39459,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_10 = Sprite_vy__P274177_mk(s); + s.tmp_10 = Sprite_vy__P21250_mk(s); s.tmp_10.arg0 = s.arg0; s.callLocIdx = 457; s.pc = 26; return s.tmp_10; case 26: @@ -43715,17 +39478,17 @@ switch (step) { s.tmp_7 = r0; r0 = pxsim_String__concat(s.tmp_1, s.tmp_7); s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.tx___291234; - s.tmp_0.arg3 = s.ty___291236; + s.tmp_0.arg2 = s.tx___37859; + s.tmp_0.arg3 = s.ty___37861; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___291230; + s.tmp_0.arg5 = s.font___37855; s.tmp_0.arg6 = undefined; s.callLocIdx = 458; s.pc = 23; return s.tmp_0; case 23: r0 = s.retval; case 3: case 4: - s.tmp_1 = Sprite_ax__P274179_mk(s); + s.tmp_1 = Sprite_ax__P21252_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 459; s.pc = 28; return s.tmp_1; case 28: @@ -43736,7 +39499,7 @@ switch (step) { r0 = s.tmp_0; { step = 6; continue; } case 5: - s.tmp_2 = Sprite_ay__P274181_mk(s); + s.tmp_2 = Sprite_ay__P21254_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 460; s.pc = 29; return s.tmp_2; case 29: @@ -43746,9 +39509,9 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 7; continue; } - s.tmp_4 = r0 = s.ty___291236; + s.tmp_4 = r0 = s.ty___37861; s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___291230; + s.tmp_7.arg0 = s.font___37855; if (!s.tmp_7.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); } else { @@ -43763,10 +39526,10 @@ switch (step) { r0 = (s.tmp_6 + 2); s.tmp_5 = r0; r0 = (s.tmp_4 + s.tmp_5); - s.ty___291236 = (r0); - s.tmp_0 = helpers_imagePrint__P273807_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_6 = Sprite_ax__P274179_mk(s); + s.ty___37861 = (r0); + s.tmp_0 = helpers_imagePrint__P20867_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_6 = Sprite_ax__P21252_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 462; s.pc = 32; return s.tmp_6; case 32: @@ -43787,7 +39550,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_10 = Sprite_ay__P274181_mk(s); + s.tmp_10 = Sprite_ay__P21254_mk(s); s.tmp_10.arg0 = s.arg0; s.callLocIdx = 463; s.pc = 34; return s.tmp_10; case 34: @@ -43806,10 +39569,10 @@ switch (step) { s.tmp_7 = r0; r0 = pxsim_String__concat(s.tmp_1, s.tmp_7); s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.tx___291234; - s.tmp_0.arg3 = s.ty___291236; + s.tmp_0.arg2 = s.tx___37859; + s.tmp_0.arg3 = s.ty___37861; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___291230; + s.tmp_0.arg5 = s.font___37855; s.tmp_0.arg6 = undefined; s.callLocIdx = 464; s.pc = 31; return s.tmp_0; case 31: @@ -43818,11 +39581,11 @@ switch (step) { case 8: case 9: case 10: - r0 = pxsim_numops_toBoolDecr(globals.debug___274784); + r0 = pxsim_numops_toBoolDecr(globals.debug___21888); if (!r0) { step = 11; continue; } - s.tmp_0 = helpers_imageDrawRect__P273776_mk(s); - s.tmp_0.arg0 = globals.screen___273849; - s.tmp_3 = game_Hitbox_left__P274033_mk(s); + s.tmp_0 = helpers_imageDrawRect__P20844_mk(s); + s.tmp_0.arg0 = globals.screen___20904; + s.tmp_3 = game_Hitbox_left__P21177_mk(s); r0 = s.arg0.fields["_hitbox"]; s.tmp_3.arg0 = r0; s.callLocIdx = 465; s.pc = 37; return s.tmp_3; @@ -43835,7 +39598,7 @@ switch (step) { s.tmp_1 = r0; r0 = (s.tmp_1 - s.arg3); s.tmp_0.arg1 = r0; - s.tmp_7 = game_Hitbox_top__P274034_mk(s); + s.tmp_7 = game_Hitbox_top__P21178_mk(s); r0 = s.arg0.fields["_hitbox"]; s.tmp_7.arg0 = r0; s.callLocIdx = 467; s.pc = 38; return s.tmp_7; @@ -43872,12 +39635,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawDebug__P276616.info = {"start":34790,"length":1092,"line":1088,"column":4,"endLine":1116,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawDebug","argumentNames":["this","left","top","offsetX","offsetY"]} +Sprite_drawDebug__P21317.info = {"start":34790,"length":1092,"line":1088,"column":4,"endLine":1116,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawDebug","argumentNames":["this","left","top","offsetX","offsetY"]} -function Sprite_drawDebug__P276616_mk(s) { +function Sprite_drawDebug__P21317_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawDebug__P276616, depth: s.depth + 1, + parent: s, fn: Sprite_drawDebug__P21317, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -43892,9 +39655,9 @@ function Sprite_drawDebug__P276616_mk(s) { tmp_10: undefined, tmp_11: undefined, tmp_12: undefined, - font___291230: undefined, - tx___291234: undefined, - ty___291236: undefined, + font___37855: undefined, + tx___37859: undefined, + ty___37861: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -43906,7 +39669,7 @@ function Sprite_drawDebug__P276616_mk(s) { -function Sprite_drawSay__P276615(s) { +function Sprite_drawSay__P21316(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -43922,7 +39685,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); @@ -43941,23 +39704,23 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 1; continue; } - s.tmp_6 = sprites_BaseSpriteSayRenderer__C274076_v0_4_mk(s); + s.tmp_6 = sprites_BaseSpriteSayRenderer__C21217_v0_4_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = globals.screen___273849; + s.tmp_6.arg1 = globals.screen___20904; s.tmp_6.arg2 = s.arg1; s.tmp_6.arg3 = s.arg0; - if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(s.tmp_6.arg0); + if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(s.tmp_6.arg0); s.tmp_6.fn = s.tmp_6.arg0.vtable.methods.draw; s.pc = 7; return s.tmp_6; case 7: r0 = s.retval; { step = 2; continue; } case 1: - s.tmp_0 = sprites_BaseSpriteSayRenderer__C274076_v2_1_mk(s); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C21217_v2_1_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(s.tmp_0.arg0); + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(s.tmp_0.arg0); s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.destroy; s.pc = 8; return s.tmp_0; case 8: @@ -43967,13 +39730,13 @@ switch (step) { case 2: { step = 4; continue; } case 3: - s.tmp_0 = sprites_BaseSpriteSayRenderer__C274076_v0_4_mk(s); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C21217_v0_4_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.screen___273849; + s.tmp_0.arg1 = globals.screen___20904; s.tmp_0.arg2 = s.arg1; s.tmp_0.arg3 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(s.tmp_0.arg0); + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(s.tmp_0.arg0); s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.draw; s.pc = 9; return s.tmp_0; case 9: @@ -43985,12 +39748,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawSay__P276615.info = {"start":34210,"length":574,"line":1070,"column":4,"endLine":1086,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawSay","argumentNames":["this","camera"]} +Sprite_drawSay__P21316.info = {"start":34210,"length":574,"line":1070,"column":4,"endLine":1086,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"drawSay","argumentNames":["this","camera"]} -function Sprite_drawSay__P276615_mk(s) { +function Sprite_drawSay__P21316_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSay__P276615, depth: s.depth + 1, + parent: s, fn: Sprite_drawSay__P21316, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -44007,7 +39770,7 @@ function Sprite_drawSay__P276615_mk(s) { -function sprites_BaseSpriteSayRenderer_destroy__P274080(s) { +function sprites_BaseSpriteSayRenderer_destroy__P21220(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44022,17 +39785,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_destroy__P274080.info = {"start":328,"length":22,"line":13,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"destroy","argumentNames":["this"]} +sprites_BaseSpriteSayRenderer_destroy__P21220.info = {"start":328,"length":22,"line":13,"column":8,"endLine":15,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"destroy","argumentNames":["this"]} -function sprites_BaseSpriteSayRenderer_destroy__P274080_mk(s) { +function sprites_BaseSpriteSayRenderer_destroy__P21220_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P274080, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P21220, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -44041,7 +39804,7 @@ function sprites_BaseSpriteSayRenderer_destroy__P274080_mk(s) { -function sprites_BaseSpriteSayRenderer_draw__P274078(s) { +function sprites_BaseSpriteSayRenderer_draw__P21218(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44059,17 +39822,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C274076_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C21217_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_draw__P274078.info = {"start":171,"length":69,"line":5,"column":8,"endLine":7,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"draw","argumentNames":["this","screen","camera","owner"]} +sprites_BaseSpriteSayRenderer_draw__P21218.info = {"start":171,"length":69,"line":5,"column":8,"endLine":7,"endColumn":9,"fileName":"pxt_modules/game/spritesay.ts","functionName":"draw","argumentNames":["this","screen","camera","owner"]} -function sprites_BaseSpriteSayRenderer_draw__P274078_mk(s) { +function sprites_BaseSpriteSayRenderer_draw__P21218_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P274078, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P21218, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -44081,7 +39844,7 @@ function sprites_BaseSpriteSayRenderer_draw__P274078_mk(s) { -function Sprite___visible__P274213(s) { +function Sprite___visible__P21275(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44096,7 +39859,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C274158_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C21242_VT)) failedCast(r0); r0 = s.arg0.fields["flags"]; s.tmp_2 = r0; r0 = (s.tmp_2 & 128); @@ -44107,12 +39870,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite___visible__P274213.info = {"start":9904,"length":72,"line":359,"column":4,"endLine":361,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__visible","argumentNames":["this"]} +Sprite___visible__P21275.info = {"start":9904,"length":72,"line":359,"column":4,"endLine":361,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"__visible","argumentNames":["this"]} -function Sprite___visible__P274213_mk(s) { +function Sprite___visible__P21275_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___visible__P274213, depth: s.depth + 1, + parent: s, fn: Sprite___visible__P21275, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -44124,7 +39887,7 @@ function Sprite___visible__P274213_mk(s) { -function scene_Camera_top__P274611(s) { +function scene_Camera_top__P21726(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44139,18 +39902,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); r0 = s.arg0.fields["_offsetY"]; return leaveAccessor(s, r0) default: oops() } } } -scene_Camera_top__P274611.info = {"start":1764,"length":54,"line":60,"column":8,"endLine":62,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"top","argumentNames":["this"]} -scene_Camera_top__P274611.isGetter = true; +scene_Camera_top__P21726.info = {"start":1764,"length":54,"line":60,"column":8,"endLine":62,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"top","argumentNames":["this"]} +scene_Camera_top__P21726.isGetter = true; -function scene_Camera_top__P274611_mk(s) { +function scene_Camera_top__P21726_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_top__P274611, depth: s.depth + 1, + parent: s, fn: scene_Camera_top__P21726, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -44159,7 +39922,7 @@ function scene_Camera_top__P274611_mk(s) { -function scene_Camera_left__P274609(s) { +function scene_Camera_left__P21724(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -44174,83 +39937,26 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C274598_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Camera__C21717_VT)) failedCast(r0); r0 = s.arg0.fields["_offsetX"]; return leaveAccessor(s, r0) default: oops() } } } -scene_Camera_left__P274609.info = {"start":1620,"length":55,"line":54,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"left","argumentNames":["this"]} -scene_Camera_left__P274609.isGetter = true; - -function scene_Camera_left__P274609_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_left__P274609, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - -function game_SplashDialog__C274749_v1_2_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: null, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, -} } - - -function game_BaseDialog__C274720_v0_1_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: null, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, -} } +scene_Camera_left__P21724.info = {"start":1620,"length":55,"line":54,"column":8,"endLine":56,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"left","argumentNames":["this"]} +scene_Camera_left__P21724.isGetter = true; - -function controller_Button__C274006_v0_1_mk(s) { +function scene_Camera_left__P21724_mk(s) { checkStack(s.depth); return { - parent: s, fn: null, depth: s.depth + 1, + parent: s, fn: scene_Camera_left__P21724, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, arg0: undefined, } } -function if_handler_1_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: null, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, -} } -function lambda_2_mk(s) { +function PhysicsEngine__C21384_v4_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44265,7 +39971,7 @@ function lambda_2_mk(s) { } } -function lambda_3_mk(s) { +function if___update_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44281,7 +39987,7 @@ function lambda_3_mk(s) { } } -function PhysicsEngine__C274328_v4_2_mk(s) { +function lambda_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44296,7 +40002,7 @@ function PhysicsEngine__C274328_v4_2_mk(s) { } } -function if___update_3_mk(s) { +function PhysicsEngine__C21384_v3_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44307,12 +40013,10 @@ function if___update_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function PhysicsEngine__C274328_v3_1_mk(s) { +function if_handler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44410,7 +40114,7 @@ function if_yOffset_1_mk(s) { } } -function if___draw_2_mk(s) { +function lambda_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44422,24 +40126,11 @@ function if___draw_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function if_z_1_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: null, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, -} } - - -function if_id_1_mk(s) { +function controller_Button__C21138_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44495,7 +40186,7 @@ function if_vy_1_mk(s) { } } -function game_BaseDialog__C274720_v2_1_mk(s) { +function if___draw_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44506,10 +40197,11 @@ function game_BaseDialog__C274720_v2_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function PhysicsEngine__C274328_v0_2_mk(s) { +function if_z_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44520,11 +40212,10 @@ function PhysicsEngine__C274328_v0_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_handler_2_mk(s) { +function if_id_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44535,11 +40226,10 @@ function if_handler_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite__C274158_v5_1_mk(s) { +function lambda_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44553,7 +40243,7 @@ function Sprite__C274158_v5_1_mk(s) { } } -function Sprite__C274158_v4_1_mk(s) { +function if_condition_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44567,7 +40257,7 @@ function Sprite__C274158_v4_1_mk(s) { } } -function if_id_2_mk(s) { +function if_effect_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44579,10 +40269,11 @@ function if_id_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function lambda_4_mk(s) { +function Sprite__C21242_v5_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44593,13 +40284,10 @@ function lambda_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function lambda_1_mk(s) { +function Sprite__C21242_v4_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44613,7 +40301,7 @@ function lambda_1_mk(s) { } } -function if_condition_1_mk(s) { +function if_sourceFactory_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44624,10 +40312,12 @@ function if_condition_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function if_effect_3_mk(s) { +function PhysicsEngine__C21384_v1_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44639,11 +40329,10 @@ function if_effect_3_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function if_sourceFactory_3_mk(s) { +function if_destroyHandler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44654,12 +40343,10 @@ function if_sourceFactory_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function PhysicsEngine__C274328_v1_2_mk(s) { +function if_handler_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44674,7 +40361,7 @@ function PhysicsEngine__C274328_v1_2_mk(s) { } } -function if_destroyHandler_1_mk(s) { +function lambda_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44685,6 +40372,9 @@ function if_destroyHandler_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } @@ -44842,7 +40532,7 @@ function if_getText_1_mk(s) { } } -function PhysicsEngine__C274328_v2_4_mk(s) { +function PhysicsEngine__C21384_v2_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44916,6 +40606,36 @@ function if_z_2_mk(s) { } } +function PhysicsEngine__C21384_v0_2_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: null, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, +} } + + +function if_id_2_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: null, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, +} } + + function if_callback_1_mk(s) { checkStack(s.depth); return { @@ -44944,7 +40664,7 @@ function if_flags_1_mk(s) { } } -function particles_ParticleFactory__C275004_v0_2_mk(s) { +function particles_ParticleFactory__C22401_v0_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -44959,7 +40679,7 @@ function particles_ParticleFactory__C275004_v0_2_mk(s) { } } -function particles_ParticleSource__C274968_v4_3_mk(s) { +function particles_ParticleSource__C22341_v4_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45017,7 +40737,7 @@ function if_height_1_mk(s) { } } -function if_handler_3_mk(s) { +function particles_ParticleFactory__C22401_v1_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45030,10 +40750,11 @@ function if_handler_3_mk(s) { arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function if_tileIndex_1_mk(s) { +function sprites_BaseSpriteSayRenderer__C21217_v1_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45044,10 +40765,13 @@ function if_tileIndex_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function if_left_1_mk(s) { +function sprites_BaseSprite__C20971_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45061,7 +40785,7 @@ function if_left_1_mk(s) { } } -function if_top_1_mk(s) { +function sprites_BaseSprite__C20971_v2_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45072,10 +40796,11 @@ function if_top_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function sprites_BaseSpriteSayRenderer__C274076_v1_4_mk(s) { +function if_handler_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45088,11 +40813,10 @@ function sprites_BaseSpriteSayRenderer__C274076_v1_4_mk(s) { arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function particles_ParticleFactory__C275004_v1_4_mk(s) { +function if_tileIndex_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45103,13 +40827,10 @@ function particles_ParticleFactory__C275004_v1_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function sprites_BaseSprite__C273911_v0_1_mk(s) { +function if_left_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45123,7 +40844,7 @@ function sprites_BaseSprite__C273911_v0_1_mk(s) { } } -function sprites_BaseSprite__C273911_v2_2_mk(s) { +function if_top_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45134,7 +40855,6 @@ function sprites_BaseSprite__C273911_v2_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } @@ -45152,7 +40872,7 @@ function if_shouldBeVisible_1_mk(s) { } } -function Sprite__C274158_v6_3_mk(s) { +function Sprite__C21242_v6_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45168,7 +40888,7 @@ function Sprite__C274158_v6_3_mk(s) { } } -function sprites_BaseSpriteSayRenderer__C274076_v0_4_mk(s) { +function sprites_BaseSpriteSayRenderer__C21217_v0_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45185,7 +40905,7 @@ function sprites_BaseSpriteSayRenderer__C274076_v0_4_mk(s) { } } -function sprites_BaseSpriteSayRenderer__C274076_v2_1_mk(s) { +function sprites_BaseSpriteSayRenderer__C21217_v2_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -45227,21 +40947,6 @@ function if_state_1_mk(s) { } } -function if__pack_2_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: null, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - tmp_3: undefined, - tmp_4: undefined, - arg0: undefined, - arg1: undefined, -} } - - function if_width_1_mk(s) { checkStack(s.depth); return { @@ -45255,7 +40960,7 @@ function if_width_1_mk(s) { arg0: undefined, } } -const controller_Controller__C273951_VT = mkVTable({ +const controller_Controller__C21104_VT = mkVTable({ name: "Controller", numFields: 5, classNo: 16, @@ -45274,28 +40979,28 @@ const controller_Controller__C273951_VT = mkVTable({ "set/_id": null, "_connected": null, "set/_connected": null, - "_controlledSprites": controller_Controller__controlledSprites__P273956, - "set/_controlledSprites": controller_Controller__controlledSprites__P273957, - "id": controller_Controller_id__P273958, - "left": controller_Controller_left__P273960, - "right": controller_Controller_right__P273961, - "up": controller_Controller_up__P273962, - "down": controller_Controller_down__P273963, - "button": controller_Controller_button__P276586, - "connected": controller_Controller_connected__P273972, - "set/connected": controller_Controller_connected__P273973, - "__preUpdate": controller_Controller___preUpdate__P273979, - "__update": controller_Controller___update__P273980, + "_controlledSprites": controller_Controller__controlledSprites__P21105, + "set/_controlledSprites": controller_Controller__controlledSprites__P21106, + "id": controller_Controller_id__P21064, + "left": controller_Controller_left__P21108, + "right": controller_Controller_right__P21109, + "up": controller_Controller_up__P21110, + "down": controller_Controller_down__P21111, + "button": controller_Controller_button__P21118, + "connected": controller_Controller_connected__P21059, + "set/connected": controller_Controller_connected__P21121, + "__preUpdate": controller_Controller___preUpdate__P21127, + "__update": controller_Controller___update__P21128, }, }); -const controller_Button__C274006_VT = mkVTable({ +const controller_Button__C21138_VT = mkVTable({ name: "Button", numFields: 7, classNo: 17, lastSubtypeNo: 18, maxBgInstances: null, methods: { - "isPressed": controller_Button_isPressed__P274017, + "isPressed": controller_Button_isPressed__P21148, }, iface: { "_owner": null, @@ -45312,29 +41017,29 @@ const controller_Button__C274006_VT = mkVTable({ "set/_pressedElasped": null, "_repeatCount": null, "set/_repeatCount": null, - "handlerState": controller_Button_handlerState__P276589, - "toString": controller_Button_toString__P274011, - "raiseButtonUp": controller_Button_raiseButtonUp__P276590, - "raiseButtonDown": controller_Button_raiseButtonDown__P276591, - "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P276592, - "onEvent": controller_Button_onEvent__P274013, - "isPressed": controller_Button_isPressed__P274017, - "pressureLevel": controller_Button_pressureLevel__P274018, - "setPressed": controller_Button_setPressed__P274019, - "__update": controller_Button___update__P274020, - "runButtonEvents": controller_Button_runButtonEvents__P276593, - "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P276594, + "handlerState": controller_Button_handlerState__P21139, + "toString": controller_Button_toString__P21140, + "raiseButtonUp": controller_Button_raiseButtonUp__P21141, + "raiseButtonDown": controller_Button_raiseButtonDown__P21142, + "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P21143, + "onEvent": controller_Button_onEvent__P21144, + "isPressed": controller_Button_isPressed__P21148, + "pressureLevel": controller_Button_pressureLevel__P21149, + "setPressed": controller_Button_setPressed__P21150, + "__update": controller_Button___update__P21151, + "runButtonEvents": controller_Button_runButtonEvents__P21152, + "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P21153, }, - toStringMethod: controller_Button_toString__P274011, + toStringMethod: controller_Button_toString__P21140, }); -const controller_AnyButton__C276587_VT = mkVTable({ +const controller_AnyButton__C21136_VT = mkVTable({ name: "AnyButton", numFields: 7, classNo: 18, lastSubtypeNo: 18, maxBgInstances: null, methods: { - "isPressed": controller_AnyButton_isPressed__P276595, + "isPressed": controller_AnyButton_isPressed__P21154, }, iface: { "_owner": null, @@ -45351,21 +41056,21 @@ const controller_AnyButton__C276587_VT = mkVTable({ "set/_pressedElasped": null, "_repeatCount": null, "set/_repeatCount": null, - "isPressed": controller_AnyButton_isPressed__P276595, - "handlerState": controller_Button_handlerState__P276589, - "toString": controller_Button_toString__P274011, - "raiseButtonUp": controller_Button_raiseButtonUp__P276590, - "raiseButtonDown": controller_Button_raiseButtonDown__P276591, - "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P276592, - "onEvent": controller_Button_onEvent__P274013, - "pressureLevel": controller_Button_pressureLevel__P274018, - "setPressed": controller_Button_setPressed__P274019, - "__update": controller_Button___update__P274020, - "runButtonEvents": controller_Button_runButtonEvents__P276593, - "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P276594, + "isPressed": controller_AnyButton_isPressed__P21154, + "handlerState": controller_Button_handlerState__P21139, + "toString": controller_Button_toString__P21140, + "raiseButtonUp": controller_Button_raiseButtonUp__P21141, + "raiseButtonDown": controller_Button_raiseButtonDown__P21142, + "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P21143, + "onEvent": controller_Button_onEvent__P21144, + "pressureLevel": controller_Button_pressureLevel__P21149, + "setPressed": controller_Button_setPressed__P21150, + "__update": controller_Button___update__P21151, + "runButtonEvents": controller_Button_runButtonEvents__P21152, + "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P21153, }, }); -const game_GameOverConfig__C274790_VT = mkVTable({ +const game_GameOverConfig__C21891_VT = mkVTable({ name: "GameOverConfig", numFields: 14, classNo: 19, @@ -45402,10 +41107,10 @@ const game_GameOverConfig__C274790_VT = mkVTable({ "set/messageSetByUser": null, "scoringTypeSetByUser": null, "set/scoringTypeSetByUser": null, - "init": game_GameOverConfig_init__P274806, + "init": game_GameOverConfig_init__P21892, }, }); -const Math_FastRandom__C274876_VT = mkVTable({ +const Math_FastRandom__C22203_VT = mkVTable({ name: "FastRandom", numFields: 2, classNo: 20, @@ -45418,371 +41123,16 @@ const Math_FastRandom__C274876_VT = mkVTable({ "set/lfsr": null, "seed": null, "set/seed": null, - "next": Math_FastRandom_next__P274879, - "randomRange": Math_FastRandom_randomRange__P274880, - "pickRandom": Math_FastRandom_pickRandom__P274881, - }, -}); -const ArrayBuffer__C300769_VT = mkVTable({ - name: "ArrayBuffer", - numFields: 2, - classNo: 21, - lastSubtypeNo: 21, - maxBgInstances: null, - methods: { - }, - iface: { - "_byteLength": null, - "set/_byteLength": null, - "_bytes": null, - "set/_bytes": null, - "byteLength": ArrayBuffer_byteLength__P300770, - "bytes": ArrayBuffer_bytes__P300771, - "slice": ArrayBuffer_slice__P300772, - "clamp": ArrayBuffer_clamp__P300773, - }, -}); -const TypedArray__C276175_VT = mkVTable({ - name: "TypedArray", - numFields: 7, - classNo: 22, - lastSubtypeNo: 23, - maxBgInstances: null, - methods: { - }, - iface: { - "BYTES_PER_ELEMENT": null, - "set/BYTES_PER_ELEMENT": null, - "_buffer": null, - "set/_buffer": null, - "_byteLength": null, - "set/_byteLength": null, - "_byteOffset": null, - "set/_byteOffset": null, - "_length": null, - "set/_length": null, - "_pack": null, - "set/_pack": null, - "_unpack": null, - "set/_unpack": null, - "fromArrayBuffer": TypedArray_fromArrayBuffer__P276178, - "buffer": TypedArray_buffer__P276180, - "byteOffset": TypedArray_byteOffset__P276182, - "length": TypedArray_length__P276184, - "set": TypedArray_set__P276186, - "setFromTypedArray": TypedArray_setFromTypedArray__P276188, - "init": TypedArray_init__P278939, - }, -}); -const Uint8Array__C276205_VT = mkVTable({ - name: "Uint8Array", - numFields: 7, - classNo: 23, - lastSubtypeNo: 23, - maxBgInstances: null, - methods: { - }, - iface: { - "BYTES_PER_ELEMENT": null, - "set/BYTES_PER_ELEMENT": null, - "_buffer": null, - "set/_buffer": null, - "_byteLength": null, - "set/_byteLength": null, - "_byteOffset": null, - "set/_byteOffset": null, - "_length": null, - "set/_length": null, - "_pack": null, - "set/_pack": null, - "_unpack": null, - "set/_unpack": null, - "fromArrayBuffer": TypedArray_fromArrayBuffer__P276178, - "buffer": TypedArray_buffer__P276180, - "byteOffset": TypedArray_byteOffset__P276182, - "length": TypedArray_length__P276184, - "set": TypedArray_set__P276186, - "setFromTypedArray": TypedArray_setFromTypedArray__P276188, - "init": TypedArray_init__P278939, - }, -}); -const game_BaseDialog__C274720_VT = mkVTable({ - name: "BaseDialog", - numFields: 11, - classNo: 24, - lastSubtypeNo: 25, - maxBgInstances: null, - methods: { - "update": game_BaseDialog_update__P274734, - "setText": game_BaseDialog_setText__P274735, - "drawTextCore": game_BaseDialog_drawTextCore__P274736, - }, - iface: { - "image": null, - "set/image": null, - "frame": null, - "set/frame": null, - "cursor": null, - "set/cursor": null, - "columns": null, - "set/columns": null, - "rows": null, - "set/rows": null, - "unit": null, - "set/unit": null, - "innerLeft": null, - "set/innerLeft": null, - "innerTop": null, - "set/innerTop": null, - "cursorCount": null, - "set/cursorCount": null, - "font": null, - "set/font": null, - "textColor": null, - "set/textColor": null, - "resize": game_BaseDialog_resize__P274733, - "update": game_BaseDialog_update__P274734, - "setText": game_BaseDialog_setText__P274735, - "drawTextCore": game_BaseDialog_drawTextCore__P274736, - "drawCursorRow": game_BaseDialog_drawCursorRow__P274737, - "drawBorder": game_BaseDialog_drawBorder__P276767, - "fastFill": game_BaseDialog_fastFill__P276768, - "clearInterior": game_BaseDialog_clearInterior__P276769, - "drawPartial": game_BaseDialog_drawPartial__P276770, - "cursorRowHeight": game_BaseDialog_cursorRowHeight__P276771, - "textAreaWidth": game_BaseDialog_textAreaWidth__P276773, - "textAreaHeight": game_BaseDialog_textAreaHeight__P276774, - "setFont": game_BaseDialog_setFont__P276775, - }, -}); -const game_SplashDialog__C274749_VT = mkVTable({ - name: "SplashDialog", - numFields: 17, - classNo: 25, - lastSubtypeNo: 25, - maxBgInstances: null, - methods: { - "update": game_BaseDialog_update__P274734, - "setText": game_SplashDialog_setText__P274757, - "drawTextCore": game_SplashDialog_drawTextCore__P274759, - }, - iface: { - "image": null, - "set/image": null, - "frame": null, - "set/frame": null, - "cursor": null, - "set/cursor": null, - "columns": null, - "set/columns": null, - "rows": null, - "set/rows": null, - "unit": null, - "set/unit": null, - "innerLeft": null, - "set/innerLeft": null, - "innerTop": null, - "set/innerTop": null, - "cursorCount": null, - "set/cursorCount": null, - "font": null, - "set/font": null, - "textColor": null, - "set/textColor": null, - "text": null, - "set/text": null, - "subtext": null, - "set/subtext": null, - "timer": null, - "set/timer": null, - "offset": null, - "set/offset": null, - "maxOffset": null, - "set/maxOffset": null, - "maxSubOffset": null, - "set/maxSubOffset": null, - "updateFont": game_SplashDialog_updateFont__P276778, - "setText": game_SplashDialog_setText__P274757, - "setSubtext": game_SplashDialog_setSubtext__P274758, - "drawTextCore": game_SplashDialog_drawTextCore__P274759, - "resize": game_BaseDialog_resize__P274733, - "update": game_BaseDialog_update__P274734, - "drawCursorRow": game_BaseDialog_drawCursorRow__P274737, - "drawBorder": game_BaseDialog_drawBorder__P276767, - "fastFill": game_BaseDialog_fastFill__P276768, - "clearInterior": game_BaseDialog_clearInterior__P276769, - "drawPartial": game_BaseDialog_drawPartial__P276770, - "cursorRowHeight": game_BaseDialog_cursorRowHeight__P276771, - "textAreaWidth": game_BaseDialog_textAreaWidth__P276773, - "textAreaHeight": game_BaseDialog_textAreaHeight__P276774, - "setFont": game_BaseDialog_setFont__P276775, - }, -}); -const control_EventContext__C272211_VT = mkVTable({ - name: "EventContext", - numFields: 10, - classNo: 26, - lastSubtypeNo: 26, - maxBgInstances: null, - methods: { - }, - iface: { - "handlers": null, - "set/handlers": null, - "frameCallbacks": null, - "set/frameCallbacks": null, - "frameWorker": null, - "set/frameWorker": null, - "framesInSample": null, - "set/framesInSample": null, - "timeInSample": null, - "set/timeInSample": null, - "lastPerfDump": null, - "set/lastPerfDump": null, - "deltaTimeMillis": null, - "set/deltaTimeMillis": null, - "prevTimeMillis": null, - "set/prevTimeMillis": null, - "idleCallbacks": null, - "set/idleCallbacks": null, - "runningCallbacks": null, - "set/runningCallbacks": null, - "deltaTime": control_EventContext_deltaTime__P272216, - "runCallbacks": control_EventContext_runCallbacks__P276302, - "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P276303, - "register": control_EventContext_register__P272217, - "unregister": control_EventContext_unregister__P272218, - "registerFrameHandler": control_EventContext_registerFrameHandler__P272219, - "registerHandler": control_EventContext_registerHandler__P272221, - }, -}); -const control_FrameCallback__C272208_VT = mkVTable({ - name: "FrameCallback", - numFields: 2, - classNo: 27, - lastSubtypeNo: 27, - maxBgInstances: null, - methods: { - }, - iface: { - "order": null, - "set/order": null, - "handler": null, - "set/handler": null, - }, -}); -const sprites_BaseSprite__C273911_VT = mkVTable({ - name: "BaseSprite", - numFields: 2, - classNo: 28, - lastSubtypeNo: 31, - maxBgInstances: null, - methods: { - "__visible": sprites_BaseSprite___visible__P273914, - "__draw": sprites_BaseSprite___draw__P273917, - "__drawCore": sprites_BaseSprite___drawCore__P273918, - "__update": sprites_BaseSprite___update__P273919, - }, - iface: { - "_z": null, - "set/_z": null, - "id": null, - "set/id": null, - "__visible": sprites_BaseSprite___visible__P273914, - "z": sprites_BaseSprite_z__P273915, - "set/z": sprites_BaseSprite_z__P273916, - "__draw": sprites_BaseSprite___draw__P273917, - "__drawCore": sprites_BaseSprite___drawCore__P273918, - "__update": sprites_BaseSprite___update__P273919, - }, -}); -const particles_ParticleSource__C274968_VT = mkVTable({ - name: "ParticleSource", - numFields: 13, - classNo: 29, - lastSubtypeNo: 29, - maxBgInstances: null, - methods: { - "__visible": sprites_BaseSprite___visible__P273914, - "__draw": particles_ParticleSource___draw__P274974, - "__drawCore": sprites_BaseSprite___drawCore__P273918, - "__update": sprites_BaseSprite___update__P273919, - "updateParticle": particles_ParticleSource_updateParticle__P277147, - }, - iface: { - "_z": null, - "set/_z": null, - "id": null, - "set/id": null, - "priority": null, - "set/priority": null, - "_dt": null, - "set/_dt": null, - "anchor": null, - "set/anchor": null, - "lifespan": null, - "set/lifespan": null, - "pFlags": null, - "set/pFlags": null, - "head": null, - "set/head": null, - "timer": null, - "set/timer": null, - "period": null, - "set/period": null, - "_factory": null, - "set/_factory": null, - "ax": null, - "set/ax": null, - "ay": null, - "set/ay": null, - "__draw": particles_ParticleSource___draw__P274974, - "_update": particles_ParticleSource__update__P274975, - "_prune": particles_ParticleSource__prune__P274976, - "setAcceleration": particles_ParticleSource_setAcceleration__P274977, - "setRelativeToCamera": particles_ParticleSource_setRelativeToCamera__P274979, - "enabled": particles_ParticleSource_enabled__P274980, - "set/enabled": particles_ParticleSource_enabled__P274981, - "destroy": particles_ParticleSource_destroy__P274982, - "clear": particles_ParticleSource_clear__P274983, - "setAnchor": particles_ParticleSource_setAnchor__P274984, - "setRate": particles_ParticleSource_setRate__P274985, - "setFactory": particles_ParticleSource_setFactory__P274987, - "updateParticle": particles_ParticleSource_updateParticle__P277147, - "drawParticle": particles_ParticleSource_drawParticle__P277148, - "__visible": sprites_BaseSprite___visible__P273914, - "z": sprites_BaseSprite_z__P273915, - "set/z": sprites_BaseSprite_z__P273916, - "__drawCore": sprites_BaseSprite___drawCore__P273918, - "__update": sprites_BaseSprite___update__P273919, + "next": Math_FastRandom_next__P22204, + "randomRange": Math_FastRandom_randomRange__P22205, + "pickRandom": Math_FastRandom_pickRandom__P22206, }, }); -const control_EventHandler__C276297_VT = mkVTable({ - name: "EventHandler", - numFields: 4, - classNo: 32, - lastSubtypeNo: 32, - maxBgInstances: null, - methods: { - }, - iface: { - "src": null, - "set/src": null, - "value": null, - "set/value": null, - "handler": null, - "set/handler": null, - "flags": null, - "set/flags": null, - "register": control_EventHandler_register__P276298, - "unregister": control_EventHandler_unregister__P276299, - }, -}); -const scene_Scene__C274660_VT = mkVTable({ +const scene_Scene__C21026_VT = mkVTable({ name: "Scene", numFields: 25, - classNo: 33, - lastSubtypeNo: 33, + classNo: 21, + lastSubtypeNo: 21, maxBgInstances: null, methods: { }, @@ -45837,39 +41187,105 @@ const scene_Scene__C274660_VT = mkVTable({ "set/_data": null, "previousScene": null, "set/previousScene": null, - "init": scene_Scene_init__P274684, - "data": scene_Scene_data__P274685, - "millis": scene_Scene_millis__P274686, - "addSprite": scene_Scene_addSprite__P274687, - "render": scene_Scene_render__P274689, + "init": scene_Scene_init__P21027, + "data": scene_Scene_data__P21028, + "millis": scene_Scene_millis__P21029, + "addSprite": scene_Scene_addSprite__P21030, + "render": scene_Scene_render__P21032, }, }); -const PhysicsEngine__C274328_VT = mkVTable({ +const PhysicsEngine__C21384_VT = mkVTable({ name: "PhysicsEngine", numFields: 0, - classNo: 34, - lastSubtypeNo: 35, + classNo: 22, + lastSubtypeNo: 23, maxBgInstances: null, methods: { - "addSprite": PhysicsEngine_addSprite__P274330, - "removeSprite": PhysicsEngine_removeSprite__P274331, - "moveSprite": PhysicsEngine_moveSprite__P274332, - "draw": PhysicsEngine_draw__P274333, - "move": PhysicsEngine_move__P274334, + "addSprite": PhysicsEngine_addSprite__P21385, + "removeSprite": PhysicsEngine_removeSprite__P21386, + "moveSprite": PhysicsEngine_moveSprite__P21387, + "draw": PhysicsEngine_draw__P21388, + "move": PhysicsEngine_move__P21389, }, iface: { - "addSprite": PhysicsEngine_addSprite__P274330, - "removeSprite": PhysicsEngine_removeSprite__P274331, - "moveSprite": PhysicsEngine_moveSprite__P274332, - "draw": PhysicsEngine_draw__P274333, - "move": PhysicsEngine_move__P274334, + "addSprite": PhysicsEngine_addSprite__P21385, + "removeSprite": PhysicsEngine_removeSprite__P21386, + "moveSprite": PhysicsEngine_moveSprite__P21387, + "draw": PhysicsEngine_draw__P21388, + "move": PhysicsEngine_move__P21389, }, }); -const scene_Camera__C274598_VT = mkVTable({ +const ArcadePhysicsEngine__C21435_VT = mkVTable({ + name: "ArcadePhysicsEngine", + numFields: 6, + classNo: 23, + lastSubtypeNo: 23, + maxBgInstances: null, + methods: { + "addSprite": ArcadePhysicsEngine_addSprite__P21444, + "removeSprite": ArcadePhysicsEngine_removeSprite__P21445, + "moveSprite": ArcadePhysicsEngine_moveSprite__P21454, + "draw": ArcadePhysicsEngine_draw__P21446, + "move": ArcadePhysicsEngine_move__P21447, + }, + iface: { + "sprites": null, + "set/sprites": null, + "map": null, + "set/map": null, + "maxVelocity": null, + "set/maxVelocity": null, + "maxNegativeVelocity": null, + "set/maxNegativeVelocity": null, + "minSingleStep": null, + "set/minSingleStep": null, + "maxSingleStep": null, + "set/maxSingleStep": null, + "maxSpeed": ArcadePhysicsEngine_maxSpeed__P21437, + "set/maxSpeed": ArcadePhysicsEngine_maxSpeed__P21438, + "minStep": ArcadePhysicsEngine_minStep__P21439, + "set/minStep": ArcadePhysicsEngine_minStep__P21440, + "maxStep": ArcadePhysicsEngine_maxStep__P21441, + "set/maxStep": ArcadePhysicsEngine_maxStep__P21442, + "addSprite": ArcadePhysicsEngine_addSprite__P21444, + "removeSprite": ArcadePhysicsEngine_removeSprite__P21445, + "draw": ArcadePhysicsEngine_draw__P21446, + "move": ArcadePhysicsEngine_move__P21447, + "createMovingSprite": ArcadePhysicsEngine_createMovingSprite__P21448, + "spriteCollisions": ArcadePhysicsEngine_spriteCollisions__P21449, + "screenEdgeCollisions": ArcadePhysicsEngine_screenEdgeCollisions__P21450, + "tilemapCollisions": ArcadePhysicsEngine_tilemapCollisions__P21451, + "tilemapOverlaps": ArcadePhysicsEngine_tilemapOverlaps__P21452, + "moveSprite": ArcadePhysicsEngine_moveSprite__P21454, + "canResolveClipping": ArcadePhysicsEngine_canResolveClipping__P21455, + "constrain": ArcadePhysicsEngine_constrain__P21456, + }, +}); +const scene_Background__C21617_VT = mkVTable({ + name: "Background", + numFields: 4, + classNo: 24, + lastSubtypeNo: 24, + maxBgInstances: null, + methods: { + }, + iface: { + "color": null, + "set/color": null, + "_image": null, + "set/_image": null, + "camera": null, + "set/camera": null, + "_layers": null, + "set/_layers": null, + "draw": scene_Background_draw__P21622, + }, +}); +const scene_Camera__C21717_VT = mkVTable({ name: "Camera", numFields: 10, - classNo: 36, - lastSubtypeNo: 36, + classNo: 25, + lastSubtypeNo: 25, maxBgInstances: null, methods: { }, @@ -45894,78 +41310,148 @@ const scene_Camera__C274598_VT = mkVTable({ "set/shakeDuration": null, "shakeAmplitude": null, "set/shakeAmplitude": null, - "offsetX": scene_Camera_offsetX__P274603, - "set/offsetX": scene_Camera_offsetX__P274604, - "offsetY": scene_Camera_offsetY__P274605, - "set/offsetY": scene_Camera_offsetY__P274606, - "x": scene_Camera_x__P274607, - "y": scene_Camera_y__P274608, - "left": scene_Camera_left__P274609, - "top": scene_Camera_top__P274611, - "isUpdated": scene_Camera_isUpdated__P274614, - "update": scene_Camera_update__P274615, + "offsetX": scene_Camera_offsetX__P21718, + "set/offsetX": scene_Camera_offsetX__P21719, + "offsetY": scene_Camera_offsetY__P21720, + "set/offsetY": scene_Camera_offsetY__P21721, + "x": scene_Camera_x__P21722, + "y": scene_Camera_y__P21723, + "left": scene_Camera_left__P21724, + "top": scene_Camera_top__P21726, + "isUpdated": scene_Camera_isUpdated__P21729, + "update": scene_Camera_update__P21730, }, }); -const scene_Background__C274486_VT = mkVTable({ - name: "Background", +const sprites_SpriteMap__C21331_VT = mkVTable({ + name: "SpriteMap", + numFields: 5, + classNo: 26, + lastSubtypeNo: 26, + maxBgInstances: null, + methods: { + }, + iface: { + "cellWidth": null, + "set/cellWidth": null, + "cellHeight": null, + "set/cellHeight": null, + "rowCount": null, + "set/rowCount": null, + "columnCount": null, + "set/columnCount": null, + "buckets": null, + "set/buckets": null, + "neighbors": sprites_SpriteMap_neighbors__P21332, + "overlaps": sprites_SpriteMap_overlaps__P21333, + "draw": sprites_SpriteMap_draw__P21334, + "resizeBuckets": sprites_SpriteMap_resizeBuckets__P21335, + "clear": sprites_SpriteMap_clear__P21336, + "key": sprites_SpriteMap_key__P21337, + "insertAtKey": sprites_SpriteMap_insertAtKey__P21338, + "insertAABB": sprites_SpriteMap_insertAABB__P21339, + "mergeAtKey": sprites_SpriteMap_mergeAtKey__P21340, + "toString": sprites_SpriteMap_toString__P21341, + }, + toStringMethod: sprites_SpriteMap_toString__P21341, +}); +const control_EventContext__C20393_VT = mkVTable({ + name: "EventContext", + numFields: 10, + classNo: 27, + lastSubtypeNo: 27, + maxBgInstances: null, + methods: { + }, + iface: { + "handlers": null, + "set/handlers": null, + "frameCallbacks": null, + "set/frameCallbacks": null, + "frameWorker": null, + "set/frameWorker": null, + "framesInSample": null, + "set/framesInSample": null, + "timeInSample": null, + "set/timeInSample": null, + "lastPerfDump": null, + "set/lastPerfDump": null, + "deltaTimeMillis": null, + "set/deltaTimeMillis": null, + "prevTimeMillis": null, + "set/prevTimeMillis": null, + "idleCallbacks": null, + "set/idleCallbacks": null, + "runningCallbacks": null, + "set/runningCallbacks": null, + "deltaTime": control_EventContext_deltaTime__P20394, + "runCallbacks": control_EventContext_runCallbacks__P20395, + "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P20396, + "register": control_EventContext_register__P20397, + "unregister": control_EventContext_unregister__P20398, + "registerFrameHandler": control_EventContext_registerFrameHandler__P20399, + "registerHandler": control_EventContext_registerHandler__P20401, + }, +}); +const control_EventHandler__C20388_VT = mkVTable({ + name: "EventHandler", numFields: 4, - classNo: 37, - lastSubtypeNo: 37, + classNo: 28, + lastSubtypeNo: 28, maxBgInstances: null, methods: { }, iface: { - "color": null, - "set/color": null, - "_image": null, - "set/_image": null, - "camera": null, - "set/camera": null, - "_layers": null, - "set/_layers": null, - "image": scene_Background_image__P274492, - "set/image": scene_Background_image__P274493, - "draw": scene_Background_draw__P274495, + "src": null, + "set/src": null, + "value": null, + "set/value": null, + "handler": null, + "set/handler": null, + "flags": null, + "set/flags": null, + "register": control_EventHandler_register__P20389, + "unregister": control_EventHandler_unregister__P20390, }, }); -const scene_BackgroundLayer__C274496_VT = mkVTable({ - name: "BackgroundLayer", - numFields: 6, - classNo: 38, - lastSubtypeNo: 38, +const sprites_BaseSprite__C20971_VT = mkVTable({ + name: "BaseSprite", + numFields: 2, + classNo: 29, + lastSubtypeNo: 32, maxBgInstances: null, methods: { + "__visible": sprites_BaseSprite___visible__P20972, + "__draw": sprites_BaseSprite___draw__P20975, + "__drawCore": sprites_BaseSprite___drawCore__P20976, + "__update": sprites_BaseSprite___update__P20977, }, iface: { - "distance": null, - "set/distance": null, - "img": null, - "set/img": null, - "repeatX": null, - "set/repeatX": null, - "repeatY": null, - "set/repeatY": null, - "alignX": null, - "set/alignX": null, - "alignY": null, - "set/alignY": null, - "draw": scene_BackgroundLayer_draw__P274504, + "_z": null, + "set/_z": null, + "id": null, + "set/id": null, + "__visible": sprites_BaseSprite___visible__P20972, + "z": sprites_BaseSprite_z__P20973, + "set/z": sprites_BaseSprite_z__P20974, + "__draw": sprites_BaseSprite___draw__P20975, + "__drawCore": sprites_BaseSprite___drawCore__P20976, + "__update": sprites_BaseSprite___update__P20977, }, }); -const Sprite__C274158_VT = mkVTable({ +const Sprite__C21242_VT = mkVTable({ name: "Sprite", numFields: 30, classNo: 30, lastSubtypeNo: 30, maxBgInstances: null, methods: { - "__visible": Sprite___visible__P274213, - "__draw": sprites_BaseSprite___draw__P273917, - "__drawCore": Sprite___drawCore__P274232, - "__update": Sprite___update__P274233, - "setHitbox": Sprite_setHitbox__P274211, - "recalcSize": Sprite_recalcSize__P276613, - "drawSprite": Sprite_drawSprite__P276617, + "__visible": Sprite___visible__P21275, + "__draw": sprites_BaseSprite___draw__P20975, + "__drawCore": Sprite___drawCore__P21296, + "__update": Sprite___update__P21297, + "setHitbox": Sprite_setHitbox__P21273, + "recalcSize": Sprite_recalcSize__P21276, + "drawSprite": Sprite_drawSprite__P21318, }, iface: { "_z": null, @@ -46028,71 +41514,71 @@ const Sprite__C274158_VT = mkVTable({ "set/flags": null, "destroyHandler": null, "set/destroyHandler": null, - "x": Sprite_x__P274171, - "set/x": Sprite_x__P274172, - "y": Sprite_y__P274173, - "set/y": Sprite_y__P274174, - "vx": Sprite_vx__P274175, - "set/vx": Sprite_vx__P274176, - "vy": Sprite_vy__P274177, - "set/vy": Sprite_vy__P274178, - "ax": Sprite_ax__P274179, - "set/ax": Sprite_ax__P274180, - "ay": Sprite_ay__P274181, - "set/ay": Sprite_ay__P274182, - "fx": Sprite_fx__P274183, - "set/fx": Sprite_fx__P274184, - "fy": Sprite_fy__P274185, - "set/fy": Sprite_fy__P274186, - "sx": Sprite_sx__P274187, - "sy": Sprite_sy__P274189, - "data": Sprite_data__P274193, - "set/data": Sprite_data__P274194, - "image": Sprite_image__P274207, - "setImage": Sprite_setImage__P274208, - "calcDimensionalHash": Sprite_calcDimensionalHash__P274209, - "resetHitbox": Sprite_resetHitbox__P274210, - "setHitbox": Sprite_setHitbox__P274211, - "isStatic": Sprite_isStatic__P274212, - "__visible": Sprite___visible__P274213, - "recalcSize": Sprite_recalcSize__P276613, - "isScaled": Sprite_isScaled__P276614, - "width": Sprite_width__P274214, - "height": Sprite_height__P274215, - "left": Sprite_left__P274216, - "set/left": Sprite_left__P274217, - "right": Sprite_right__P274218, - "set/right": Sprite_right__P274219, - "top": Sprite_top__P274220, - "set/top": Sprite_top__P274221, - "bottom": Sprite_bottom__P274222, - "set/bottom": Sprite_bottom__P274223, - "kind": Sprite_kind__P274224, - "setKind": Sprite_setKind__P274225, - "isOutOfScreen": Sprite_isOutOfScreen__P274231, - "__drawCore": Sprite___drawCore__P274232, - "__update": Sprite___update__P274233, - "setFlag": Sprite_setFlag__P274236, - "overlapsWith": Sprite_overlapsWith__P274237, - "clearObstacles": Sprite_clearObstacles__P274242, - "registerObstacle": Sprite_registerObstacle__P274243, - "destroy": Sprite_destroy__P274245, - "_destroyCore": Sprite__destroyCore__P274246, - "toString": Sprite_toString__P274251, - "drawSay": Sprite_drawSay__P276615, - "drawDebug": Sprite_drawDebug__P276616, - "drawSprite": Sprite_drawSprite__P276617, - "z": sprites_BaseSprite_z__P273915, - "set/z": sprites_BaseSprite_z__P273916, - "__draw": sprites_BaseSprite___draw__P273917, + "x": Sprite_x__P21244, + "set/x": Sprite_x__P21245, + "y": Sprite_y__P21246, + "set/y": Sprite_y__P21247, + "vx": Sprite_vx__P21248, + "set/vx": Sprite_vx__P21249, + "vy": Sprite_vy__P21250, + "set/vy": Sprite_vy__P21251, + "ax": Sprite_ax__P21252, + "set/ax": Sprite_ax__P21253, + "ay": Sprite_ay__P21254, + "set/ay": Sprite_ay__P21255, + "fx": Sprite_fx__P21256, + "set/fx": Sprite_fx__P21257, + "fy": Sprite_fy__P21258, + "set/fy": Sprite_fy__P21259, + "sx": Sprite_sx__P21260, + "sy": Sprite_sy__P21262, + "data": Sprite_data__P21266, + "set/data": Sprite_data__P21267, + "image": Sprite_image__P21269, + "setImage": Sprite_setImage__P21270, + "calcDimensionalHash": Sprite_calcDimensionalHash__P21271, + "resetHitbox": Sprite_resetHitbox__P21272, + "setHitbox": Sprite_setHitbox__P21273, + "isStatic": Sprite_isStatic__P21274, + "__visible": Sprite___visible__P21275, + "recalcSize": Sprite_recalcSize__P21276, + "isScaled": Sprite_isScaled__P21277, + "width": Sprite_width__P21278, + "height": Sprite_height__P21279, + "left": Sprite_left__P21280, + "set/left": Sprite_left__P21281, + "right": Sprite_right__P21282, + "set/right": Sprite_right__P21283, + "top": Sprite_top__P21284, + "set/top": Sprite_top__P21285, + "bottom": Sprite_bottom__P21286, + "set/bottom": Sprite_bottom__P21287, + "kind": Sprite_kind__P21288, + "setKind": Sprite_setKind__P21289, + "isOutOfScreen": Sprite_isOutOfScreen__P21295, + "__drawCore": Sprite___drawCore__P21296, + "__update": Sprite___update__P21297, + "setFlag": Sprite_setFlag__P21300, + "overlapsWith": Sprite_overlapsWith__P21301, + "clearObstacles": Sprite_clearObstacles__P21306, + "registerObstacle": Sprite_registerObstacle__P21307, + "destroy": Sprite_destroy__P21309, + "_destroyCore": Sprite__destroyCore__P21310, + "toString": Sprite_toString__P21315, + "drawSay": Sprite_drawSay__P21316, + "drawDebug": Sprite_drawDebug__P21317, + "drawSprite": Sprite_drawSprite__P21318, + "z": sprites_BaseSprite_z__P20973, + "set/z": sprites_BaseSprite_z__P20974, + "__draw": sprites_BaseSprite___draw__P20975, }, - toStringMethod: Sprite_toString__P274251, + toStringMethod: Sprite_toString__P21315, }); -const tiles_TileMap__C274552_VT = mkVTable({ +const tiles_TileMap__C21670_VT = mkVTable({ name: "TileMap", numFields: 5, - classNo: 39, - lastSubtypeNo: 39, + classNo: 33, + lastSubtypeNo: 33, maxBgInstances: null, methods: { }, @@ -46107,29 +41593,29 @@ const tiles_TileMap__C274552_VT = mkVTable({ "set/renderable": null, "handlerState": null, "set/handlerState": null, - "scale": tiles_TileMap_scale__P274555, - "set/scale": tiles_TileMap_scale__P274556, - "data": tiles_TileMap_data__P274557, - "offsetX": tiles_TileMap_offsetX__P274558, - "offsetY": tiles_TileMap_offsetY__P274559, - "areaWidth": tiles_TileMap_areaWidth__P274560, - "areaHeight": tiles_TileMap_areaHeight__P274561, - "layer": tiles_TileMap_layer__P274562, - "enabled": tiles_TileMap_enabled__P274564, - "getTile": tiles_TileMap_getTile__P274566, - "getTileIndex": tiles_TileMap_getTileIndex__P274567, - "draw": tiles_TileMap_draw__P276734, - "isObstacle": tiles_TileMap_isObstacle__P274573, - "getObstacle": tiles_TileMap_getObstacle__P274574, - "isOnWall": tiles_TileMap_isOnWall__P274575, - "getTileImage": tiles_TileMap_getTileImage__P274576, + "scale": tiles_TileMap_scale__P21671, + "set/scale": tiles_TileMap_scale__P21672, + "data": tiles_TileMap_data__P21673, + "offsetX": tiles_TileMap_offsetX__P21674, + "offsetY": tiles_TileMap_offsetY__P21675, + "areaWidth": tiles_TileMap_areaWidth__P21676, + "areaHeight": tiles_TileMap_areaHeight__P21677, + "layer": tiles_TileMap_layer__P21678, + "enabled": tiles_TileMap_enabled__P21680, + "getTile": tiles_TileMap_getTile__P21682, + "getTileIndex": tiles_TileMap_getTileIndex__P21683, + "draw": tiles_TileMap_draw__P21690, + "isObstacle": tiles_TileMap_isObstacle__P21691, + "getObstacle": tiles_TileMap_getObstacle__P21692, + "isOnWall": tiles_TileMap_isOnWall__P21693, + "getTileImage": tiles_TileMap_getTileImage__P21694, }, }); -const tiles_TileMapData__C274534_VT = mkVTable({ +const tiles_TileMapData__C21655_VT = mkVTable({ name: "TileMapData", numFields: 7, - classNo: 40, - lastSubtypeNo: 40, + classNo: 34, + lastSubtypeNo: 34, maxBgInstances: null, methods: { }, @@ -46148,149 +41634,60 @@ const tiles_TileMapData__C274534_VT = mkVTable({ "set/_width": null, "_height": null, "set/_height": null, - "width": tiles_TileMapData_width__P274536, - "height": tiles_TileMapData_height__P274537, - "scale": tiles_TileMapData_scale__P274538, - "set/scale": tiles_TileMapData_scale__P274539, - "getTile": tiles_TileMapData_getTile__P274540, - "getTileImage": tiles_TileMapData_getTileImage__P274543, - "isWall": tiles_TileMapData_isWall__P274545, - "isOutsideMap": tiles_TileMapData_isOutsideMap__P274546, + "width": tiles_TileMapData_width__P21656, + "height": tiles_TileMapData_height__P21657, + "scale": tiles_TileMapData_scale__P21658, + "set/scale": tiles_TileMapData_scale__P21659, + "getTile": tiles_TileMapData_getTile__P21660, + "getTileImage": tiles_TileMapData_getTileImage__P21663, + "isWall": tiles_TileMapData_isWall__P21665, + "isOutsideMap": tiles_TileMapData_isOutsideMap__P21666, }, }); -const ArcadePhysicsEngine__C274344_VT = mkVTable({ - name: "ArcadePhysicsEngine", +const scene_BackgroundLayer__C21624_VT = mkVTable({ + name: "BackgroundLayer", numFields: 6, classNo: 35, lastSubtypeNo: 35, maxBgInstances: null, - methods: { - "addSprite": ArcadePhysicsEngine_addSprite__P274353, - "removeSprite": ArcadePhysicsEngine_removeSprite__P274354, - "moveSprite": ArcadePhysicsEngine_moveSprite__P274358, - "draw": ArcadePhysicsEngine_draw__P274355, - "move": ArcadePhysicsEngine_move__P274356, - }, - iface: { - "sprites": null, - "set/sprites": null, - "map": null, - "set/map": null, - "maxVelocity": null, - "set/maxVelocity": null, - "maxNegativeVelocity": null, - "set/maxNegativeVelocity": null, - "minSingleStep": null, - "set/minSingleStep": null, - "maxSingleStep": null, - "set/maxSingleStep": null, - "maxSpeed": ArcadePhysicsEngine_maxSpeed__P274346, - "set/maxSpeed": ArcadePhysicsEngine_maxSpeed__P274347, - "minStep": ArcadePhysicsEngine_minStep__P274348, - "set/minStep": ArcadePhysicsEngine_minStep__P274349, - "maxStep": ArcadePhysicsEngine_maxStep__P274350, - "set/maxStep": ArcadePhysicsEngine_maxStep__P274351, - "addSprite": ArcadePhysicsEngine_addSprite__P274353, - "removeSprite": ArcadePhysicsEngine_removeSprite__P274354, - "draw": ArcadePhysicsEngine_draw__P274355, - "move": ArcadePhysicsEngine_move__P274356, - "createMovingSprite": ArcadePhysicsEngine_createMovingSprite__P276658, - "spriteCollisions": ArcadePhysicsEngine_spriteCollisions__P276659, - "screenEdgeCollisions": ArcadePhysicsEngine_screenEdgeCollisions__P276660, - "tilemapCollisions": ArcadePhysicsEngine_tilemapCollisions__P276661, - "tilemapOverlaps": ArcadePhysicsEngine_tilemapOverlaps__P276662, - "moveSprite": ArcadePhysicsEngine_moveSprite__P274358, - "canResolveClipping": ArcadePhysicsEngine_canResolveClipping__P276663, - "constrain": ArcadePhysicsEngine_constrain__P276664, - }, -}); -const sprites_SpriteMap__C274263_VT = mkVTable({ - name: "SpriteMap", - numFields: 5, - classNo: 41, - lastSubtypeNo: 41, - maxBgInstances: null, methods: { }, iface: { - "cellWidth": null, - "set/cellWidth": null, - "cellHeight": null, - "set/cellHeight": null, - "rowCount": null, - "set/rowCount": null, - "columnCount": null, - "set/columnCount": null, - "buckets": null, - "set/buckets": null, - "neighbors": sprites_SpriteMap_neighbors__P274265, - "overlaps": sprites_SpriteMap_overlaps__P274266, - "draw": sprites_SpriteMap_draw__P274267, - "resizeBuckets": sprites_SpriteMap_resizeBuckets__P274268, - "clear": sprites_SpriteMap_clear__P274269, - "key": sprites_SpriteMap_key__P276621, - "insertAtKey": sprites_SpriteMap_insertAtKey__P276622, - "insertAABB": sprites_SpriteMap_insertAABB__P274270, - "mergeAtKey": sprites_SpriteMap_mergeAtKey__P276623, - "toString": sprites_SpriteMap_toString__P274271, - }, - toStringMethod: sprites_SpriteMap_toString__P274271, -}); -const sprites_SpriteSet__C274280_VT = mkVTable({ - name: "SpriteSet", - numFields: 1, - classNo: 42, - lastSubtypeNo: 42, - maxBgInstances: null, - methods: { - }, - iface: { - "_sprites": null, - "set/_sprites": null, - "length": sprites_SpriteSet_length__P274283, - "add": sprites_SpriteSet_add__P274285, - "remove": sprites_SpriteSet_remove__P274287, - "contains": sprites_SpriteSet_contains__P274288, - "toString": sprites_SpriteSet_toString__P274291, + "distance": null, + "set/distance": null, + "img": null, + "set/img": null, + "repeatX": null, + "set/repeatX": null, + "repeatY": null, + "set/repeatY": null, + "alignX": null, + "set/alignX": null, + "alignY": null, + "set/alignY": null, + "draw": scene_BackgroundLayer_draw__P21625, }, - toStringMethod: sprites_SpriteSet_toString__P274291, }); -const game_Hitbox__C274025_VT = mkVTable({ - name: "Hitbox", - numFields: 6, - classNo: 43, - lastSubtypeNo: 43, +const control_FrameCallback__C20387_VT = mkVTable({ + name: "FrameCallback", + numFields: 2, + classNo: 36, + lastSubtypeNo: 36, maxBgInstances: null, methods: { }, iface: { - "hash": null, - "set/hash": null, - "parent": null, - "set/parent": null, - "ox": null, - "set/ox": null, - "oy": null, - "set/oy": null, - "width": null, - "set/width": null, - "height": null, - "set/height": null, - "left": game_Hitbox_left__P274033, - "top": game_Hitbox_top__P274034, - "right": game_Hitbox_right__P274035, - "bottom": game_Hitbox_bottom__P274036, - "isValid": game_Hitbox_isValid__P274037, - "contains": game_Hitbox_contains__P274038, - "updateIfInvalid": game_Hitbox_updateIfInvalid__P274039, - "overlapsWith": game_Hitbox_overlapsWith__P274040, + "order": null, + "set/order": null, + "handler": null, + "set/handler": null, }, }); -const control_PollEvent__C276276_VT = mkVTable({ +const control_PollEvent__C20348_VT = mkVTable({ name: "PollEvent", numFields: 6, - classNo: 44, - lastSubtypeNo: 44, + classNo: 37, + lastSubtypeNo: 37, maxBgInstances: null, methods: { }, @@ -46309,11 +41706,11 @@ const control_PollEvent__C276276_VT = mkVTable({ "set/once": null, }, }); -const scene_systemMenu_PauseMenu__C274912_VT = mkVTable({ +const scene_systemMenu_PauseMenu__C22223_VT = mkVTable({ name: "PauseMenu", numFields: 7, - classNo: 45, - lastSubtypeNo: 45, + classNo: 38, + lastSubtypeNo: 38, maxBgInstances: null, methods: { }, @@ -46332,19 +41729,19 @@ const scene_systemMenu_PauseMenu__C274912_VT = mkVTable({ "set/scrollOffset": null, "generator": null, "set/generator": null, - "show": scene_systemMenu_PauseMenu_show__P274914, - "onUpdate": scene_systemMenu_PauseMenu_onUpdate__P274915, - "setSelection": scene_systemMenu_PauseMenu_setSelection__P274916, - "drawText": scene_systemMenu_PauseMenu_drawText__P274917, - "dispose": scene_systemMenu_PauseMenu_dispose__P274918, - "updateScrollTarget": scene_systemMenu_PauseMenu_updateScrollTarget__P277062, + "show": scene_systemMenu_PauseMenu_show__P22224, + "onUpdate": scene_systemMenu_PauseMenu_onUpdate__P22225, + "setSelection": scene_systemMenu_PauseMenu_setSelection__P22226, + "drawText": scene_systemMenu_PauseMenu_drawText__P22227, + "dispose": scene_systemMenu_PauseMenu_dispose__P22228, + "updateScrollTarget": scene_systemMenu_PauseMenu_updateScrollTarget__P22229, }, }); -const scene_systemMenu_MenuOption__C274904_VT = mkVTable({ +const scene_systemMenu_MenuOption__C22214_VT = mkVTable({ name: "MenuOption", numFields: 8, - classNo: 46, - lastSubtypeNo: 46, + classNo: 39, + lastSubtypeNo: 39, maxBgInstances: null, methods: { }, @@ -46365,20 +41762,20 @@ const scene_systemMenu_MenuOption__C274904_VT = mkVTable({ "set/getText": null, "action": null, "set/action": null, - "show": scene_systemMenu_MenuOption_show__P274906, - "position": scene_systemMenu_MenuOption_position__P274907, - "setOffset": scene_systemMenu_MenuOption_setOffset__P274908, - "setTheme": scene_systemMenu_MenuOption_setTheme__P274909, - "setState": scene_systemMenu_MenuOption_setState__P274910, - "dispose": scene_systemMenu_MenuOption_dispose__P274911, - "updateCard": scene_systemMenu_MenuOption_updateCard__P277061, + "show": scene_systemMenu_MenuOption_show__P22215, + "position": scene_systemMenu_MenuOption_position__P22216, + "setOffset": scene_systemMenu_MenuOption_setOffset__P22217, + "setTheme": scene_systemMenu_MenuOption_setTheme__P22218, + "setState": scene_systemMenu_MenuOption_setState__P22219, + "dispose": scene_systemMenu_MenuOption_dispose__P22220, + "updateCard": scene_systemMenu_MenuOption_updateCard__P22221, }, }); -const effects_ParticleEffect__C275079_VT = mkVTable({ +const effects_ParticleEffect__C22468_VT = mkVTable({ name: "ParticleEffect", numFields: 3, - classNo: 47, - lastSubtypeNo: 48, + classNo: 40, + lastSubtypeNo: 41, maxBgInstances: null, methods: { }, @@ -46389,15 +41786,15 @@ const effects_ParticleEffect__C275079_VT = mkVTable({ "set/defaultRate": null, "defaultLifespan": null, "set/defaultLifespan": null, - "start": effects_ParticleEffect_start__P275081, - "destroy": effects_ParticleEffect_destroy__P275082, + "start": effects_ParticleEffect_start__P22469, + "destroy": effects_ParticleEffect_destroy__P22470, }, }); -const effects_ImageEffect__C275107_VT = mkVTable({ +const effects_ImageEffect__C22521_VT = mkVTable({ name: "ImageEffect", numFields: 4, - classNo: 49, - lastSubtypeNo: 49, + classNo: 42, + lastSubtypeNo: 42, maxBgInstances: null, methods: { }, @@ -46410,21 +41807,132 @@ const effects_ImageEffect__C275107_VT = mkVTable({ "set/fastRandom": null, "times": null, "set/times": null, - "applyTo": effects_ImageEffect_applyTo__P275109, - "change": effects_ImageEffect_change__P275110, + "applyTo": effects_ImageEffect_applyTo__P22522, + "change": effects_ImageEffect_change__P22523, }, }); -const scene_Renderable__C274617_VT = mkVTable({ - name: "Renderable", - numFields: 4, +const game_Hitbox__C21176_VT = mkVTable({ + name: "Hitbox", + numFields: 6, + classNo: 43, + lastSubtypeNo: 43, + maxBgInstances: null, + methods: { + }, + iface: { + "hash": null, + "set/hash": null, + "parent": null, + "set/parent": null, + "ox": null, + "set/ox": null, + "oy": null, + "set/oy": null, + "width": null, + "set/width": null, + "height": null, + "set/height": null, + "left": game_Hitbox_left__P21177, + "top": game_Hitbox_top__P21178, + "right": game_Hitbox_right__P21179, + "bottom": game_Hitbox_bottom__P21180, + "isValid": game_Hitbox_isValid__P21181, + "contains": game_Hitbox_contains__P21182, + "updateIfInvalid": game_Hitbox_updateIfInvalid__P21183, + "overlapsWith": game_Hitbox_overlapsWith__P21184, + }, +}); +const particles_ParticleSource__C22341_VT = mkVTable({ + name: "ParticleSource", + numFields: 13, classNo: 31, lastSubtypeNo: 31, maxBgInstances: null, methods: { - "__visible": scene_Renderable___visible__P274619, - "__draw": sprites_BaseSprite___draw__P273917, - "__drawCore": scene_Renderable___drawCore__P274620, - "__update": sprites_BaseSprite___update__P273919, + "__visible": sprites_BaseSprite___visible__P20972, + "__draw": particles_ParticleSource___draw__P22343, + "__drawCore": sprites_BaseSprite___drawCore__P20976, + "__update": sprites_BaseSprite___update__P20977, + "updateParticle": particles_ParticleSource_updateParticle__P22357, + }, + iface: { + "_z": null, + "set/_z": null, + "id": null, + "set/id": null, + "priority": null, + "set/priority": null, + "_dt": null, + "set/_dt": null, + "anchor": null, + "set/anchor": null, + "lifespan": null, + "set/lifespan": null, + "pFlags": null, + "set/pFlags": null, + "head": null, + "set/head": null, + "timer": null, + "set/timer": null, + "period": null, + "set/period": null, + "_factory": null, + "set/_factory": null, + "ax": null, + "set/ax": null, + "ay": null, + "set/ay": null, + "__draw": particles_ParticleSource___draw__P22343, + "_update": particles_ParticleSource__update__P22344, + "_prune": particles_ParticleSource__prune__P22345, + "setAcceleration": particles_ParticleSource_setAcceleration__P22346, + "setRelativeToCamera": particles_ParticleSource_setRelativeToCamera__P22348, + "enabled": particles_ParticleSource_enabled__P22349, + "set/enabled": particles_ParticleSource_enabled__P22350, + "destroy": particles_ParticleSource_destroy__P22351, + "clear": particles_ParticleSource_clear__P22352, + "setAnchor": particles_ParticleSource_setAnchor__P22353, + "setRate": particles_ParticleSource_setRate__P22354, + "setFactory": particles_ParticleSource_setFactory__P22356, + "updateParticle": particles_ParticleSource_updateParticle__P22357, + "drawParticle": particles_ParticleSource_drawParticle__P22358, + "__visible": sprites_BaseSprite___visible__P20972, + "z": sprites_BaseSprite_z__P20973, + "set/z": sprites_BaseSprite_z__P20974, + "__drawCore": sprites_BaseSprite___drawCore__P20976, + "__update": sprites_BaseSprite___update__P20977, + }, +}); +const sprites_SpriteSet__C21348_VT = mkVTable({ + name: "SpriteSet", + numFields: 1, + classNo: 44, + lastSubtypeNo: 44, + maxBgInstances: null, + methods: { + }, + iface: { + "_sprites": null, + "set/_sprites": null, + "length": sprites_SpriteSet_length__P21350, + "add": sprites_SpriteSet_add__P21352, + "remove": sprites_SpriteSet_remove__P21354, + "contains": sprites_SpriteSet_contains__P21355, + "toString": sprites_SpriteSet_toString__P21358, + }, + toStringMethod: sprites_SpriteSet_toString__P21358, +}); +const scene_Renderable__C21732_VT = mkVTable({ + name: "Renderable", + numFields: 4, + classNo: 32, + lastSubtypeNo: 32, + maxBgInstances: null, + methods: { + "__visible": scene_Renderable___visible__P21734, + "__draw": sprites_BaseSprite___draw__P20975, + "__drawCore": scene_Renderable___drawCore__P21735, + "__update": sprites_BaseSprite___update__P20977, }, iface: { "_z": null, @@ -46435,19 +41943,19 @@ const scene_Renderable__C274617_VT = mkVTable({ "set/handler": null, "shouldBeVisible": null, "set/shouldBeVisible": null, - "__visible": scene_Renderable___visible__P274619, - "__drawCore": scene_Renderable___drawCore__P274620, - "z": sprites_BaseSprite_z__P273915, - "set/z": sprites_BaseSprite_z__P273916, - "__draw": sprites_BaseSprite___draw__P273917, - "__update": sprites_BaseSprite___update__P273919, + "__visible": scene_Renderable___visible__P21734, + "__drawCore": scene_Renderable___drawCore__P21735, + "z": sprites_BaseSprite_z__P20973, + "set/z": sprites_BaseSprite_z__P20974, + "__draw": sprites_BaseSprite___draw__P20975, + "__update": sprites_BaseSprite___update__P20977, }, }); -const controller_ButtonHandler__C274000_VT = mkVTable({ +const controller_ButtonHandler__C21169_VT = mkVTable({ name: "ButtonHandler", numFields: 2, - classNo: 50, - lastSubtypeNo: 50, + classNo: 45, + lastSubtypeNo: 45, maxBgInstances: null, methods: { }, @@ -46458,11 +41966,11 @@ const controller_ButtonHandler__C274000_VT = mkVTable({ "set/callback": null, }, }); -const controller_ButtonEventHandlerState__C274002_VT = mkVTable({ +const controller_ButtonEventHandlerState__C21171_VT = mkVTable({ name: "ButtonEventHandlerState", numFields: 3, - classNo: 51, - lastSubtypeNo: 51, + classNo: 46, + lastSubtypeNo: 46, maxBgInstances: null, methods: { }, @@ -46475,11 +41983,11 @@ const controller_ButtonEventHandlerState__C274002_VT = mkVTable({ "set/system": null, }, }); -const effects_ScreenEffect__C275083_VT = mkVTable({ +const effects_ScreenEffect__C22478_VT = mkVTable({ name: "ScreenEffect", numFields: 5, - classNo: 48, - lastSubtypeNo: 48, + classNo: 41, + lastSubtypeNo: 41, maxBgInstances: null, methods: { }, @@ -46494,34 +42002,34 @@ const effects_ScreenEffect__C275083_VT = mkVTable({ "set/source": null, "sceneDefaultRate": null, "set/sceneDefaultRate": null, - "start": effects_ParticleEffect_start__P275081, - "destroy": effects_ParticleEffect_destroy__P275082, + "start": effects_ParticleEffect_start__P22469, + "destroy": effects_ParticleEffect_destroy__P22470, }, }); -const particles_ParticleFactory__C275004_VT = mkVTable({ +const particles_ParticleFactory__C22401_VT = mkVTable({ name: "ParticleFactory", numFields: 0, - classNo: 52, - lastSubtypeNo: 56, + classNo: 47, + lastSubtypeNo: 51, maxBgInstances: null, methods: { - "createParticle": particles_ParticleFactory_createParticle__P275006, - "drawParticle": particles_ParticleFactory_drawParticle__P275007, + "createParticle": particles_ParticleFactory_createParticle__P22402, + "drawParticle": particles_ParticleFactory_drawParticle__P22403, }, iface: { - "createParticle": particles_ParticleFactory_createParticle__P275006, - "drawParticle": particles_ParticleFactory_drawParticle__P275007, + "createParticle": particles_ParticleFactory_createParticle__P22402, + "drawParticle": particles_ParticleFactory_drawParticle__P22403, }, }); -const particles_SprayFactory__C275008_VT = mkVTable({ +const particles_SprayFactory__C22405_VT = mkVTable({ name: "SprayFactory", numFields: 3, - classNo: 53, - lastSubtypeNo: 56, + classNo: 48, + lastSubtypeNo: 51, maxBgInstances: null, methods: { - "createParticle": particles_SprayFactory_createParticle__P275010, - "drawParticle": particles_SprayFactory_drawParticle__P275011, + "createParticle": particles_SprayFactory_createParticle__P22407, + "drawParticle": particles_SprayFactory_drawParticle__P22408, }, iface: { "speed": null, @@ -46530,21 +42038,21 @@ const particles_SprayFactory__C275008_VT = mkVTable({ "set/minAngle": null, "spread": null, "set/spread": null, - "createParticle": particles_SprayFactory_createParticle__P275010, - "drawParticle": particles_SprayFactory_drawParticle__P275011, - "setSpeed": particles_SprayFactory_setSpeed__P275012, - "setDirection": particles_SprayFactory_setDirection__P275013, + "createParticle": particles_SprayFactory_createParticle__P22407, + "drawParticle": particles_SprayFactory_drawParticle__P22408, + "setSpeed": particles_SprayFactory_setSpeed__P22409, + "setDirection": particles_SprayFactory_setDirection__P22410, }, }); -const particles_AreaFactory__C275014_VT = mkVTable({ +const particles_AreaFactory__C22412_VT = mkVTable({ name: "AreaFactory", numFields: 8, - classNo: 54, - lastSubtypeNo: 56, + classNo: 49, + lastSubtypeNo: 51, maxBgInstances: null, methods: { - "createParticle": particles_AreaFactory_createParticle__P275020, - "drawParticle": particles_AreaFactory_drawParticle__P275021, + "createParticle": particles_AreaFactory_createParticle__P22414, + "drawParticle": particles_AreaFactory_drawParticle__P22415, }, iface: { "speed": null, @@ -46563,21 +42071,21 @@ const particles_AreaFactory__C275014_VT = mkVTable({ "set/maxLifespan": null, "galois": null, "set/galois": null, - "createParticle": particles_AreaFactory_createParticle__P275020, - "drawParticle": particles_AreaFactory_drawParticle__P275021, - "setSpeed": particles_SprayFactory_setSpeed__P275012, - "setDirection": particles_SprayFactory_setDirection__P275013, + "createParticle": particles_AreaFactory_createParticle__P22414, + "drawParticle": particles_AreaFactory_drawParticle__P22415, + "setSpeed": particles_SprayFactory_setSpeed__P22409, + "setDirection": particles_SprayFactory_setDirection__P22410, }, }); -const particles_ShapeFactory__C275030_VT = mkVTable({ +const particles_ShapeFactory__C22422_VT = mkVTable({ name: "ShapeFactory", numFields: 11, - classNo: 55, - lastSubtypeNo: 56, + classNo: 50, + lastSubtypeNo: 51, maxBgInstances: null, methods: { - "createParticle": particles_ShapeFactory_createParticle__P275034, - "drawParticle": particles_ShapeFactory_drawParticle__P275033, + "createParticle": particles_ShapeFactory_createParticle__P22426, + "drawParticle": particles_ShapeFactory_drawParticle__P22425, }, iface: { "speed": null, @@ -46602,22 +42110,22 @@ const particles_ShapeFactory__C275030_VT = mkVTable({ "set/ox": null, "oy": null, "set/oy": null, - "addShape": particles_ShapeFactory_addShape__P275032, - "drawParticle": particles_ShapeFactory_drawParticle__P275033, - "createParticle": particles_ShapeFactory_createParticle__P275034, - "setSpeed": particles_SprayFactory_setSpeed__P275012, - "setDirection": particles_SprayFactory_setDirection__P275013, + "addShape": particles_ShapeFactory_addShape__P22424, + "drawParticle": particles_ShapeFactory_drawParticle__P22425, + "createParticle": particles_ShapeFactory_createParticle__P22426, + "setSpeed": particles_SprayFactory_setSpeed__P22409, + "setDirection": particles_SprayFactory_setDirection__P22410, }, }); -const particles_ConfettiFactory__C275035_VT = mkVTable({ +const particles_ConfettiFactory__C22428_VT = mkVTable({ name: "ConfettiFactory", numFields: 11, - classNo: 56, - lastSubtypeNo: 56, + classNo: 51, + lastSubtypeNo: 51, maxBgInstances: null, methods: { - "createParticle": particles_ShapeFactory_createParticle__P275034, - "drawParticle": particles_ShapeFactory_drawParticle__P275033, + "createParticle": particles_ShapeFactory_createParticle__P22426, + "drawParticle": particles_ShapeFactory_drawParticle__P22425, }, iface: { "speed": null, @@ -46642,18 +42150,18 @@ const particles_ConfettiFactory__C275035_VT = mkVTable({ "set/ox": null, "oy": null, "set/oy": null, - "addShape": particles_ShapeFactory_addShape__P275032, - "drawParticle": particles_ShapeFactory_drawParticle__P275033, - "createParticle": particles_ShapeFactory_createParticle__P275034, - "setSpeed": particles_SprayFactory_setSpeed__P275012, - "setDirection": particles_SprayFactory_setDirection__P275013, + "addShape": particles_ShapeFactory_addShape__P22424, + "drawParticle": particles_ShapeFactory_drawParticle__P22425, + "createParticle": particles_ShapeFactory_createParticle__P22426, + "setSpeed": particles_SprayFactory_setSpeed__P22409, + "setDirection": particles_SprayFactory_setDirection__P22410, }, }); -const particles_Particle__C274949_VT = mkVTable({ +const particles_Particle__C22339_VT = mkVTable({ name: "Particle", numFields: 8, - classNo: 57, - lastSubtypeNo: 57, + classNo: 52, + lastSubtypeNo: 52, maxBgInstances: 200, methods: { }, @@ -46676,11 +42184,11 @@ const particles_Particle__C274949_VT = mkVTable({ "set/color": null, }, }); -const music_Playable__C273728_VT = mkVTable({ +const music_Playable__C20627_VT = mkVTable({ name: "Playable", numFields: 1, - classNo: 58, - lastSubtypeNo: 59, + classNo: 53, + lastSubtypeNo: 54, maxBgInstances: null, methods: { }, @@ -46689,11 +42197,11 @@ const music_Playable__C273728_VT = mkVTable({ "set/stopped": null, }, }); -const music_MelodyPlayable__C273733_VT = mkVTable({ +const music_MelodyPlayable__C20800_VT = mkVTable({ name: "MelodyPlayable", numFields: 2, - classNo: 59, - lastSubtypeNo: 59, + classNo: 54, + lastSubtypeNo: 54, maxBgInstances: null, methods: { }, @@ -46704,11 +42212,11 @@ const music_MelodyPlayable__C273733_VT = mkVTable({ "set/melody": null, }, }); -const music_Melody__C273443_VT = mkVTable({ +const music_Melody__C20552_VT = mkVTable({ name: "Melody", numFields: 2, - classNo: 60, - lastSubtypeNo: 60, + classNo: 55, + lastSubtypeNo: 55, maxBgInstances: null, methods: { }, @@ -46717,15 +42225,38 @@ const music_Melody__C273443_VT = mkVTable({ "set/_text": null, "_player": null, "set/_player": null, - "toString": music_Melody_toString__P273452, + "toString": music_Melody_toString__P20562, + }, + toStringMethod: music_Melody_toString__P20562, +}); +const sprites_BaseSpriteSayRenderer__C21217_VT = mkVTable({ + name: "BaseSpriteSayRenderer", + numFields: 3, + classNo: 56, + lastSubtypeNo: 56, + maxBgInstances: null, + methods: { + "draw": sprites_BaseSpriteSayRenderer_draw__P21218, + "update": sprites_BaseSpriteSayRenderer_update__P21219, + "destroy": sprites_BaseSpriteSayRenderer_destroy__P21220, + }, + iface: { + "text": null, + "set/text": null, + "fgColor": null, + "set/fgColor": null, + "bgColor": null, + "set/bgColor": null, + "draw": sprites_BaseSpriteSayRenderer_draw__P21218, + "update": sprites_BaseSpriteSayRenderer_update__P21219, + "destroy": sprites_BaseSpriteSayRenderer_destroy__P21220, }, - toStringMethod: music_Melody_toString__P273452, }); -const MovingSprite__C274342_VT = mkVTable({ +const MovingSprite__C21433_VT = mkVTable({ name: "MovingSprite", numFields: 7, - classNo: 61, - lastSubtypeNo: 61, + classNo: 57, + lastSubtypeNo: 57, maxBgInstances: null, methods: { }, @@ -46746,34 +42277,11 @@ const MovingSprite__C274342_VT = mkVTable({ "set/yStep": null, }, }); -const tiles_Location__C274510_VT = mkVTable({ - name: "Location", - numFields: 2, - classNo: 62, - lastSubtypeNo: 62, - maxBgInstances: null, - methods: { - }, - iface: { - "_row": null, - "set/_row": null, - "_col": null, - "set/_col": null, - "tileMap": tiles_Location_tileMap__P274512, - "column": tiles_Location_column__P274513, - "row": tiles_Location_row__P274514, - "x": tiles_Location_x__P274515, - "y": tiles_Location_y__P274516, - "left": tiles_Location_left__P274517, - "top": tiles_Location_top__P274518, - "tileSet": tiles_Location_tileSet__P274521, - }, -}); -const sprites_StaticObstacle__C274315_VT = mkVTable({ +const sprites_StaticObstacle__C21376_VT = mkVTable({ name: "StaticObstacle", numFields: 5, - classNo: 63, - lastSubtypeNo: 63, + classNo: 58, + lastSubtypeNo: 58, maxBgInstances: null, methods: { }, @@ -46788,37 +42296,37 @@ const sprites_StaticObstacle__C274315_VT = mkVTable({ "set/top": null, "left": null, "set/left": null, - "x": sprites_StaticObstacle_x__P274322, - "y": sprites_StaticObstacle_y__P274323, - "height": sprites_StaticObstacle_height__P274324, - "width": sprites_StaticObstacle_width__P274325, + "x": sprites_StaticObstacle_x__P21377, + "y": sprites_StaticObstacle_y__P21378, + "height": sprites_StaticObstacle_height__P21379, + "width": sprites_StaticObstacle_width__P21380, }, }); -const sprites_BaseSpriteSayRenderer__C274076_VT = mkVTable({ - name: "BaseSpriteSayRenderer", - numFields: 3, - classNo: 64, - lastSubtypeNo: 64, +const tiles_Location__C21627_VT = mkVTable({ + name: "Location", + numFields: 2, + classNo: 59, + lastSubtypeNo: 59, maxBgInstances: null, methods: { - "draw": sprites_BaseSpriteSayRenderer_draw__P274078, - "update": sprites_BaseSpriteSayRenderer_update__P274079, - "destroy": sprites_BaseSpriteSayRenderer_destroy__P274080, }, iface: { - "text": null, - "set/text": null, - "fgColor": null, - "set/fgColor": null, - "bgColor": null, - "set/bgColor": null, - "draw": sprites_BaseSpriteSayRenderer_draw__P274078, - "update": sprites_BaseSpriteSayRenderer_update__P274079, - "destroy": sprites_BaseSpriteSayRenderer_destroy__P274080, + "_row": null, + "set/_row": null, + "_col": null, + "set/_col": null, + "tileMap": tiles_Location_tileMap__P21628, + "column": tiles_Location_column__P21629, + "row": tiles_Location_row__P21630, + "x": tiles_Location_x__P21631, + "y": tiles_Location_y__P21632, + "left": tiles_Location_left__P21633, + "top": tiles_Location_top__P21634, + "tileSet": tiles_Location_tileSet__P21637, }, }); -const breakpoints = setupDebugger(1, ["buf___315203","allPassed___315150"]) +const breakpoints = setupDebugger(1, []) -return _main___P315607 +return _main___P61375 }) diff --git a/assets/version.txt b/assets/version.txt index 1cc5f65..867e524 100644 --- a/assets/version.txt +++ b/assets/version.txt @@ -1 +1 @@ -1.1.0 \ No newline at end of file +1.2.0 \ No newline at end of file diff --git a/pxt.json b/pxt.json index 18a1b6e..b166eda 100644 --- a/pxt.json +++ b/pxt.json @@ -1,6 +1,6 @@ { "name": "pxt-typed-arrays", - "version": "1.1.0", + "version": "1.2.0", "description": "", "dependencies": { "device": "*"