diff --git a/assets/js/binary.js b/assets/js/binary.js index 1b97cfd..d22d24c 100644 --- a/assets/js/binary.js +++ b/assets/js/binary.js @@ -1,5 +1,5 @@ -// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.12.51/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"0.0.0","target":"arcade","targetVersion":"1.12.51"} -// total=1243816 new=5.86% cached=88.48% other=5.66% +// meta={"simUrl":"https://trg-arcade.userpxt.io/v1.12.51/---simulator","cdnUrl":"https://pxt.azureedge.net","version":"0.1.0","target":"arcade","targetVersion":"1.12.51","repo":"sarahjean/helloworld"} +// total=1337802 new=5.55% cached=88.74% other=5.71% (function (ectx) { 'use strict'; const runtime = ectx.runtime; @@ -58,6 +58,7 @@ pxtrt.mapKeyNames = [ "_hitbox", "_id", "_image", + "_inputLastFrame", "_kind", "_kindsOverlappedWith", "_lastUpdatedSpriteX", @@ -68,6 +69,7 @@ pxtrt.mapKeyNames = [ "_layers", "_map", "_millis", + "_moveSpriteInternal", "_obstacles", "_offsetX", "_offsetY", @@ -132,11 +134,13 @@ pxtrt.mapKeyNames = [ "charHeight", "charWidth", "clear", + "clearInterior", "clearObstacles", "collisionHandlers", "color", "column", "columnCount", + "columns", "condition", "connected", "constrain", @@ -146,6 +150,9 @@ pxtrt.mapKeyNames = [ "createMovingSprite", "createParticle", "createdHandlers", + "cursor", + "cursorCount", + "cursorRowHeight", "data", "defaultLifespan", "defaultRate", @@ -158,13 +165,17 @@ pxtrt.mapKeyNames = [ "distance", "down", "draw", + "drawBorder", + "drawCursorRow", "drawDebug", "drawOffsetX", "drawOffsetY", + "drawPartial", "drawParticle", "drawSay", "drawSprite", "drawText", + "drawTextCore", "dx", "dy", "effect", @@ -173,10 +184,13 @@ pxtrt.mapKeyNames = [ "enabled", "event", "eventContext", + "fastFill", "fastRandom", "fgColor", "flags", "followingSprites", + "font", + "frame", "frameCallbacks", "frameWorker", "framesInSample", @@ -208,6 +222,8 @@ pxtrt.mapKeyNames = [ "infoFont", "infoTop", "init", + "innerLeft", + "innerTop", "insertAABB", "insertAtKey", "isObstacle", @@ -236,9 +252,11 @@ pxtrt.mapKeyNames = [ "map", "maxLifespan", "maxNegativeVelocity", + "maxOffset", "maxSingleStep", "maxSpeed", "maxStep", + "maxSubOffset", "maxVelocity", "melody", "mergeAtKey", @@ -253,6 +271,7 @@ pxtrt.mapKeyNames = [ "multiplier", "neighbors", "next", + "offset", "offsetX", "offsetY", "onEvent", @@ -299,10 +318,12 @@ pxtrt.mapKeyNames = [ "repeatX", "repeatY", "resetHitbox", + "resize", "resizeBuckets", "right", "row", "rowCount", + "rows", "runButtonEvents", "runCallbacks", "runningCallbacks", @@ -326,6 +347,7 @@ pxtrt.mapKeyNames = [ "setDirection", "setFactory", "setFlag", + "setFont", "setHitbox", "setImage", "setKind", @@ -336,6 +358,8 @@ pxtrt.mapKeyNames = [ "setSelection", "setSpeed", "setState", + "setSubtext", + "setText", "setTheme", "shakeAmplitude", "shakeDuration", @@ -357,10 +381,14 @@ pxtrt.mapKeyNames = [ "start", "state", "stopped", + "subtext", "sx", "sy", "system", "text", + "textAreaHeight", + "textAreaWidth", + "textColor", "theme", "tileIndex", "tileMap", @@ -375,10 +403,12 @@ pxtrt.mapKeyNames = [ "times", "toString", "top", + "unit", "unregister", "up", "update", "updateCard", + "updateFont", "updateIfInvalid", "updateParticle", "updateScrollTarget", @@ -429,7 +459,7 @@ const pxsim_pxtrt = pxsim.pxtrt; const pxsim_numops = pxsim.numops; -function _main___P18028(s) { +function _main___P37203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -439,280 +469,280 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - globals._intervals___4409 = (undefined); - globals._pollEventQueue___4418 = (undefined); - globals.minPriority___375 = (1); + globals._intervals___22447 = (undefined); + globals._pollEventQueue___22456 = (undefined); + globals.minPriority___18413 = (1); r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, listeners_inline__P4421); - globals.listeners___4422 = (s.tmp_0); - globals.globalVolume___4475 = (null); - globals.playToneID___4482 = (0); - r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C1626_VT); + r0 = pxsim_Array__push(s.tmp_0, listeners_inline__P22459); + globals.listeners___22460 = (s.tmp_0); + globals.globalVolume___22513 = (null); + globals.playToneID___22520 = (0); + r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C19664_VT); s.tmp_0 = r0; - s.tmp_1 = music_Melody_constructor__P1629_mk(s); + s.tmp_1 = music_Melody_constructor__P19667_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 = 1; return s.tmp_1; case 1: r0 = s.retval; - globals.wawawawaa___1647 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C1626_VT); + globals.wawawawaa___19685 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(music_Melody__C19664_VT); s.tmp_0 = r0; - s.tmp_1 = music_Melody_constructor__P1629_mk(s); + s.tmp_1 = music_Melody_constructor__P19667_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 = 2; return s.tmp_1; case 2: r0 = s.retval; - globals.powerUp___1650 = (s.tmp_0); - globals.brightness___1951 = (100); + globals.powerUp___19688 = (s.tmp_0); + globals.brightness___19989 = (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", _hex7950); - globals.font8___1975 = (s.tmp_0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex25988); + globals.font8___20013 = (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", _hex7952); - globals.font12___1976 = (s.tmp_0); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex25990); + globals.font12___20014 = (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", _hex9802); - globals.font5___1980 = (s.tmp_0); - globals.__updated___4589 = (false); - r0 = pxsim.control.runInParallel(control___screen_inline__P4592); - r0 = pxsim_pxtcore.setPalette(_hex4603); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "data", _hex27840); + globals.font5___20018 = (s.tmp_0); + globals.__updated___22627 = (false); + r0 = pxsim.control.runInParallel(control___screen_inline__P22630); + r0 = pxsim_pxtcore.setPalette(_hex22641); 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___2032 = (r0); - s.tmp_0 = control___screen_setupUpdate__P1994_mk(s); - s.tmp_0.arg0 = _screen_internal_inline__P4612; + globals.screen___20070 = (r0); + s.tmp_0 = control___screen_setupUpdate__P20032_mk(s); + s.tmp_0.arg0 = _screen_internal_inline__P22650; s.callLocIdx = 6; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - globals.control_EventContext_onStats___398 = (_screen_internal_inline__P4617); - globals.RUN_KEY___4622 = ("#run"); - globals.SCOPE_KEY___4623 = ("#scope"); - s.tmp_0 = settings_initScopes__P4634_mk(s); + globals.control_EventContext_onStats___18436 = (_screen_internal_inline__P22655); + globals.RUN_KEY___22660 = ("#run"); + globals.SCOPE_KEY___22661 = ("#scope"); + s.tmp_0 = settings_initScopes__P22672_mk(s); s.callLocIdx = 7; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 5; s.tmp_1.arg2 = 4; s.callLocIdx = 8; s.pc = 5; return s.tmp_1; case 5: r0 = s.retval; - globals.A___2113 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.A___20151 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 6; s.tmp_1.arg2 = 5; s.callLocIdx = 9; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; - globals.B___2114 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.B___20152 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 1; s.tmp_1.arg2 = 47; s.callLocIdx = 10; s.pc = 7; return s.tmp_1; case 7: r0 = s.retval; - globals.left___2115 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.left___20153 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 2; s.tmp_1.arg2 = 49; s.callLocIdx = 11; s.pc = 8; return s.tmp_1; case 8: r0 = s.retval; - globals.up___2116 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.up___20154 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 3; s.tmp_1.arg2 = 48; s.callLocIdx = 12; s.pc = 9; return s.tmp_1; case 9: r0 = s.retval; - globals.right___2117 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.right___20155 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 4; s.tmp_1.arg2 = 50; s.callLocIdx = 13; s.pc = 10; return s.tmp_1; case 10: r0 = s.retval; - globals.down___2118 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + globals.down___20156 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 7; s.tmp_1.arg2 = 51; s.callLocIdx = 14; s.pc = 11; return s.tmp_1; case 11: r0 = s.retval; - globals.menu___2119 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C2134_VT); + globals.menu___20157 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C20172_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P2138_mk(s); + s.tmp_1 = controller_Controller_constructor__P20176_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 2; s.tmp_1.arg2 = undefined; s.callLocIdx = 15; s.pc = 12; return s.tmp_1; case 12: r0 = s.retval; - globals.player2___2120 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C2134_VT); + globals.player2___20158 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C20172_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P2138_mk(s); + s.tmp_1 = controller_Controller_constructor__P20176_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 3; s.tmp_1.arg2 = undefined; s.callLocIdx = 16; s.pc = 13; return s.tmp_1; case 13: r0 = s.retval; - globals.player3___2121 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C2134_VT); + globals.player3___20159 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C20172_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Controller_constructor__P2138_mk(s); + s.tmp_1 = controller_Controller_constructor__P20176_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 4; s.tmp_1.arg2 = undefined; s.callLocIdx = 17; s.pc = 14; return s.tmp_1; case 14: r0 = s.retval; - globals.player4___2122 = (s.tmp_0); - s.tmp_0 = controller__player1__P2128_mk(s); + globals.player4___20160 = (s.tmp_0); + s.tmp_0 = controller__player1__P20166_mk(s); s.callLocIdx = 18; s.pc = 15; return s.tmp_0; case 15: r0 = s.retval; - globals.player1___2123 = (r0); - s.tmp_0 = game_addScenePopHandler__P3020_mk(s); - s.tmp_0.arg0 = controller_inline__P4662; + globals.player1___20161 = (r0); + s.tmp_0 = game_addScenePopHandler__P21058_mk(s); + s.tmp_0.arg0 = controller_inline__P22700; s.callLocIdx = 23; s.pc = 16; return s.tmp_0; case 16: r0 = s.retval; - s.tmp_0 = game_addScenePushHandler__P3018_mk(s); - s.tmp_0.arg0 = controller_inline__P4702; + s.tmp_0 = game_addScenePushHandler__P21056_mk(s); + s.tmp_0.arg0 = controller_inline__P22740; s.callLocIdx = 25; s.pc = 17; return s.tmp_0; case 17: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_AnyButton__C4726_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_AnyButton__C22764_VT); s.tmp_0 = r0; - s.tmp_1 = controller_Button_constructor__P2195_mk(s); + s.tmp_1 = controller_Button_constructor__P20233_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 0; s.tmp_1.arg2 = -1; s.callLocIdx = 26; s.pc = 18; return s.tmp_1; case 18: r0 = s.retval; - globals.anyButton___2170 = (s.tmp_0); - globals._userEventsEnabled___4740 = (true); - globals.defaultRepeatDelay___4742 = (500); - globals.defaultRepeatInterval___4744 = (30); - s.tmp_0 = SpriteKind_create__P2479_mk(s); + globals.anyButton___20208 = (s.tmp_0); + globals._userEventsEnabled___22778 = (true); + globals.defaultRepeatDelay___22780 = (500); + globals.defaultRepeatInterval___22782 = (30); + s.tmp_0 = SpriteKind_create__P20517_mk(s); s.callLocIdx = 27; s.pc = 19; return s.tmp_0; case 19: r0 = s.retval; - globals.Player___2480 = (r0); - s.tmp_0 = SpriteKind_create__P2479_mk(s); + globals.Player___20518 = (r0); + s.tmp_0 = SpriteKind_create__P20517_mk(s); s.callLocIdx = 28; s.pc = 20; return s.tmp_0; case 20: r0 = s.retval; - globals.Food___2482 = (r0); - s.tmp_0 = SpriteKind_create__P2479_mk(s); + globals.Food___20520 = (r0); + s.tmp_0 = SpriteKind_create__P20517_mk(s); s.callLocIdx = 29; s.pc = 21; return s.tmp_0; case 21: r0 = s.retval; - globals.Enemy___2483 = (r0); + globals.Enemy___20521 = (r0); r0 = (0.1 * 256); s.tmp_0 = r0; r0 = (s.tmp_0 | 0); - globals.MIN_MOVE_GAP___2521 = (r0); - globals.infoState___4809 = (undefined); - s.tmp_0 = game_addScenePushHandler__P3018_mk(s); - s.tmp_0.arg0 = info_inline__P4813; + globals.MIN_MOVE_GAP___20559 = (r0); + globals.infoState___22847 = (undefined); + s.tmp_0 = game_addScenePushHandler__P21056_mk(s); + s.tmp_0.arg0 = info_inline__P22851; s.callLocIdx = 31; s.pc = 22; return s.tmp_0; case 22: r0 = s.retval; - s.tmp_0 = game_addScenePopHandler__P3020_mk(s); - s.tmp_0.arg0 = info_inline__P4828; + s.tmp_0 = game_addScenePopHandler__P21058_mk(s); + s.tmp_0.arg0 = info_inline__P22866; s.callLocIdx = 35; s.pc = 23; return s.tmp_0; case 23: r0 = s.retval; r0 = pxsim_Array__mk(); - globals.scene_Scene_initializers___2865 = (r0); - r0 = pxsim.image.ofBuffer(_hex4918); - globals.img_trophy_sm___4919 = (r0); - r0 = pxsim.image.ofBuffer(_hex4921); - globals.img_trophy_lg___4922 = (r0); - r0 = pxsim.image.ofBuffer(_hex4924); - globals.img_sleepy_sim___4925 = (r0); - globals.debug___2967 = (false); - globals.stats___2968 = (false); - globals.gameOverConfig___2998 = (gameOverConfig_inline__P4937); - s.tmp_0 = scene_systemMenu_initVolume__P5211_mk(s); + globals.scene_Scene_initializers___20903 = (r0); + r0 = pxsim.image.ofBuffer(_hex22956); + globals.img_trophy_sm___22957 = (r0); + r0 = pxsim.image.ofBuffer(_hex22959); + globals.img_trophy_lg___22960 = (r0); + r0 = pxsim.image.ofBuffer(_hex22962); + globals.img_sleepy_sim___22963 = (r0); + globals.debug___21005 = (false); + globals.stats___21006 = (false); + globals.gameOverConfig___21036 = (gameOverConfig_inline__P22975); + s.tmp_0 = scene_systemMenu_initVolume__P23249_mk(s); s.callLocIdx = 37; s.pc = 24; return s.tmp_0; case 24: r0 = s.retval; - s.tmp_0 = scene_systemMenu_initScreen__P5212_mk(s); + s.tmp_0 = scene_systemMenu_initScreen__P23250_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___2865, scene_systemMenu_register__P3106); - r0 = pxsim.image.ofBuffer(_hex5219); - globals.CARD_NORMAL___3111 = (r0); - r0 = pxsim.image.ofBuffer(_hex5221); - globals.CARD_SELECTED___3112 = (r0); - r0 = pxsim.image.ofBuffer(_hex5223); - globals.CARD_ACTIVE___3113 = (r0); - r0 = pxsim.image.ofBuffer(_hex5225); - globals.VOLUME_UP_ICON___3114 = (r0); - r0 = pxsim.image.ofBuffer(_hex5227); - globals.BRIGHTNESS_DOWN_ICON___3115 = (r0); - r0 = pxsim.image.ofBuffer(_hex5229); - globals.CLOSE_MENU_ICON___3116 = (r0); - r0 = pxsim.image.ofBuffer(_hex5231); - globals.VOLUME_DOWN_ICON___3117 = (r0); - r0 = pxsim.image.ofBuffer(_hex5233); - globals.SLEEP_ICON___3118 = (r0); - r0 = pxsim.image.ofBuffer(_hex5235); - globals.CONSOLE_ICON___3119 = (r0); - r0 = pxsim.image.ofBuffer(_hex5237); - globals.BRIGHTNESS_UP_ICON___3120 = (r0); - r0 = pxsim.image.ofBuffer(_hex5239); - globals.STATS_ICON___3121 = (r0); - globals.consoleColor___5242 = (1); - globals.tabSize___5245 = (8); - globals.consoleFont___5251 = (globals.font5___1980); - r0 = pxsim_ImageMethods.height(globals.screen___2032); + r0 = pxsim_Array__push(globals.scene_Scene_initializers___20903, scene_systemMenu_register__P21144); + r0 = pxsim.image.ofBuffer(_hex23257); + globals.CARD_NORMAL___21149 = (r0); + r0 = pxsim.image.ofBuffer(_hex23259); + globals.CARD_SELECTED___21150 = (r0); + r0 = pxsim.image.ofBuffer(_hex23261); + globals.CARD_ACTIVE___21151 = (r0); + r0 = pxsim.image.ofBuffer(_hex23263); + globals.VOLUME_UP_ICON___21152 = (r0); + r0 = pxsim.image.ofBuffer(_hex23265); + globals.BRIGHTNESS_DOWN_ICON___21153 = (r0); + r0 = pxsim.image.ofBuffer(_hex23267); + globals.CLOSE_MENU_ICON___21154 = (r0); + r0 = pxsim.image.ofBuffer(_hex23269); + globals.VOLUME_DOWN_ICON___21155 = (r0); + r0 = pxsim.image.ofBuffer(_hex23271); + globals.SLEEP_ICON___21156 = (r0); + r0 = pxsim.image.ofBuffer(_hex23273); + globals.CONSOLE_ICON___21157 = (r0); + r0 = pxsim.image.ofBuffer(_hex23275); + globals.BRIGHTNESS_UP_ICON___21158 = (r0); + r0 = pxsim.image.ofBuffer(_hex23277); + globals.STATS_ICON___21159 = (r0); + globals.consoleColor___23280 = (1); + globals.tabSize___23283 = (8); + globals.consoleFont___23289 = (globals.font5___20018); + r0 = pxsim_ImageMethods.height(globals.screen___20070); s.tmp_2 = r0; s.tmp_5 = if_charHeight_1_mk(s); - s.tmp_5.arg0 = globals.consoleFont___5251; + s.tmp_5.arg0 = globals.consoleFont___23289; if (!s.tmp_5.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "charHeight"); } else { @@ -731,13 +761,13 @@ switch (step) { r0 = pxsim.Math_.floor(s.tmp_1); s.tmp_0 = r0; r0 = (s.tmp_0 - 1); - globals.consoleLines___5256 = (r0); - r0 = pxsim_ImageMethods.width(globals.screen___2032); + globals.consoleLines___23294 = (r0); + r0 = pxsim_ImageMethods.width(globals.screen___20070); 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___5251; + s.tmp_4.arg0 = globals.consoleFont___23289; if (!s.tmp_4.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "charWidth"); } else { @@ -752,22 +782,22 @@ switch (step) { r0 = (s.tmp_1 / s.tmp_3); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - globals.consoleColumns___5266 = (r0); - s.tmp_0 = console_addListener__P383_mk(s); - s.tmp_0.arg0 = game_consoleOverlay_listener__P5278; + globals.consoleColumns___23304 = (r0); + s.tmp_0 = console_addListener__P18421_mk(s); + s.tmp_0.arg0 = game_consoleOverlay_listener__P23316; 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__P13237; + s.tmp_0.argL = MAX_SOURCES_inline__P31275; setupLambda(s.tmp_0, s.tmp_0.argL); s.callLocIdx = 43; s.pc = 29; return s.tmp_0; case 29: r0 = s.retval; - globals.MAX_SOURCES___5280 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_SprayFactory__C3191_VT); + globals.MAX_SOURCES___23318 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_SprayFactory__C21229_VT); s.tmp_0 = r0; - s.tmp_1 = particles_SprayFactory_constructor__P3192_mk(s); + s.tmp_1 = particles_SprayFactory_constructor__P21230_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 20; s.tmp_1.arg2 = 0; @@ -775,74 +805,95 @@ switch (step) { s.callLocIdx = 44; s.pc = 30; return s.tmp_1; case 30: r0 = s.retval; - globals.defaultFactory___3171 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C3059_VT); + globals.defaultFactory___21209 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C21097_VT); s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P3061_mk(s); + s.tmp_1 = Math_FastRandom_constructor__P21099_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = undefined; s.callLocIdx = 45; s.pc = 31; return s.tmp_1; case 31: r0 = s.retval; - globals.galois___5300 = (s.tmp_0); - globals.angleSlice___5308 = (0.06283185307179587); - r0 = pxsim_pxtcore_mkClassInstance(effects_ScreenEffect__C3266_VT); + globals.galois___23338 = (s.tmp_0); + globals.angleSlice___23346 = (0.06283185307179587); + r0 = pxsim_pxtcore_mkClassInstance(effects_ScreenEffect__C21304_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ScreenEffect_constructor__P3267_mk(s); + s.tmp_1 = effects_ScreenEffect_constructor__P21305_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__P12991; + s.tmp_1.arg4 = confetti_inline__P31029; s.callLocIdx = 51; s.pc = 32; return s.tmp_1; case 32: r0 = s.retval; - globals.confetti___3274 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C3290_VT); + globals.confetti___21312 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C21328_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ImageEffect_constructor__P3291_mk(s); + s.tmp_1 = effects_ImageEffect_constructor__P21329_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 100; - s.tmp_1.arg2 = dissolve_inline__P10780; + s.tmp_1.arg2 = dissolve_inline__P28818; s.callLocIdx = 57; s.pc = 33; return s.tmp_1; case 33: r0 = s.retval; - globals.dissolve___3295 = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C3290_VT); + globals.dissolve___21333 = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(effects_ImageEffect__C21328_VT); s.tmp_0 = r0; - s.tmp_1 = effects_ImageEffect_constructor__P3291_mk(s); + s.tmp_1 = effects_ImageEffect_constructor__P21329_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = 125; - s.tmp_1.arg2 = melt_inline__P12937; + s.tmp_1.arg2 = melt_inline__P30975; s.callLocIdx = 60; s.pc = 34; return s.tmp_1; case 34: r0 = s.retval; - globals.melt___3296 = (s.tmp_0); - s.tmp_0 = game_setWaitAnyButton__P3000_mk(s); - s.tmp_0.arg0 = controller_pauseUntilAnyButtonIsPressed__P2205; + globals.melt___21334 = (s.tmp_0); + s.tmp_0 = game_setWaitAnyButton__P21038_mk(s); + s.tmp_0.arg0 = controller_pauseUntilAnyButtonIsPressed__P20243; s.callLocIdx = 61; s.pc = 35; return s.tmp_0; case 35: r0 = s.retval; - s.tmp_0 = game_eventContext__P3002_mk(s); + s.tmp_0 = game_eventContext__P21040_mk(s); s.callLocIdx = 62; s.pc = 36; return s.tmp_0; case 36: r0 = s.retval; - s.tmp_0 = scene_setBackgroundColor__P2883_mk(s); + s.tmp_0 = scene_setBackgroundColor__P20921_mk(s); s.tmp_0.arg0 = 12; s.callLocIdx = 63; s.pc = 37; return s.tmp_0; case 37: + r0 = s.retval; + s.tmp_0 = game_splash__P21003_mk(s); + s.tmp_0.arg0 = "Hello, nice to meet you."; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 64; s.pc = 38; return s.tmp_0; + case 38: + r0 = s.retval; + s.tmp_0 = sprites_create__P20313_mk(s); + r0 = pxsim.image.ofBuffer(_hex37139); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = globals.Player___20518; + s.callLocIdx = 65; s.pc = 39; return s.tmp_0; + case 39: + r0 = s.retval; + globals.protagonist___37136 = (r0); + s.tmp_0 = controller_moveSprite__P20205_mk(s); + s.tmp_0.arg0 = globals.protagonist___37136; + s.tmp_0.arg1 = 100; + s.tmp_0.arg2 = 100; + s.callLocIdx = 66; s.pc = 40; return s.tmp_0; + case 40: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -_main___P18028.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"
","argumentNames":[]} -_main___P18028.continuations = [ ] +_main___P37203.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/arcade-character-animations/main.ts","functionName":"
","argumentNames":[]} +_main___P37203.continuations = [ ] -function _main___P18028_mk(s) { +function _main___P37203_mk(s) { checkStack(s.depth); return { - parent: s, fn: _main___P18028, depth: s.depth + 1, + parent: s, fn: _main___P37203, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -852,29 +903,30 @@ function _main___P18028_mk(s) { tmp_5: undefined, } } -const _hex7950 = pxsim.BufferMethods.createBufferFromHex("2000000000000000210000005e0000002200000e000e0000230028fe28fe280024004c92ff926400250002651248a64026006c92926ca000270000000e000000280000007c82000029000000827c00002a005438103854002b0010107c1010002c000000907000002d001010101010002e000000606000002f000060100806003000003c42423c00310000447e4000003200004462524c00330000424a4e320034003028247e20003500004e4a4a32003600003c4a4a30003700000262120e00380000344a4a34003900000c52523c003a0000006c6c00003b000000967600003c001028284444003d002828282828003e004444282810003f0000025909060040003c425a560800410078141214780042007e4a4a4a34004300003c424224004400007e42423c004500007e4a4a42004600007e0a0a02004700003c425234004800007e08087e00490000427e4200004a002040423e02004b00007e081462004c00007e404040004d007e0418047e004e00007e04087e004f003c4242423c005000007e12120c005100003c5262bc005200007e12126c00530000244a522400540002027e0202005500003e40403e005600001e70701e0057007e2018207e00580042241824420059000608700806005a000062524a46005b00007e424200005c000006081060005d000042427e00005e000804020408005f00808080808000600000000204000061000030484878006200007e4848300063000030484848006400003048487e006500003068585000660000107c12040067000018a4a478006800007e08087000690000487a4000006a000040847d00006b00007e102840006c0000427e4000006d007808300870006e000078080870006f00003048483000700000fc24241800710000182424fc0072000078100810007300005058682800740000083e48200075000038404078007600001860601800770038403040380078000048303048007900005ca0a07c007a000048685848007b000008364100007c000000fe0000007d000041360800007e00000804080400a000000000000000a10000007a000000a200003048fc4800a30090fc92928400a400542844285400a5002a2c782c2a00a6000000ee000000a7000094aaaa5200a800000200020000a9003e414955413eaa0000242a2e0000ab00102854284400ac00001010107000ad00001010101000ae003e415d45413eaf00000202020200b000000814140800b1008888be888800b2000024322c0000b30000222a140000b400000004020000b50000f840207800b6000c1e7e027e00b700000010000000b800000080400000b90000243e200000ba0000242a240000bb00442854281000bc00025f70f84000bd00021f90c8b000be0011557af84000bf000030484d2000c000601916186000c100601816196000c200601a151a6000c300601a151a6100c400601914196000c500601a151a6000c6007c0a7e4a4200c700001ea1611200c800007c55564400c900007c56554400ca00007c56554600cb00007c55544500cc0000457e440000cd0000447e450000ce0000467d460000cf0000457c450000d000087e4a423c00d100007e09127d00d200003845463800d300003846453800d400003846453a00d500003a45463900d600003845443900d700442810284400d80000fc724e3f00d900003c41423c00da00003c42413c00db00003c42413e00dc00003c41403d00dd00040872090400de00007e24241800df00007c025a2400e0000030494a7800e10000304a497800e20000304a497a00e3000032494a7900e40000304a487a00e50000304a4d7a00e600304878685000e7000018a4642400e8000030695a5000e90000306a595000ea0000306a595200eb0000306a585200ec0000497a400000ed0000487a410000ee00004a79420000ef00004a78420000f00000304a4b3d00f100007a090a7100f2000030494a3000f30000304a493000f40000304a493200f5000032494a3100f60000304a483200f700101054101000f800007068583800f900003841427800fa00003842417800fb00003842417a00fc00003842407a00fd0000b84241f800fe0000ff24241800ff00005ca1a07d000001601915196000010100304a4a7a000201611a16196000030100314a4a790004013c0a094abc00050100182464bc000601003846452800070100304a4948000801003846452a00090100304a494a000a010038444528000b010030484a48000c010038454629000d010030494a49000e01007c454639000f0100314a497e001001087e4a423c00110130484c7e04001201007d55554500130100326a5a52001401007d56564500150100316a5a51001601007c55544400170100306a5850001801003f65a521001901001874ac28001a01007c555645001b010030695a51001c010038465536001d0100304a49f2001e010039465635001f0100314a4af100200100384455340021010018a4a578002201001ea1691a0023010018a6a578002401007812117a0025017e080a7102002601047e147e04002701047e0c08700028010002457e450029010002497a41002a0100457d4500002b01004a7a4200002c0100014a7a49002d0100014a7a41002e0100217fa100002f0100247da00000300100447d440000310100487840000032017e0022423e0033013d0040847d0034012040463d0600350100800af90200360100bf440a3100370100bf4814200038010078102848003901007c404241003a0100467d4000003b01003fa06020003c0100a17f2000003d01007c414241003e0100457e4100003f01007e40484000400100427e4008004101107e48404000420100527e4800004301007c0a117c00440100780a097000450100bf42043f00460100bc440438004701007c09127d00480100790a09700049010a06780870004a01003f02847f004b01003c048478004c013945454539004d0100324a4a32004e013946464639004f0100314a4a310050013a4544463900510132494832010052013c427e4a420053013048306850005401007c163548005501007812091000560100bf49093600570100bc480408005801007d1635480059010079120910005a010048565524005b0100505a6928005c010048565526005d0100505a692a005e010012a56912005f010028ac741400600100485556250061010050596a290062010101bf410100630100049f641000640104057e050400650100083d4a2100660102127e120200670100183e5820006801003a414239006901003a414279006a01003d41413d006b01003a42427a006c010039424239006d010039424279006e01003a45453a006f01003a45457a0070013a41403a010071013a41407a01007201001f60a01f007301001c60a03c00740178221122780075013842314238007601081261120800770100b84241fa00780104097009040079010064564d44007a0100486a5948007b010064544d44007c010048685a48007d010064554e45007e010048695a49007f0100087c0204008f01003452523c00920100887e090200a0013c42423c0806a101003048483008af01003e403e0806b001003840781008b501006a5a4a4e00b601005878585800d101003845463900d2010030494a3100e601003845563500e7010030494af100fa0100742a750000fb0100304c4a7d00fc0178147e554400fd0130487a695000fe010078744e3d00ff0100706a59380018020012a569120019020028ac7414001a020101bf4101001b0200049f641000bb0200000c0a0000bc0200000a060000bd020000060a0000c602000201020000c702000102010000c902000202020000d802000102020100d902000002000000da02000205020000db02000040800000dc02000201020100dd02020100020100740300000201000075030000804000007a030000c08000007e03000096760000840300000300000085030200030002008603037c12127c008703000010000000880303007e4a4200890303007e087e008a030300427e42008c03033c42423c008e0303000e700e008f03035c62625c00900302003b400200910378141214780092037e4a4a4a34009303007e0202020094036058465860009503007e4a4a420096030062524a46009703007e08087e0098033c4a4a4a3c00990300427e4200009a03007e081462009b036018061860009c037e0418047e009d03007e04087e009e0300424a4a42009f033c4242423c00a003007e02027e00a103007e12120c00a30300665a424200a40302027e020200a503060870080600a60318247e241800a703422418244200a8030e107e100e00a9035c6202625c00aa0300457c450000ab03040970090400ac030030484a7900ad030030685a5100ae0378100a09f000af03003a41200000b0033a4043403a00b103003048487800b20300fe25251a00b3030c30c0300c00b403344a4a4a3000b503003068585000b603021aa6a24200b7033c080404f800b803003c4a4a3c00b903003840200000ba03007820504800bb03641212227c00bc03fc2020103c00bd03182040201800be03112d2ba94100bf03003048483000c003087808780800c103f82424241800c2031824a4a44800c303304848582800c403000838482800c503384040403800c6031c20f8241800c703c4281028c400c8031c20fc201c00c903304820483000ca03000238422000cb03384240423800cc0330484a493000cd03384042413800ce03304822493000d0033c52525c2000d10310344a3c0800d203067804020400d303120a7c020400d4030d7009040800d5031824ff241800d603384828483800d70348302221d800da031c2221a14200db031824a4a44200dc037e1212020200dd0300fc24240400de033e2010087c00df030c0ac9281800e003700c621c7000e10301092516f800e2039ea0bea07e00e30398a0b8a07800e4030c1214107e00e503001028207800e603be9088887000e70348544e443800e803245252524c00e903285454544800ea0364524c526400eb03086458640800ec03385454542200ed03306848682400ee03184a7e4a1800ef031848ff0a0800f003483020205800f10378a4a4a49800f203304848485000f303006080847d00f4033c4a4a4a3c00f5030030585848000004007c555644000104007c55544500020401013f8579000304007c0605040004043c4a4a422400050400244a522400060400427e420000070400457c45000008042040423e020009047c027e4830000a047e087e4830000b0402027e0a72000c04007c102a45000d047c2112087c000e040c5152523d000f043f20e0203f00100478141214780011047e4a4a4a300012047e4a4a4a34001304007e020202001404c07c427ec0001504007e4a4a4200160476087e087600170424424a4a34001804007e08047e001904007d120a7d001a04007e081462001b04403c02027e001c047e0418047e001d04007e08087e001e043c4242423c001f047e0202027e002004007e12120c002104003c42422400220402027e02020023040e5050503e00240418247e241800250442241824420026043f2020bf600027040e1010107e0028047e407e407e0029043f203fa07f002a04027e484830002b047e4848307e002c04007e484830002d0424424a4a3c002e047e183c423c002f04006c12127e0030043048487840003104003c4a4a3100320400786850200033040078080808003404c0704878c000350430686850000036044830783048003704004058683000380478402010780039047942221279003a040078203048003b044030080878003c047810201078003d047810101078003e043048484830003f047808080878004004fc24242418004104304848485000420408087808080043041ca0a0a07c0044041824ff241800450400483030480046043c2020bc60004704182020207800480478407840780049043c203ca07c004a040878505020004b047850502078004c040078505020004d044858683000004e047830304830004f0450282878000050040030696a500051040032686a50005204023f0a887000530400780a09080054040030685848005504005058682800560400487a4000005704004a784200005804004080847d0059047008785020005a047810785020005b04047e141060005c040078223148005d047841221078005e0418a1a2a279005f043c20e0203c006204027f4a4830006304087e5850200070040e107e100e00710418207820180072043c4a4a4a3c0073043068586830007404001e70180c0075040018603010009004007e020203009104007808080c009204087e0a0a0200930420782808080096043b043f043be0970424183c1824c09a04003f040a31c09b04003c101824c0ae04060870080600af040c10e0100c00b004161870181600b1042c30e0302c00b20421120c1221c0b3040024181824c0ba047e0808087000bb04007e08087000d804003452523c00d904002868583000e20400457d450000e304004a7a420000e8043c4a4a4a3c00e904003058583000ee04003d41413d00ef04003a42427a00d005681020285000d105484848784000d205004830600000d305080808780800d405680808087800d505000008780000d605080818680800d705087808087800d805784050487800d905000008180000da0504040404fc00db05484848483800dc050e4848281800dd05087848487800de05582010487000df05000004fc0000e005004040487800e105000878483800e205487840281800e305041c0404fc00e405485848483800e50504f820140800e605485060685000e705f40424241c00e805080808087000e905785058403800ea05487808087800f005087800087800f105081800087800f205081800081800f305000010080000f405100800100800021e7c5455542800031e007e484930000a1e007c454438000b1e003049487e001e1e007c151404001f1e001079140800401e7e0419047e00411e780832087000561e007c15140800571e00fc25241800601e004854552400611e0050586a28006a1e04047d0404006b1e00083d482000801e7c2112207c00811e384132403800821e7c2012217c00831e384032413800841e7c2110217c00851e384230423800f21e040972080400f31e00b84142f800a3207e0a7a120a00a420a8fcaa828400a720087e2a1c0800ab200098a4a6bf02ac20183c5a5a4200af20627f224438009021103854101000912108047e0408009221101054381000932110207e201000942110381010381095212844fe442800") -const _hex7952 = pxsim.BufferMethods.createBufferFromHex("20000000000000000000000000000000000000000000000000002100000000000006fc0000000000000000000000000000000000220000001c00000000001c0000000000000000000000000000002300a000f807a000f807a00000000000000000000000000000002400000018022404460c8803000000000000000000000000000025003802c4017800200390040803000000000000000000000000260080037804a4041803800340040000000000000000000000002700000000001c00000000000000000000000000000000000000280000000000f8010606010800000000000000000000000000002900000001080606f801000000000000000000000000000000002a00040014000e001400040000000000000000000000000000002b0040004000f8034000400000000000000000000000000000002c000000000000090006000000000000000000000000000000002d000000800080008000000000000000000000000000000000002e000000000000060000000000000000000000000000000000002f00000c800360001c000300000000000000000000000000000030000000f80304040404f80300000000000000000000000000003100000004040404fc07000400040000000000000000000000003200000008060405c4043804000000000000000000000000000033000000080244044404b803000000000000000000000000000034000000800170010801fc070001000000000000000000000000350000023c0424042404c403000000000000000000000000000036000000f0034804440488030000000000000000000000000000370000000400c40734000c00000000000000000000000000000038000000b80344044404b803000000000000000000000000000039000000780284048802f00100000000000000000000000000003a000000000030060000000000000000000000000000000000003b000000000018090006000000000000000000000000000000003c004000a000a000a000100100000000000000000000000000003d002001200120012001200100000000000000000000000000003e0000001001a000a000a00040000000000000000000000000003f000000080084066400180000000000000000000000000000004000f0030c04c20822092409f80900000000000000000000000041000007f8008400f8000007000000000000000000000000000042000000fc0744044404b803000000000000000000000000000043000000f001080204040404080200000000000000000000000044000000fc0704040802f001000000000000000000000000000045000000fc07440444044404000000000000000000000000000046000000fc07440044004400000000000000000000000000000047000000f00108024404c803000000000000000000000000000048000000fc0740004000fc070000000000000000000000000000490000000404fc070404040400000000000000000000000000004a000000000200040004fc0300000000000000000000000000004b000000fc074000f0000c0304040000000000000000000000004c000000fc0700040004000400000000000000000000000000004d000000fc0738007000fc0700000000000000000000000000004e000000fc073800c003fc0700000000000000000000000000004f000000f80304040404f803000000000000000000000000000050000000fc07840084004400780000000000000000000000000051000000fc0102020206fc09000000000000000000000000000052000000fc074400c4013806000000000000000000000000000053000000180224044404880300000000000000000000000000005400000004000400fc070400040000000000000000000000000055000000fc0300040004fc03000000000000000000000000000056000c00f0030004f0030c00000000000000000000000000000057007c008007e001f0010007fc0000000000000000000000000058000404b8034000b80304040000000000000000000000000000590004003800c00730000c0000000000000000000000000000005a0004040407e4041c04040400000000000000000000000000005b0000000000ff0f0108010800000000000000000000000000005c0003001c0060008003000c00000000000000000000000000005d00000001080108ff0f000000000000000000000000000000005e004000380004003800400000000000000000000000000000005f00000800080008000800080000000000000000000000000000600000000000020004000000000000000000000000000000000061000000200390049004e007000000000000000000000000000062000000fc0710041004e003000000000000000000000000000063000000c001200210043004000200000000000000000000000064000000e00310041004fc07000000000000000000000000000065000000e00390049004e0040000000000000000000000000000660000001000f80714001400000000000000000000000000000067000000b806440944093c09040600000000000000000000000068000000fc0710001000e0070000000000000000000000000000690000000000f4070000000000000000000000000000000000006a00000800080008fd07000000000000000000000000000000006b000000fe078000e001100610040000000000000000000000006c0000000000fc030004000400000000000000000000000000006d00f00710001000e0071000e0070000000000000000000000006e000000f00710001000e00700000000000000000000000000006f000000e00310041004e003000000000000000000000000000070000000fc0f04010401f800000000000000000000000000000071000000f80004010401fc0f000000000000000000000000000072000000f00720001000100000000000000000000000000000007300000060029004900420030000000000000000000000000000740000001000fc0310041004000000000000000000000000000075000000f00300040004f007000000000000000000000000000076003000c0030004c003300000000000000000000000000000007700f0000007e003c0010007f000000000000000000000000000780010046003800060031004000000000000000000000000000079000c0870088007f0000c0000000000000000000000000000007a000000000410079004700410040000000000000000000000007b0000004000be070108010800000000000000000000000000007c0000000000ff0f0000000000000000000000000000000000007d00000001080108be07400000000000000000000000000000007e00800040004000800080004000000000000000000000000000") -const _hex9802 = pxsim.BufferMethods.createBufferFromHex("20000000000000002100001700000000220000030003000023000a1f0a1f0a0024000a17151d0a00250013090412190026000a15150a100027000003000000002800000e11000000290000110e0000002a00000a040a00002b0000040e0400002c000010080000002d000004040400002e000008000000002f0010080402010030000e11110e0000310000121f100000320019151512000033000911150b000034000c0a091f080035001715151509003600081416150800370011090503010038000a1515150a00390002150d0502003a00000a000000003b0000100a0000003c0000040a1100003d00000a0a0a00003e0000110a0400003f0002011505020040000e1115090e0041001e05051e000042001f15150a000043000e111111000044001f11110e000045001f151511000046001f050501000047000e1111150c0048001f04041f00004900111f110000004a000911110f01004b001f040a1100004c001f10101000004d001f0204021f004e001f0204081f004f000e11110e000050001f0505020000510006091916000052001f05050a10005300121515090000540001011f01010055000f10100f0000560007081008070057001f0804081f0058001b04041b0000590001021c0201005a001915131100005b00001f111100005c000102040810005d000011111f00005e000002010200005f00101010101000600000010200000061000c12121e100062001f141408000063000c121212000064000814141f000065000e15151200006600041e0501000067000215150f000068001f04041800006900001d000000006a000010100d00006b001f040a1000006c00000f101000006d001e0204021e006e001e02021c00006f000c12120c000070001e0a0a0400007100040a0a1e000072001c0202020000730010140a0200007400000f1414100075000e10101e1000760006081008060077001e1008101e007800120c0c12000079001214080402007a00121a161200007b0000041f1100007c00001f000000007d00111f040000007e00000404080800d3000c1213130c00f3000c12130d000004010e05051e100005010609191f080006010c121313120007010c121313000018010f0b1b19000019010e151d1a000041011f14121000004201100f1412000043011f0205081f0044011e03031c00005a0110140b0302005b0110140b0300007901121a171300007a01121a171300007b01121b171200007c01121b17120000") -const _hex4603 = pxsim.BufferMethods.createBufferFromHex("000000ffffffff2121ff93c4ff8135fff609249ca378dc52003fad87f2ff8e2ec4a4839f5c406ce5cdc491463d000000") -const _hex4918 = pxsim.BufferMethods.createBufferFromHex("870407000800000000000000404400005055040450555505505501011011000000000000") -const _hex4921 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000050050000000000000550000000005045444404000000455544444400040045555555550404004555555555450500455555555511050045555555150101004555111111000100501511110100000000000550000000000000500500000000000000000000000000000000000000") -const _hex4924 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000000000000006666666666060060ffffff666f660060fffffff6ff660060fff1ff666f660060fff1ff6666660060fffff16666660060fffff16666660060fff1ff6666660060fff1ff66f6660060ffffff6666660060fffffff6666600006666666666060000000000000000000000000000000000") -const _hex5219 = pxsim.BufferMethods.createBufferFromHex("8704240024000000001111111111111111111111111111111100000010313333333333333333333333333333130100001113111111111111111111111111111131110000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000111311111111111111111111111111113111000010313333333333333333333333333333130100000011111111111111111111111111111111000000") -const _hex5221 = pxsim.BufferMethods.createBufferFromHex("8704240024000000002222222222222222222222222222222200000020323333333333333333333333333333230200002223222222222222222222222222222232220000322211111111111111111111111111112223000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003222111111111111111111111111111122230000222322222222222222222222222222223222000020323333333333333333333333333333230200000022222222222222222222222222222222000000") -const _hex5223 = pxsim.BufferMethods.createBufferFromHex("8704240024000000004444444444444444444444444444444400000040343333333333333333333333333333430400004443444444444444444444444444444434440000344411111111111111111111111111114443000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003444111111111111111111111111111144430000444344444444444444444444444444443444000040343333333333333333333333333333430400000044444444444444444444444444444444000000") -const _hex5225 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d00000000000000000000000070666607000000000000000000000000006776000000000000000000000000660700007066000000000000000000006766777766760000000000000000000060666666660600000000000000000066006766667600660000000000000000667600000000676600000000000000006766767777676676000000000000000060666666666666060000000000000000006766666666760000000000000000000000676666760000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5227 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0bb000000000000000000000000b000404500b0000000000000000000005b0b000400540b0000000000000000b0550400000054b5000000000000000000440040bb0040040000000000000000000040d4ddbb0000000000000000000000004055ddbd000000000000000000004b005455d5dd0b400b000000000000005b045411d5dd0b540b000000000000004b005411d5dd0b400b0000000000000000004055ddbd00000000000000000000000040d4ddbb0000000000000000000000440040bb0040040000000000000000b0550400000054b50000000000000000005b04000400540b000000000000000000b000404500b0000000000000000000000000b0bb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5229 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020020000000000002002000000000000202200000000000022020000000000000022020000000020220000000000000000202200000000220200000000000000000022020000202200000000000000000000202200002202000000000000000000000022022022000000000000000000000000202222020000000000000000000000000022220000000000000000000000000000222200000000000000000000000000202222020000000000000000000000002202202200000000000000000000002022000022020000000000000000000022020000202200000000000000000020220000000022020000000000000000220200000000202200000000000000202200000000000022020000000000002002000000000000200200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5231 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d0000000000000000000000007066660700000000000000000000000000677600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5233 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0cbcc0c0000000000000000000000b0db55d5cd0c00000000000000000000db555555ddcd000000000000000000b055555555d59d0b0000000000000000db55555555d59db900000000000000005b55555555d5ddb900000000000000b05db5cccc5bdddd990b000000000000b055ccccccccdddd9d0b000000000000b0b5ccccccccdbdd9d0b000000000000b0c5ccccccccdcdd9d0b000000000000b0c5ccdccbccdcdd9d0c000000000000b0cdcc5b55ccdcdd9d0c00000000000000ccdc55b5ccdcddc90000000000000000cccc5b55ccdbddc90000000000000000c0ccdccbccdd9d0c000000000000000000ccccccdbddcd00000000000000000000c0dcddddcd0c0000000000000000000000c0cccc0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5235 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc00000000000000b0bbbbbbbbcb00c0cd000000000000001bddddddddbd0c1ccd000000000000b011cbccccccbc0c1ccd000000000000b01d6c666666bc0cbccd000000000000b01d6c616661bc0c1ccd000000000000b01d6c161666bccc1bcd000000000000b01d6c666166bcccbbcd000000000000b01d6c666666bccc1bcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666661bcccbbcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666666bc0c1ccd000000000000b01dcbccccccbc0cbccd000000000000c0b1bbbbbbbbbb0cdccb000000000000c0bbbbbbbbbbcb00dc0c00000000000000cccccccccc0c00cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5237 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004004000000000000000000000000000054450000000000000000000000440b00bbbb00b0440000000000000040550b00000000b0550400000000000040b5000044bb00005b04000000000000b00b0044ddddbb00b00b0000000000000000405d55d5dd0b00000000000000000000d4555555ddbd0000000000000000000054555555d5bd0000000000000000b44055555555d5dd0b4b000000000040b54055555555d5dd0b5b040000000040b54055555555d5dd0b5b040000000000b44055115555d5dd0b4b000000000000000054115555d5bd00000000000000000000d4555555ddbd00000000000000000000405d55d5dd0b0000000000000000b00b0044ddddbb00b00b00000000000040b5000044bb00005b0400000000000040550b00000000b0550400000000000000440b00bbbb00b0440000000000000000000000544500000000000000000000000000004004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -const _hex5239 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbbb00000000000000000000000000b055bb00bbbbbb000000000000000000b0b5bdbcbbbbddcb0000000000000000b0dbcb5b5555bbdd0c00000000000000b0cbdcbdbb5b55dbcd0000000000000000c0dddb11d15bb5bd0c00000000000000bbbd111111b155bb0c00000000000000db1b111111115bb5cb00000000000000db1bb11d1199b9d5cb00000000000000db1b11bb9199b955cb000000000000005b1b11b19b99995bcb000000000000005b1d1111bb99995ccb00000000000000b0b511bbbb99995ccb00000000000000b0d51d919999d95b0b00000000000000005bdb919999c9d50b0000000000000000b0d51b99d9bcb5000000000000000000005bd5bbbc550b00000000000000000000b05b5555bd000000000000000000000000b0bbbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex25988 = pxsim.BufferMethods.createBufferFromHex("2000000000000000210000005e0000002200000e000e0000230028fe28fe280024004c92ff926400250002651248a64026006c92926ca000270000000e000000280000007c82000029000000827c00002a005438103854002b0010107c1010002c000000907000002d001010101010002e000000606000002f000060100806003000003c42423c00310000447e4000003200004462524c00330000424a4e320034003028247e20003500004e4a4a32003600003c4a4a30003700000262120e00380000344a4a34003900000c52523c003a0000006c6c00003b000000967600003c001028284444003d002828282828003e004444282810003f0000025909060040003c425a560800410078141214780042007e4a4a4a34004300003c424224004400007e42423c004500007e4a4a42004600007e0a0a02004700003c425234004800007e08087e00490000427e4200004a002040423e02004b00007e081462004c00007e404040004d007e0418047e004e00007e04087e004f003c4242423c005000007e12120c005100003c5262bc005200007e12126c00530000244a522400540002027e0202005500003e40403e005600001e70701e0057007e2018207e00580042241824420059000608700806005a000062524a46005b00007e424200005c000006081060005d000042427e00005e000804020408005f00808080808000600000000204000061000030484878006200007e4848300063000030484848006400003048487e006500003068585000660000107c12040067000018a4a478006800007e08087000690000487a4000006a000040847d00006b00007e102840006c0000427e4000006d007808300870006e000078080870006f00003048483000700000fc24241800710000182424fc0072000078100810007300005058682800740000083e48200075000038404078007600001860601800770038403040380078000048303048007900005ca0a07c007a000048685848007b000008364100007c000000fe0000007d000041360800007e00000804080400a000000000000000a10000007a000000a200003048fc4800a30090fc92928400a400542844285400a5002a2c782c2a00a6000000ee000000a7000094aaaa5200a800000200020000a9003e414955413eaa0000242a2e0000ab00102854284400ac00001010107000ad00001010101000ae003e415d45413eaf00000202020200b000000814140800b1008888be888800b2000024322c0000b30000222a140000b400000004020000b50000f840207800b6000c1e7e027e00b700000010000000b800000080400000b90000243e200000ba0000242a240000bb00442854281000bc00025f70f84000bd00021f90c8b000be0011557af84000bf000030484d2000c000601916186000c100601816196000c200601a151a6000c300601a151a6100c400601914196000c500601a151a6000c6007c0a7e4a4200c700001ea1611200c800007c55564400c900007c56554400ca00007c56554600cb00007c55544500cc0000457e440000cd0000447e450000ce0000467d460000cf0000457c450000d000087e4a423c00d100007e09127d00d200003845463800d300003846453800d400003846453a00d500003a45463900d600003845443900d700442810284400d80000fc724e3f00d900003c41423c00da00003c42413c00db00003c42413e00dc00003c41403d00dd00040872090400de00007e24241800df00007c025a2400e0000030494a7800e10000304a497800e20000304a497a00e3000032494a7900e40000304a487a00e50000304a4d7a00e600304878685000e7000018a4642400e8000030695a5000e90000306a595000ea0000306a595200eb0000306a585200ec0000497a400000ed0000487a410000ee00004a79420000ef00004a78420000f00000304a4b3d00f100007a090a7100f2000030494a3000f30000304a493000f40000304a493200f5000032494a3100f60000304a483200f700101054101000f800007068583800f900003841427800fa00003842417800fb00003842417a00fc00003842407a00fd0000b84241f800fe0000ff24241800ff00005ca1a07d000001601915196000010100304a4a7a000201611a16196000030100314a4a790004013c0a094abc00050100182464bc000601003846452800070100304a4948000801003846452a00090100304a494a000a010038444528000b010030484a48000c010038454629000d010030494a49000e01007c454639000f0100314a497e001001087e4a423c00110130484c7e04001201007d55554500130100326a5a52001401007d56564500150100316a5a51001601007c55544400170100306a5850001801003f65a521001901001874ac28001a01007c555645001b010030695a51001c010038465536001d0100304a49f2001e010039465635001f0100314a4af100200100384455340021010018a4a578002201001ea1691a0023010018a6a578002401007812117a0025017e080a7102002601047e147e04002701047e0c08700028010002457e450029010002497a41002a0100457d4500002b01004a7a4200002c0100014a7a49002d0100014a7a41002e0100217fa100002f0100247da00000300100447d440000310100487840000032017e0022423e0033013d0040847d0034012040463d0600350100800af90200360100bf440a3100370100bf4814200038010078102848003901007c404241003a0100467d4000003b01003fa06020003c0100a17f2000003d01007c414241003e0100457e4100003f01007e40484000400100427e4008004101107e48404000420100527e4800004301007c0a117c00440100780a097000450100bf42043f00460100bc440438004701007c09127d00480100790a09700049010a06780870004a01003f02847f004b01003c048478004c013945454539004d0100324a4a32004e013946464639004f0100314a4a310050013a4544463900510132494832010052013c427e4a420053013048306850005401007c163548005501007812091000560100bf49093600570100bc480408005801007d1635480059010079120910005a010048565524005b0100505a6928005c010048565526005d0100505a692a005e010012a56912005f010028ac741400600100485556250061010050596a290062010101bf410100630100049f641000640104057e050400650100083d4a2100660102127e120200670100183e5820006801003a414239006901003a414279006a01003d41413d006b01003a42427a006c010039424239006d010039424279006e01003a45453a006f01003a45457a0070013a41403a010071013a41407a01007201001f60a01f007301001c60a03c00740178221122780075013842314238007601081261120800770100b84241fa00780104097009040079010064564d44007a0100486a5948007b010064544d44007c010048685a48007d010064554e45007e010048695a49007f0100087c0204008f01003452523c00920100887e090200a0013c42423c0806a101003048483008af01003e403e0806b001003840781008b501006a5a4a4e00b601005878585800d101003845463900d2010030494a3100e601003845563500e7010030494af100fa0100742a750000fb0100304c4a7d00fc0178147e554400fd0130487a695000fe010078744e3d00ff0100706a59380018020012a569120019020028ac7414001a020101bf4101001b0200049f641000bb0200000c0a0000bc0200000a060000bd020000060a0000c602000201020000c702000102010000c902000202020000d802000102020100d902000002000000da02000205020000db02000040800000dc02000201020100dd02020100020100740300000201000075030000804000007a030000c08000007e03000096760000840300000300000085030200030002008603037c12127c008703000010000000880303007e4a4200890303007e087e008a030300427e42008c03033c42423c008e0303000e700e008f03035c62625c00900302003b400200910378141214780092037e4a4a4a34009303007e0202020094036058465860009503007e4a4a420096030062524a46009703007e08087e0098033c4a4a4a3c00990300427e4200009a03007e081462009b036018061860009c037e0418047e009d03007e04087e009e0300424a4a42009f033c4242423c00a003007e02027e00a103007e12120c00a30300665a424200a40302027e020200a503060870080600a60318247e241800a703422418244200a8030e107e100e00a9035c6202625c00aa0300457c450000ab03040970090400ac030030484a7900ad030030685a5100ae0378100a09f000af03003a41200000b0033a4043403a00b103003048487800b20300fe25251a00b3030c30c0300c00b403344a4a4a3000b503003068585000b603021aa6a24200b7033c080404f800b803003c4a4a3c00b903003840200000ba03007820504800bb03641212227c00bc03fc2020103c00bd03182040201800be03112d2ba94100bf03003048483000c003087808780800c103f82424241800c2031824a4a44800c303304848582800c403000838482800c503384040403800c6031c20f8241800c703c4281028c400c8031c20fc201c00c903304820483000ca03000238422000cb03384240423800cc0330484a493000cd03384042413800ce03304822493000d0033c52525c2000d10310344a3c0800d203067804020400d303120a7c020400d4030d7009040800d5031824ff241800d603384828483800d70348302221d800da031c2221a14200db031824a4a44200dc037e1212020200dd0300fc24240400de033e2010087c00df030c0ac9281800e003700c621c7000e10301092516f800e2039ea0bea07e00e30398a0b8a07800e4030c1214107e00e503001028207800e603be9088887000e70348544e443800e803245252524c00e903285454544800ea0364524c526400eb03086458640800ec03385454542200ed03306848682400ee03184a7e4a1800ef031848ff0a0800f003483020205800f10378a4a4a49800f203304848485000f303006080847d00f4033c4a4a4a3c00f5030030585848000004007c555644000104007c55544500020401013f8579000304007c0605040004043c4a4a422400050400244a522400060400427e420000070400457c45000008042040423e020009047c027e4830000a047e087e4830000b0402027e0a72000c04007c102a45000d047c2112087c000e040c5152523d000f043f20e0203f00100478141214780011047e4a4a4a300012047e4a4a4a34001304007e020202001404c07c427ec0001504007e4a4a4200160476087e087600170424424a4a34001804007e08047e001904007d120a7d001a04007e081462001b04403c02027e001c047e0418047e001d04007e08087e001e043c4242423c001f047e0202027e002004007e12120c002104003c42422400220402027e02020023040e5050503e00240418247e241800250442241824420026043f2020bf600027040e1010107e0028047e407e407e0029043f203fa07f002a04027e484830002b047e4848307e002c04007e484830002d0424424a4a3c002e047e183c423c002f04006c12127e0030043048487840003104003c4a4a3100320400786850200033040078080808003404c0704878c000350430686850000036044830783048003704004058683000380478402010780039047942221279003a040078203048003b044030080878003c047810201078003d047810101078003e043048484830003f047808080878004004fc24242418004104304848485000420408087808080043041ca0a0a07c0044041824ff241800450400483030480046043c2020bc60004704182020207800480478407840780049043c203ca07c004a040878505020004b047850502078004c040078505020004d044858683000004e047830304830004f0450282878000050040030696a500051040032686a50005204023f0a887000530400780a09080054040030685848005504005058682800560400487a4000005704004a784200005804004080847d0059047008785020005a047810785020005b04047e141060005c040078223148005d047841221078005e0418a1a2a279005f043c20e0203c006204027f4a4830006304087e5850200070040e107e100e00710418207820180072043c4a4a4a3c0073043068586830007404001e70180c0075040018603010009004007e020203009104007808080c009204087e0a0a0200930420782808080096043b043f043be0970424183c1824c09a04003f040a31c09b04003c101824c0ae04060870080600af040c10e0100c00b004161870181600b1042c30e0302c00b20421120c1221c0b3040024181824c0ba047e0808087000bb04007e08087000d804003452523c00d904002868583000e20400457d450000e304004a7a420000e8043c4a4a4a3c00e904003058583000ee04003d41413d00ef04003a42427a00d005681020285000d105484848784000d205004830600000d305080808780800d405680808087800d505000008780000d605080818680800d705087808087800d805784050487800d905000008180000da0504040404fc00db05484848483800dc050e4848281800dd05087848487800de05582010487000df05000004fc0000e005004040487800e105000878483800e205487840281800e305041c0404fc00e405485848483800e50504f820140800e605485060685000e705f40424241c00e805080808087000e905785058403800ea05487808087800f005087800087800f105081800087800f205081800081800f305000010080000f405100800100800021e7c5455542800031e007e484930000a1e007c454438000b1e003049487e001e1e007c151404001f1e001079140800401e7e0419047e00411e780832087000561e007c15140800571e00fc25241800601e004854552400611e0050586a28006a1e04047d0404006b1e00083d482000801e7c2112207c00811e384132403800821e7c2012217c00831e384032413800841e7c2110217c00851e384230423800f21e040972080400f31e00b84142f800a3207e0a7a120a00a420a8fcaa828400a720087e2a1c0800ab200098a4a6bf02ac20183c5a5a4200af20627f224438009021103854101000912108047e0408009221101054381000932110207e201000942110381010381095212844fe442800") +const _hex25990 = pxsim.BufferMethods.createBufferFromHex("20000000000000000000000000000000000000000000000000002100000000000006fc0000000000000000000000000000000000220000001c00000000001c0000000000000000000000000000002300a000f807a000f807a00000000000000000000000000000002400000018022404460c8803000000000000000000000000000025003802c4017800200390040803000000000000000000000000260080037804a4041803800340040000000000000000000000002700000000001c00000000000000000000000000000000000000280000000000f8010606010800000000000000000000000000002900000001080606f801000000000000000000000000000000002a00040014000e001400040000000000000000000000000000002b0040004000f8034000400000000000000000000000000000002c000000000000090006000000000000000000000000000000002d000000800080008000000000000000000000000000000000002e000000000000060000000000000000000000000000000000002f00000c800360001c000300000000000000000000000000000030000000f80304040404f80300000000000000000000000000003100000004040404fc07000400040000000000000000000000003200000008060405c4043804000000000000000000000000000033000000080244044404b803000000000000000000000000000034000000800170010801fc070001000000000000000000000000350000023c0424042404c403000000000000000000000000000036000000f0034804440488030000000000000000000000000000370000000400c40734000c00000000000000000000000000000038000000b80344044404b803000000000000000000000000000039000000780284048802f00100000000000000000000000000003a000000000030060000000000000000000000000000000000003b000000000018090006000000000000000000000000000000003c004000a000a000a000100100000000000000000000000000003d002001200120012001200100000000000000000000000000003e0000001001a000a000a00040000000000000000000000000003f000000080084066400180000000000000000000000000000004000f0030c04c20822092409f80900000000000000000000000041000007f8008400f8000007000000000000000000000000000042000000fc0744044404b803000000000000000000000000000043000000f001080204040404080200000000000000000000000044000000fc0704040802f001000000000000000000000000000045000000fc07440444044404000000000000000000000000000046000000fc07440044004400000000000000000000000000000047000000f00108024404c803000000000000000000000000000048000000fc0740004000fc070000000000000000000000000000490000000404fc070404040400000000000000000000000000004a000000000200040004fc0300000000000000000000000000004b000000fc074000f0000c0304040000000000000000000000004c000000fc0700040004000400000000000000000000000000004d000000fc0738007000fc0700000000000000000000000000004e000000fc073800c003fc0700000000000000000000000000004f000000f80304040404f803000000000000000000000000000050000000fc07840084004400780000000000000000000000000051000000fc0102020206fc09000000000000000000000000000052000000fc074400c4013806000000000000000000000000000053000000180224044404880300000000000000000000000000005400000004000400fc070400040000000000000000000000000055000000fc0300040004fc03000000000000000000000000000056000c00f0030004f0030c00000000000000000000000000000057007c008007e001f0010007fc0000000000000000000000000058000404b8034000b80304040000000000000000000000000000590004003800c00730000c0000000000000000000000000000005a0004040407e4041c04040400000000000000000000000000005b0000000000ff0f0108010800000000000000000000000000005c0003001c0060008003000c00000000000000000000000000005d00000001080108ff0f000000000000000000000000000000005e004000380004003800400000000000000000000000000000005f00000800080008000800080000000000000000000000000000600000000000020004000000000000000000000000000000000061000000200390049004e007000000000000000000000000000062000000fc0710041004e003000000000000000000000000000063000000c001200210043004000200000000000000000000000064000000e00310041004fc07000000000000000000000000000065000000e00390049004e0040000000000000000000000000000660000001000f80714001400000000000000000000000000000067000000b806440944093c09040600000000000000000000000068000000fc0710001000e0070000000000000000000000000000690000000000f4070000000000000000000000000000000000006a00000800080008fd07000000000000000000000000000000006b000000fe078000e001100610040000000000000000000000006c0000000000fc030004000400000000000000000000000000006d00f00710001000e0071000e0070000000000000000000000006e000000f00710001000e00700000000000000000000000000006f000000e00310041004e003000000000000000000000000000070000000fc0f04010401f800000000000000000000000000000071000000f80004010401fc0f000000000000000000000000000072000000f00720001000100000000000000000000000000000007300000060029004900420030000000000000000000000000000740000001000fc0310041004000000000000000000000000000075000000f00300040004f007000000000000000000000000000076003000c0030004c003300000000000000000000000000000007700f0000007e003c0010007f000000000000000000000000000780010046003800060031004000000000000000000000000000079000c0870088007f0000c0000000000000000000000000000007a000000000410079004700410040000000000000000000000007b0000004000be070108010800000000000000000000000000007c0000000000ff0f0000000000000000000000000000000000007d00000001080108be07400000000000000000000000000000007e00800040004000800080004000000000000000000000000000") +const _hex27840 = pxsim.BufferMethods.createBufferFromHex("20000000000000002100001700000000220000030003000023000a1f0a1f0a0024000a17151d0a00250013090412190026000a15150a100027000003000000002800000e11000000290000110e0000002a00000a040a00002b0000040e0400002c000010080000002d000004040400002e000008000000002f0010080402010030000e11110e0000310000121f100000320019151512000033000911150b000034000c0a091f080035001715151509003600081416150800370011090503010038000a1515150a00390002150d0502003a00000a000000003b0000100a0000003c0000040a1100003d00000a0a0a00003e0000110a0400003f0002011505020040000e1115090e0041001e05051e000042001f15150a000043000e111111000044001f11110e000045001f151511000046001f050501000047000e1111150c0048001f04041f00004900111f110000004a000911110f01004b001f040a1100004c001f10101000004d001f0204021f004e001f0204081f004f000e11110e000050001f0505020000510006091916000052001f05050a10005300121515090000540001011f01010055000f10100f0000560007081008070057001f0804081f0058001b04041b0000590001021c0201005a001915131100005b00001f111100005c000102040810005d000011111f00005e000002010200005f00101010101000600000010200000061000c12121e100062001f141408000063000c121212000064000814141f000065000e15151200006600041e0501000067000215150f000068001f04041800006900001d000000006a000010100d00006b001f040a1000006c00000f101000006d001e0204021e006e001e02021c00006f000c12120c000070001e0a0a0400007100040a0a1e000072001c0202020000730010140a0200007400000f1414100075000e10101e1000760006081008060077001e1008101e007800120c0c12000079001214080402007a00121a161200007b0000041f1100007c00001f000000007d00111f040000007e00000404080800d3000c1213130c00f3000c12130d000004010e05051e100005010609191f080006010c121313120007010c121313000018010f0b1b19000019010e151d1a000041011f14121000004201100f1412000043011f0205081f0044011e03031c00005a0110140b0302005b0110140b0300007901121a171300007a01121a171300007b01121b171200007c01121b17120000") +const _hex22641 = pxsim.BufferMethods.createBufferFromHex("000000ffffffff2121ff93c4ff8135fff609249ca378dc52003fad87f2ff8e2ec4a4839f5c406ce5cdc491463d000000") +const _hex22956 = pxsim.BufferMethods.createBufferFromHex("870407000800000000000000404400005055040450555505505501011011000000000000") +const _hex22959 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000050050000000000000550000000005045444404000000455544444400040045555555550404004555555555450500455555555511050045555555150101004555111111000100501511110100000000000550000000000000500500000000000000000000000000000000000000") +const _hex22962 = pxsim.BufferMethods.createBufferFromHex("870410001000000000000000000000000000000000000000006666666666060060ffffff666f660060fffffff6ff660060fff1ff666f660060fff1ff6666660060fffff16666660060fffff16666660060fff1ff6666660060fff1ff66f6660060ffffff6666660060fffffff6666600006666666666060000000000000000000000000000000000") +const _hex23257 = pxsim.BufferMethods.createBufferFromHex("8704240024000000001111111111111111111111111111111100000010313333333333333333333333333333130100001113111111111111111111111111111131110000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000311111111111111111111111111111111113000031111111111111111111111111111111111300003111111111111111111111111111111111130000111311111111111111111111111111113111000010313333333333333333333333333333130100000011111111111111111111111111111111000000") +const _hex23259 = pxsim.BufferMethods.createBufferFromHex("8704240024000000002222222222222222222222222222222200000020323333333333333333333333333333230200002223222222222222222222222222222232220000322211111111111111111111111111112223000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003212111111111111111111111111111121230000321211111111111111111111111111112123000032121111111111111111111111111111212300003222111111111111111111111111111122230000222322222222222222222222222222223222000020323333333333333333333333333333230200000022222222222222222222222222222222000000") +const _hex23261 = pxsim.BufferMethods.createBufferFromHex("8704240024000000004444444444444444444444444444444400000040343333333333333333333333333333430400004443444444444444444444444444444434440000344411111111111111111111111111114443000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003414111111111111111111111111111141430000341411111111111111111111111111114143000034141111111111111111111111111111414300003444111111111111111111111111111144430000444344444444444444444444444444443444000040343333333333333333333333333333430400000044444444444444444444444444444444000000") +const _hex23263 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d00000000000000000000000070666607000000000000000000000000006776000000000000000000000000660700007066000000000000000000006766777766760000000000000000000060666666660600000000000000000066006766667600660000000000000000667600000000676600000000000000006766767777676676000000000000000060666666666666060000000000000000006766666666760000000000000000000000676666760000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23265 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0bb000000000000000000000000b000404500b0000000000000000000005b0b000400540b0000000000000000b0550400000054b5000000000000000000440040bb0040040000000000000000000040d4ddbb0000000000000000000000004055ddbd000000000000000000004b005455d5dd0b400b000000000000005b045411d5dd0b540b000000000000004b005411d5dd0b400b0000000000000000004055ddbd00000000000000000000000040d4ddbb0000000000000000000000440040bb0040040000000000000000b0550400000054b50000000000000000005b04000400540b000000000000000000b000404500b0000000000000000000000000b0bb0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23267 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020020000000000002002000000000000202200000000000022020000000000000022020000000020220000000000000000202200000000220200000000000000000022020000202200000000000000000000202200002202000000000000000000000022022022000000000000000000000000202222020000000000000000000000000022220000000000000000000000000000222200000000000000000000000000202222020000000000000000000000002202202200000000000000000000002022000022020000000000000000000022020000202200000000000000000020220000000022020000000000000000220200000000202200000000000000202200000000000022020000000000002002000000000000200200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23269 = pxsim.BufferMethods.createBufferFromHex("8704200020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0fcff0f000000000000000000000000bcddddfb000000000000000000000000dcbbbbfd000000000000000000000000ccbbbbfc0000000000000000000000c0bcd1bdfb0f00000000000000000000c01b11ddbb0f00000000000000000000c0bcbbbbcb0f00000000000000000000bc11d1ddddcb000000000000000000c01d11ddddddd10c0000000000000000bcd1cbbcfbcf1dcb00000000000000001ccdccddbdffdfc100000000000000001cccccdbcbffcfc10000000000000000dbcbccccfcffbfcd0000000000000000bbbdccccffcfdbbb0000000000000000b0dbbdbbbbdbbd0b000000000000000000b0cbccccbc0b000000000000000000000000000000000000000000000000000000d007700d0000000000000000000000007066660700000000000000000000000000677600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23271 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b0cbcc0c0000000000000000000000b0db55d5cd0c00000000000000000000db555555ddcd000000000000000000b055555555d59d0b0000000000000000db55555555d59db900000000000000005b55555555d5ddb900000000000000b05db5cccc5bdddd990b000000000000b055ccccccccdddd9d0b000000000000b0b5ccccccccdbdd9d0b000000000000b0c5ccccccccdcdd9d0b000000000000b0c5ccdccbccdcdd9d0c000000000000b0cdcc5b55ccdcdd9d0c00000000000000ccdc55b5ccdcddc90000000000000000cccc5b55ccdbddc90000000000000000c0ccdccbccdd9d0c000000000000000000ccccccdbddcd00000000000000000000c0dcddddcd0c0000000000000000000000c0cccc0c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23273 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cc00000000000000b0bbbbbbbbcb00c0cd000000000000001bddddddddbd0c1ccd000000000000b011cbccccccbc0c1ccd000000000000b01d6c666666bc0cbccd000000000000b01d6c616661bc0c1ccd000000000000b01d6c161666bccc1bcd000000000000b01d6c666166bcccbbcd000000000000b01d6c666666bccc1bcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666661bcccbbcd000000000000b01d6c666661bccc1bcd000000000000b01d6c666666bc0c1ccd000000000000b01dcbccccccbc0cbccd000000000000c0b1bbbbbbbbbb0cdccb000000000000c0bbbbbbbbbbcb00dc0c00000000000000cccccccccc0c00cc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23275 = pxsim.BufferMethods.createBufferFromHex("87042000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004004000000000000000000000000000054450000000000000000000000440b00bbbb00b0440000000000000040550b00000000b0550400000000000040b5000044bb00005b04000000000000b00b0044ddddbb00b00b0000000000000000405d55d5dd0b00000000000000000000d4555555ddbd0000000000000000000054555555d5bd0000000000000000b44055555555d5dd0b4b000000000040b54055555555d5dd0b5b040000000040b54055555555d5dd0b5b040000000000b44055115555d5dd0b4b000000000000000054115555d5bd00000000000000000000d4555555ddbd00000000000000000000405d55d5dd0b0000000000000000b00b0044ddddbb00b00b00000000000040b5000044bb00005b0400000000000040550b00000000b0550400000000000000440b00bbbb00b0440000000000000000000000544500000000000000000000000000004004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex23277 = pxsim.BufferMethods.createBufferFromHex("870420002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bbbb00000000000000000000000000b055bb00bbbbbb000000000000000000b0b5bdbcbbbbddcb0000000000000000b0dbcb5b5555bbdd0c00000000000000b0cbdcbdbb5b55dbcd0000000000000000c0dddb11d15bb5bd0c00000000000000bbbd111111b155bb0c00000000000000db1b111111115bb5cb00000000000000db1bb11d1199b9d5cb00000000000000db1b11bb9199b955cb000000000000005b1b11b19b99995bcb000000000000005b1d1111bb99995ccb00000000000000b0b511bbbb99995ccb00000000000000b0d51d919999d95b0b00000000000000005bdb919999c9d50b0000000000000000b0d51b99d9bcb5000000000000000000005bd5bbbc550b00000000000000000000b05b5555bd000000000000000000000000b0bbbb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") +const _hex37139 = pxsim.BufferMethods.createBufferFromHex("87041000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006006000000000000666600000000000066660000000000006006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") -function control___screen_inline__P4592(s) { +function control___screen_inline__P22630(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -887,23 +939,23 @@ switch (step) { case 1: r0 = pxsim_numops_toBoolDecr(true); if (!r0) { step = 4; continue; } - globals.__updated___4589 = (false); - s.tmp_0 = pause__P413_mk(s); + globals.__updated___22627 = (false); + s.tmp_0 = pause__P18451_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___4589); + r0 = pxsim_numops_toBoolDecr(globals.__updated___22627); 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__P1993_mk(s); + s.tmp_2 = control___screen_update__P20031_mk(s); s.callLocIdx = 3; s.pc = 6; return s.tmp_2; case 6: r0 = s.retval; - globals.__updated___4589 = (true); + globals.__updated___22627 = (true); case 2: case 3: { step = 1; continue; } @@ -912,12 +964,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -control___screen_inline__P4592.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__P22630.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__P4592_mk(s) { +function control___screen_inline__P22630_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_inline__P4592, depth: s.depth + 1, + parent: s, fn: control___screen_inline__P22630, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -928,7 +980,7 @@ function control___screen_inline__P4592_mk(s) { -function _screen_internal_inline__P4612(s) { +function _screen_internal_inline__P22650(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -938,17 +990,17 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.updateScreen(globals.screen___2032); + r0 = pxsim_pxtcore.updateScreen(globals.screen___20070); r0 = undefined; return leave(s, r0) default: oops() } } } -_screen_internal_inline__P4612.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__P22650.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__P4612_mk(s) { +function _screen_internal_inline__P22650_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_inline__P4612, depth: s.depth + 1, + parent: s, fn: _screen_internal_inline__P22650, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, } } @@ -956,7 +1008,7 @@ function _screen_internal_inline__P4612_mk(s) { -function _screen_internal_inline__P4617(s) { +function _screen_internal_inline__P22655(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -975,12 +1027,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -_screen_internal_inline__P4617.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__P22655.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__P4617_mk(s) { +function _screen_internal_inline__P22655_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_inline__P4617, depth: s.depth + 1, + parent: s, fn: _screen_internal_inline__P22655, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -989,7 +1041,7 @@ function _screen_internal_inline__P4617_mk(s) { -function controller_inline__P4662(s) { +function controller_inline__P22700(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -999,16 +1051,16 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.stateWhenPushed___4663 = undefined; - s.i___4669 = undefined; - s.p___4675 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); + s.stateWhenPushed___22701 = undefined; + s.i___22707 = undefined; + s.p___22713 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); s.callLocIdx = 19; s.pc = 12; return s.tmp_0; case 12: r0 = s.retval; r0 = r0.fields["controllerConnectionState"]; - s.stateWhenPushed___4663 = (r0); - r0 = pxsim_numops_toBoolDecr(s.stateWhenPushed___4663); + s.stateWhenPushed___22701 = (r0); + r0 = pxsim_numops_toBoolDecr(s.stateWhenPushed___22701); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -1017,24 +1069,24 @@ switch (step) { { step = 11; continue; } case 1: case 2: - s.i___4669 = (0); + s.i___22707 = (0); case 3: - s.tmp_1 = r0 = s.i___4669; - r0 = pxsim_Array__length(s.stateWhenPushed___4663); + s.tmp_1 = r0 = s.i___22707; + r0 = pxsim_Array__length(s.stateWhenPushed___22701); 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___4660, s.i___4669); - s.p___4675 = (r0); - s.tmp_0 = r0 = s.p___4675; + r0 = pxsim_Array__getAt(globals._players___22698, s.i___22707); + s.p___22713 = (r0); + s.tmp_0 = r0 = s.p___22713; 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___4663, s.i___4669); + r0 = pxsim_Array__getAt(s.stateWhenPushed___22701, s.i___22707); s.tmp_5 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_5); s.tmp_4 = r0; @@ -1044,7 +1096,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = s.p___4675.fields["_connected"]; + r0 = s.p___22713.fields["_connected"]; s.tmp_10 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_10); s.tmp_9 = r0; @@ -1060,7 +1112,7 @@ switch (step) { s.tmp_11 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_11); if (!r0) { step = 8; continue; } - r0 = s.p___4675.fields["_connected"]; + r0 = s.p___22713.fields["_connected"]; s.tmp_12 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_12); if (!r0) { step = 6; continue; } @@ -1071,13 +1123,13 @@ switch (step) { case 7: // jmp value (already in r0) s.tmp_13 = r0; - r0 = s.p___4675.fields["_id"]; + r0 = s.p___22713.fields["_id"]; s.tmp_14 = r0; r0 = pxsim.control.raiseEvent(s.tmp_14, s.tmp_13); case 8: case 9: - r0 = (s.i___4669 + 1); - s.i___4669 = (r0); + r0 = (s.i___22707 + 1); + s.i___22707 = (r0); { step = 3; continue; } case 10: case 11: @@ -1085,12 +1137,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_inline__P4662.info = {"start":344,"length":582,"line":15,"column":28,"endLine":30,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":[]} +controller_inline__P22700.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__P4662_mk(s) { +function controller_inline__P22700_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_inline__P4662, depth: s.depth + 1, + parent: s, fn: controller_inline__P22700, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1107,16 +1159,16 @@ function controller_inline__P4662_mk(s) { tmp_12: undefined, tmp_13: undefined, tmp_14: undefined, - stateWhenPushed___4663: undefined, - i___4669: undefined, - p___4675: undefined, + stateWhenPushed___22701: undefined, + i___22707: undefined, + p___22713: undefined, } } -function controller_inline__P4702(s) { +function controller_inline__P22740(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1126,7 +1178,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___4707 = undefined; + s.i___22745 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; @@ -1135,43 +1187,43 @@ switch (step) { r0 = pxsim_Array__mk(); s.tmp_1 = r0; r0 = (s.tmp_0).fields["controllerConnectionState"] = (s.tmp_1); - s.i___4707 = (0); + s.i___22745 = (0); case 1: - s.tmp_1 = r0 = s.i___4707; - r0 = pxsim_Array__length(globals._players___4660); + s.tmp_1 = r0 = s.i___22745; + r0 = pxsim_Array__length(globals._players___22698); 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___4660, s.i___4707); + r0 = pxsim_Array__getAt(globals._players___22698, s.i___22745); 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___4707; - r0 = pxsim_Array__getAt(globals._players___4660, s.i___4707); + s.tmp_5 = r0 = s.i___22745; + r0 = pxsim_Array__getAt(globals._players___22698, s.i___22745); 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___4707 + 1); - s.i___4707 = (r0); + r0 = (s.i___22745 + 1); + s.i___22745 = (r0); { step = 1; continue; } case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_inline__P4702.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__P22740.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__P4702_mk(s) { +function controller_inline__P22740_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_inline__P4702, depth: s.depth + 1, + parent: s, fn: controller_inline__P22740, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1181,7 +1233,7 @@ function controller_inline__P4702_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - i___4707: undefined, + i___22745: undefined, arg0: undefined, } } @@ -1189,7 +1241,7 @@ function controller_inline__P4702_mk(s) { -function info_inline__P4813(s) { +function info_inline__P22851(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1203,36 +1255,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.infoState___4809); + r0 = pxsim_numops_toBoolDecr(globals.infoState___22847); if (!r0) { step = 3; continue; } - r0 = pxsim_numops_toBoolDecr(globals.infoStateStack___4811); + r0 = pxsim_numops_toBoolDecr(globals.infoStateStack___22849); 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___4811 = (r0); + globals.infoStateStack___22849 = (r0); case 1: case 2: r0 = pxsim_pxtrt.mkMap(); s.tmp_0 = r0; - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "state", globals.infoState___4809); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "state", globals.infoState___22847); r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "scene", s.arg0); - r0 = pxsim_Array__push(globals.infoStateStack___4811, s.tmp_0); - globals.infoState___4809 = (undefined); + r0 = pxsim_Array__push(globals.infoStateStack___22849, s.tmp_0); + globals.infoState___22847 = (undefined); case 3: case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -info_inline__P4813.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__P22851.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__P4813_mk(s) { +function info_inline__P22851_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_inline__P4813, depth: s.depth + 1, + parent: s, fn: info_inline__P22851, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1243,7 +1295,7 @@ function info_inline__P4813_mk(s) { -function info_inline__P4828(s) { +function info_inline__P22866(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1253,30 +1305,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___4829 = undefined; - s.nextState___4838 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); + s.scene___22867 = undefined; + s.nextState___22876 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); s.callLocIdx = 32; s.pc = 7; return s.tmp_0; case 7: r0 = s.retval; - s.scene___4829 = (r0); - globals.infoState___4809 = (undefined); - s.tmp_0 = r0 = globals.infoStateStack___4811; + s.scene___22867 = (r0); + globals.infoState___22847 = (undefined); + s.tmp_0 = r0 = globals.infoStateStack___22849; 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___4811); + r0 = pxsim_Array__length(globals.infoStateStack___22849); 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___4811); - s.nextState___4838 = (r0); + r0 = pxsim_Array_.pop(globals.infoStateStack___22849); + s.nextState___22876 = (r0); s.tmp_2 = if_scene_1_mk(s); - s.tmp_2.arg0 = s.nextState___4838; + s.tmp_2.arg0 = s.nextState___22876; if (!s.tmp_2.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "scene"); } else { @@ -1288,12 +1340,12 @@ switch (step) { case 8: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 == s.scene___4829); + r0 = (s.tmp_1 == s.scene___22867); 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___4838; + s.tmp_3.arg0 = s.nextState___22876; if (!s.tmp_3.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_3.arg0, "state"); } else { @@ -1304,10 +1356,10 @@ switch (step) { } case 9: r0 = s.retval; - globals.infoState___4809 = (r0); + globals.infoState___22847 = (r0); { step = 4; continue; } case 3: - r0 = pxsim_Array__push(globals.infoStateStack___4811, s.nextState___4838); + r0 = pxsim_Array__push(globals.infoStateStack___22849, s.nextState___22876); case 4: case 5: case 6: @@ -1315,26 +1367,26 @@ switch (step) { return leave(s, r0) default: oops() } } } -info_inline__P4828.info = {"start":2910,"length":376,"line":105,"column":28,"endLine":116,"endColumn":5,"fileName":"pxt_modules/game/info.ts","functionName":"inline","argumentNames":[]} +info_inline__P22866.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__P4828_mk(s) { +function info_inline__P22866_mk(s) { checkStack(s.depth); return { - parent: s, fn: info_inline__P4828, depth: s.depth + 1, + parent: s, fn: info_inline__P22866, 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___4829: undefined, - nextState___4838: undefined, + scene___22867: undefined, + nextState___22876: undefined, } } -function gameOverConfig_inline__P4937(s) { +function gameOverConfig_inline__P22975(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1344,32 +1396,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._gameOverConfig___4936); + r0 = pxsim_numops_toBoolDecr(globals._gameOverConfig___22974); 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__C2973_VT); + r0 = pxsim_pxtcore_mkClassInstance(game_GameOverConfig__C21011_VT); s.tmp_2 = r0; - s.tmp_3 = game_GameOverConfig_constructor__P2988_mk(s); + s.tmp_3 = game_GameOverConfig_constructor__P21026_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___4936 = (s.tmp_2); + globals._gameOverConfig___22974 = (s.tmp_2); case 1: case 2: - r0 = globals._gameOverConfig___4936; + r0 = globals._gameOverConfig___22974; return leave(s, r0) default: oops() } } } -gameOverConfig_inline__P4937.info = {"start":3714,"length":115,"line":107,"column":34,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":[]} +gameOverConfig_inline__P22975.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__P4937_mk(s) { +function gameOverConfig_inline__P22975_mk(s) { checkStack(s.depth); return { - parent: s, fn: gameOverConfig_inline__P4937, depth: s.depth + 1, + parent: s, fn: gameOverConfig_inline__P22975, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -1381,7 +1433,7 @@ function gameOverConfig_inline__P4937_mk(s) { -function scene_setBackgroundColor__P2883(s) { +function controller_moveSprite__P20205(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1391,73 +1443,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___7023 = 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 = game_currentScene__P2999_mk(s); - s.callLocIdx = 938; s.pc = 1; return s.tmp_0; + s.tmp_0 = controller_Controller__moveSpriteInternal__P20190_mk(s); + s.tmp_1 = controller__player1__P20166_mk(s); + s.callLocIdx = 35; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.tmp_0.arg3 = s.arg2; + s.callLocIdx = 36; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.scene___7023 = (r0); - r0 = s.scene___7023.fields["background"]; - s.tmp_0 = r0; - r0 = (s.tmp_0).fields["color"] = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_setBackgroundColor__P2883.info = {"start":1231,"length":140,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundColor","argumentNames":["color"]} +controller_moveSprite__P20205.info = {"start":14763,"length":142,"line":440,"column":4,"endLine":442,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"moveSprite","argumentNames":["sprite","vx","vy"]} -function scene_setBackgroundColor__P2883_mk(s) { +function controller_moveSprite__P20205_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_setBackgroundColor__P2883, depth: s.depth + 1, + parent: s, fn: controller_moveSprite__P20205, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - scene___7023: undefined, + tmp_1: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_eventContext__P3002(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__P4952_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 944; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = globals._scene___4944.fields["eventContext"]; - return leave(s, r0) - default: oops() -} } } -game_eventContext__P3002.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__P3002_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_eventContext__P3002, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function game_init__P4952(s) { +function controller_Controller__moveSpriteInternal__P20190(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1467,212 +1493,164 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.cp___37050 = 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(globals._scene___4944); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_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); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 15; continue; } case 1: - r0 = s.arg0; case 2: - // jmp value (already in r0) + s.tmp_5 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 27; s.pc = 16; return s.tmp_5; + case 16: + 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 = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C2843_VT); - s.tmp_3 = r0; - s.tmp_4 = scene_Scene_constructor__P2866_mk(s); - s.tmp_4.arg0 = s.tmp_3; - s.tmp_5 = control_pushEventContext__P409_mk(s); - s.callLocIdx = 945; s.pc = 6; return s.tmp_5; - case 6: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.tmp_4.arg2 = globals._scene___4944; - s.callLocIdx = 946; s.pc = 5; return s.tmp_4; - case 5: + s.tmp_6 = controller_Controller__controlledSprites__P20178_mk(s); + s.tmp_6.arg0 = s.arg0; + r0 = pxsim_Array__mk(); + s.tmp_6.arg1 = r0; + s.callLocIdx = 28; s.pc = 17; return s.tmp_6; + case 17: r0 = s.retval; - globals._scene___4944 = (s.tmp_3); case 3: case 4: - s.tmp_0 = scene_Scene_init__P2867_mk(s); - s.tmp_0.arg0 = globals._scene___4944; - s.callLocIdx = 947; s.pc = 7; return s.tmp_0; - case 7: + r0 = pxsim_pxtcore_mkAction(1, cp_inline__P37053); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayFind__P18149_mk(s); + s.tmp_2 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 29; s.pc = 19; return s.tmp_2; + case 19: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_init__P4952.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} - -function game_init__P4952_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_init__P4952, 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_Scene_init__P2867(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_Scene__C2843_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 30; s.pc = 18; return s.tmp_1; + case 18: + r0 = s.retval; + s.cp___37050 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cp___37050); + 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_1 = power_poke__P1929_mk(s); - s.callLocIdx = 907; s.pc = 4; return s.tmp_1; - case 4: + if (!r0) { step = 5; continue; } + r0 = pxsim_pxtcore_mkClassInstance(controller_ControlledSprite__C20168_VT); + s.tmp_2 = r0; + s.tmp_3 = controller_ControlledSprite_constructor__P20170_mk(s); + s.tmp_3.arg0 = s.tmp_2; + s.tmp_3.arg1 = s.arg1; + s.tmp_3.arg2 = s.arg2; + s.tmp_3.arg3 = s.arg3; + s.callLocIdx = 31; s.pc = 20; return s.tmp_3; + case 20: + r0 = s.retval; + s.cp___37050 = (s.tmp_2); + s.tmp_1 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 32; s.pc = 21; return s.tmp_1; + case 21: r0 = s.retval; - 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__P7060); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P403_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 = 910; s.pc = 5; return s.tmp_1; + r0 = pxsim_Array__push(s.tmp_0, s.cp___37050); case 5: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P403_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 13; - s.tmp_0.arg2 = controller__moveSprites__P2133; - s.callLocIdx = 911; s.pc = 6; return s.tmp_0; case 6: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P7084); + r0 = s.cp___37050.fields["vx"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P403_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 = 913; s.pc = 7; return s.tmp_1; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 7; continue; } + r0 = s.tmp_0; + { step = 8; continue; } case 7: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P7097); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P403_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 = 917; s.pc = 8; return s.tmp_1; + r0 = (s.arg2 == 0); case 8: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 9; continue; } + s.tmp_2 = Sprite_vx__P20397_mk(s); + r0 = s.cp___37050.fields["s"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 0; + s.callLocIdx = 33; s.pc = 22; return s.tmp_2; + case 22: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P7118); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P403_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 = 919; s.pc = 9; return s.tmp_1; case 9: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P7126); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_EventContext_registerFrameHandler__P403_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 = 923; s.pc = 10; return s.tmp_1; case 10: - r0 = s.retval; - s.tmp_0 = control_EventContext_registerFrameHandler__P403_mk(s); - r0 = s.arg0.fields["eventContext"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 200; - s.tmp_0.arg2 = control___screen_update__P1993; - s.callLocIdx = 924; s.pc = 11; return s.tmp_0; + r0 = s.cp___37050.fields["vy"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 11; continue; } + r0 = s.tmp_0; + { step = 12; continue; } case 11: - r0 = s.retval; - s.tmp_0 = multiplayer_initServer__P3388_mk(s); - s.callLocIdx = 925; s.pc = 12; return s.tmp_0; + r0 = (s.arg3 == 0); case 12: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 13; continue; } + s.tmp_2 = Sprite_vy__P20399_mk(s); + r0 = s.cp___37050.fields["s"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 0; + s.callLocIdx = 34; s.pc = 23; return s.tmp_2; + case 23: r0 = s.retval; - s.tmp_0 = multiplayer_initPlayerConnectionListeners__P3389_mk(s); - s.callLocIdx = 926; s.pc = 13; return s.tmp_0; case 13: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P7157); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_1.arg0 = globals.scene_Scene_initializers___2865; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 928; s.pc = 14; return s.tmp_1; case 14: - r0 = s.retval; - case 3: + r0 = (s.cp___37050).fields["vx"] = (s.arg2); + r0 = (s.cp___37050).fields["vy"] = (s.arg3); + case 15: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init__P2867.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} +controller_Controller__moveSpriteInternal__P20190.info = {"start":6039,"length":617,"line":202,"column":8,"endLine":218,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSpriteInternal","argumentNames":["this","sprite","vx","vy"]} -function scene_Scene_init__P2867_mk(s) { +function controller_Controller__moveSpriteInternal__P20190_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init__P2867, depth: s.depth + 1, + parent: s, fn: controller_Controller__moveSpriteInternal__P20190, 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, + cp___37050: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_Scene_init_inline__P7060(s) { +function cp_inline__P37053(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1682,47 +1660,36 @@ 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.tmp_1 = r0; - r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); - s.tmp_0 = controller___update__P2165_mk(s); - r0 = s.caps[0].fields["eventContext"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["s"]; + r0 = r0.fields["id"]; + s.tmp_0 = r0; + r0 = s.caps[0].fields["id"]; 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 = 909; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = (s.tmp_0 == s.tmp_1); return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P7060.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +cp_inline__P37053.info = {"start":6268,"length":26,"line":205,"column":50,"endLine":205,"endColumn":76,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["cp"]} -function scene_Scene_init_inline__P7060_mk(s) { +function cp_inline__P37053_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7060, depth: s.depth + 1, + parent: s, fn: cp_inline__P37053, 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_Scene_init_inline__P7084(s) { +function Sprite_vy__P20399(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1732,41 +1699,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = PhysicsEngine__C2511_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"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = (s.tmp_2 / 1000); - s.tmp_0.arg1 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C2511_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: - r0 = s.retval; + r0 = (s.tmp_2 | 0); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P7084.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_vy__P20399.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_Scene_init_inline__P7084_mk(s) { +function Sprite_vy__P20399_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7084, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P20399, 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_Scene_init_inline__P7097(s) { +function Sprite_vy__P20398(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1776,80 +1744,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dt___7098 = undefined; - s.s___7106 = undefined; - s.unnamed86___U2 = undefined; - s.unnamed87___U3 = undefined; - r0 = s.caps[0].fields["eventContext"]; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["deltaTimeMillis"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 / 1000); - s.dt___7098 = (r0); - s.tmp_0 = scene_Camera_update__P2798_mk(s); - r0 = s.caps[0].fields["camera"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 915; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.s___7106 = (undefined); - r0 = s.caps[0].fields["allSprites"]; - s.unnamed86___U2 = (r0); - s.unnamed87___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed87___U3; - r0 = pxsim_Array__length(s.unnamed86___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed86___U2, s.unnamed87___U3); - s.s___7106 = (r0); - s.tmp_2 = if___update_3_mk(s); - s.tmp_2.arg0 = s.s___7106; - r0 = s.caps[0].fields["camera"]; - s.tmp_2.arg1 = r0; - s.tmp_2.arg2 = s.dt___7098; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); - s.callLocIdx = 916; 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 = 916; s.pc = 4; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 916; s.pc = 4; return s.tmp_2;; } - else { s.callLocIdx = 916; s.pc = 4; return s.tmp_2; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; } - case 4: - r0 = s.retval; - r0 = (s.unnamed87___U3 + 1); - s.unnamed87___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed86___U2 = (undefined); - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_Scene_init_inline__P7097.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_vy__P20398.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__P20398.isGetter = true; -function scene_Scene_init_inline__P7097_mk(s) { +function Sprite_vy__P20398_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7097, depth: s.depth + 1, + parent: s, fn: Sprite_vy__P20398, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - dt___7098: undefined, - s___7106: undefined, - unnamed86___U2: undefined, - unnamed87___U3: undefined, + arg0: undefined, } } -function scene_Scene_init_inline__P7118(s) { +function Fx_toFloat__P18211(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1859,30 +1782,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_Scene_render__P2872_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 918; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 / 256); return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P7118.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Fx_toFloat__P18211.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} -function scene_Scene_init_inline__P7118_mk(s) { +function Fx_toFloat__P18211_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7118, depth: s.depth + 1, + parent: s, fn: Fx_toFloat__P18211, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, } } -function scene_Scene_init_inline__P7126(s) { +function Sprite_vx__P20397(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -1892,108 +1814,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = r0 = globals.stats___2968; - 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___398; - case 2: - // jmp value (already in r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_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 = 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___398; - if ((globals.control_EventContext_lastStats___397) && (globals.control_EventContext_lastStats___397).vtable) { - setupResume(s, 8); - pxsim_String__stringConv(globals.control_EventContext_lastStats___397); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___397) + ""; } - case 8: - r0 = s.retval; - 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 = 920; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_numops_toBoolDecr(globals.debug___2967); - if (!r0) { step = 5; continue; } - s.tmp_0 = PhysicsEngine__C2511_v3_1_mk(s); - r0 = s.caps[0].fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C2511_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: - case 6: - s.tmp_0 = game_consoleOverlay_draw__P3127_mk(s); - s.callLocIdx = 921; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = power_checkDeepSleep__P1930_mk(s); - s.callLocIdx = 922; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Scene_init_inline__P7126.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} +Sprite_vx__P20397.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_Scene_init_inline__P7126_mk(s) { +function Sprite_vx__P20397_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7126, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P20397, 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_Scene_init_inline__P7157(s) { +function Sprite_vx__P20396(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2007,23 +1863,21 @@ switch (step) { 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 = 927; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_vx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_Scene_init_inline__P7157.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} +Sprite_vx__P20396.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__P20396.isGetter = true; -function scene_Scene_init_inline__P7157_mk(s) { +function Sprite_vx__P20396_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_init_inline__P7157, depth: s.depth + 1, + parent: s, fn: Sprite_vx__P20396, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -2033,7 +1887,7 @@ function scene_Scene_init_inline__P7157_mk(s) { -function multiplayer_initPlayerConnectionListeners__P3389(s) { +function controller_Controller__controlledSprites__P20178(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2043,43 +1897,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___7177 = undefined; - s.p___7177 = (1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 160; s.pc = 1; return s.tmp_1; case 1: - r0 = (s.p___7177 <= 4); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P5400_mk(s); - s.tmp_1.arg0 = s.p___7177; - s.callLocIdx = 1279; s.pc = 3; return s.tmp_1; - case 3: r0 = s.retval; - r0 = (s.p___7177 + 1); - s.p___7177 = (r0); - { step = 1; continue; } - case 2: + 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() } } } -multiplayer_initPlayerConnectionListeners__P3389.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} +controller_Controller__controlledSprites__P20178.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 multiplayer_initPlayerConnectionListeners__P3389_mk(s) { +function controller_Controller__controlledSprites__P20178_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initPlayerConnectionListeners__P3389, depth: s.depth + 1, + parent: s, fn: controller_Controller__controlledSprites__P20178, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - p___7177: undefined, + tmp_2: undefined, + arg0: undefined, + arg1: undefined, } } -function multiplayer_registerPlayerConnectionListeners__P5400(s) { +function controller_Controller__controlledSprites__P20177(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2093,41 +1949,31 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P7189); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_onEvent__P391_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 = 1281; s.pc = 1; return s.tmp_1; + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 159; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P7195); + r0 = r0.fields["controlledSprites"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = control_onEvent__P391_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 = 1283; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - r0 = undefined; - return leave(s, 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() } } } -multiplayer_registerPlayerConnectionListeners__P5400.info = {"start":1484,"length":415,"line":45,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"registerPlayerConnectionListeners","argumentNames":["playerNumber"]} +controller_Controller__controlledSprites__P20177.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__P20177.isGetter = true; -function multiplayer_registerPlayerConnectionListeners__P5400_mk(s) { +function controller_Controller__controlledSprites__P20177_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners__P5400, depth: s.depth + 1, + parent: s, fn: controller_Controller__controlledSprites__P20177, 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, } } @@ -2135,7 +1981,7 @@ function multiplayer_registerPlayerConnectionListeners__P5400_mk(s) { -function multiplayer_registerPlayerConnectionListeners_inline__P7189(s) { +function controller_ControlledSprite_constructor__P20170(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2145,31 +1991,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P5401_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 1280; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + 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, controller_ControlledSprite__C20168_VT)) failedCast(r0); + r0 = (s.arg0).fields["s"] = (s.arg1); + r0 = (s.arg0).fields["vx"] = (s.arg2); + r0 = (s.arg0).fields["vy"] = (s.arg3); r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_registerPlayerConnectionListeners_inline__P7189.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +controller_ControlledSprite_constructor__P20170.info = {"start":1876,"length":117,"line":60,"column":8,"endLine":64,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["this","s","vx","vy"]} -function multiplayer_registerPlayerConnectionListeners_inline__P7189_mk(s) { +function controller_ControlledSprite_constructor__P20170_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P7189, depth: s.depth + 1, + parent: s, fn: controller_ControlledSprite_constructor__P20170, 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 multiplayer_registerPlayerConnectionListeners_inline__P7195(s) { +function helpers_arrayFind__P18149(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2179,154 +2034,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P5401_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 1282; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -multiplayer_registerPlayerConnectionListeners_inline__P7195.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} - -function multiplayer_registerPlayerConnectionListeners_inline__P7195_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P7195, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function multiplayer_receiveConnectionChangedEvent__P5401(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.c___7200 = undefined; + s.len___37100 = undefined; + s.i___37103 = undefined; + s.v___37108 = 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; } + r0 = pxsim_Array__length(s.arg0); + s.len___37100 = (r0); + s.i___37103 = (0); case 1: - s.c___7200 = (globals.player1___2123); - { step = 5; continue; } - case 2: - s.c___7200 = (globals.player2___2120); - { step = 5; continue; } - case 3: - s.c___7200 = (globals.player3___2121); - { step = 5; continue; } - case 4: - s.c___7200 = (globals.player4___2122); - case 5: - r0 = pxsim_numops_toBoolDecr(s.c___7200); - if (!r0) { step = 6; continue; } - s.tmp_0 = controller_Controller_connected__P2156_mk(s); - s.tmp_0.arg0 = s.c___7200; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1284; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 6: - case 7: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -multiplayer_receiveConnectionChangedEvent__P5401.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 multiplayer_receiveConnectionChangedEvent__P5401_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: multiplayer_receiveConnectionChangedEvent__P5401, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - c___7200: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function controller_Controller_connected__P2156(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__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - s.tmp_1 = r0; - r0 = (s.arg1 != s.tmp_1); + r0 = (s.i___37103 < s.len___37100); 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"]; + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___37103); + s.v___37108 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___37108; + s.tmp_1.arg1 = s.i___37103; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 0; 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; } - r0 = 1; - { step = 2; continue; } - case 1: - r0 = 2; + if (!r0) { step = 2; continue; } + r0 = s.v___37108; + { step = 5; continue; } 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: + r0 = (s.i___37103 + 1); + s.i___37103 = (r0); + { step = 1; continue; } case 4: r0 = undefined; + case 5: return leave(s, r0) default: oops() } } } -controller_Controller_connected__P2156.info = {"start":7796,"length":261,"line":254,"column":8,"endLine":259,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"connected","argumentNames":["this","value"]} +helpers_arrayFind__P18149.info = {"start":8018,"length":292,"line":271,"column":4,"endLine":278,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayFind","argumentNames":["arr","callbackfn"]} -function controller_Controller_connected__P2156_mk(s) { +function helpers_arrayFind__P18149_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_connected__P2156, depth: s.depth + 1, + parent: s, fn: helpers_arrayFind__P18149, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, + len___37100: undefined, + i___37103: undefined, + v___37108: undefined, arg0: undefined, arg1: undefined, } } @@ -2335,7 +2096,7 @@ function controller_Controller_connected__P2156_mk(s) { -function controller__player1__P2128(s) { +function controller__player1__P20166(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2345,7 +2106,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals._players___4660); + r0 = pxsim_numops_toBoolDecr(globals._players___22698); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -2354,7 +2115,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = pxsim_Array__getAt(globals._players___4660, 0); + r0 = pxsim_Array__getAt(globals._players___22698, 0); s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; @@ -2364,18 +2125,18 @@ switch (step) { s.tmp_4 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C2134_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_Controller__C20172_VT); s.tmp_5 = r0; r0 = pxsim_Array__mk(); s.tmp_6 = r0; - r0 = pxsim_Array__push(s.tmp_6, globals.left___2115); - r0 = pxsim_Array__push(s.tmp_6, globals.up___2116); - r0 = pxsim_Array__push(s.tmp_6, globals.right___2117); - r0 = pxsim_Array__push(s.tmp_6, globals.down___2118); - r0 = pxsim_Array__push(s.tmp_6, globals.A___2113); - r0 = pxsim_Array__push(s.tmp_6, globals.B___2114); - r0 = pxsim_Array__push(s.tmp_6, globals.menu___2119); - s.tmp_7 = controller_Controller_constructor__P2138_mk(s); + r0 = pxsim_Array__push(s.tmp_6, globals.left___20153); + r0 = pxsim_Array__push(s.tmp_6, globals.up___20154); + r0 = pxsim_Array__push(s.tmp_6, globals.right___20155); + r0 = pxsim_Array__push(s.tmp_6, globals.down___20156); + r0 = pxsim_Array__push(s.tmp_6, globals.A___20151); + r0 = pxsim_Array__push(s.tmp_6, globals.B___20152); + r0 = pxsim_Array__push(s.tmp_6, globals.menu___20157); + s.tmp_7 = controller_Controller_constructor__P20176_mk(s); s.tmp_7.arg0 = s.tmp_5; s.tmp_7.arg1 = 1; s.tmp_7.arg2 = s.tmp_6; @@ -2384,16 +2145,16 @@ switch (step) { r0 = s.retval; case 3: case 4: - r0 = pxsim_Array__getAt(globals._players___4660, 0); + r0 = pxsim_Array__getAt(globals._players___22698, 0); return leave(s, r0) default: oops() } } } -controller__player1__P2128.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} +controller__player1__P20166.info = {"start":1381,"length":258,"line":47,"column":4,"endLine":51,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_player1","argumentNames":[]} -function controller__player1__P2128_mk(s) { +function controller__player1__P20166_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__player1__P2128, depth: s.depth + 1, + parent: s, fn: controller__player1__P20166, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2409,7 +2170,7 @@ function controller__player1__P2128_mk(s) { -function controller_Controller_constructor__P2138(s) { +function controller_Controller_constructor__P20176(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2419,9 +2180,9 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.leftId___7256 = undefined; - s.i___7264 = undefined; - s.i___7282 = undefined; + s.leftId___25294 = undefined; + s.i___25302 = undefined; + s.i___25320 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -2429,7 +2190,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; r0 = pxsim.control.allocateNotifyEvent(); s.tmp_1 = r0; @@ -2453,18 +2214,18 @@ switch (step) { r0 = (s.tmp_1 * 7); s.tmp_0 = r0; r0 = (1 + s.tmp_0); - s.leftId___7256 = (r0); - s.i___7264 = (0); + s.leftId___25294 = (r0); + s.i___25302 = (0); case 2: - r0 = (s.i___7264 < 7); + r0 = (s.i___25302 < 7); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C2189_VT); + r0 = pxsim_pxtcore_mkClassInstance(controller_Button__C20227_VT); s.tmp_1 = r0; - s.tmp_2 = controller_Button_constructor__P2195_mk(s); + s.tmp_2 = controller_Button_constructor__P20233_mk(s); s.tmp_2.arg0 = s.tmp_1; - r0 = (s.leftId___7256 + s.i___7264); + r0 = (s.leftId___25294 + s.i___25302); s.tmp_2.arg1 = r0; s.tmp_2.arg2 = -1; s.callLocIdx = 157; s.pc = 7; return s.tmp_2; @@ -2473,14 +2234,14 @@ switch (step) { r0 = s.arg0.fields["buttons"]; s.tmp_3 = r0; r0 = pxsim_Array__push(s.tmp_3, s.tmp_1); - r0 = (s.i___7264 + 1); - s.i___7264 = (r0); + r0 = (s.i___25302 + 1); + s.i___25302 = (r0); { step = 2; continue; } case 3: case 4: - s.i___7282 = (0); + s.i___25320 = (0); case 5: - s.tmp_1 = r0 = s.i___7282; + s.tmp_1 = r0 = s.i___25320; r0 = s.arg0.fields["buttons"]; s.tmp_3 = r0; r0 = pxsim_Array__length(s.tmp_3); @@ -2491,14 +2252,14 @@ switch (step) { if (!r0) { step = 6; continue; } r0 = s.arg0.fields["buttons"]; s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___7282); + r0 = pxsim_Array__getAt(s.tmp_5, s.i___25320); s.tmp_4 = r0; r0 = (s.tmp_4).fields["_owner"] = (s.arg0); - r0 = (s.i___7282 + 1); - s.i___7282 = (r0); + r0 = (s.i___25320 + 1); + s.i___25320 = (r0); { step = 5; continue; } case 6: - s.tmp_0 = controller_addController__P4724_mk(s); + s.tmp_0 = controller_addController__P22762_mk(s); s.tmp_0.arg0 = s.arg0; s.callLocIdx = 158; s.pc = 8; return s.tmp_0; case 8: @@ -2507,12 +2268,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_Controller_constructor__P2138.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"]} +controller_Controller_constructor__P20176.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 controller_Controller_constructor__P2138_mk(s) { +function controller_Controller_constructor__P20176_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_constructor__P2138, depth: s.depth + 1, + parent: s, fn: controller_Controller_constructor__P20176, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2520,9 +2281,9 @@ function controller_Controller_constructor__P2138_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - leftId___7256: undefined, - i___7264: undefined, - i___7282: undefined, + leftId___25294: undefined, + i___25302: undefined, + i___25320: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -2532,7 +2293,7 @@ function controller_Controller_constructor__P2138_mk(s) { -function controller_addController__P4724(s) { +function controller_addController__P22762(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2546,17 +2307,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals._players___4660); + r0 = pxsim_numops_toBoolDecr(globals._players___22698); 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._players___4660 = (r0); + globals._players___22698 = (r0); case 1: case 2: - s.tmp_0 = r0 = globals._players___4660; + s.tmp_0 = r0 = globals._players___22698; r0 = s.arg0.fields["playerIndex"]; s.tmp_2 = r0; r0 = (s.tmp_2 - 1); @@ -2566,12 +2327,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_addController__P4724.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} +controller_addController__P22762.info = {"start":1218,"length":157,"line":40,"column":4,"endLine":45,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"addController","argumentNames":["ctrl"]} -function controller_addController__P4724_mk(s) { +function controller_addController__P22762_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_addController__P4724, depth: s.depth + 1, + parent: s, fn: controller_addController__P22762, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -2583,7 +2344,7 @@ function controller_addController__P4724_mk(s) { -function control_onEvent__P391(s) { +function sprites_create__P20313(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2593,63 +2354,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___7355 = undefined; + s.scene___29583 = undefined; + s.sprite___29586 = 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__P408_mk(s); - s.callLocIdx = 39; s.pc = 3; return s.tmp_0; - case 3: + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 296; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.ctx___7355 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___7355); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.scene___29583 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(Sprite__C20379_VT); 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__P405_mk(s); - s.tmp_0.arg0 = s.ctx___7355; - 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 = 40; s.pc = 4; return s.tmp_0; + s.tmp_1 = Sprite_constructor__P20426_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 297; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.sprite___29586 = (s.tmp_0); + s.tmp_0 = Sprite_setKind__P20446_mk(s); + s.tmp_0.arg0 = s.sprite___29586; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 298; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = PhysicsEngine__C20549_v0_2_mk(s); + r0 = s.scene___29583.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.sprite___29586; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C20549_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; - case 2: - r0 = undefined; + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P29601); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P29607); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___29586); + s.tmp_2 = helpers_arrayForEach__P18147_mk(s); + s.tmp_3 = helpers_arrayFilter__P18148_mk(s); + r0 = s.scene___29583.fields["createdHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 299; 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 = 301; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + r0 = s.sprite___29586; return leave(s, r0) default: oops() } } } -control_onEvent__P391.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"]} +sprites_create__P20313.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 control_onEvent__P391_mk(s) { +function sprites_create__P20313_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_onEvent__P391, depth: s.depth + 1, + parent: s, fn: sprites_create__P20313, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - ctx___7355: undefined, + tmp_2: undefined, + tmp_3: undefined, + scene___29583: undefined, + sprite___29586: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function control_eventContext__P408(s) { +function forEach_inline__P29601(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2659,42 +2444,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___4444); - if (!r0) { step = 1; continue; } - s.tmp_0 = r0 = globals.eventContexts___4444; - r0 = pxsim_Array__length(globals.eventContexts___4444); - 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; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0.fields["kind"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 == s.caps[0]); return leave(s, r0) default: oops() } } } -control_eventContext__P408.info = {"start":7094,"length":136,"line":213,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} +forEach_inline__P29601.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function control_eventContext__P408_mk(s) { +function forEach_inline__P29601_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_eventContext__P408, depth: s.depth + 1, + parent: s, fn: forEach_inline__P29601, 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__P405(s) { +function sprites_create_inline__P29607(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2704,113 +2479,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___7378 = undefined; - s.unnamed60___U1 = undefined; - s.unnamed61___U2 = undefined; - s.hn___7401 = 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__C395_VT)) failedCast(r0); - s.h___7378 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed60___U1 = (r0); - s.unnamed61___U2 = (0); + 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 = 300; 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 = 300; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 300; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 300; s.pc = 1; return s.tmp_0; } + } case 1: - s.tmp_0 = r0 = s.unnamed61___U2; - r0 = pxsim_Array__length(s.unnamed60___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed60___U1, s.unnamed61___U2); - s.h___7378 = (r0); - r0 = s.h___7378.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___7378.fields["value"]; - 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___7378).fields["flags"] = (s.arg4); - r0 = (s.h___7378).fields["handler"] = (s.arg3); - { step = 7; continue; } - case 4: - case 5: - r0 = (s.unnamed61___U2 + 1); - s.unnamed61___U2 = (r0); - { step = 1; continue; } - case 6: - s.unnamed60___U1 = (undefined); - r0 = pxsim_pxtcore_mkClassInstance(control_EventHandler__C4436_VT); - s.tmp_0 = r0; - s.tmp_1 = control_EventHandler_constructor__P4439_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 = 51; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - s.hn___7401 = (s.tmp_0); - r0 = s.arg0.fields["handlers"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.hn___7401); - s.tmp_0 = control_EventHandler_register__P4437_mk(s); - s.tmp_0.arg0 = s.hn___7401; - s.callLocIdx = 52; s.pc = 9; return s.tmp_0; - case 9: r0 = s.retval; - case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerHandler__P405.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"]} +sprites_create_inline__P29607.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} -function control_EventContext_registerHandler__P405_mk(s) { +function sprites_create_inline__P29607_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerHandler__P405, depth: s.depth + 1, + parent: s, fn: sprites_create_inline__P29607, 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___7378: undefined, - unnamed60___U1: undefined, - unnamed61___U2: undefined, - hn___7401: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function control_EventHandler_constructor__P4439(s) { +function PhysicsEngine_addSprite__P20551(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2823,40 +2529,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, control_EventHandler__C4436_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); + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventHandler_constructor__P4439.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"]} +PhysicsEngine_addSprite__P20551.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 control_EventHandler_constructor__P4439_mk(s) { +function PhysicsEngine_addSprite__P20551_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_constructor__P4439, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_addSprite__P20551, 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 control_EventHandler_register__P4437(s) { +function Sprite_setKind__P20446(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2866,45 +2562,153 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.spritesByKind___29625 = undefined; + s.overlapMap___29654 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventHandler__C4436_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkAction(1, control_EventHandler_register_inline__P7422); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = (s.arg1 == undefined); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = s.arg0.fields["src"]; + 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.arg0.fields["value"]; + r0 = (s.tmp_1 === s.arg1); + case 2: + // jmp value (already in r0) s.tmp_2 = r0; - r0 = s.arg0.fields["flags"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 3; continue; } + { step = 15; continue; } + case 3: + case 4: + s.tmp_3 = game_currentScene__P21037_mk(s); + s.callLocIdx = 366; s.pc = 16; return s.tmp_3; + case 16: + r0 = s.retval; + r0 = r0.fields["spritesByKind"]; + s.spritesByKind___29625 = (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___29625, s.tmp_2); + case 6: + // jmp value (already in r0) s.tmp_3 = r0; - r0 = pxsim.control.internalOnEvent(s.tmp_1, s.tmp_2, s.tmp_0, s.tmp_3); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = sprites_SpriteSet_remove__P20508_mk(s); + r0 = s.arg0.fields["_kind"]; + s.tmp_5 = r0; + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___29625, s.tmp_5); + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.arg0; + s.callLocIdx = 367; 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___29625, 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__C20501_VT); + s.tmp_4 = r0; + s.tmp_5 = sprites_SpriteSet_constructor__P20503_mk(s); + s.tmp_5.arg0 = s.tmp_4; + s.callLocIdx = 368; s.pc = 18; return s.tmp_5; + case 18: + r0 = s.retval; + r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___29625, s.arg1, s.tmp_4); + case 9: + case 10: + s.tmp_0 = sprites_SpriteSet_add__P20506_mk(s); + r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___29625, s.arg1); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 369; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + case 11: + case 12: + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 370; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + r0 = r0.fields["overlapMap"]; + s.overlapMap___29654 = (r0); + r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___29654, 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___29654; + 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___29654, 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() } } } -control_EventHandler_register__P4437.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} +Sprite_setKind__P20446.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 control_EventHandler_register__P4437_mk(s) { +function Sprite_setKind__P20446_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_register__P4437, depth: s.depth + 1, + parent: s, fn: Sprite_setKind__P20446, 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___29625: undefined, + overlapMap___29654: undefined, arg0: undefined, + arg1: undefined, } } -function control_EventHandler_register_inline__P7422(s) { +function sprites_SpriteSet_remove__P20508(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2914,45 +2718,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["handler"]; + s.i___28768 = 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__C20501_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); + s.i___28768 = (r0); + r0 = (s.i___28768 > -1); 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 = 41; 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 = 41; s.pc = 3; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 41; s.pc = 3; return s.tmp_1;; } - else { s.callLocIdx = 41; s.pc = 3; return s.tmp_1; } - } - case 3: + s.tmp_1 = helpers_arraySplice__P18138_mk(s); + r0 = s.arg0.fields["_sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___28768; + s.tmp_1.arg2 = 1; + s.callLocIdx = 516; s.pc = 4; return s.tmp_1; + case 4: r0 = s.retval; + r0 = true; + { step = 3; continue; } case 1: case 2: - r0 = undefined; + r0 = false; + case 3: return leave(s, r0) default: oops() } } } -control_EventHandler_register_inline__P7422.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +sprites_SpriteSet_remove__P20508.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 control_EventHandler_register_inline__P7422_mk(s) { +function sprites_SpriteSet_remove__P20508_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_register_inline__P7422, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_remove__P20508, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + i___28768: undefined, + arg0: undefined, + arg1: undefined, } } -function multiplayer_initServer__P3388(s) { +function helpers_arraySplice__P18138(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -2962,47 +2779,55 @@ 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.i___27497 = 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_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_2 = control_EventContext_registerFrameHandler__P403_mk(s); - s.tmp_3 = game_eventContext__P3002_mk(s); - s.callLocIdx = 1277; 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__P7441; - s.callLocIdx = 1278; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; + { step = 5; continue; } case 1: case 2: + s.i___27497 = (0); + case 3: + r0 = (s.i___27497 < 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___27497 + 1); + s.i___27497 = (r0); + { step = 3; continue; } + case 4: + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -multiplayer_initServer__P3388.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} +helpers_arraySplice__P18138.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 multiplayer_initServer__P3388_mk(s) { +function helpers_arraySplice__P18138_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer__P3388, depth: s.depth + 1, + parent: s, fn: helpers_arraySplice__P18138, 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, + i___27497: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function multiplayer_initServer_inline__P7441(s) { +function sprites_SpriteSet_add__P20506(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3012,35 +2837,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim.multiplayer.getOrigin(); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C20501_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_1 === "server"); + 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.multiplayer.postImage(globals.screen___2032); + r0 = false; + { step = 5; continue; } case 1: case 2: - 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() } } } -multiplayer_initServer_inline__P7441.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} +sprites_SpriteSet_add__P20506.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 multiplayer_initServer_inline__P7441_mk(s) { +function sprites_SpriteSet_add__P20506_mk(s) { checkStack(s.depth); return { - parent: s, fn: multiplayer_initServer_inline__P7441, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_add__P20506, 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 game_consoleOverlay_draw__P3127(s) { +function sprites_SpriteSet_contains__P20509(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3050,216 +2905,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.height___7494 = undefined; - s.top___7499 = undefined; - s.i___7505 = undefined; - s.t___7518 = undefined; - s.tOff___7525 = undefined; - s.tab___7527 = undefined; - s.unnamed90___U6 = undefined; - s.unnamed91___U7 = undefined; - s.padding___7529 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); - 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 = pxsim_numops_toBoolDecr(globals.instance___5197); - 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_5 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_5); - if (!r0) { step = 3; continue; } - { step = 13; continue; } - case 3: - case 4: - s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = globals.consoleFont___5251; - 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 = 1131; s.pc = 14; return s.tmp_7; } + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; } - case 14: - r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_6 + 2); - s.height___7494 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___2968); - if (!r0) { step = 5; continue; } - r0 = s.height___7494; - { step = 6; continue; } - case 5: - r0 = 0; - case 6: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (2 + s.tmp_0); - s.top___7499 = (r0); - s.i___7505 = (0); - case 7: - s.tmp_1 = r0 = s.i___7505; - r0 = pxsim_Array__length(globals.consoleStrings___5243); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C20501_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; + s.tmp_1 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 12; continue; } - r0 = pxsim_Array__getAt(globals.consoleStrings___5243, s.i___7505); - 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__P122_mk(s); - r0 = pxsim_Array__getAt(globals.consoleStrings___5243, s.i___7505); - s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = "\t"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1132; s.pc = 15; return s.tmp_6; - case 15: - r0 = s.retval; - s.t___7518 = (r0); - s.tOff___7525 = (0); - s.tab___7527 = (undefined); - s.unnamed90___U6 = (s.t___7518); - s.unnamed91___U7 = (0); - case 8: - s.tmp_0 = r0 = s.unnamed91___U7; - r0 = pxsim_Array__length(s.unnamed90___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 9; continue; } - r0 = pxsim_Array__getAt(s.unnamed90___U6, s.unnamed91___U7); - s.tab___7527 = (r0); - s.tmp_2 = r0 = globals.tabSize___5245; - s.tmp_5 = r0 = s.tOff___7525; - r0 = pxsim_String_.length(s.tab___7527); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_4 = r0; - r0 = (s.tmp_4 % globals.tabSize___5245); - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.padding___7529 = (r0); - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - s.tmp_0.arg1 = s.tab___7527; - s.tmp_2 = r0 = s.tOff___7525; - s.tmp_4 = if_charWidth_1_mk(s); - s.tmp_4.arg0 = globals.consoleFont___5251; - 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 = 1133; 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___7499; - r0 = (s.i___7505 * s.height___7494); - s.tmp_6 = r0; - r0 = (s.tmp_5 + s.tmp_6); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___5242; - s.tmp_0.arg5 = globals.consoleFont___5251; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1134; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.tmp_0 = r0 = s.tOff___7525; - r0 = pxsim_String_.length(s.tab___7527); - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.padding___7529); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.tOff___7525 = (r0); - r0 = (s.unnamed91___U7 + 1); - s.unnamed91___U7 = (r0); - { step = 8; continue; } - case 9: - s.unnamed90___U6 = (undefined); - { step = 11; continue; } - case 10: - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - r0 = pxsim_Array__getAt(globals.consoleStrings___5243, s.i___7505); - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = 4; - s.tmp_1 = r0 = s.top___7499; - r0 = (s.i___7505 * s.height___7494); - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = globals.consoleColor___5242; - s.tmp_0.arg5 = globals.consoleFont___5251; - s.tmp_0.arg6 = undefined; - s.callLocIdx = 1135; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - case 11: - r0 = (s.i___7505 + 1); - s.i___7505 = (r0); - { step = 7; continue; } - case 12: - case 13: - r0 = undefined; + r0 = (s.tmp_0 > -1); return leave(s, r0) default: oops() } } } -game_consoleOverlay_draw__P3127.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} +sprites_SpriteSet_contains__P20509.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_draw__P3127_mk(s) { +function sprites_SpriteSet_contains__P20509_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_draw__P3127, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_contains__P20509, 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, - height___7494: undefined, - top___7499: undefined, - i___7505: undefined, - t___7518: undefined, - tOff___7525: undefined, - tab___7527: undefined, - unnamed90___U6: undefined, - unnamed91___U7: undefined, - padding___7529: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_isVisible__P3108(s) { +function sprites_SpriteSet_constructor__P20503(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3269,33 +2947,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___5197); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteSet__C20501_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = (s.tmp_0).fields["_sprites"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_isVisible__P3108.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} +sprites_SpriteSet_constructor__P20503.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} -function scene_systemMenu_isVisible__P3108_mk(s) { +function sprites_SpriteSet_constructor__P20503_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_isVisible__P3108, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_constructor__P20503, 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__P1990(s) { +function Sprite_constructor__P20426(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3305,460 +2987,124 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x0___7601 = undefined; - s.cp___7603 = undefined; - s.mult___7604 = undefined; - s.dataW___7609 = undefined; - s.dataH___7615 = undefined; - s.byteHeight___7621 = undefined; - s.charSize___7627 = undefined; - s.dataSize___7631 = undefined; - s.fontdata___7635 = undefined; - s.lastchar___7638 = undefined; - s.imgBuf___7645 = undefined; - s.xOffset___7669 = undefined; - s.yOffset___7670 = undefined; - s.ch___7685 = undefined; - s.l___7704 = undefined; - s.r___7705 = undefined; - s.off___7707 = undefined; - s.guess___7708 = undefined; - s.m___7727 = undefined; - s.v___7736 = undefined; - s.i___7792 = undefined; - s.j___7797 = undefined; - s.mask___7798 = undefined; - s.c___7799 = undefined; - s.n___7816 = 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__P1977_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 97; s.pc = 39; return s.tmp_2; - case 39: - r0 = s.retval; - s.arg5 = (r0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P20134_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 328; s.pc = 1; return s.tmp_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___7601 = (s.arg2); - s.cp___7603 = (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 = 98; s.pc = 40; return s.tmp_1; } - } - case 40: - r0 = s.retval; - 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 = 99; 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___7604 = (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 = 100; 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___7604); - s.dataW___7609 = (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 = 101; 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___7604); - s.dataH___7615 = (r0); - r0 = (s.dataH___7615 + 7); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 3); - s.byteHeight___7621 = (r0); - r0 = (s.byteHeight___7621 * s.dataW___7609); - s.charSize___7627 = (r0); - r0 = (2 + s.charSize___7627); - s.dataSize___7631 = (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 = 102; s.pc = 44; return s.tmp_0; } - } - case 44: - r0 = s.retval; - s.fontdata___7635 = (r0); - r0 = pxsim.BufferMethods.length(s.fontdata___7635); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___7631); - s.tmp_0 = r0; - r0 = (s.tmp_0 - 1); - s.lastchar___7638 = (r0); - r0 = (s.mult___7604 == 1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = (8 + s.charSize___7627); - s.tmp_1 = r0; - r0 = pxsim.control.createBuffer(s.tmp_1); - s.imgBuf___7645 = (r0); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___7645, 0, 135); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___7645, 1, 1); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___7645, 2, s.dataW___7609); - r0 = pxsim.BufferMethods.setByte(s.imgBuf___7645, 4, s.dataH___7615); - case 7: - case 8: - case 9: - s.tmp_1 = r0 = s.cp___7603; - 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___7669 = (0); - s.yOffset___7670 = (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___7603; - 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___7603); - 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 = 103; s.pc = 45; return s.tmp_4; } - } - case 45: - r0 = s.retval; - s.xOffset___7669 = (r0); - s.tmp_0 = if_yOffset_1_mk(s); - r0 = pxsim_Array__getAt(s.arg6, s.cp___7603); - 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 = 104; s.pc = 46; return s.tmp_0; } - } - case 46: - r0 = s.retval; - s.yOffset___7670 = (r0); - case 12: - case 13: - s.tmp_0 = r0 = s.cp___7603; - r0 = (s.tmp_0 + 1); - s.cp___7603 = (r0); - r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); - s.ch___7685 = (r0); - r0 = (s.ch___7685 == 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 = 105; s.pc = 47; return s.tmp_4; } - } - case 47: r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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 + 2); + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); - s.arg3 = (r0); - s.arg2 = (s.x0___7601); - case 14: - case 15: - r0 = (s.ch___7685 < 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___7704 = (0); - s.r___7705 = (s.lastchar___7638); - s.off___7707 = (0); - r0 = (s.ch___7685 - 32); - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.dataSize___7631); - s.guess___7708 = (r0); - r0 = pxsim.BufferMethods.getNumber(s.fontdata___7635, 4, s.guess___7708); + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); s.tmp_1 = r0; - r0 = (s.tmp_1 == s.ch___7685); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 18; continue; } - s.off___7707 = (s.guess___7708); - { step = 25; continue; } - case 18: - case 19: - r0 = (s.l___7704 <= s.r___7705); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 24; continue; } - s.tmp_1 = r0 = s.l___7704; - r0 = (s.r___7705 - s.l___7704); + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + 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_1 + s.tmp_2); - s.m___7727 = (r0); - s.tmp_0 = r0 = s.fontdata___7635; - r0 = (s.m___7727 * s.dataSize___7631); + r0 = (s.tmp_2 * 256); + s.tmp_6 = r0; + r0 = (s.tmp_6 | 0); s.tmp_1 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); - s.v___7736 = (r0); - r0 = (s.v___7736 == s.ch___7685); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.m___7727 * s.dataSize___7631); - s.off___7707 = (r0); - { step = 24; continue; } - case 20: - case 21: - r0 = (s.v___7736 < s.ch___7685); + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.arg0.fields["_x"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.m___7727 + 1); - s.l___7704 = (r0); - { step = 23; continue; } - case 22: - r0 = (s.m___7727 - 1); - s.r___7705 = (r0); - case 23: - { step = 19; continue; } - case 24: - case 25: - r0 = (s.mult___7604 == 1); + r0 = (s.arg0).fields["_lastX"] = (s.tmp_0); + r0 = s.arg0.fields["_y"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 26; continue; } - s.tmp_1 = r0 = s.imgBuf___7645; - s.tmp_3 = r0 = s.fontdata___7635; - r0 = (s.off___7707 + 2); - s.tmp_4 = r0; - r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___7627); - s.tmp_2 = r0; - r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); - s.tmp_0 = helpers_imageDrawIcon__P1955_mk(s); + r0 = (s.arg0).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = Sprite_vx__P20397_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.imgBuf___7645; - r0 = (s.arg2 + s.xOffset___7669); - s.tmp_0.arg2 = r0; - r0 = (s.arg3 + s.yOffset___7670); - s.tmp_0.arg3 = r0; - s.tmp_0.arg4 = s.arg4; - s.callLocIdx = 106; s.pc = 48; return s.tmp_0; - case 48: + s.tmp_0.arg1 = 0; + s.callLocIdx = 331; s.pc = 2; return s.tmp_0; + case 2: 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 = 107; s.pc = 49; return s.tmp_2; } - } - case 49: + s.tmp_0 = Sprite_vy__P20399_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 332; s.pc = 3; return s.tmp_0; + case 3: 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___7707 + 2); - s.off___7707 = (r0); - s.i___7792 = (0); - case 27: - r0 = (s.i___7792 < s.dataW___7609); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 36; continue; } - s.j___7797 = (0); - s.mask___7798 = (1); - s.tmp_0 = r0 = s.off___7707; - r0 = (s.tmp_0 + 1); - s.off___7707 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___7635, s.tmp_0); - s.c___7799 = (r0); - case 28: - r0 = (s.j___7797 < s.dataH___7615); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 35; continue; } - r0 = (s.mask___7798 == 256); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 29; continue; } - s.tmp_2 = r0 = s.off___7707; - r0 = (s.tmp_2 + 1); - s.off___7707 = (r0); - r0 = pxsim.BufferMethods.getByte(s.fontdata___7635, s.tmp_2); - s.c___7799 = (r0); - s.mask___7798 = (1); - case 29: - case 30: - s.n___7816 = (0); - case 31: - r0 = (s.c___7799 & s.mask___7798); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 32; continue; } - r0 = (s.n___7816 + 1); - s.n___7816 = (r0); - r0 = (s.mask___7798 << 1); - s.mask___7798 = (r0); - { step = 31; continue; } - case 32: - r0 = pxsim_numops_toBoolDecr(s.n___7816); - if (!r0) { step = 33; continue; } - s.tmp_0 = helpers_imageFillRect__P1956_mk(s); + s.tmp_0 = Sprite_ax__P20401_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg2; - r0 = (s.xOffset___7669 * s.mult___7604); - 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___7797 + s.yOffset___7670); - s.tmp_5 = r0; - r0 = (s.tmp_5 * s.mult___7604); - s.tmp_4 = r0; - r0 = (s.tmp_3 + s.tmp_4); - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.mult___7604; - r0 = (s.mult___7604 * s.n___7816); - s.tmp_0.arg4 = r0; - s.tmp_0.arg5 = s.arg4; - s.callLocIdx = 108; s.pc = 50; return s.tmp_0; - case 50: + s.tmp_0.arg1 = 0; + s.callLocIdx = 333; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = (s.j___7797 + s.n___7816); - s.j___7797 = (r0); - { step = 34; continue; } - case 33: - r0 = (s.mask___7798 << 1); - s.mask___7798 = (r0); - r0 = (s.j___7797 + 1); - s.j___7797 = (r0); - case 34: - { step = 28; continue; } - case 35: - r0 = (s.arg2 + s.mult___7604); - s.arg2 = (r0); - r0 = (s.i___7792 + 1); - s.i___7792 = (r0); - { step = 27; continue; } - case 36: - case 37: - { step = 9; continue; } - case 38: + s.tmp_0 = Sprite_ay__P20403_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 334; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = Sprite_fx__P20405_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 335; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_fy__P20407_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 336; 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__P20429_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 337; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = Sprite_setKind__P20446_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = -1; + s.callLocIdx = 338; 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() } } } -helpers_imagePrint__P1990.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"]} +Sprite_constructor__P20426.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 helpers_imagePrint__P1990_mk(s) { +function Sprite_constructor__P20426_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrint__P1990, depth: s.depth + 1, + parent: s, fn: Sprite_constructor__P20426, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -3766,45 +3112,16 @@ function helpers_imagePrint__P1990_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - x0___7601: undefined, - cp___7603: undefined, - mult___7604: undefined, - dataW___7609: undefined, - dataH___7615: undefined, - byteHeight___7621: undefined, - charSize___7627: undefined, - dataSize___7631: undefined, - fontdata___7635: undefined, - lastchar___7638: undefined, - imgBuf___7645: undefined, - xOffset___7669: undefined, - yOffset___7670: undefined, - ch___7685: undefined, - l___7704: undefined, - r___7705: undefined, - off___7707: undefined, - guess___7708: undefined, - m___7727: undefined, - v___7736: undefined, - i___7792: undefined, - j___7797: undefined, - mask___7798: undefined, - c___7799: undefined, - n___7816: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, } } -function image_getFontForText__P1977(s) { +function Sprite_setImage__P20429(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3814,60 +3131,66 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___7933 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.i___7933 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_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; } case 1: - s.tmp_1 = r0 = s.i___7933; - r0 = pxsim_String_.length(s.arg0); + r0 = s.arg0.fields["_image"]; 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___7933); - s.tmp_4 = r0; - r0 = (s.tmp_4 > 8192); + 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 = 2; continue; } - r0 = globals.font12___1976; + if (!r0) { step = 3; continue; } { step = 5; continue; } - case 2: case 3: - r0 = (s.i___7933 + 1); - s.i___7933 = (r0); - { step = 1; continue; } case 4: - r0 = globals.font8___1975; + r0 = (s.arg0).fields["_image"] = (s.arg1); + s.tmp_0 = Sprite__C20379_v5_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C20379_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() } } } -image_getFontForText__P1977.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} +Sprite_setImage__P20429.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 image_getFontForText__P1977_mk(s) { +function Sprite_setImage__P20429_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_getFontForText__P1977, depth: s.depth + 1, + parent: s, fn: Sprite_setImage__P20429, 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___7933: undefined, arg0: undefined, + arg1: undefined, } } -function helpers_imageFillRect__P1956(s) { +function Sprite_recalcSize__P22790(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3879,58 +3202,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.arg5 = (s.lambdaArgs[5]); s.lambdaArgs = null; } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P4581_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 79; s.pc = 1; return s.tmp_2; + 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__P20408_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 343; 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 * 256); + s.tmp_7 = r0; + r0 = (s.tmp_7 | 0); s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P4581_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 80; s.pc = 2; return s.tmp_4; + 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__P20410_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 345; s.pc = 2; return s.tmp_6; 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_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__P20431_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 347; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_imageFillRect__P1956.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"]} +Sprite_recalcSize__P22790.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} -function helpers_imageFillRect__P1956_mk(s) { +function Sprite_recalcSize__P22790_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageFillRect__P1956, depth: s.depth + 1, + parent: s, fn: Sprite_recalcSize__P22790, 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, - arg3: undefined, - arg4: undefined, - arg5: undefined, } } -function helpers_pack__P4581(s) { +function Sprite_resetHitbox__P20431(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -3942,57 +3285,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_2 = Math_clamp__P127_mk(s); - s.tmp_2.arg0 = -30000; - s.tmp_2.arg1 = 30000; - r0 = (s.arg0 | 0); - s.tmp_2.arg2 = r0; - s.callLocIdx = 76; s.pc = 1; return s.tmp_2; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = (s.arg0).fields["_hitbox"] = (null); + s.tmp_0 = Sprite__C20379_v4_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C20379_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; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 65535); - s.tmp_0 = r0; - s.tmp_5 = Math_clamp__P127_mk(s); - s.tmp_5.arg0 = -30000; - s.tmp_5.arg1 = 30000; - r0 = (s.arg1 | 0); - s.tmp_5.arg2 = r0; - s.callLocIdx = 77; 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__P4581.info = {"start":4278,"length":145,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"pack","argumentNames":["x","y"]} +Sprite_resetHitbox__P20431.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} -function helpers_pack__P4581_mk(s) { +function Sprite_resetHitbox__P20431_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_pack__P4581, depth: s.depth + 1, + parent: s, fn: Sprite_resetHitbox__P20431, 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__P127(s) { +function Sprite_setHitbox__P20432(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4004,44 +3328,53 @@ 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 = Math_min__P131_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_1 = Math_max__P130_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.arg2; - s.callLocIdx = 14; s.pc = 2; return s.tmp_1; - case 2: + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_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__P20260_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 341; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 15; s.pc = 1; return s.tmp_0; + { step = 2; continue; } case 1: + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = game_calculateHitBox__P20262_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 342; 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); + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_clamp__P127.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"]} +Sprite_setHitbox__P20432.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} -function Math_clamp__P127_mk(s) { +function Sprite_setHitbox__P20432_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_clamp__P127, depth: s.depth + 1, + parent: s, fn: Sprite_setHitbox__P20432, 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 Math_min__P131(s) { +function game_calculateHitBox__P20262(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4051,41 +3384,215 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___29062 = undefined; + s.minX___29065 = undefined; + s.minY___29069 = undefined; + s.maxX___29073 = undefined; + s.maxY___29075 = undefined; + s.c___29077 = undefined; + s.fxc___29078 = undefined; + s.r___29085 = undefined; + s.fxr___29086 = undefined; + s.width___29150 = undefined; + s.height___29158 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 <= s.arg1); + r0 = s.arg0.fields["_hitbox"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } + 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__P20258_mk(s); + r0 = s.arg0.fields["_hitbox"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 275; s.pc = 12; return s.tmp_1; + case 12: + r0 = s.retval; case 2: - r0 = s.arg1; + // 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___29062 = (r0); + r0 = pxsim_ImageMethods.width(s.i___29062); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minX___29065 = (r0); + r0 = pxsim_ImageMethods.height(s.i___29062); + s.tmp_0 = r0; + r0 = (s.tmp_0 * 256); + s.tmp_1 = r0; + r0 = (s.tmp_1 | 0); + s.minY___29069 = (r0); + s.maxX___29073 = (0); + s.maxY___29075 = (0); + s.c___29077 = (0); + s.fxc___29078 = (0); + case 5: + s.tmp_1 = r0 = s.c___29077; + r0 = pxsim_ImageMethods.width(s.i___29062); + 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___29085 = (0); + s.fxr___29086 = (0); + case 6: + s.tmp_1 = r0 = s.r___29085; + r0 = pxsim_ImageMethods.height(s.i___29062); + 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___29062, s.c___29077, s.r___29085); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 7; continue; } + s.tmp_4 = Fx_min__P18204_mk(s); + s.tmp_4.arg0 = s.minX___29065; + s.tmp_4.arg1 = s.fxc___29078; + s.callLocIdx = 279; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + s.minX___29065 = (r0); + s.tmp_0 = Fx_min__P18204_mk(s); + s.tmp_0.arg0 = s.minY___29069; + s.tmp_0.arg1 = s.fxr___29086; + s.callLocIdx = 280; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.minY___29069 = (r0); + s.tmp_0 = Fx_max__P18205_mk(s); + s.tmp_0.arg0 = s.maxX___29073; + s.tmp_0.arg1 = s.fxc___29078; + s.callLocIdx = 281; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.maxX___29073 = (r0); + s.tmp_0 = Fx_max__P18205_mk(s); + s.tmp_0.arg0 = s.maxY___29075; + s.tmp_0.arg1 = s.fxr___29086; + s.callLocIdx = 282; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.maxY___29075 = (r0); + case 7: + case 8: + r0 = (s.r___29085 + 1); + s.r___29085 = (r0); + r0 = (s.fxr___29086 + 256); + s.tmp_0 = r0; + s.fxr___29086 = (r0); + r0 = s.tmp_0; + { step = 6; continue; } + case 9: + r0 = (s.c___29077 + 1); + s.c___29077 = (r0); + r0 = (s.fxc___29078 + 256); + s.tmp_0 = r0; + s.fxc___29078 = (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___29065, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.minX___29065 = (r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.minY___29069, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.minY___29069 = (r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.maxX___29073, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.maxX___29073 = (r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = pxsim.Math_.imul(s.maxY___29075, s.tmp_0); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + s.maxY___29075 = (r0); + r0 = (s.maxX___29073 - s.minX___29065); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sx"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.width___29150 = (r0); + r0 = (s.maxY___29075 - s.minY___29069); + s.tmp_0 = r0; + r0 = s.arg0.fields["_sy"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + s.height___29158 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C20246_VT); + s.tmp_0 = r0; + s.tmp_1 = game_Hitbox_constructor__P20253_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.tmp_1.arg2 = s.width___29150; + s.tmp_1.arg3 = s.height___29158; + r0 = (s.minX___29065 & -256); + s.tmp_1.arg4 = r0; + r0 = (s.minY___29069 & -256); + s.tmp_1.arg5 = r0; + s.callLocIdx = 295; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + r0 = s.tmp_0; + case 11: return leave(s, r0) default: oops() } } } -Math_min__P131.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"]} +game_calculateHitBox__P20262.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} -function Math_min__P131_mk(s) { +function game_calculateHitBox__P20262_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_min__P131, depth: s.depth + 1, + parent: s, fn: game_calculateHitBox__P20262, 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___29062: undefined, + minX___29065: undefined, + minY___29069: undefined, + maxX___29073: undefined, + maxY___29075: undefined, + c___29077: undefined, + fxc___29078: undefined, + r___29085: undefined, + fxr___29086: undefined, + width___29150: undefined, + height___29158: undefined, arg0: undefined, - arg1: undefined, } } -function Math_max__P130(s) { +function Sprite_image__P20428(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4097,39 +3604,76 @@ 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; } + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_image__P20428.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__P20428.isGetter = true; + +function Sprite_image__P20428_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_image__P20428, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_Hitbox_isValid__P20258(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__C20246_VT)) failedCast(r0); + r0 = s.arg0.fields["hash"]; + s.tmp_0 = r0; + s.tmp_2 = Sprite_calcDimensionalHash__P20430_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 228; s.pc = 1; return s.tmp_2; case 1: - case 2: - r0 = s.arg1; - case 3: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 === s.tmp_1); return leave(s, r0) default: oops() } } } -Math_max__P130.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"]} +game_Hitbox_isValid__P20258.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} -function Math_max__P130_mk(s) { +function game_Hitbox_isValid__P20258_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_max__P130, depth: s.depth + 1, + parent: s, fn: game_Hitbox_isValid__P20258, 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_imageDrawIcon__P1955(s) { +function Sprite_calcDimensionalHash__P20430(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4141,49 +3685,56 @@ 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 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = helpers_pack__P4581_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg3; - s.callLocIdx = 78; s.pc = 1; return s.tmp_3; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; s.tmp_2 = r0; - r0 = pxsim_ImageMethods._drawIcon(s.tmp_0, s.tmp_1, s.tmp_2, s.arg4); - r0 = undefined; + 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() } } } -helpers_imageDrawIcon__P1955.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"]} +Sprite_calcDimensionalHash__P20430.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} -function helpers_imageDrawIcon__P1955_mk(s) { +function Sprite_calcDimensionalHash__P20430_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawIcon__P1955, depth: s.depth + 1, + parent: s, fn: Sprite_calcDimensionalHash__P20430, 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, - arg3: undefined, - arg4: undefined, } } -function helpers_stringSplit__P122(s) { +function Fx_toIntShifted__P18194(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4193,186 +3744,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.A___7956 = undefined; - s.lim___7958 = undefined; - s.s___7974 = undefined; - s.p___7977 = undefined; - s.R___7978 = undefined; - s.z___7992 = undefined; - s.T___8005 = undefined; - s.q___8006 = undefined; - s.e___8012 = 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___7956 = (r0); - s.lim___7958 = (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___7958 = (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___7958 = (0); - { step = 3; continue; } - case 2: - r0 = (s.arg2 | 0); - s.lim___7958 = (r0); - case 3: - case 4: - r0 = pxsim_String_.length(s.arg0); - s.s___7974 = (r0); - s.p___7977 = (0); - s.R___7978 = (s.arg1); - r0 = (s.lim___7958 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.A___7956; - { step = 21; continue; } - 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___7956, 0, s.arg0); - r0 = s.A___7956; - { step = 21; continue; } - case 7: - case 8: - r0 = (s.s___7974 == 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.tmp_1 = helpers_splitMatch__P4367_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = 0; - s.tmp_1.arg2 = s.R___7978; - s.callLocIdx = 10; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - s.z___7992 = (r0); - r0 = (s.z___7992 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.A___7956; - { step = 21; continue; } - case 9: - case 10: - r0 = pxsim_Array_.setAt(s.A___7956, 0, s.arg0); - r0 = s.A___7956; - { step = 21; continue; } - case 11: - case 12: - s.q___8006 = (s.p___7977); - case 13: - r0 = (s.q___8006 != s.s___7974); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - s.tmp_1 = helpers_splitMatch__P4367_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.q___8006; - s.tmp_1.arg2 = s.R___7978; - s.callLocIdx = 11; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - s.e___8012 = (r0); - r0 = (s.e___8012 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.q___8006 + 1); - s.q___8006 = (r0); - { step = 19; continue; } - case 14: - r0 = (s.e___8012 == s.p___7977); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - r0 = (s.q___8006 + 1); - s.q___8006 = (r0); - { step = 18; continue; } - case 15: - s.tmp_0 = helpers_stringSlice__P119_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___7977; - s.tmp_0.arg2 = s.q___8006; - s.callLocIdx = 12; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.T___8005 = (r0); - r0 = pxsim_Array__push(s.A___7956, s.T___8005); - r0 = pxsim_Array__length(s.A___7956); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 + 8); s.tmp_1 = r0; - r0 = (s.tmp_1 == s.lim___7958); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 16; continue; } - r0 = s.A___7956; - { step = 21; continue; } - case 16: - case 17: - s.p___7977 = (s.e___8012); - s.q___8006 = (s.p___7977); - case 18: - case 19: - { step = 13; continue; } - case 20: - s.tmp_0 = helpers_stringSlice__P119_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.p___7977; - s.tmp_0.arg2 = s.q___8006; - s.callLocIdx = 13; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.T___8005 = (r0); - r0 = pxsim_Array__push(s.A___7956, s.T___8005); - r0 = s.A___7956; - case 21: + r0 = (s.tmp_0 >> s.tmp_1); return leave(s, r0) default: oops() } } } -helpers_stringSplit__P122.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"]} +Fx_toIntShifted__P18194.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 helpers_stringSplit__P122_mk(s) { +function Fx_toIntShifted__P18194_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSplit__P122, depth: s.depth + 1, + parent: s, fn: Fx_toIntShifted__P18194, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - A___7956: undefined, - lim___7958: undefined, - s___7974: undefined, - p___7977: undefined, - R___7978: undefined, - z___7992: undefined, - T___8005: undefined, - q___8006: undefined, - e___8012: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function helpers_splitMatch__P4367(s) { +function game_Hitbox_constructor__P20253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4382,85 +3783,89 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___8092 = undefined; - s.s___8095 = undefined; - s.i___8105 = 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_String_.length(s.arg2); - s.r___8092 = (r0); - r0 = pxsim_String_.length(s.arg0); - s.s___8095 = (r0); - r0 = (s.arg1 + s.r___8092); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.s___8095); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = -1; - { step = 7; continue; } + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C20246_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_calcDimensionalHash__P20430_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 219; s.pc = 1; return s.tmp_2; case 1: - case 2: - s.i___8105 = (0); - case 3: - r0 = (s.i___8105 < s.r___8092); - 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___8105); - 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___8105); - s.tmp_5 = r0; - r0 = (s.tmp_2 != s.tmp_5); + r0 = s.retval; 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___8105 + 1); - s.i___8105 = (r0); - { step = 3; continue; } - case 6: - r0 = (s.arg1 + s.r___8092); - case 7: + 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() } } } -helpers_splitMatch__P4367.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"]} +game_Hitbox_constructor__P20253.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 helpers_splitMatch__P4367_mk(s) { +function game_Hitbox_constructor__P20253_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_splitMatch__P4367, depth: s.depth + 1, + parent: s, fn: game_Hitbox_constructor__P20253, 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___8092: undefined, - s___8095: undefined, - i___8105: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, +} } + + + + + +function Fx_floor__P18206(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 & -256); + return leave(s, r0) + default: oops() +} } } +Fx_floor__P18206.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} + +function Fx_floor__P18206_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_floor__P18206, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function helpers_stringSlice__P119(s) { +function Fx_max__P18205(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4470,81 +3875,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___8057 = 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___8057 = (r0); - r0 = (s.arg1 < 0); + r0 = (s.arg0 > s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = Math_max__P130_mk(s); - r0 = (s.len___8057 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 9; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.arg1 = (r0); + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: + r0 = s.arg1; + { step = 3; continue; } 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___8057); - { step = 6; continue; } + r0 = undefined; 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___8057 + 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__P119.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"]} +Fx_max__P18205.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 helpers_stringSlice__P119_mk(s) { +function Fx_max__P18205_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_stringSlice__P119, depth: s.depth + 1, + parent: s, fn: Fx_max__P18205, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - len___8057: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function scene_Scene_render__P2872(s) { +function Fx_min__P18204(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4554,147 +3922,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___8189 = undefined; - s.unnamed88___U1 = undefined; - s.unnamed89___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C2843_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 4); + r0 = (s.arg0 < s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 11; continue; } + r0 = s.arg0; + { step = 3; continue; } + { step = 2; continue; } case 1: + r0 = s.arg1; + { step = 3; continue; } 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__P2872_mk(s); - r0 = s.arg0.fields["previousScene"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 930; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 5: - s.tmp_0 = scene_Background_draw__P2678_mk(s); - r0 = s.arg0.fields["background"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 931; 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__P105_mk(s); - r0 = s.arg0.fields["allSprites"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = scene_Scene_render_inline__P8166; - s.callLocIdx = 936; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - 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); - case 7: - case 8: - s.s___8189 = (undefined); - r0 = s.arg0.fields["allSprites"]; - s.unnamed88___U1 = (r0); - s.unnamed89___U2 = (0); - case 9: - s.tmp_0 = r0 = s.unnamed89___U2; - r0 = pxsim_Array__length(s.unnamed88___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed88___U1, s.unnamed89___U2); - s.s___8189 = (r0); - s.tmp_2 = if___draw_2_mk(s); - s.tmp_2.arg0 = s.s___8189; - r0 = s.arg0.fields["camera"]; - s.tmp_2.arg1 = r0; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__draw"), 2); - s.callLocIdx = 937; s.pc = 15; return s.tmp_2; - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["__draw"]; - if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["__draw"], 2); s.callLocIdx = 937; s.pc = 15; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 937; s.pc = 15; return s.tmp_2;; } - else { s.callLocIdx = 937; s.pc = 15; return s.tmp_2; } - } - case 15: - r0 = s.retval; - r0 = (s.unnamed89___U2 + 1); - s.unnamed89___U2 = (r0); - { step = 9; continue; } - case 10: - s.unnamed88___U1 = (undefined); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 & -5); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); - case 11: r0 = undefined; + case 3: return leave(s, r0) default: oops() } } } -scene_Scene_render__P2872.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} +Fx_min__P18204.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 scene_Scene_render__P2872_mk(s) { +function Fx_min__P18204_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render__P2872, depth: s.depth + 1, + parent: s, fn: Fx_min__P18204, 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___8189: undefined, - unnamed88___U1: undefined, - unnamed89___U2: undefined, arg0: undefined, + arg1: undefined, } } -function scene_Scene_render_inline__P8166(s) { +function Fx_mul__P18198(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4709,90 +3974,20 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_2 = if_z_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, "z"); - } else { - s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["z"]; - if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["z"]; } - else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } - else { s.callLocIdx = 932; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = if_z_1_mk(s); - s.tmp_4.arg0 = s.arg1; - if (!s.tmp_4.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "z"); - } else { - s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["z"]; - if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["z"]; } - else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } - else { s.callLocIdx = 933; s.pc = 4; return s.tmp_4; } - } - case 4: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_1 - s.tmp_3); + r0 = pxsim.Math_.imul(s.arg0, s.arg1); 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_6 = if_id_1_mk(s); - s.tmp_6.arg0 = s.arg0; - if (!s.tmp_6.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "id"); - } else { - s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["id"]; - if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["id"]; } - else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } - else { s.callLocIdx = 934; s.pc = 5; return s.tmp_6; } - } - case 5: - r0 = s.retval; - s.tmp_5 = r0; - s.tmp_8 = if_id_1_mk(s); - s.tmp_8.arg0 = s.arg1; - if (!s.tmp_8.arg0.vtable.iface) { - s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "id"); - } else { - s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["id"]; - if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["id"]; } - else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } - else { s.callLocIdx = 935; s.pc = 6; return s.tmp_8; } - } - case 6: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_5 - s.tmp_7); - case 2: - // jmp value (already in r0) - s.tmp_9 = r0; - r0 = s.tmp_9; + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -scene_Scene_render_inline__P8166.info = {"start":8781,"length":52,"line":242,"column":37,"endLine":242,"endColumn":89,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["a","b"]} +Fx_mul__P18198.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 scene_Scene_render_inline__P8166_mk(s) { +function Fx_mul__P18198_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_render_inline__P8166, depth: s.depth + 1, + parent: s, fn: Fx_mul__P18198, 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, } } @@ -4801,7 +3996,7 @@ function scene_Scene_render_inline__P8166_mk(s) { -function scene_Background_draw__P2678(s) { +function Fx_sub__P18197(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4813,60 +4008,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, scene_Background__C2669_VT)) failedCast(r0); - r0 = s.arg0.fields["color"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.fill(globals.screen___2032, 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___2032, 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__P8337); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P109_mk(s); - r0 = s.arg0.fields["_layers"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 793; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; - case 3: - case 4: - r0 = undefined; + r0 = (s.arg0 - s.arg1); return leave(s, r0) default: oops() } } } -scene_Background_draw__P2678.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} +Fx_sub__P18197.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 scene_Background_draw__P2678_mk(s) { +function Fx_sub__P18197_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw__P2678, depth: s.depth + 1, + parent: s, fn: Fx_sub__P18197, 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_Background_draw_inline__P8337(s) { +function Fx_add__P18195(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4876,66 +4040,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___8339 = undefined; - s.oy___8350 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.caps[0].fields["camera"]; - r0 = r0.fields["drawOffsetX"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["distance"]; - s.tmp_3 = r0; - r0 = (1 + s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.round(s.tmp_0); - s.ox___8339 = (r0); - r0 = s.caps[0].fields["camera"]; - r0 = r0.fields["drawOffsetY"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["distance"]; - s.tmp_3 = r0; - r0 = (1 + s.tmp_3); - s.tmp_2 = r0; - r0 = (s.tmp_1 / s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim.Math_.round(s.tmp_0); - s.oy___8350 = (r0); - s.tmp_0 = scene_BackgroundLayer_draw__P2687_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ox___8339; - s.tmp_0.arg2 = s.oy___8350; - s.callLocIdx = 792; 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() } } } -scene_Background_draw_inline__P8337.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} +Fx_add__P18195.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 scene_Background_draw_inline__P8337_mk(s) { +function Fx_add__P18195_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_draw_inline__P8337, depth: s.depth + 1, + parent: s, fn: Fx_add__P18195, 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___8339: undefined, - oy___8350: undefined, arg0: undefined, + arg1: undefined, } } -function scene_BackgroundLayer_draw__P2687(s) { +function game_Hitbox_updateIfInvalid__P20260(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -4945,251 +4074,155 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___8368 = undefined; - s.h___8371 = undefined; - s.pw___8374 = undefined; - s.ph___8378 = undefined; - s.rx___8387 = undefined; - s.ry___8390 = undefined; - s.y___8459 = undefined; - s.py___8460 = undefined; - s.dh___8469 = undefined; - s.x___8477 = undefined; - s.rxl___8478 = undefined; - s.px___8484 = undefined; - s.dw___8488 = undefined; + s.newHitBox___29259 = undefined; + s.oMinX___29264 = undefined; + s.oMinY___29267 = undefined; + s.oMaxX___29270 = undefined; + s.oMaxY___29276 = undefined; + s.nMinX___29282 = undefined; + s.nMinY___29285 = undefined; + s.nMaxX___29288 = undefined; + s.nMaxY___29294 = undefined; + s.xDiff___29300 = undefined; + s.yDiff___29311 = 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_BackgroundLayer__C2679_VT)) failedCast(r0); - r0 = pxsim_ImageMethods.width(globals.screen___2032); - s.w___8368 = (r0); - r0 = pxsim_ImageMethods.height(globals.screen___2032); - s.h___8371 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_0); - s.pw___8374 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.height(s.tmp_0); - s.ph___8378 = (r0); - r0 = pxsim_numops_toBoolDecr(s.pw___8374); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, game_Hitbox__C20246_VT)) failedCast(r0); + s.tmp_1 = game_Hitbox_isValid__P20258_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 233; s.pc = 8; return s.tmp_1; + case 8: + 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; - { step = 2; continue; } + { step = 7; continue; } case 1: - r0 = pxsim_numops_toBoolDecr(s.ph___8378); - 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 = 23; continue; } - case 3: - case 4: - r0 = (0 - s.arg1); - s.rx___8387 = (r0); - r0 = (0 - s.arg2); - s.ry___8390 = (r0); - r0 = s.arg0.fields["alignX"]; + s.tmp_2 = game_calculateHitBox__P20262_mk(s); + r0 = s.arg0.fields["parent"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 234; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.newHitBox___29259 = (r0); + r0 = s.arg0.fields["ox"]; + s.oMinX___29264 = (r0); + r0 = s.arg0.fields["oy"]; + s.oMinY___29267 = (r0); + r0 = s.arg0.fields["width"]; s.tmp_0 = r0; - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); - if (r0) { step = 5; continue; } - r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); - if (r0) { step = 6; continue; } - r0 = s.tmp_0; - { step = 7; continue; } - case 5: - s.tmp_1 = r0 = s.rx___8387; - r0 = (s.w___8368 + s.pw___8374); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.rx___8387 = (r0); - { step = 7; continue; } - case 6: - s.tmp_0 = r0 = s.rx___8387; - r0 = (s.w___8368 + s.pw___8374); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.rx___8387 = (r0); - case 7: - r0 = s.arg0.fields["alignY"]; + r0 = (s.oMinX___29264 + s.tmp_0); + s.oMaxX___29270 = (r0); + r0 = s.arg0.fields["height"]; s.tmp_0 = r0; - r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); - if (r0) { step = 8; continue; } - r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); - if (r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 8: - s.tmp_1 = r0 = s.ry___8390; - r0 = (s.h___8371 + s.ph___8378); - s.tmp_2 = r0; - r0 = (s.tmp_1 - s.tmp_2); - s.ry___8390 = (r0); - { step = 10; continue; } - case 9: - s.tmp_0 = r0 = s.ry___8390; - r0 = (s.h___8371 + s.ph___8378); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 - s.tmp_1); - s.ry___8390 = (r0); + r0 = (s.oMinY___29267 + s.tmp_0); + s.oMaxY___29276 = (r0); + r0 = s.newHitBox___29259.fields["ox"]; + s.nMinX___29282 = (r0); + r0 = s.newHitBox___29259.fields["oy"]; + s.nMinY___29285 = (r0); + r0 = s.newHitBox___29259.fields["width"]; + s.tmp_0 = r0; + r0 = (s.nMinX___29282 + s.tmp_0); + s.nMaxX___29288 = (r0); + r0 = s.newHitBox___29259.fields["height"]; + s.tmp_0 = r0; + r0 = (s.nMinY___29285 + s.tmp_0); + s.nMaxY___29294 = (r0); + s.tmp_1 = Fx_abs__P18203_mk(s); + r0 = (s.oMinX___29264 - s.nMinX___29282); + s.tmp_1.arg0 = r0; + s.callLocIdx = 240; s.pc = 10; return s.tmp_1; case 10: - r0 = (s.rx___8387 % s.w___8368); - s.rx___8387 = (r0); - r0 = (s.rx___8387 < 0); + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - r0 = (s.rx___8387 + s.w___8368); - s.rx___8387 = (r0); + s.tmp_3 = Fx_abs__P18203_mk(s); + r0 = (s.oMaxX___29270 - s.nMaxX___29288); + s.tmp_3.arg0 = r0; + s.callLocIdx = 242; 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___29300 = (r0); + s.tmp_1 = Fx_abs__P18203_mk(s); + r0 = (s.oMinY___29267 - s.nMinY___29285); + s.tmp_1.arg0 = r0; + s.callLocIdx = 245; s.pc = 12; return s.tmp_1; case 12: - r0 = (s.ry___8390 % s.h___8371); - s.ry___8390 = (r0); - r0 = (s.ry___8390 < 0); + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (s.ry___8390 + s.h___8371); - s.ry___8390 = (r0); + s.tmp_3 = Fx_abs__P18203_mk(s); + r0 = (s.oMaxY___29276 - s.nMaxY___29294); + s.tmp_3.arg0 = r0; + s.callLocIdx = 247; s.pc = 13; return s.tmp_3; case 13: - case 14: - r0 = pxsim.Math_.floor(s.rx___8387); - s.rx___8387 = (r0); - r0 = pxsim.Math_.floor(s.ry___8390); - s.ry___8390 = (r0); - s.y___8459 = (0); - s.py___8460 = (0); - case 15: - r0 = (s.y___8459 < s.h___8371); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 22; continue; } - r0 = (s.y___8459 % s.ph___8378); - s.py___8460 = (r0); - s.tmp_0 = Math_min__P131_mk(s); - r0 = (s.ph___8378 - s.py___8460); - s.tmp_0.arg0 = r0; - r0 = (s.h___8371 - s.ry___8390); - s.tmp_0.arg1 = r0; - s.callLocIdx = 795; s.pc = 24; return s.tmp_0; - case 24: r0 = s.retval; - s.dh___8469 = (r0); - s.x___8477 = (0); - s.rxl___8478 = (s.rx___8387); - case 16: - r0 = (s.x___8477 < s.w___8368); + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + s.yDiff___29311 = (r0); + r0 = (s.xDiff___29300 > 512); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 19; continue; } - r0 = (s.x___8477 % s.pw___8374); - s.px___8484 = (r0); - s.tmp_0 = Math_min__P131_mk(s); - r0 = (s.pw___8374 - s.px___8484); - s.tmp_0.arg0 = r0; - r0 = (s.w___8368 - s.rxl___8478); - s.tmp_0.arg1 = r0; - s.callLocIdx = 796; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.dw___8488 = (r0); - r0 = s.arg0.fields["img"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.drawImage(globals.screen___2032, s.tmp_0, s.rxl___8478, s.ry___8390); - r0 = (s.rxl___8478 + s.dw___8488); + if (!r0) { step = 3; continue; } + r0 = (s.arg0).fields["ox"] = (s.nMinX___29282); + r0 = s.newHitBox___29259.fields["width"]; s.tmp_0 = r0; - r0 = (s.tmp_0 % s.w___8368); - s.rxl___8478 = (r0); - r0 = s.arg0.fields["repeatX"]; + r0 = (s.arg0).fields["width"] = (s.tmp_0); + case 3: + case 4: + r0 = (s.yDiff___29311 > 512); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 17; continue; } - r0 = s.dw___8488; - { step = 18; continue; } - case 17: - r0 = s.w___8368; - case 18: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.x___8477 + s.tmp_1); - s.x___8477 = (r0); - { step = 16; continue; } - case 19: - r0 = (s.ry___8390 + s.dh___8469); + if (!r0) { step = 5; continue; } + r0 = (s.arg0).fields["oy"] = (s.nMinY___29285); + r0 = s.newHitBox___29259.fields["height"]; s.tmp_0 = r0; - r0 = (s.tmp_0 % s.h___8371); - s.ry___8390 = (r0); - r0 = s.arg0.fields["repeatY"]; + r0 = (s.arg0).fields["height"] = (s.tmp_0); + case 5: + case 6: + r0 = s.newHitBox___29259.fields["hash"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = s.dh___8469; - { step = 21; continue; } - case 20: - r0 = s.h___8371; - case 21: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = (s.y___8459 + s.tmp_1); - s.y___8459 = (r0); - { step = 15; continue; } - case 22: - case 23: + r0 = (s.arg0).fields["hash"] = (s.tmp_0); + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_draw__P2687.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"]} +game_Hitbox_updateIfInvalid__P20260.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} -function scene_BackgroundLayer_draw__P2687_mk(s) { +function game_Hitbox_updateIfInvalid__P20260_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_draw__P2687, depth: s.depth + 1, + parent: s, fn: game_Hitbox_updateIfInvalid__P20260, 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___8368: undefined, - h___8371: undefined, - pw___8374: undefined, - ph___8378: undefined, - rx___8387: undefined, - ry___8390: undefined, - y___8459: undefined, - py___8460: undefined, - dh___8469: undefined, - x___8477: undefined, - rxl___8478: undefined, - px___8484: undefined, - dw___8488: undefined, + newHitBox___29259: undefined, + oMinX___29264: undefined, + oMinY___29267: undefined, + oMaxX___29270: undefined, + oMaxY___29276: undefined, + nMinX___29282: undefined, + nMinY___29285: undefined, + nMaxX___29288: undefined, + nMaxY___29294: undefined, + xDiff___29300: undefined, + yDiff___29311: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_arraySort__P105(s) { +function Fx_abs__P18203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5201,58 +4234,40 @@ switch (step) { 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); + r0 = (s.arg0 < 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; + 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 = pxsim_Array__length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_2 > 1); + r0 = s.arg0; + { step = 3; continue; } case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - s.arg1 = (helpers_arraySort_inline__P8211); + r0 = undefined; case 3: - case 4: - s.tmp_0 = helpers_sortHelper__P4365_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 2; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; return leave(s, r0) default: oops() } } } -helpers_arraySort__P105.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"]} +Fx_abs__P18203.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} -function helpers_arraySort__P105_mk(s) { +function Fx_abs__P18203_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort__P105, depth: s.depth + 1, + parent: s, fn: Fx_abs__P18203, 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 helpers_arraySort_inline__P8211(s) { +function Sprite_sy__P20410(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5262,142 +4277,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.aIsUndef___8214 = undefined; - s.bIsUndef___8218 = undefined; - s.aIsNull___8229 = undefined; - s.bIsNull___8233 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 === undefined); - s.aIsUndef___8214 = (r0); - r0 = (s.arg1 === undefined); - s.bIsUndef___8218 = (r0); - s.tmp_0 = r0 = s.aIsUndef___8214; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.bIsUndef___8218; - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = 0; - { step = 17; continue; } - { step = 8; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(s.aIsUndef___8214); - if (!r0) { step = 4; continue; } - r0 = 1; - { step = 17; continue; } - { step = 7; continue; } - case 4: - r0 = pxsim_numops_toBoolDecr(s.bIsUndef___8218); - if (!r0) { step = 5; continue; } - r0 = -1; - { step = 17; continue; } - case 5: - case 6: - case 7: - case 8: - r0 = (s.arg0 === null); - s.aIsNull___8229 = (r0); - r0 = (s.arg1 === null); - s.bIsNull___8233 = (r0); - s.tmp_0 = r0 = s.aIsNull___8229; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } - case 9: - r0 = s.bIsNull___8233; - case 10: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 11; continue; } - r0 = 0; - { step = 17; continue; } - { step = 16; continue; } - case 11: - r0 = pxsim_numops_toBoolDecr(s.aIsNull___8229); - if (!r0) { step = 12; continue; } - r0 = 1; - { step = 17; continue; } - { step = 15; continue; } - case 12: - r0 = pxsim_numops_toBoolDecr(s.bIsNull___8233); - if (!r0) { step = 13; continue; } - r0 = -1; - { step = 17; continue; } - case 13: - case 14: - case 15: - case 16: - 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_3 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_4 = r0; - r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); - s.tmp_2 = r0; - if ((s.arg1) && (s.arg1).vtable) { - setupResume(s, 19); - pxsim_String__stringConv(s.arg1); - checkResumeConsumed(); - return; - } else { s.retval = (s.arg1) + ""; } - case 19: - r0 = s.retval; - s.tmp_6 = r0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_7 = r0; - r0 = pxsim_String__concat(s.tmp_6, s.tmp_7); - s.tmp_5 = r0; - r0 = pxsim_String_.compare(s.tmp_2, s.tmp_5); - case 17: - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_sy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -helpers_arraySort_inline__P8211.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"]} +Sprite_sy__P20410.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__P20410.isGetter = true; -function helpers_arraySort_inline__P8211_mk(s) { +function Sprite_sy__P20410_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySort_inline__P8211, depth: s.depth + 1, + parent: s, fn: Sprite_sy__P20410, 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, - aIsUndef___8214: undefined, - bIsUndef___8218: undefined, - aIsNull___8229: undefined, - bIsNull___8233: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_sortHelper__P4365(s) { +function Sprite_sx__P20408(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5407,114 +4315,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___8268 = undefined; - s.i___8271 = undefined; - s.j___8277 = 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.tmp_1 <= 0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; 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_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; } - r0 = s.arg0; - { step = 11; continue; } - case 3: - case 4: - r0 = pxsim_Array__length(s.arg0); - s.len___8268 = (r0); - s.i___8271 = (0); - case 5: - s.tmp_1 = r0 = s.i___8271; - r0 = (s.len___8268 - 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___8271 + 1); - s.j___8277 = (r0); - case 6: - r0 = (s.j___8277 < s.len___8268); - 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___8271); - s.tmp_3.arg0 = r0; - r0 = pxsim_Array__getAt(s.arg0, s.j___8277); - s.tmp_3.arg1 = r0; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 0; s.pc = 12; return s.tmp_3; - case 12: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 > 0); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 7; continue; } - s.tmp_4 = helpers_swap__P4364_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.i___8271; - s.tmp_4.arg2 = s.j___8277; - s.callLocIdx = 1; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - case 7: - case 8: - r0 = (s.j___8277 + 1); - s.j___8277 = (r0); - { step = 6; continue; } - case 9: - r0 = (s.i___8271 + 1); - s.i___8271 = (r0); - { step = 5; continue; } - case 10: - r0 = s.arg0; - case 11: - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -helpers_sortHelper__P4365.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"]} +Sprite_sx__P20408.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__P20408.isGetter = true; -function helpers_sortHelper__P4365_mk(s) { +function Sprite_sx__P20408_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_sortHelper__P4365, depth: s.depth + 1, + parent: s, fn: Sprite_sx__P20408, 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___8268: undefined, - i___8271: undefined, - j___8277: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_swap__P4364(s) { +function Sprite_fy__P20407(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5524,46 +4353,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.temp___8306 = 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__getAt(s.arg0, s.arg1); - s.temp___8306 = (r0); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.arg2); + s.tmp_3 = Math_max__P18168_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 324; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; 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___8306); + 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() } } } -helpers_swap__P4364.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"]} +Sprite_fy__P20407.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 helpers_swap__P4364_mk(s) { +function Sprite_fy__P20407_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_swap__P4364, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P20407, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - temp___8306: undefined, + tmp_3: undefined, + tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function scene_Camera_update__P2798(s) { +function Math_max__P18168(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5573,187 +4407,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.elapsed___8575 = undefined; - s.percentComplete___8589 = undefined; - s.damp___8596 = undefined; - s.f___8605 = undefined; - s.x___8611 = undefined; - s.y___8618 = 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__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["sprite"]; + r0 = (s.arg0 >= s.arg1); 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__P2354_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 891; 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__P2356_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 892; 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__P2787_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_x__P2354_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 893; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - 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 = 894; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = scene_Camera_offsetY__P2789_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_2 = Sprite_y__P2356_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 895; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___2032); - 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 = 896; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; + r0 = s.arg0; + { step = 3; continue; } 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___8575 = (r0); - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_1 = r0; - r0 = (s.elapsed___8575 >= 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; } + r0 = s.arg1; case 3: - r0 = s.arg0.fields["shakeDuration"]; - s.tmp_0 = r0; - r0 = (s.elapsed___8575 / s.tmp_0); - s.percentComplete___8589 = (r0); - s.damp___8596 = (1); - r0 = (s.percentComplete___8589 >= 0.75); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_1 = Math_max__P130_mk(s); - s.tmp_1.arg0 = 0; - r0 = (1 - s.percentComplete___8589); - s.tmp_1.arg1 = r0; - s.callLocIdx = 899; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.damp___8596 = (r0); - case 4: - case 5: - r0 = s.arg0.fields["shakeAmplitude"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 * s.damp___8596); - s.f___8605 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___8605); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.x___8611 = (r0); - r0 = pxsim.Math_.random(); - s.tmp_1 = r0; - r0 = (s.tmp_1 * s.f___8605); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 0); - s.y___8618 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.x___8611); - 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___8618); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); - case 6: - case 7: - case 8: - r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_update__P2798.info = {"start":2563,"length":1418,"line":83,"column":8,"endLine":116,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"update","argumentNames":["this"]} +Math_max__P18168.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 scene_Camera_update__P2798_mk(s) { +function Math_max__P18168_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_update__P2798, depth: s.depth + 1, + parent: s, fn: Math_max__P18168, 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___8575: undefined, - percentComplete___8589: undefined, - damp___8596: undefined, - f___8605: undefined, - x___8611: undefined, - y___8618: undefined, arg0: undefined, + arg1: undefined, } } -function scene_Camera_offsetY__P2789(s) { +function Sprite_fy__P20406(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5763,93 +4451,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___8637 = 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__C2781_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 882; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.scene___8637 = (r0); - r0 = s.scene___8637.fields["tileMap"]; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_fy"]; 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___8637.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__P2742_mk(s); - r0 = s.scene___8637.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 884; 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) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -scene_Camera_offsetY__P2789.info = {"start":1152,"length":291,"line":39,"column":8,"endLine":46,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetY","argumentNames":["this","v"]} +Sprite_fy__P20406.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__P20406.isGetter = true; -function scene_Camera_offsetY__P2789_mk(s) { +function Sprite_fy__P20406_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P2789, depth: s.depth + 1, + parent: s, fn: Sprite_fy__P20406, 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___8637: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_enabled__P2747(s) { +function Sprite_fx__P20405(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5861,42 +4491,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, tiles_TileMap__C2735_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_3 = Math_max__P18168_mk(s); + s.tmp_3.arg0 = 0; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 321; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + r0 = (s.tmp_2 * 256); + s.tmp_4 = r0; + r0 = (s.tmp_4 | 0); 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) + r0 = (s.tmp_0).fields["_fx"] = (s.tmp_1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMap_enabled__P2747.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__P2747.isGetter = true; +Sprite_fx__P20405.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 tiles_TileMap_enabled__P2747_mk(s) { +function Sprite_fx__P20405_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_enabled__P2747, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P20405, 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 tiles_TileMap_offsetY__P2742(s) { +function Sprite_fx__P20404(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5908,57 +4545,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, tiles_TileMap__C2735_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P130_mk(s); - s.tmp_3 = tiles_TileMap_areaHeight__P2744_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 821; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___2032); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 822; 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 = 823; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_fx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_offsetY__P2742.info = {"start":9630,"length":123,"line":329,"column":8,"endLine":331,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetY","argumentNames":["this","value"]} +Sprite_fx__P20404.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__P20404.isGetter = true; -function tiles_TileMap_offsetY__P2742_mk(s) { +function Sprite_fx__P20404_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetY__P2742, depth: s.depth + 1, + parent: s, fn: Sprite_fx__P20404, 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 tiles_TileMap_areaHeight__P2744(s) { +function Sprite_ay__P20403(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -5970,51 +4583,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, tiles_TileMap__C2735_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"]; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); s.tmp_2 = r0; - r0 = s.tmp_2.fields["_height"]; + r0 = (s.tmp_2 | 0); 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 = 0; - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_areaHeight__P2744.info = {"start":9864,"length":93,"line":337,"column":8,"endLine":339,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} +Sprite_ay__P20403.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 tiles_TileMap_areaHeight__P2744_mk(s) { +function Sprite_ay__P20403_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaHeight__P2744, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P20403, 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 tiles_TileMap_scale__P2738(s) { +function Sprite_ay__P20402(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6029,19 +4631,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - r0 = s.arg0.fields["_scale"]; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_ay"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_scale__P2738.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__P2738.isGetter = true; +Sprite_ay__P20402.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__P20402.isGetter = true; -function tiles_TileMap_scale__P2738_mk(s) { +function Sprite_ay__P20402_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_scale__P2738, depth: s.depth + 1, + parent: s, fn: Sprite_ay__P20402, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -6049,7 +4654,7 @@ function tiles_TileMap_scale__P2738_mk(s) { -function tiles_TileMapData_height__P2720(s) { +function Sprite_ax__P20401(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6061,30 +4666,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, tiles_TileMapData__C2717_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, Sprite__C20379_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); + r0 = undefined; + return leave(s, r0) default: oops() } } } -tiles_TileMapData_height__P2720.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__P2720.isGetter = true; +Sprite_ax__P20401.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 tiles_TileMapData_height__P2720_mk(s) { +function Sprite_ax__P20401_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_height__P2720, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P20401, 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_Camera_offsetY__P2788(s) { +function Sprite_ax__P20400(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6099,19 +4714,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_ax"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); return leaveAccessor(s, r0) default: oops() } } } -scene_Camera_offsetY__P2788.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__P2788.isGetter = true; +Sprite_ax__P20400.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__P20400.isGetter = true; -function scene_Camera_offsetY__P2788_mk(s) { +function Sprite_ax__P20400_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetY__P2788, depth: s.depth + 1, + parent: s, fn: Sprite_ax__P20400, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -6119,7 +4737,7 @@ function scene_Camera_offsetY__P2788_mk(s) { -function scene_Camera_offsetX__P2787(s) { +function sprites_BaseSprite_constructor__P20134(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6129,84 +4747,42 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___8697 = 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__C2781_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 879; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.scene___8697 = (r0); - r0 = s.scene___8697.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; } + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_z__P20137_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 129; s.pc = 1; return s.tmp_0; case 1: - r0 = s.scene___8697.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_offsetX__P2741_mk(s); - r0 = s.scene___8697.fields["tileMap"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = s.arg1; - s.callLocIdx = 881; 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; } + s.tmp_0 = scene_Scene_addSprite__P20908_mk(s); + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 130; s.pc = 3; return s.tmp_1; 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 = s.retval; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 131; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P2787.info = {"start":784,"length":291,"line":28,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"offsetX","argumentNames":["this","v"]} +sprites_BaseSprite_constructor__P20134.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 scene_Camera_offsetX__P2787_mk(s) { +function sprites_BaseSprite_constructor__P20134_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P2787, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_constructor__P20134, 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___8697: undefined, arg0: undefined, arg1: undefined, } } @@ -6215,7 +4791,7 @@ function scene_Camera_offsetX__P2787_mk(s) { -function tiles_TileMap_offsetX__P2741(s) { +function scene_Scene_addSprite__P20908(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6231,44 +4807,44 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_1 = Math_max__P130_mk(s); - s.tmp_3 = tiles_TileMap_areaWidth__P2743_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 818; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, scene_Scene__C20881_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 = pxsim_ImageMethods.width(globals.screen___2032); - s.tmp_4 = r0; - r0 = (s.tmp_2 - s.tmp_4); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 819; 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 = 820; s.pc = 1; return s.tmp_0; + 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 = 929; s.pc = 1; return s.tmp_3; } + } case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_offsetX__P2741.info = {"start":9499,"length":121,"line":325,"column":8,"endLine":327,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"offsetX","argumentNames":["this","value"]} +scene_Scene_addSprite__P20908.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 tiles_TileMap_offsetX__P2741_mk(s) { +function scene_Scene_addSprite__P20908_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_offsetX__P2741, depth: s.depth + 1, + parent: s, fn: scene_Scene_addSprite__P20908, 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, } } @@ -6277,7 +4853,7 @@ function tiles_TileMap_offsetX__P2741_mk(s) { -function tiles_TileMap_areaWidth__P2743(s) { +function sprites_BaseSprite_z__P20137(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6289,51 +4865,54 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + if (!checkSubtype(r0, sprites_BaseSprite__C20132_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 = s.arg0.fields["_map"]; - s.tmp_2 = r0; - r0 = s.tmp_2.fields["_width"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["_scale"]; + r0 = (s.arg0).fields["_z"] = (s.arg1); + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 132; 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_1 << s.tmp_3); - { step = 2; continue; } + r0 = (s.tmp_3 | 1); + s.tmp_2 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); case 1: - r0 = 0; case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - r0 = s.tmp_4; + r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_areaWidth__P2743.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} +sprites_BaseSprite_z__P20137.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 tiles_TileMap_areaWidth__P2743_mk(s) { +function sprites_BaseSprite_z__P20137_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_areaWidth__P2743, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P20137, 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 tiles_TileMapData_width__P2719(s) { +function sprites_BaseSprite_z__P20136(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6348,18 +4927,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C2717_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); + r0 = s.arg0.fields["_z"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMapData_width__P2719.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__P2719.isGetter = true; +sprites_BaseSprite_z__P20136.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__P20136.isGetter = true; -function tiles_TileMapData_width__P2719_mk(s) { +function sprites_BaseSprite_z__P20136_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_width__P2719, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite_z__P20136, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -6368,7 +4947,7 @@ function tiles_TileMapData_width__P2719_mk(s) { -function scene_Camera_offsetX__P2786(s) { +function helpers_arrayFilter__P18148(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6378,32 +4957,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___26976 = undefined; + s.len___26978 = undefined; + s.i___26981 = undefined; + s.v___26986 = 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__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - return leaveAccessor(s, r0) + r0 = pxsim_Array__mk(); + s.res___26976 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___26978 = (r0); + s.i___26981 = (0); + case 1: + r0 = (s.i___26981 < s.len___26978); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.arg0, s.i___26981); + s.v___26986 = (r0); + s.tmp_1 = lambda_3_mk(s); + s.tmp_1.argL = s.arg1; + s.tmp_1.arg0 = s.v___26986; + s.tmp_1.arg1 = s.i___26981; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 6; 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___26976, s.v___26986); + case 2: + case 3: + r0 = (s.i___26981 + 1); + s.i___26981 = (r0); + { step = 1; continue; } + case 4: + r0 = s.res___26976; + return leave(s, r0) default: oops() } } } -scene_Camera_offsetX__P2786.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__P2786.isGetter = true; +helpers_arrayFilter__P18148.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 scene_Camera_offsetX__P2786_mk(s) { +function helpers_arrayFilter__P18148_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_offsetX__P2786, depth: s.depth + 1, + parent: s, fn: helpers_arrayFilter__P18148, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + res___26976: undefined, + len___26978: undefined, + i___26981: undefined, + v___26986: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_y__P2356(s) { +function helpers_arrayForEach__P18147(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6413,107 +5031,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___25200 = undefined; + s.i___25203 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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) - default: oops() -} } } -Sprite_y__P2356.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__P2356.isGetter = true; - -function Sprite_y__P2356_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_y__P2356, 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 Fx_toFloat__P173(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 / 256); - return leave(s, r0) - default: oops() -} } } -Fx_toFloat__P173.info = {"start":2470,"length":81,"line":77,"column":4,"endLine":79,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toFloat","argumentNames":["v"]} - -function Fx_toFloat__P173_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_toFloat__P173, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function Fx_div__P162(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); + r0 = pxsim_Array__length(s.arg0); + s.len___25200 = (r0); + s.i___25203 = (0); + case 1: + r0 = (s.i___25203 < s.len___25200); 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___25203); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.i___25203; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 5; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + r0 = (s.i___25203 + 1); + s.i___25203 = (r0); + { step = 1; continue; } + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_div__P162.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__P18147.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__P162_mk(s) { +function helpers_arrayForEach__P18147_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_div__P162, depth: s.depth + 1, + parent: s, fn: helpers_arrayForEach__P18147, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + len___25200: undefined, + i___25203: undefined, arg0: undefined, arg1: undefined, } } @@ -6522,7 +5082,7 @@ function Fx_div__P162_mk(s) { -function Fx_add__P157(s) { +function game_splash__P21003(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6532,81 +5092,160 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.dialog___36102 = undefined; + s.s___36115 = undefined; + s.pressed___36122 = undefined; + s.done___36123 = undefined; 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__P157.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__P157_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Fx_add__P157, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Sprite_x__P2354(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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; + s.tmp_0 = console_inspect__P18420_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 20; + s.callLocIdx = 89; 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__P18420_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 20; + s.callLocIdx = 90; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + { step = 2; continue; } + case 1: + r0 = s.arg1; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = s.arg0.fields["_width"]; + s.arg1 = (s.tmp_1); + s.tmp_0 = controller__setUserEventsEnabled__P20244_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 91; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = game_pushScene__P21041_mk(s); + s.callLocIdx = 92; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 93; 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 << 8); - s.tmp_4 = r0; - r0 = pxsim.Math_.idiv(s.tmp_4, 512); + r0 = (s.tmp_3 | 2); s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + r0 = pxsim_pxtcore_mkClassInstance(game_SplashDialog__C20970_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, 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__P20977_mk(s); + s.tmp_2.arg0 = s.tmp_0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.tmp_1; + s.callLocIdx = 94; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.dialog___36102 = (s.tmp_0); + s.tmp_0 = game_SplashDialog__C20970_v1_2_mk(s); + s.tmp_0.arg0 = s.dialog___36102; + s.tmp_0.arg1 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, game_SplashDialog__C20970_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__P20979_mk(s); + s.tmp_0.arg0 = s.dialog___36102; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 95; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 5: + case 6: + s.tmp_0 = sprites_create__P20313_mk(s); + r0 = s.dialog___36102.fields["image"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = -1; + s.callLocIdx = 96; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.s___36115 = (r0); + r0 = pxsim_pxtrt.mklocRef(); + s.pressed___36122 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.pressed___36122, true); + r0 = pxsim_pxtrt.mklocRef(); + s.done___36123 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.done___36123, false); + r0 = pxsim_pxtcore_mkAction(3, game_splash_inline__P36125); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dialog___36102); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.pressed___36122); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.done___36123); + s.tmp_1 = game_onUpdate__P21061_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 99; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, game_splash_inline__P36148); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.done___36123); + s.tmp_1 = pauseUntil__P18405_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 100; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0 = controller__setUserEventsEnabled__P20244_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 101; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_x__P2354.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__P2354.isGetter = true; +game_splash__P21003.info = {"start":30591,"length":1082,"line":865,"column":4,"endLine":896,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"splash","argumentNames":["title","subtitle"]} -function Sprite_x__P2354_mk(s) { +function game_splash__P21003_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P2354, depth: s.depth + 1, + parent: s, fn: game_splash__P21003, 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, + dialog___36102: undefined, + s___36115: undefined, + pressed___36122: undefined, + done___36123: undefined, arg0: undefined, + arg1: undefined, } } -function PhysicsEngine_move__P2517(s) { +function game_splash_inline__P36125(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6616,33 +5255,93 @@ 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__C2511_VT)) failedCast(r0); + s.currentState___36128 = undefined; + s.tmp_0 = game_BaseDialog__C20941_v0_1_mk(s); + s.tmp_0.arg0 = s.caps[0]; + if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C20941_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__C20227_v0_1_mk(s); + s.tmp_0.arg0 = globals.A___20151; + if (!checkSubtype(s.tmp_0.arg0, controller_Button__C20227_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___36128 = (r0); + s.tmp_0 = r0 = s.currentState___36128; + 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); + 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_stlocRef(s.caps[1], true); + s.tmp_0 = scene_setBackgroundImage__P20923_mk(s); + s.tmp_0.arg0 = null; + s.callLocIdx = 97; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = game_popScene__P21042_mk(s); + s.callLocIdx = 98; s.pc = 12; return s.tmp_0; + case 12: + 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___36128); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); + 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: r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_move__P2517.info = {"start":351,"length":20,"line":18,"column":4,"endLine":18,"endColumn":24,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +game_splash_inline__P36125.info = {"start":31175,"length":410,"line":880,"column":22,"endLine":892,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} -function PhysicsEngine_move__P2517_mk(s) { +function game_splash_inline__P36125_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_move__P2517, depth: s.depth + 1, + parent: s, fn: game_splash_inline__P36125, 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, + currentState___36128: undefined, } } -function PhysicsEngine_draw__P2516(s) { +function game_splash_inline__P36148(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6652,31 +5351,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, PhysicsEngine__C2511_VT)) failedCast(r0); - r0 = undefined; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); return leave(s, r0) default: oops() } } } -PhysicsEngine_draw__P2516.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +game_splash_inline__P36148.info = {"start":31607,"length":10,"line":894,"column":19,"endLine":894,"endColumn":29,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"inline","argumentNames":[]} -function PhysicsEngine_draw__P2516_mk(s) { +function game_splash_inline__P36148_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_draw__P2516, depth: s.depth + 1, + parent: s, fn: game_splash_inline__P36148, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, } } -function controller___update__P2165(s) { +function game_onUpdate__P21061(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6686,82 +5378,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtms___9029 = 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___9029 = (r0); - r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P9036); + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___9029); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_2 = controller_players__P2129_mk(s); - s.callLocIdx = 193; s.pc = 2; return s.tmp_2; + 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__P18441_mk(s); + s.tmp_3 = game_eventContext__P21040_mk(s); + s.callLocIdx = 962; s.pc = 5; return s.tmp_3; + case 5: r0 = s.retval; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 195; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 20; + s.tmp_2.arg2 = s.arg0; + s.callLocIdx = 963; s.pc = 4; return s.tmp_2; + case 4: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -controller___update__P2165.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} +game_onUpdate__P21061.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} -function controller___update__P2165_mk(s) { +function game_onUpdate__P21061_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller___update__P2165, depth: s.depth + 1, + parent: s, fn: game_onUpdate__P21061, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - dtms___9029: undefined, - arg0: undefined, -} } - - - - - -function controller___update_inline__P9036(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 = controller_Controller___update__P2163_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.caps[0]; - s.callLocIdx = 194; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -controller___update_inline__P9036.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__P9036_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller___update_inline__P9036, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + tmp_3: undefined, arg0: undefined, } } @@ -6769,7 +5425,7 @@ function controller___update_inline__P9036_mk(s) { -function controller_Controller___update__P2163(s) { +function control_EventContext_registerFrameHandler__P18441(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6779,57 +5435,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.fn___27169 = undefined; + s.i___27178 = 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__C2134_VT)) failedCast(r0); - r0 = pxsim_pxtrt.mklocRef(); + if (!checkSubtype(r0, control_EventContext__C18433_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_pxtrt_stlocRef(s.tmp_0, s.arg1); - s.arg1 = (s.tmp_0); - s.tmp_1 = r0 = s.arg1; - r0 = pxsim_pxtrt_ldlocRef(s.arg1); + 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__P22480_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 50; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C18430_VT); + s.fn___27169 = (r0); + r0 = (s.fn___27169).fields["order"] = (s.arg1); + r0 = (s.fn___27169).fields["handler"] = (s.arg2); + s.i___27178 = (0); + case 3: + s.tmp_1 = r0 = s.i___27178; + r0 = s.arg0.fields["frameCallbacks"]; s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); + r0 = pxsim_Array__length(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); - r0 = pxsim_pxtcore_mkAction(1, controller_Controller___update_inline__P9049); + r0 = (s.tmp_1 < s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - r0 = s.arg0.fields["buttons"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 192; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = undefined; + 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___27178); + 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___27178, s.fn___27169); + r0 = s.fn___27169; + { step = 7; continue; } + case 4: + case 5: + r0 = (s.i___27178 + 1); + s.i___27178 = (r0); + { step = 3; continue; } + case 6: + r0 = s.arg0.fields["frameCallbacks"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.fn___27169); + r0 = s.fn___27169; + case 7: return leave(s, r0) default: oops() } } } -controller_Controller___update__P2163.info = {"start":13211,"length":124,"line":396,"column":8,"endLine":399,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["this","dtms"]} +control_EventContext_registerFrameHandler__P18441.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 controller_Controller___update__P2163_mk(s) { +function control_EventContext_registerFrameHandler__P18441_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___update__P2163, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameHandler__P18441, 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___27169: undefined, + i___27178: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function controller_Controller___update_inline__P9049(s) { +function control_EventContext_registerFrameCallbacks__P22480(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6839,29 +5543,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.worker___27212 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = controller_Button___update__P2203_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); - s.tmp_0.arg1 = r0; - s.callLocIdx = 191; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C18433_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; } case 1: - r0 = s.retval; + case 2: + r0 = s.arg0.fields["frameWorker"]; + s.worker___27212 = (r0); + r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P27218); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___27212); + r0 = pxsim.control.runInParallel(s.tmp_0); + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___update_inline__P9049.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} +control_EventContext_registerFrameCallbacks__P22480.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} -function controller_Controller___update_inline__P9049_mk(s) { +function control_EventContext_registerFrameCallbacks__P22480_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___update_inline__P9049, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks__P22480, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + worker___27212: undefined, arg0: undefined, } } @@ -6869,7 +5591,7 @@ function controller_Controller___update_inline__P9049_mk(s) { -function controller_Button___update__P2203(s) { +function control_EventContext_registerFrameCallbacks_inline__P27218(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -6879,124 +5601,73 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___9065 = undefined; - s.interval___9074 = undefined; - s.count___9087 = 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__C2189_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.delay___27248 = undefined; + r0 = s.caps[0].fields["runningCallbacks"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 11; continue; } + r0 = pxsim_pxtcore_mkAction(1, control_EventContext_registerFrameCallbacks_inline__P27224); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); + s.tmp_2 = pauseUntil__P18405_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 44; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; case 1: 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"]; + 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_1 === undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - r0 = globals.defaultRepeatDelay___4742; - { step = 4; continue; } + r0 = (s.tmp_0).fields["prevTimeMillis"] = (s.tmp_1); case 3: - r0 = s.arg0.fields["repeatDelay"]; - case 4: - // jmp value (already in r0) - s.tmp_2 = r0; - s.delay___9065 = (s.tmp_2); - r0 = s.arg0.fields["repeatInterval"]; + r0 = s.caps[0].fields["frameWorker"]; s.tmp_1 = r0; - r0 = (s.tmp_1 === undefined); + r0 = (s.caps[1] == s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = globals.defaultRepeatInterval___4744; - { step = 6; continue; } - case 5: - r0 = s.arg0.fields["repeatInterval"]; + if (!r0) { step = 4; continue; } + s.tmp_2 = control_EventContext_runCallbacks__P22479_mk(s); + s.tmp_2.arg0 = s.caps[0]; + s.callLocIdx = 45; s.pc = 6; return s.tmp_2; case 6: - // jmp value (already in r0) - s.tmp_2 = r0; - s.interval___9074 = (s.tmp_2); - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 < s.delay___9065); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - { step = 11; continue; } + r0 = s.retval; + s.delay___27248 = (r0); + s.tmp_0 = pause__P18451_mk(s); + s.tmp_0.arg0 = s.delay___27248; + s.callLocIdx = 46; s.pc = 7; return s.tmp_0; case 7: - case 8: - r0 = s.arg0.fields["_pressedElasped"]; - s.tmp_5 = r0; - r0 = (s.tmp_5 - s.delay___9065); - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.interval___9074); - s.tmp_3 = r0; - r0 = (s.tmp_3 / s.interval___9074); - s.tmp_2 = r0; - r0 = pxsim.Math_.floor(s.tmp_2); - s.count___9087 = (r0); - r0 = s.arg0.fields["_repeatCount"]; - s.tmp_1 = r0; - r0 = (s.count___9087 != 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__P4731_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 207; s.pc = 12; return s.tmp_2; - case 12: r0 = s.retval; - r0 = (s.arg0).fields["_repeatCount"] = (s.count___9087); - case 9: - case 10: - case 11: + { step = 3; continue; } + case 4: + r0 = (s.caps[0]).fields["runningCallbacks"] = (false); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button___update__P2203.info = {"start":7291,"length":704,"line":217,"column":8,"endLine":234,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"__update","argumentNames":["this","dtms"]} +control_EventContext_registerFrameCallbacks_inline__P27218.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function controller_Button___update__P2203_mk(s) { +function control_EventContext_registerFrameCallbacks_inline__P27218_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button___update__P2203, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P27218, 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, - delay___9065: undefined, - interval___9074: undefined, - count___9087: undefined, - arg0: undefined, - arg1: undefined, + delay___27248: undefined, } } -function controller_Button_raiseButtonRepeat__P4731(s) { +function control_EventContext_registerFrameCallbacks_inline__P27224(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7006,43 +5677,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, controller_Button__C2189_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___4740); - 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 = s.caps[0].fields["runningCallbacks"]; + 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__P4731.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} +control_EventContext_registerFrameCallbacks_inline__P27224.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function controller_Button_raiseButtonRepeat__P4731_mk(s) { +function control_EventContext_registerFrameCallbacks_inline__P27224_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonRepeat__P4731, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P27224, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, } } -function controller_players__P2129(s) { +function control_EventContext_runCallbacks__P22479(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7052,34 +5710,291 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller__player1__P2128_mk(s); - s.callLocIdx = 152; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = helpers_arrayFilter__P110_mk(s); - s.tmp_0.arg0 = globals._players___4660; - s.tmp_0.arg1 = controller_players_inline__P9019; - s.callLocIdx = 153; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + s.loopStart___27257 = undefined; + s.f___27270 = undefined; + s.unnamed146___U2 = undefined; + s.unnamed147___U3 = undefined; + s.now___27275 = undefined; + s.runtime___27278 = undefined; + s.realTimeInSample___27297 = undefined; + s.fps___27306 = undefined; + s.delay___27375 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.loopStart___27257 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["prevTimeMillis"]; + s.tmp_2 = r0; + r0 = (s.loopStart___27257 - s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); + r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___27257); + s.f___27270 = (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___27270 = (r0); + s.tmp_2 = if_handler_1_mk(s); + s.tmp_2.arg0 = s.f___27270; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); + s.callLocIdx = 42; 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 = 42; s.pc = 11; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 42; s.pc = 11; return s.tmp_2;; } + else { s.callLocIdx = 42; s.pc = 11; return s.tmp_2; } + } + case 11: + r0 = s.retval; + r0 = (s.unnamed147___U3 + 1); + s.unnamed147___U3 = (r0); + { step = 1; continue; } + case 2: + s.unnamed146___U2 = (undefined); + r0 = pxsim.control.millis(); + s.now___27275 = (r0); + r0 = (s.now___27275 - s.loopStart___27257); + s.runtime___27278 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["timeInSample"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.runtime___27278); + 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 = 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___27275 - s.tmp_4); + s.realTimeInSample___27297 = (r0); + r0 = (s.arg0).fields["lastPerfDump"] = (s.now___27275); + 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___27306 = (r0); + r0 = pxsim.Math_.round(s.fps___27306); + 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___18435 = (r0); + r0 = (s.fps___27306 < 99); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + if ((globals.control_EventContext_lastStats___18435) && (globals.control_EventContext_lastStats___18435).vtable) { + setupResume(s, 13); + pxsim_String__stringConv(globals.control_EventContext_lastStats___18435); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___18435) + ""; } + case 13: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.fps___27306 * 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___18435 = (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___27306 * 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___27297) && (s.realTimeInSample___27297).vtable) { + setupResume(s, 19); + pxsim_String__stringConv(s.realTimeInSample___27297); + checkResumeConsumed(); + return; + } else { s.retval = (s.realTimeInSample___27297) + ""; } + 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__P18168_mk(s); + s.tmp_0.arg0 = 1; + r0 = (20 - s.runtime___27278); + s.tmp_0.arg1 = r0; + s.callLocIdx = 43; s.pc = 20; return s.tmp_0; + case 20: + r0 = s.retval; + s.delay___27375 = (r0); + r0 = s.delay___27375; return leave(s, r0) default: oops() } } } -controller_players__P2129.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} +control_EventContext_runCallbacks__P22479.info = {"start":2220,"length":1395,"line":75,"column":8,"endLine":106,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} -function controller_players__P2129_mk(s) { +function control_EventContext_runCallbacks__P22479_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players__P2129, depth: s.depth + 1, + parent: s, fn: control_EventContext_runCallbacks__P22479, 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___27257: undefined, + f___27270: undefined, + unnamed146___U2: undefined, + unnamed147___U3: undefined, + now___27275: undefined, + runtime___27278: undefined, + realTimeInSample___27297: undefined, + fps___27306: undefined, + delay___27375: undefined, + arg0: undefined, } } -function controller_players_inline__P9019(s) { +function game_popScene__P21042(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7089,38 +6004,84 @@ 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_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + s.oldScene___28434 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 954; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.oldScene___28434 = (r0); + s.tmp_0 = r0 = globals._sceneStack___22983; + 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___22983); + case 2: + // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = pxsim_Array_.pop(globals._sceneStack___22983); + globals._scene___22982 = (r0); + s.tmp_0 = control_popEventContext__P18448_mk(s); + s.callLocIdx = 955; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + { step = 6; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(globals._scene___22982); + if (!r0) { step = 4; continue; } + s.tmp_0 = control_popEventContext__P18448_mk(s); + s.callLocIdx = 956; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + globals._scene___22982 = (undefined); + case 4: + case 5: + case 6: + r0 = pxsim_numops_toBoolDecr(globals._scene___22982); + if (!r0) { step = 7; continue; } + s.tmp_0 = particles_enableAll__P21221_mk(s); + s.callLocIdx = 957; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + case 7: + case 8: + r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___22985); + if (!r0) { step = 9; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P28455); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___28434); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1.arg0 = globals._scenePopHandlers___22985; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 959; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + case 9: + case 10: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_players_inline__P9019.info = {"start":1767,"length":14,"line":55,"column":31,"endLine":55,"endColumn":45,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +game_popScene__P21042.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} -function controller_players_inline__P9019_mk(s) { +function game_popScene__P21042_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_players_inline__P9019, depth: s.depth + 1, + parent: s, fn: game_popScene__P21042, 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, + oldScene___28434: undefined, } } -function helpers_arrayFilter__P110(s) { +function game_popScene_inline__P28455(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7130,71 +6091,125 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___8938 = undefined; - s.len___8940 = undefined; - s.i___8943 = undefined; - s.v___8948 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___8938 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___8940 = (r0); - s.i___8943 = (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 = 958; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.i___8943 < s.len___8940); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.arg0, s.i___8943); - s.v___8948 = (r0); - s.tmp_1 = lambda_3_mk(s); - s.tmp_1.argL = s.arg1; - s.tmp_1.arg0 = s.v___8948; - s.tmp_1.arg1 = s.i___8943; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 6; 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___8938, s.v___8948); - case 2: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_popScene_inline__P28455.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_popScene_inline__P28455_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_popScene_inline__P28455, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function particles_enableAll__P21221(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.sources___28459 = undefined; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1196; s.pc = 3; return s.tmp_0; case 3: - r0 = (s.i___8943 + 1); - s.i___8943 = (r0); - { step = 1; continue; } + r0 = s.retval; + s.sources___28459 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___28459); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + s.tmp_0.arg0 = s.sources___28459; + s.tmp_0.arg1 = particles_enableAll_inline__P28465; + s.callLocIdx = 1198; s.pc = 4; return s.tmp_0; case 4: - r0 = s.res___8938; + r0 = s.retval; + s.tmp_0 = particles_pruneParticles__P23328_mk(s); + s.callLocIdx = 1199; 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_arrayFilter__P110.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"]} +particles_enableAll__P21221.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} -function helpers_arrayFilter__P110_mk(s) { +function particles_enableAll__P21221_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayFilter__P110, depth: s.depth + 1, + parent: s, fn: particles_enableAll__P21221, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + sources___28459: undefined, +} } + + + + + +function particles_enableAll_inline__P28465(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 = particles_ParticleSource_enabled__P21202_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1197; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = true; + return leave(s, r0) + default: oops() +} } } +particles_enableAll_inline__P28465.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} + +function particles_enableAll_inline__P28465_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_enableAll_inline__P28465, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - res___8938: undefined, - len___8940: undefined, - i___8943: undefined, - v___8948: undefined, arg0: undefined, - arg1: undefined, } } -function controller__moveSprites__P2133(s) { +function particles_particleSources__P23332(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7204,36 +6219,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - s.tmp_1 = controller_players__P2129_mk(s); - s.callLocIdx = 154; s.pc = 2; return s.tmp_1; - case 2: + s.sources___28633 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 1200; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = r0.fields["particleSources"]; + s.sources___28633 = (r0); + r0 = s.sources___28633; + return leave(s, r0) + default: oops() +} } } +particles_particleSources__P23332.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} + +function particles_particleSources__P23332_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_particleSources__P23332, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + sources___28633: undefined, +} } + + + + + +function particles_pruneParticles__P23328(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.sources___28470 = undefined; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1183; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___28470 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___28470); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1 = helpers_arraySlice__P18153_mk(s); + s.tmp_1.arg0 = s.sources___28470; + s.tmp_1.arg1 = 0; + r0 = pxsim_Array__length(s.sources___28470); + s.tmp_1.arg2 = r0; + s.callLocIdx = 1184; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = controller__moveSprites_inline__P8788; - s.callLocIdx = 156; s.pc = 1; return s.tmp_0; - case 1: + s.tmp_0.arg1 = particles_pruneParticles_inline__P28479; + s.callLocIdx = 1186; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites__P2133.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} +particles_pruneParticles__P23328.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} -function controller__moveSprites__P2133_mk(s) { +function particles_pruneParticles__P23328_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites__P2133, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles__P23328, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + sources___28470: undefined, } } -function controller__moveSprites_inline__P8788(s) { +function particles_pruneParticles_inline__P28479(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7247,21 +6313,21 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = controller_Controller___preUpdate__P2162_mk(s); + s.tmp_0 = particles_ParticleSource__prune__P21197_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 155; s.pc = 1; return s.tmp_0; + s.callLocIdx = 1185; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller__moveSprites_inline__P8788.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} +particles_pruneParticles_inline__P28479.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function controller__moveSprites_inline__P8788_mk(s) { +function particles_pruneParticles_inline__P28479_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__moveSprites_inline__P8788, depth: s.depth + 1, + parent: s, fn: particles_pruneParticles_inline__P28479, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -7271,7 +6337,7 @@ function controller__moveSprites_inline__P8788_mk(s) { -function controller_Controller___preUpdate__P2162(s) { +function particles_ParticleSource__prune__P21197(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7281,308 +6347,137 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.deadSprites___8795 = undefined; - s.svx___8796 = undefined; - s.svy___8797 = undefined; - s.svxInCricle___8832 = undefined; - s.svyInCircle___8834 = undefined; - s.sq___8836 = undefined; - s.scale___8851 = undefined; + s.scene___28509 = undefined; + s.sources___28517 = undefined; + s.current___28531 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); - s.tmp_3 = controller_Controller__controlledSprites__P2139_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 166; s.pc = 18; return s.tmp_3; - case 18: - r0 = s.retval; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + case 1: + 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 = 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___8795 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.deadSprites___8795, false); - r0 = pxsim_pxtrt.mklocRef(); - s.svx___8796 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svx___8796, 0); - r0 = pxsim_pxtrt.mklocRef(); - s.svy___8797 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.svy___8797, 0); - r0 = s.arg0.fields["analog"]; + r0 = (s.tmp_1 & 2); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = r0 = s.svx___8796; - s.tmp_5 = controller_Button_pressureLevel__P2201_mk(s); - s.tmp_6 = controller_Controller_right__P2144_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 167; s.pc = 20; return s.tmp_6; - case 20: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.callLocIdx = 168; s.pc = 19; return s.tmp_5; - case 19: - r0 = s.retval; - s.tmp_4 = r0; - s.tmp_8 = controller_Button_pressureLevel__P2201_mk(s); - s.tmp_9 = controller_Controller_left__P2143_mk(s); - s.tmp_9.arg0 = s.arg0; - s.callLocIdx = 169; s.pc = 22; return s.tmp_9; - case 22: - r0 = s.retval; - s.tmp_8.arg0 = r0; - s.callLocIdx = 170; s.pc = 21; return s.tmp_8; - case 21: - r0 = s.retval; - s.tmp_7 = r0; - r0 = (s.tmp_4 - s.tmp_7); + 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 = (s.tmp_3 >> 1); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_1, s.tmp_2); - s.tmp_0 = r0 = s.svy___8797; - s.tmp_4 = controller_Button_pressureLevel__P2201_mk(s); - s.tmp_5 = controller_Controller_down__P2146_mk(s); - s.tmp_5.arg0 = s.arg0; - s.callLocIdx = 171; s.pc = 24; return s.tmp_5; - case 24: - r0 = s.retval; - s.tmp_4.arg0 = r0; - s.callLocIdx = 172; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - s.tmp_3 = r0; - s.tmp_7 = controller_Button_pressureLevel__P2201_mk(s); - s.tmp_8 = controller_Controller_up__P2145_mk(s); - s.tmp_8.arg0 = s.arg0; - s.callLocIdx = 173; s.pc = 26; return s.tmp_8; - case 26: + 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__P21037_mk(s); + s.callLocIdx = 1158; s.pc = 21; return s.tmp_5; + case 21: r0 = s.retval; - s.tmp_7.arg0 = r0; - s.callLocIdx = 174; s.pc = 25; return s.tmp_7; - case 25: + s.scene___28509 = (r0); + r0 = pxsim_numops_toBoolDecr(s.scene___28509); + if (!r0) { step = 7; continue; } + r0 = s.scene___28509.fields["allSprites"]; + s.tmp_0 = r0; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); + case 7: + case 8: + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1159; s.pc = 22; return s.tmp_0; + case 22: r0 = s.retval; - s.tmp_6 = r0; - r0 = (s.tmp_3 - s.tmp_6); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); + s.sources___28517 = (r0); + s.tmp_0 = r0 = s.sources___28517; + 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___28517); + case 10: + // jmp value (already in r0) s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - { step = 12; continue; } - case 3: - s.tmp_1 = controller_Button__C2189_v0_1_mk(s); - s.tmp_2 = controller_Controller_right__P2144_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 175; 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__C2189_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__C2189_v0_1_mk(s); - s.tmp_6 = controller_Controller_left__P2143_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 176; 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__C2189_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___8796; - 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__C2189_v0_1_mk(s); - s.tmp_2 = controller_Controller_down__P2146_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 177; 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__C2189_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__C2189_v0_1_mk(s); - s.tmp_6 = controller_Controller_up__P2145_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 178; 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__C2189_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; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 11; continue; } + r0 = pxsim_Array_.removeElement(s.sources___28517, s.arg0); case 11: - // jmp value (already in r0) - s.tmp_7 = r0; - s.tmp_8 = r0 = s.svy___8797; - 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___8832 = (r0); - s.tmp_0 = r0 = s.svxInCricle___8832; - r0 = pxsim_pxtrt_ldlocRef(s.svx___8796); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt.mklocRef(); - s.svyInCircle___8834 = (r0); - s.tmp_0 = r0 = s.svyInCircle___8834; - r0 = pxsim_pxtrt_ldlocRef(s.svy___8797); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = pxsim_pxtrt_ldlocRef(s.svx___8796); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svx___8796); - s.tmp_2 = r0; - r0 = (s.tmp_1 * s.tmp_2); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___8797); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_ldlocRef(s.svy___8797); - s.tmp_5 = r0; - r0 = (s.tmp_4 * s.tmp_5); - s.tmp_3 = r0; - r0 = (s.tmp_0 + s.tmp_3); - s.sq___8836 = (r0); - r0 = (s.sq___8836 > 65536); + r0 = s.arg0.fields["anchor"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = (65536 / s.sq___8836); - s.tmp_1 = r0; - r0 = pxsim.Math_.sqrt(s.tmp_1); - s.scale___8851 = (r0); - s.tmp_0 = r0 = s.svxInCricle___8832; - s.tmp_3 = r0 = s.scale___8851; - r0 = pxsim_pxtrt_ldlocRef(s.svx___8796); - 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___8834; - s.tmp_3 = r0 = s.scale___8851; - r0 = pxsim_pxtrt_ldlocRef(s.svy___8797); - 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); + r0 = (s.tmp_0 == undefined); case 13: case 14: - r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P8869); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___8795); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___8796); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___8797); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___8832); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___8834); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_2 = controller_Controller__controlledSprites__P2139_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 179; 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 = 187; s.pc = 35; return s.tmp_1; - case 35: - r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___8795); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 15; continue; } - s.tmp_1 = controller_Controller__controlledSprites__P2140_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = helpers_arrayFilter__P110_mk(s); - s.tmp_3 = controller_Controller__controlledSprites__P2139_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 188; 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__P8926; - s.callLocIdx = 189; s.pc = 38; return s.tmp_2; - case 38: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 190; s.pc = 37; return s.tmp_1; - case 37: - r0 = s.retval; + r0 = s.arg0.fields["head"]; + s.current___28531 = (r0); case 15: + s.tmp_0 = r0 = s.current___28531; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 16; continue; } + r0 = s.tmp_0; + { step = 17; continue; } case 16: + r0 = s.current___28531.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___28531.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___28531.fields["next"]; + r0 = r0.fields["next"]; + s.tmp_4 = r0; + r0 = (s.current___28531).fields["next"] = (s.tmp_4); + { step = 19; continue; } + case 18: + r0 = s.current___28531.fields["next"]; + s.current___28531 = (r0); + case 19: + { step = 15; continue; } + case 20: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate__P2162.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} +particles_ParticleSource__prune__P21197.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} -function controller_Controller___preUpdate__P2162_mk(s) { +function particles_ParticleSource__prune__P21197_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate__P2162, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__prune__P21197, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -7590,17 +6485,9 @@ function controller_Controller___preUpdate__P2162_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - deadSprites___8795: undefined, - svx___8796: undefined, - svy___8797: undefined, - svxInCricle___8832: undefined, - svyInCircle___8834: undefined, - sq___8836: undefined, - scale___8851: undefined, + scene___28509: undefined, + sources___28517: undefined, + current___28531: undefined, arg0: undefined, } } @@ -7608,7 +6495,7 @@ function controller_Controller___preUpdate__P2162_mk(s) { -function controller_Controller___preUpdate_inline__P8869(s) { +function helpers_arraySlice__P18153(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7618,175 +6505,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___8872 = undefined; - s.vx___8873 = undefined; - s.vy___8874 = undefined; + s.res___28554 = undefined; + s.len___28556 = undefined; + s.i___28590 = 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 = 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 = 180; s.pc = 22; return s.tmp_0; } - } - case 22: - r0 = s.retval; - s.s___8872 = (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 = 181; s.pc = 23; return s.tmp_2; } - } - case 23: - r0 = s.retval; - s.vx___8873 = (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 = 182; s.pc = 24; return s.tmp_3; } - } - case 24: - r0 = s.retval; - s.vy___8874 = (r0); - r0 = s.s___8872.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); + r0 = pxsim_Array__mk(); + s.res___28554 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___28556 = (r0); + r0 = (s.arg1 === undefined); 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; } + s.arg1 = (0); + { step = 4; continue; } case 1: - case 2: - r0 = s.arg0.fields["_inputLastFrame"]; + r0 = (s.arg1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - r0 = pxsim_numops_toBoolDecr(s.vx___8873); - if (!r0) { step = 3; continue; } - r0 = (s.s___8872).fields["_vx"] = (0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_max__P18168_mk(s); + r0 = (s.len___28556 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 8; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + s.arg1 = (r0); + case 2: case 3: case 4: - r0 = pxsim_numops_toBoolDecr(s.vy___8874); + r0 = (s.arg1 > s.len___28556); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - r0 = (s.s___8872).fields["_vy"] = (0); + r0 = s.res___28554; + { 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___28556); + { step = 10; continue; } case 7: - case 8: - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + r0 = (s.arg2 < 0); s.tmp_0 = r0; - r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 9; continue; } - r0 = s.tmp_0; - { step = 10; continue; } + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = (s.len___28556 + s.arg2); + s.arg2 = (r0); + case 8: 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___8873; - r0 = pxsim_numops_toBool(s.tmp_2); - if (r0) { step = 11; continue; } - r0 = s.tmp_2; - { step = 12; continue; } + r0 = (s.arg2 > s.len___28556); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.arg2 = (s.len___28556); case 11: - r0 = s.vy___8874; 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___8872; - r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); - s.tmp_6 = r0; - r0 = pxsim.Math_.imul(s.tmp_6, s.vx___8873); - s.tmp_5 = r0; - r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); - s.tmp_0 = r0 = s.s___8872; - r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___8874); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); - { step = 18; continue; } + s.i___28590 = (s.arg1); case 13: - r0 = pxsim_numops_toBoolDecr(s.vx___8873); + r0 = (s.i___28590 < s.arg2); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 14; continue; } - s.tmp_0 = r0 = s.s___8872; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1 = r0 = s.res___28554; + r0 = pxsim_Array__getAt(s.arg0, s.i___28590); s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vx___8873); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - { step = 17; continue; } + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___28590 + 1); + s.i___28590 = (r0); + { step = 13; continue; } case 14: - r0 = pxsim_numops_toBoolDecr(s.vy___8874); - if (!r0) { step = 15; continue; } - s.tmp_0 = r0 = s.s___8872; - r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.vy___8874); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + r0 = s.res___28554; 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; return leave(s, r0) default: oops() } } } -controller_Controller___preUpdate_inline__P8869.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} +helpers_arraySlice__P18153.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 controller_Controller___preUpdate_inline__P8869_mk(s) { +function helpers_arraySlice__P18153_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P8869, depth: s.depth + 1, + parent: s, fn: helpers_arraySlice__P18153, 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___8872: undefined, - vx___8873: undefined, - vy___8874: undefined, + res___28554: undefined, + len___28556: undefined, + i___28590: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function controller_Controller___preUpdate_inline__P8926(s) { +function particles_ParticleSource_enabled__P21202(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7798,37 +6624,66 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["s"]; - r0 = r0.fields["flags"]; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = particles_ParticleSource_enabled__P21201_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1162; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 & 2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = (s.tmp_1 !== s.tmp_2); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + 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; } + 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() } } } -controller_Controller___preUpdate_inline__P8926.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} +particles_ParticleSource_enabled__P21202.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 controller_Controller___preUpdate_inline__P8926_mk(s) { +function particles_ParticleSource_enabled__P21202_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller___preUpdate_inline__P8926, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P21202, 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 controller_Button_pressureLevel__P2201(s) { +function particles_ParticleSource_enabled__P21201(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7843,57 +6698,34 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C2189_VT)) failedCast(r0); - r0 = pxsim.control.deviceDalVersion(); + if (!checkSubtype(r0, particles_ParticleSource__C21189_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 = (s.tmp_1 == "sim"); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_3 = controller_Button__C2189_v0_1_mk(s); - s.tmp_3.arg0 = s.arg0; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C2189_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.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: - // 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) + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) default: oops() } } } -controller_Button_pressureLevel__P2201.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} +particles_ParticleSource_enabled__P21201.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__P21201.isGetter = true; -function controller_Button_pressureLevel__P2201_mk(s) { +function particles_ParticleSource_enabled__P21201_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_pressureLevel__P2201, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_enabled__P21201, 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, } } @@ -7901,7 +6733,7 @@ function controller_Button_pressureLevel__P2201_mk(s) { -function controller_Button_isPressed__P2200(s) { +function control_popEventContext__P18448(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7911,31 +6743,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; - if (!checkSubtype(r0, controller_Button__C2189_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + s.ctx___28640 = undefined; + s.context___28648 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___22482); + 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 = pxsim_Array_.pop(globals.eventContexts___22482); + s.ctx___28640 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___28640); + 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__P18440_mk(s); + s.tmp_2.arg0 = s.ctx___28640; + s.callLocIdx = 56; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.tmp_0 = r0 = globals.eventContexts___22482; + r0 = pxsim_Array__length(globals.eventContexts___22482); + 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___28648 = (r0); + r0 = pxsim_numops_toBoolDecr(s.context___28648); + if (!r0) { step = 5; continue; } + s.tmp_0 = control_EventContext_register__P18439_mk(s); + s.tmp_0.arg0 = s.context___28648; + s.callLocIdx = 57; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + { step = 6; continue; } + case 5: + globals.eventContexts___22482 = (undefined); + case 6: + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_isPressed__P2200.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} +control_popEventContext__P18448.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} -function controller_Button_isPressed__P2200_mk(s) { +function control_popEventContext__P18448_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_isPressed__P2200, depth: s.depth + 1, + parent: s, fn: control_popEventContext__P18448, 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, + ctx___28640: undefined, + context___28648: undefined, } } -function controller_Controller_down__P2146(s) { +function control_EventContext_unregister__P18440(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7945,30 +6821,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___27577 = undefined; + s.unnamed150___U1 = undefined; + s.unnamed151___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (4 - 1); + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); + s.h___27577 = (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 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, 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___27577 = (r0); + s.tmp_2 = control_EventHandler_unregister__P22476_mk(s); + s.tmp_2.arg0 = s.h___27577; + s.callLocIdx = 49; 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() } } } -controller_Controller_down__P2146.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__P2146.isGetter = true; +control_EventContext_unregister__P18440.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function controller_Controller_down__P2146_mk(s) { +function control_EventContext_unregister__P18440_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_down__P2146, depth: s.depth + 1, + parent: s, fn: control_EventContext_unregister__P18440, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + h___27577: undefined, + unnamed150___U1: undefined, + unnamed151___U2: undefined, arg0: undefined, } } @@ -7976,7 +6882,7 @@ function controller_Controller_down__P2146_mk(s) { -function controller_Controller_button__P4725(s) { +function control_EventHandler_unregister__P22476(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -7988,37 +6894,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, controller_Controller__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + if (!checkSubtype(r0, control_EventHandler__C22474_VT)) failedCast(r0); + r0 = s.arg0.fields["src"]; s.tmp_0 = r0; - r0 = (s.arg1 - 1); + r0 = s.arg0.fields["value"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = pxsim.control.internalOnEvent(s.tmp_0, s.tmp_1, control_doNothing__P22478, s.tmp_2); + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller_button__P4725.info = {"start":6666,"length":105,"line":220,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"button","argumentNames":["this","button"]} +control_EventHandler_unregister__P22476.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} -function controller_Controller_button__P4725_mk(s) { +function control_EventHandler_unregister__P22476_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_button__P4725, depth: s.depth + 1, + parent: s, fn: control_EventHandler_unregister__P22476, 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_up__P2145(s) { +function control_doNothing__P22478(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8028,38 +6936,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__C2134_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) + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_up__P2145.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__P2145.isGetter = true; +control_doNothing__P22478.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} -function controller_Controller_up__P2145_mk(s) { +function control_doNothing__P22478_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_up__P2145, depth: s.depth + 1, + parent: s, fn: control_doNothing__P22478, 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__P2144(s) { +function control_EventContext_register__P18439(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8069,30 +6963,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___28661 = undefined; + s.unnamed148___U1 = undefined; + s.unnamed149___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; - s.tmp_0 = r0; - r0 = (3 - 1); + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); + s.h___28661 = (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 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, 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___28661 = (r0); + s.tmp_2 = control_EventHandler_register__P22475_mk(s); + s.tmp_2.arg0 = s.h___28661; + s.callLocIdx = 47; 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__P22480_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 48; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller_right__P2144.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__P2144.isGetter = true; +control_EventContext_register__P18439.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function controller_Controller_right__P2144_mk(s) { +function control_EventContext_register__P18439_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_right__P2144, depth: s.depth + 1, + parent: s, fn: control_EventContext_register__P18439, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + h___28661: undefined, + unnamed148___U1: undefined, + unnamed149___U2: undefined, arg0: undefined, } } @@ -8100,7 +7023,7 @@ function controller_Controller_right__P2144_mk(s) { -function controller_Controller_left__P2143(s) { +function control_EventHandler_register__P22475(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8115,25 +7038,32 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["buttons"]; + if (!checkSubtype(r0, control_EventHandler__C22474_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkAction(1, control_EventHandler_register_inline__P25460); s.tmp_0 = r0; - r0 = (1 - 1); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = s.arg0.fields["src"]; s.tmp_1 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); - return leaveAccessor(s, 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() } } } -controller_Controller_left__P2143.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__P2143.isGetter = true; +control_EventHandler_register__P22475.info = {"start":961,"length":165,"line":30,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} -function controller_Controller_left__P2143_mk(s) { +function control_EventHandler_register__P22475_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_left__P2143, depth: s.depth + 1, + parent: s, fn: control_EventHandler_register__P22475, 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, } } @@ -8141,7 +7071,7 @@ function controller_Controller_left__P2143_mk(s) { -function controller_Controller__controlledSprites__P2140(s) { +function control_EventHandler_register_inline__P25460(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8151,45 +7081,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, controller_Controller__C2134_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 160; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = r0.fields["controlledSprites"]; + r0 = s.caps[0].fields["handler"]; 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 = 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 = 41; 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 = 41; s.pc = 3; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 41; s.pc = 3; return s.tmp_1;; } + else { s.callLocIdx = 41; s.pc = 3; return s.tmp_1; } + } + case 3: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P2140.info = {"start":3300,"length":134,"line":105,"column":8,"endLine":107,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"_controlledSprites","argumentNames":["this","cps"]} +control_EventHandler_register_inline__P25460.info = {"start":1032,"length":71,"line":31,"column":58,"endLine":33,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} -function controller_Controller__controlledSprites__P2140_mk(s) { +function control_EventHandler_register_inline__P25460_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P2140, depth: s.depth + 1, + parent: s, fn: control_EventHandler_register_inline__P25460, 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__P2139(s) { +function game_pushScene__P21041(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8199,43 +7129,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Controller__C2134_VT)) failedCast(r0); - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 159; s.pc = 1; return s.tmp_1; + s.oldScene___30667 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 948; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.oldScene___30667 = (r0); + s.tmp_0 = particles_clearAll__P21219_mk(s); + s.callLocIdx = 949; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_disableAll__P21220_mk(s); + s.callLocIdx = 950; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals._sceneStack___22983); + 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._sceneStack___22983 = (r0); case 1: + case 2: + r0 = pxsim_Array__push(globals._sceneStack___22983, globals._scene___22982); + s.tmp_0 = game_init__P22990_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 951; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - r0 = r0.fields["controlledSprites"]; + r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___22984); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P30684); 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 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___30667); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1.arg0 = globals._scenePushHandlers___22984; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 953; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + case 3: + case 4: + r0 = undefined; + return leave(s, r0) default: oops() } } } -controller_Controller__controlledSprites__P2139.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__P2139.isGetter = true; +game_pushScene__P21041.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} -function controller_Controller__controlledSprites__P2139_mk(s) { +function game_pushScene__P21041_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller__controlledSprites__P2139, depth: s.depth + 1, + parent: s, fn: game_pushScene__P21041, 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, + oldScene___30667: undefined, } } -function Fx_imul__P161(s) { +function game_pushScene_inline__P30684(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8247,29 +7204,35 @@ 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); + 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 = 952; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_imul__P161.info = {"start":1010,"length":130,"line":32,"column":4,"endLine":34,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"imul","argumentNames":["a","b"]} +game_pushScene_inline__P30684.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} -function Fx_imul__P161_mk(s) { +function game_pushScene_inline__P30684_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_imul__P161, depth: s.depth + 1, + parent: s, fn: game_pushScene_inline__P30684, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function power_checkDeepSleep__P1930(s) { +function game_init__P22990(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8279,77 +7242,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___7449 = undefined; - s.to___7452 = undefined; - s.tmp_0 = power_init__P4569_mk(s); - s.callLocIdx = 75; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = r0 = globals._poked___4567; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(globals._scene___22982); + 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 = 0; + r0 = s.arg0; case 2: // jmp value (already in r0) - s.tmp_1 = r0; - s.p___7449 = (s.tmp_1); - s.tmp_0 = r0 = globals._timeout___4568; - r0 = pxsim_numops_toBool(s.tmp_0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 3; continue; } - r0 = s.tmp_0; - { step = 4; continue; } + r0 = pxsim_pxtcore_mkClassInstance(scene_Scene__C20881_VT); + s.tmp_3 = r0; + s.tmp_4 = scene_Scene_constructor__P20904_mk(s); + s.tmp_4.arg0 = s.tmp_3; + s.tmp_5 = control_pushEventContext__P18447_mk(s); + s.callLocIdx = 945; s.pc = 6; return s.tmp_5; + case 6: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.tmp_4.arg2 = globals._scene___22982; + s.callLocIdx = 946; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; + globals._scene___22982 = (s.tmp_3); case 3: - r0 = 0; case 4: - // jmp value (already in r0) - s.tmp_1 = r0; - s.to___7452 = (s.tmp_1); - r0 = (s.to___7452 > 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___7449); - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.to___7452); - 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; } + s.tmp_0 = scene_Scene_init__P20905_mk(s); + s.tmp_0.arg0 = globals._scene___22982; + s.callLocIdx = 947; 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; r0 = undefined; return leave(s, r0) default: oops() } } } -power_checkDeepSleep__P1930.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} +game_init__P22990.info = {"start":4560,"length":194,"line":141,"column":4,"endLine":146,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["forceNewScene"]} -function power_checkDeepSleep__P1930_mk(s) { +function game_init__P22990_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_checkDeepSleep__P1930, depth: s.depth + 1, + parent: s, fn: game_init__P22990, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -8357,16 +7299,14 @@ function power_checkDeepSleep__P1930_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - p___7449: undefined, - to___7452: undefined, + arg0: undefined, } } -function power_init__P4569(s) { +function scene_Scene_init__P20905(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8376,54 +7316,138 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals._timeout___4568 !== undefined); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C20881_VT)) failedCast(r0); + r0 = s.arg0.fields["allSprites"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; continue; } + { step = 3; continue; } case 1: case 2: - r0 = pxsim_pxtcore.getConfig(212, -1); - s.tmp_1 = r0; - r0 = (s.tmp_1 * 1000); - globals._timeout___4568 = (r0); - r0 = (globals._timeout___4568 > 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: - r0 = (globals._timeout___4568 < 300000); + s.tmp_1 = power_poke__P19967_mk(s); + s.callLocIdx = 907; s.pc = 4; return s.tmp_1; case 4: - // jmp value (already in r0) + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - globals._timeout___4568 = (300000); + r0 = (s.tmp_0).fields["allSprites"] = (s.tmp_1); + r0 = (s.arg0).fields["spriteNextId"] = (0); + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25098); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P18441_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 = 910; s.pc = 5; return s.tmp_1; case 5: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P18441_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 13; + s.tmp_0.arg2 = controller__moveSprites__P20171; + s.callLocIdx = 911; s.pc = 6; return s.tmp_0; case 6: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25122); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P18441_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 = 913; s.pc = 7; return s.tmp_1; case 7: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25135); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P18441_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 = 917; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25156); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P18441_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 = 919; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25164); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_EventContext_registerFrameHandler__P18441_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 = 923; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + s.tmp_0 = control_EventContext_registerFrameHandler__P18441_mk(s); + r0 = s.arg0.fields["eventContext"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 200; + s.tmp_0.arg2 = control___screen_update__P20031; + s.callLocIdx = 924; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = multiplayer_initServer__P21426_mk(s); + s.callLocIdx = 925; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = multiplayer_initPlayerConnectionListeners__P21427_mk(s); + s.callLocIdx = 926; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_Scene_init_inline__P25195); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1.arg0 = globals.scene_Scene_initializers___20903; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 928; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -power_init__P4569.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} +scene_Scene_init__P20905.info = {"start":4432,"length":2572,"line":127,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"init","argumentNames":["this"]} -function power_init__P4569_mk(s) { +function scene_Scene_init__P20905_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_init__P4569, depth: s.depth + 1, + parent: s, fn: scene_Scene_init__P20905, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + arg0: undefined, } } -function power_poke__P1929(s) { +function scene_Scene_init_inline__P25098(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8433,31 +7457,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = power_init__P4569_mk(s); - s.callLocIdx = 74; s.pc = 1; return s.tmp_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.tmp_1 = r0; + r0 = (s.tmp_0).fields["_millis"] = (s.tmp_1); + s.tmp_0 = controller___update__P20203_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 = 909; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = pxsim.control.millis(); - globals._poked___4567 = (r0); r0 = undefined; return leave(s, r0) default: oops() } } } -power_poke__P1929.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} +scene_Scene_init_inline__P25098.info = {"start":4722,"length":217,"line":134,"column":72,"endLine":138,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function power_poke__P1929_mk(s) { +function scene_Scene_init_inline__P25098_mk(s) { checkStack(s.depth); return { - parent: s, fn: power_poke__P1929, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25098, 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 control_EventContext_registerFrameHandler__P403(s) { +function scene_Scene_init_inline__P25122(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8467,105 +7507,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.fn___9131 = undefined; - s.i___9140 = 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__C395_VT)) failedCast(r0); - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_0 = PhysicsEngine__C20549_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 = 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_3).fields["frameCallbacks"] = (s.tmp_4); - s.tmp_0 = control_EventContext_registerFrameCallbacks__P4442_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 50; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 1: - case 2: - r0 = pxsim_pxtcore_mkClassInstance(control_FrameCallback__C392_VT); - s.fn___9131 = (r0); - r0 = (s.fn___9131).fields["order"] = (s.arg1); - r0 = (s.fn___9131).fields["handler"] = (s.arg2); - s.i___9140 = (0); - case 3: - s.tmp_1 = r0 = s.i___9140; - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + r0 = s.tmp_1.fields["deltaTimeMillis"]; 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___9140); - 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___9140, s.fn___9131); - r0 = s.fn___9131; - { step = 7; continue; } - case 4: - case 5: - r0 = (s.i___9140 + 1); - s.i___9140 = (r0); - { step = 3; continue; } - case 6: - r0 = s.arg0.fields["frameCallbacks"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.fn___9131); - r0 = s.fn___9131; - case 7: + r0 = (s.tmp_2 / 1000); + s.tmp_0.arg1 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C20549_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: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameHandler__P403.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"]} +scene_Scene_init_inline__P25122.info = {"start":5234,"length":159,"line":143,"column":69,"endLine":146,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameHandler__P403_mk(s) { +function scene_Scene_init_inline__P25122_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameHandler__P403, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25122, 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___9131: undefined, - i___9140: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_EventContext_registerFrameCallbacks__P4442(s) { +function scene_Scene_init_inline__P25135(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8575,55 +7551,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.worker___9174 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C395_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.dt___25136 = undefined; + s.s___25144 = 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; } - { step = 3; continue; } + r0 = s.tmp_0.fields["deltaTimeMillis"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 / 1000); + s.dt___25136 = (r0); + s.tmp_0 = scene_Camera_update__P20836_mk(s); + r0 = s.caps[0].fields["camera"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 915; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.s___25144 = (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___25144 = (r0); + s.tmp_2 = if___update_3_mk(s); + s.tmp_2.arg0 = s.s___25144; + r0 = s.caps[0].fields["camera"]; + s.tmp_2.arg1 = r0; + s.tmp_2.arg2 = s.dt___25136; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__update"), 3); + s.callLocIdx = 916; 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 = 916; s.pc = 4; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 916; s.pc = 4; return s.tmp_2;; } + else { s.callLocIdx = 916; 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.arg0.fields["frameWorker"]; - s.worker___9174 = (r0); - r0 = pxsim_pxtcore_mkAction(2, control_EventContext_registerFrameCallbacks_inline__P9180); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.worker___9174); - r0 = pxsim.control.runInParallel(s.tmp_0); - case 3: + s.unnamed178___U2 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks__P4442.info = {"start":3668,"length":895,"line":109,"column":8,"endLine":133,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"registerFrameCallbacks","argumentNames":["this"]} +scene_Scene_init_inline__P25135.info = {"start":5582,"length":214,"line":152,"column":79,"endLine":158,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks__P4442_mk(s) { +function scene_Scene_init_inline__P25135_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks__P4442, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25135, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - worker___9174: undefined, - arg0: undefined, + dt___25136: undefined, + s___25144: undefined, + unnamed178___U2: undefined, + unnamed179___U3: undefined, } } -function control_EventContext_registerFrameCallbacks_inline__P9180(s) { +function scene_Scene_init_inline__P25156(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8633,73 +7634,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.delay___9210 = 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__P9186); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.caps[0]); - s.tmp_2 = pauseUntil__P367_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 44; s.pc = 5; return s.tmp_2; - case 5: - r0 = s.retval; + s.tmp_0 = scene_Scene_render__P20910_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 918; 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__P4441_mk(s); - s.tmp_2.arg0 = s.caps[0]; - s.callLocIdx = 45; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.delay___9210 = (r0); - s.tmp_0 = pause__P413_mk(s); - s.tmp_0.arg0 = s.delay___9210; - s.callLocIdx = 46; 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__P9180.info = {"start":3829,"length":723,"line":113,"column":34,"endLine":132,"endColumn":13,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +scene_Scene_init_inline__P25156.info = {"start":5937,"length":109,"line":163,"column":76,"endLine":166,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks_inline__P9180_mk(s) { +function scene_Scene_init_inline__P25156_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P9180, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25156, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - delay___9210: undefined, } } -function control_EventContext_registerFrameCallbacks_inline__P9186(s) { +function scene_Scene_init_inline__P25164(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8709,30 +7667,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["runningCallbacks"]; + s.tmp_0 = r0 = globals.stats___21006; + 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___18436; + case 2: + // jmp value (already in r0) s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_2 = lambda_2_mk(s); + s.tmp_2.argL = globals.control_EventContext_onStats___18436; + if ((globals.control_EventContext_lastStats___18435) && (globals.control_EventContext_lastStats___18435).vtable) { + setupResume(s, 8); + pxsim_String__stringConv(globals.control_EventContext_lastStats___18435); + checkResumeConsumed(); + return; + } else { s.retval = (globals.control_EventContext_lastStats___18435) + ""; } + case 8: + r0 = s.retval; + 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 = 920; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(globals.debug___21005); + if (!r0) { step = 5; continue; } + s.tmp_0 = PhysicsEngine__C20549_v3_1_mk(s); + r0 = s.caps[0].fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C20549_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: + case 6: + s.tmp_0 = game_consoleOverlay_draw__P21165_mk(s); + s.callLocIdx = 921; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = power_checkDeepSleep__P19968_mk(s); + s.callLocIdx = 922; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_registerFrameCallbacks_inline__P9186.info = {"start":4060,"length":28,"line":117,"column":31,"endLine":117,"endColumn":59,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":[]} +scene_Scene_init_inline__P25164.info = {"start":6163,"length":504,"line":168,"column":80,"endLine":180,"endColumn":13,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":[]} -function control_EventContext_registerFrameCallbacks_inline__P9186_mk(s) { +function scene_Scene_init_inline__P25164_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_registerFrameCallbacks_inline__P9186, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25164, 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, } } -function control_EventContext_runCallbacks__P4441(s) { +function scene_Scene_init_inline__P25195(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -8742,283 +7778,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.loopStart___9219 = undefined; - s.f___9232 = undefined; - s.unnamed54___U2 = undefined; - s.unnamed55___U3 = undefined; - s.now___9237 = undefined; - s.runtime___9240 = undefined; - s.realTimeInSample___9259 = undefined; - s.fps___9268 = undefined; - s.delay___9337 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C395_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.loopStart___9219 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["prevTimeMillis"]; - s.tmp_2 = r0; - r0 = (s.loopStart___9219 - s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["deltaTimeMillis"] = (s.tmp_1); - r0 = (s.arg0).fields["prevTimeMillis"] = (s.loopStart___9219); - s.f___9232 = (undefined); - r0 = s.arg0.fields["frameCallbacks"]; - s.unnamed54___U2 = (r0); - s.unnamed55___U3 = (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 = 927; s.pc = 1; return s.tmp_0; case 1: - s.tmp_0 = r0 = s.unnamed55___U3; - r0 = pxsim_Array__length(s.unnamed54___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed54___U2, s.unnamed55___U3); - s.f___9232 = (r0); - s.tmp_2 = if_handler_1_mk(s); - s.tmp_2.arg0 = s.f___9232; - if (!s.tmp_2.arg0.vtable.iface) { - setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "handler"), 1); - s.callLocIdx = 42; 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 = 42; s.pc = 11; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 42; s.pc = 11; return s.tmp_2;; } - else { s.callLocIdx = 42; s.pc = 11; return s.tmp_2; } - } - case 11: - r0 = s.retval; - r0 = (s.unnamed55___U3 + 1); - s.unnamed55___U3 = (r0); - { step = 1; continue; } - case 2: - s.unnamed54___U2 = (undefined); - r0 = pxsim.control.millis(); - s.now___9237 = (r0); - r0 = (s.now___9237 - s.loopStart___9219); - s.runtime___9240 = (r0); - s.tmp_0 = r0 = s.arg0; - r0 = s.tmp_0.fields["timeInSample"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.runtime___9240); - 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 = 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___9237 - s.tmp_4); - s.realTimeInSample___9259 = (r0); - r0 = (s.arg0).fields["lastPerfDump"] = (s.now___9237); - 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___9268 = (r0); - r0 = pxsim.Math_.round(s.fps___9268); - 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___397 = (r0); - r0 = (s.fps___9268 < 99); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - if ((globals.control_EventContext_lastStats___397) && (globals.control_EventContext_lastStats___397).vtable) { - setupResume(s, 13); - pxsim_String__stringConv(globals.control_EventContext_lastStats___397); - checkResumeConsumed(); - return; - } else { s.retval = (globals.control_EventContext_lastStats___397) + ""; } - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.fps___9268 * 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___397 = (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___9268 * 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___9259) && (s.realTimeInSample___9259).vtable) { - setupResume(s, 19); - pxsim_String__stringConv(s.realTimeInSample___9259); - checkResumeConsumed(); - return; - } else { s.retval = (s.realTimeInSample___9259) + ""; } - 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__P130_mk(s); - s.tmp_0.arg0 = 1; - r0 = (20 - s.runtime___9240); - s.tmp_0.arg1 = r0; - s.callLocIdx = 43; s.pc = 20; return s.tmp_0; - case 20: r0 = s.retval; - s.delay___9337 = (r0); - r0 = s.delay___9337; + r0 = undefined; return leave(s, r0) default: oops() } } } -control_EventContext_runCallbacks__P4441.info = {"start":2220,"length":1395,"line":75,"column":8,"endLine":106,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"runCallbacks","argumentNames":["this"]} +scene_Scene_init_inline__P25195.info = {"start":6980,"length":12,"line":186,"column":39,"endLine":186,"endColumn":51,"fileName":"pxt_modules/game/scene.ts","functionName":"inline","argumentNames":["f"]} -function control_EventContext_runCallbacks__P4441_mk(s) { +function scene_Scene_init_inline__P25195_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_runCallbacks__P4441, depth: s.depth + 1, + parent: s, fn: scene_Scene_init_inline__P25195, 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___9219: undefined, - f___9232: undefined, - unnamed54___U2: undefined, - unnamed55___U3: undefined, - now___9237: undefined, - runtime___9240: undefined, - realTimeInSample___9259: undefined, - fps___9268: undefined, - delay___9337: undefined, arg0: undefined, } } @@ -9026,7 +7808,7 @@ function control_EventContext_runCallbacks__P4441_mk(s) { -function pauseUntil__P367(s) { +function multiplayer_initPlayerConnectionListeners__P21427(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9036,77 +7818,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.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.p___25215 = undefined; + s.p___25215 = (1); 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 = 29; 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; } + r0 = (s.p___25215 <= 4); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = multiplayer_registerPlayerConnectionListeners__P23438_mk(s); + s.tmp_1.arg0 = s.p___25215; + s.callLocIdx = 1279; s.pc = 3; return s.tmp_1; 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__P366_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 30; s.pc = 9; return s.tmp_0; - case 9: r0 = s.retval; - case 7: + r0 = (s.p___25215 + 1); + s.p___25215 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -pauseUntil__P367.info = {"start":2224,"length":227,"line":73,"column":0,"endLine":77,"endColumn":1,"fileName":"pxt_modules/base/poll.ts","functionName":"pauseUntil","argumentNames":["condition","timeOut"]} +multiplayer_initPlayerConnectionListeners__P21427.info = {"start":1324,"length":154,"line":39,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initPlayerConnectionListeners","argumentNames":[]} -function pauseUntil__P367_mk(s) { +function multiplayer_initPlayerConnectionListeners__P21427_mk(s) { checkStack(s.depth); return { - parent: s, fn: pauseUntil__P367, depth: s.depth + 1, + parent: s, fn: multiplayer_initPlayerConnectionListeners__P21427, 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, + p___25215: undefined, } } -function control___queuePollEvent__P366(s) { +function multiplayer_registerPlayerConnectionListeners__P23438(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9116,97 +7864,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ev___9359 = 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__C4415_VT); - s.tmp_0 = r0; - s.tmp_1 = control_PollEvent_constructor__P4416_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 = 27; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.ev___9359 = (s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___4418); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P25227); 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___9359); - globals._pollEventQueue___4418 = (s.tmp_2); - r0 = pxsim.control.runInParallel(control_pollEvents__P4419); - { step = 2; continue; } + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P18429_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 = 1281; s.pc = 1; return s.tmp_1; case 1: - r0 = pxsim_Array__push(globals._pollEventQueue___4418, s.ev___9359); - case 2: - r0 = pxsim_numops_toBoolDecr(s.arg2); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_onEvent__P391_mk(s); - r0 = s.ev___9359.fields["eid"]; - s.tmp_0.arg0 = r0; - r0 = s.ev___9359.fields["vid"]; - s.tmp_0.arg1 = r0; - s.tmp_0.arg2 = s.arg2; - s.tmp_0.arg3 = 16; - s.callLocIdx = 28; s.pc = 6; return s.tmp_0; - case 6: r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = s.ev___9359.fields["eid"]; + r0 = pxsim_pxtcore_mkAction(1, multiplayer_registerPlayerConnectionListeners_inline__P25233); s.tmp_0 = r0; - r0 = s.ev___9359.fields["vid"]; - s.tmp_1 = r0; - setupResume(s, 7); - pxsim.control.waitForEvent(s.tmp_0, s.tmp_1); - checkResumeConsumed(); - return; - case 7: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = control_onEvent__P18429_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 = 1283; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -control___queuePollEvent__P366.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"]} +multiplayer_registerPlayerConnectionListeners__P23438.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___queuePollEvent__P366_mk(s) { +function multiplayer_registerPlayerConnectionListeners__P23438_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___queuePollEvent__P366, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners__P23438, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - ev___9359: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_pollEvents__P4419(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P25227(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9216,139 +7920,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.now___9402 = undefined; - s.i___9405 = undefined; - s.ev___9411 = undefined; + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P23439_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 1280; s.pc = 1; return s.tmp_0; case 1: - r0 = pxsim_Array__length(globals._pollEventQueue___4418); - 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___9402 = (r0); - s.i___9405 = (0); - case 2: - s.tmp_1 = r0 = s.i___9405; - r0 = pxsim_Array__length(globals._pollEventQueue___4418); - 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___4418, s.i___9405); - s.ev___9411 = (r0); - s.tmp_1 = if_condition_1_mk(s); - s.tmp_1.arg0 = s.ev___9411; - if (!s.tmp_1.arg0.vtable.iface) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); - s.callLocIdx = 24; 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 = 24; s.pc = 13; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 24; s.pc = 13; return s.tmp_1;; } - else { s.callLocIdx = 24; s.pc = 13; return s.tmp_1; } - } - 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___9411.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___9411.fields["start"]; - s.tmp_5 = r0; - r0 = (s.now___9402 - s.tmp_5); - s.tmp_4 = r0; - r0 = s.ev___9411.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___9411.fields["eid"]; - s.tmp_9 = r0; - r0 = s.ev___9411.fields["vid"]; - s.tmp_10 = r0; - r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); - r0 = s.ev___9411.fields["once"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = helpers_arraySplice__P100_mk(s); - s.tmp_1.arg0 = globals._pollEventQueue___4418; - s.tmp_1.arg1 = s.i___9405; - s.tmp_1.arg2 = 1; - s.callLocIdx = 25; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - r0 = (s.i___9405 - 1); - s.i___9405 = (r0); - case 7: - case 8: - case 9: - case 10: - r0 = (s.i___9405 + 1); - s.i___9405 = (r0); - { step = 2; continue; } - case 11: - s.tmp_0 = pause__P413_mk(s); - s.tmp_0.arg0 = 50; - s.callLocIdx = 26; s.pc = 15; return s.tmp_0; - case 15: r0 = s.retval; - { step = 1; continue; } - case 12: - globals._pollEventQueue___4418 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -control_pollEvents__P4419.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} +multiplayer_registerPlayerConnectionListeners_inline__P25227.info = {"start":1656,"length":55,"line":49,"column":12,"endLine":49,"endColumn":67,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function control_pollEvents__P4419_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P25227_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pollEvents__P4419, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P25227, 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___9402: undefined, - i___9405: undefined, - ev___9411: undefined, } } -function helpers_arraySplice__P100(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P25233(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9358,55 +7954,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___9459 = 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_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 5; continue; } + s.tmp_0 = multiplayer_receiveConnectionChangedEvent__P23439_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 1282; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.i___9459 = (0); - case 3: - r0 = (s.i___9459 < 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___9459 + 1); - s.i___9459 = (r0); - { step = 3; continue; } - case 4: - case 5: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySplice__P100.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"]} +multiplayer_registerPlayerConnectionListeners_inline__P25233.info = {"start":1826,"length":56,"line":54,"column":12,"endLine":54,"endColumn":68,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function helpers_arraySplice__P100_mk(s) { +function multiplayer_registerPlayerConnectionListeners_inline__P25233_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySplice__P100, depth: s.depth + 1, + parent: s, fn: multiplayer_registerPlayerConnectionListeners_inline__P25233, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - i___9459: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function control_PollEvent_constructor__P4416(s) { +function multiplayer_receiveConnectionChangedEvent__P23439(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9416,49 +7988,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.c___25238 = 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_PollEvent__C4415_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); + 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___25238 = (globals.player1___20161); + { step = 5; continue; } + case 2: + s.c___25238 = (globals.player2___20158); + { step = 5; continue; } + case 3: + s.c___25238 = (globals.player3___20159); + { step = 5; continue; } + case 4: + s.c___25238 = (globals.player4___20160); + case 5: + r0 = pxsim_numops_toBoolDecr(s.c___25238); + if (!r0) { step = 6; continue; } + s.tmp_0 = controller_Controller_connected__P20194_mk(s); + s.tmp_0.arg0 = s.c___25238; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1284; 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_PollEvent_constructor__P4416.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"]} +multiplayer_receiveConnectionChangedEvent__P23439.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_PollEvent_constructor__P4416_mk(s) { +function multiplayer_receiveConnectionChangedEvent__P23439_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_PollEvent_constructor__P4416, depth: s.depth + 1, + parent: s, fn: multiplayer_receiveConnectionChangedEvent__P23439, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + c___25238: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, - arg5: undefined, - arg6: undefined, } } -function control_EventContext_deltaTime__P400(s) { +function controller_Controller_connected__P20194(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9470,33 +8060,57 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, control_EventContext__C395_VT)) failedCast(r0); - r0 = s.arg0.fields["deltaTimeMillis"]; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; + s.tmp_1 = r0; + r0 = (s.arg1 != s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 / 1000); - return leaveAccessor(s, 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) default: oops() } } } -control_EventContext_deltaTime__P400.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__P400.isGetter = true; +controller_Controller_connected__P20194.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_deltaTime__P400_mk(s) { +function controller_Controller_connected__P20194_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_deltaTime__P400, depth: s.depth + 1, + parent: s, fn: controller_Controller_connected__P20194, 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_arrayForEach__P109(s) { +function control_onEvent__P18429(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9506,58 +8120,63 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___7162 = undefined; - s.i___7165 = undefined; + s.ctx___25393 = 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_Array__length(s.arg0); - s.len___7162 = (r0); - s.i___7165 = (0); - case 1: - r0 = (s.i___7165 < s.len___7162); + s.tmp_0 = control_eventContext__P18446_mk(s); + s.callLocIdx = 39; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.ctx___25393 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___25393); + 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_3_mk(s); - s.tmp_1.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___7165); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___7165; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 5; s.pc = 3; return s.tmp_1; - case 3: + 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__P18443_mk(s); + s.tmp_0.arg0 = s.ctx___25393; + 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 = 40; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - r0 = (s.i___7165 + 1); - s.i___7165 = (r0); - { step = 1; continue; } case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayForEach__P109.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"]} +control_onEvent__P18429.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 helpers_arrayForEach__P109_mk(s) { +function control_onEvent__P18429_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayForEach__P109, depth: s.depth + 1, + parent: s, fn: control_onEvent__P18429, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___7162: undefined, - i___7165: undefined, + ctx___25393: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function scene_Scene_constructor__P2866(s) { +function control_eventContext__P18446(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9567,200 +8186,42 @@ 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_Scene__C2843_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__C2527_VT); - s.tmp_0 = r0; - s.tmp_1 = ArcadePhysicsEngine_constructor__P2528_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 = 904; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C2781_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Camera_constructor__P2785_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 905; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - r0 = (s.arg0).fields["camera"] = (s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_Background__C2669_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_Background_constructor__P2673_mk(s); - s.tmp_1.arg0 = s.tmp_0; - r0 = s.arg0.fields["camera"]; - s.tmp_1.arg1 = r0; - s.callLocIdx = 906; 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); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_Scene_constructor__P2866.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 scene_Scene_constructor__P2866_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Scene_constructor__P2866, 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_Camera_constructor__P2785(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__C2781_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() -} } } -scene_Camera_constructor__P2785.info = {"start":550,"length":156,"line":17,"column":8,"endLine":23,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} - -function scene_Camera_constructor__P2785_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_Camera_constructor__P2785, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function scene_Background_constructor__P2673(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, scene_Background__C2669_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(); + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___22482); + if (!r0) { step = 1; continue; } + s.tmp_0 = r0 = globals.eventContexts___22482; + r0 = pxsim_Array__length(globals.eventContexts___22482); + s.tmp_2 = r0; + r0 = (s.tmp_2 - 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); + 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) default: oops() } } } -scene_Background_constructor__P2673.info = {"start":367,"length":132,"line":20,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["this","camera"]} +control_eventContext__P18446.info = {"start":7094,"length":136,"line":213,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"eventContext","argumentNames":[]} -function scene_Background_constructor__P2673_mk(s) { +function control_eventContext__P18446_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Background_constructor__P2673, depth: s.depth + 1, + parent: s, fn: control_eventContext__P18446, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, - arg1: undefined, + tmp_2: undefined, + tmp_3: undefined, } } -function ArcadePhysicsEngine_constructor__P2528(s) { +function control_EventContext_registerHandler__P18443(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9770,70 +8231,113 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.h___25416 = undefined; + s.unnamed152___U1 = undefined; + s.unnamed153___U2 = undefined; + s.hn___25439 = 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__C2527_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__C2446_VT); - s.tmp_0 = r0; - s.tmp_1 = sprites_SpriteMap_constructor__P2447_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 525; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); + s.h___25416 = (undefined); + r0 = s.arg0.fields["handlers"]; + s.unnamed152___U1 = (r0); + s.unnamed153___U2 = (0); case 1: - r0 = s.retval; - r0 = (s.arg0).fields["map"] = (s.tmp_0); - s.tmp_0 = ArcadePhysicsEngine_maxSpeed__P2530_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 526; s.pc = 2; return s.tmp_0; + 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___25416 = (r0); + r0 = s.h___25416.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.retval; - s.tmp_0 = ArcadePhysicsEngine_maxStep__P2534_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 527; s.pc = 3; return s.tmp_0; + r0 = s.h___25416.fields["value"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 == s.arg2); case 3: - r0 = s.retval; - s.tmp_0 = ArcadePhysicsEngine_minStep__P2532_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 528; s.pc = 4; return s.tmp_0; + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 4; continue; } + r0 = (s.h___25416).fields["flags"] = (s.arg4); + r0 = (s.h___25416).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__C22474_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventHandler_constructor__P22477_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 = 51; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.hn___25439 = (s.tmp_0); + r0 = s.arg0.fields["handlers"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.hn___25439); + s.tmp_0 = control_EventHandler_register__P22475_mk(s); + s.tmp_0.arg0 = s.hn___25439; + s.callLocIdx = 52; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_constructor__P2528.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"]} +control_EventContext_registerHandler__P18443.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 ArcadePhysicsEngine_constructor__P2528_mk(s) { +function control_EventContext_registerHandler__P18443_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constructor__P2528, depth: s.depth + 1, + parent: s, fn: control_EventContext_registerHandler__P18443, 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___25416: undefined, + unnamed152___U1: undefined, + unnamed153___U2: undefined, + hn___25439: undefined, arg0: undefined, arg1: undefined, arg2: undefined, arg3: undefined, + arg4: undefined, } } -function ArcadePhysicsEngine_maxStep__P2534(s) { +function control_EventHandler_constructor__P22477(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9846,39 +8350,40 @@ 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, ArcadePhysicsEngine__C2527_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); + if (!checkSubtype(r0, control_EventHandler__C22474_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() } } } -ArcadePhysicsEngine_maxStep__P2534.info = {"start":2329,"length":67,"line":88,"column":4,"endLine":90,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxStep","argumentNames":["this","v"]} +control_EventHandler_constructor__P22477.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 ArcadePhysicsEngine_maxStep__P2534_mk(s) { +function control_EventHandler_constructor__P22477_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P2534, depth: s.depth + 1, + parent: s, fn: control_EventHandler_constructor__P22477, 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, } } -function ArcadePhysicsEngine_maxStep__P2533(s) { +function multiplayer_initServer__P21426(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9888,73 +8393,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, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - r0 = s.arg0.fields["maxSingleStep"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + r0 = pxsim.multiplayer.getOrigin(); s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_maxStep__P2533.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__P2533.isGetter = true; - -function ArcadePhysicsEngine_maxStep__P2533_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_maxStep__P2533, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function Fx_toInt__P172(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 + 128); + r0 = (s.tmp_1 === "server"); s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = control_EventContext_registerFrameHandler__P18441_mk(s); + s.tmp_3 = game_eventContext__P21040_mk(s); + s.callLocIdx = 1277; 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__P25479; + s.callLocIdx = 1278; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_toInt__P172.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} +multiplayer_initServer__P21426.info = {"start":1011,"length":307,"line":29,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"initServer","argumentNames":[]} -function Fx_toInt__P172_mk(s) { +function multiplayer_initServer__P21426_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toInt__P172, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer__P21426, 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, + tmp_3: undefined, } } -function ArcadePhysicsEngine_minStep__P2532(s) { +function multiplayer_initServer_inline__P25479(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -9964,42 +8443,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, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim.multiplayer.getOrigin(); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minSingleStep"] = (s.tmp_1); + r0 = (s.tmp_1 === "server"); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.multiplayer.postImage(globals.screen___20070); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_minStep__P2532.info = {"start":2176,"length":67,"line":80,"column":4,"endLine":82,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"minStep","argumentNames":["this","v"]} +multiplayer_initServer_inline__P25479.info = {"start":1175,"length":126,"line":31,"column":93,"endLine":35,"endColumn":13,"fileName":"pxt_modules/game/multiplayer.ts","functionName":"inline","argumentNames":[]} -function ArcadePhysicsEngine_minStep__P2532_mk(s) { +function multiplayer_initServer_inline__P25479_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_minStep__P2532, depth: s.depth + 1, + parent: s, fn: multiplayer_initServer_inline__P25479, 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 ArcadePhysicsEngine_minStep__P2531(s) { +function game_consoleOverlay_draw__P21165(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10009,89 +8481,216 @@ 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.height___25532 = undefined; + s.top___25537 = undefined; + s.i___25543 = undefined; + s.t___25556 = undefined; + s.tOff___25563 = undefined; + s.tab___25565 = undefined; + s.unnamed182___U6 = undefined; + s.unnamed183___U7 = undefined; + s.padding___25567 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___23281); + 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 = pxsim_numops_toBoolDecr(globals.instance___23235); + 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_5 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 3; continue; } + { step = 13; continue; } + case 3: + case 4: + s.tmp_7 = if_charHeight_1_mk(s); + s.tmp_7.arg0 = globals.consoleFont___23289; + 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 = 1131; s.pc = 14; return s.tmp_7; } } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - r0 = s.arg0.fields["minSingleStep"]; + case 14: + r0 = s.retval; + s.tmp_6 = r0; + r0 = (s.tmp_6 + 2); + s.height___25532 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21006); + if (!r0) { step = 5; continue; } + r0 = s.height___25532; + { step = 6; continue; } + case 5: + r0 = 0; + case 6: + // jmp value (already in r0) s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + r0 = (2 + s.tmp_0); + s.top___25537 = (r0); + s.i___25543 = (0); + case 7: + s.tmp_1 = r0 = s.i___25543; + r0 = pxsim_Array__length(globals.consoleStrings___23281); + 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___23281, s.i___25543); + 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__P18160_mk(s); + r0 = pxsim_Array__getAt(globals.consoleStrings___23281, s.i___25543); + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = "\t"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1132; s.pc = 15; return s.tmp_6; + case 15: + r0 = s.retval; + s.t___25556 = (r0); + s.tOff___25563 = (0); + s.tab___25565 = (undefined); + s.unnamed182___U6 = (s.t___25556); + 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_1 >> 8); - return leaveAccessor(s, r0) - default: oops() -} } } -ArcadePhysicsEngine_minStep__P2531.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__P2531.isGetter = true; - -function ArcadePhysicsEngine_minStep__P2531_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_minStep__P2531, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_maxSpeed__P2530(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_0 < s.tmp_1); + if (!r0) { step = 9; continue; } + r0 = pxsim_Array__getAt(s.unnamed182___U6, s.unnamed183___U7); + s.tab___25565 = (r0); + s.tmp_2 = r0 = globals.tabSize___23283; + s.tmp_5 = r0 = s.tOff___25563; + r0 = pxsim_String_.length(s.tab___25565); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_4 = r0; + r0 = (s.tmp_4 % globals.tabSize___23283); + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.padding___25567 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + s.tmp_0.arg1 = s.tab___25565; + s.tmp_2 = r0 = s.tOff___25563; + s.tmp_4 = if_charWidth_1_mk(s); + s.tmp_4.arg0 = globals.consoleFont___23289; + 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 = 1133; s.pc = 17; return s.tmp_4; } } - r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + case 17: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_2 * s.tmp_3); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxVelocity"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - r0 = s.arg0.fields["maxVelocity"]; + r0 = (4 + s.tmp_1); + s.tmp_0.arg2 = r0; + s.tmp_5 = r0 = s.top___25537; + r0 = (s.i___25543 * s.height___25532); + s.tmp_6 = r0; + r0 = (s.tmp_5 + s.tmp_6); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___23280; + s.tmp_0.arg5 = globals.consoleFont___23289; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1134; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + s.tmp_0 = r0 = s.tOff___25563; + r0 = pxsim_String_.length(s.tab___25565); s.tmp_2 = r0; - r0 = (0 - s.tmp_2); + r0 = (s.tmp_2 + s.padding___25567); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["maxNegativeVelocity"] = (s.tmp_1); + r0 = (s.tmp_0 + s.tmp_1); + s.tOff___25563 = (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__P20028_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + r0 = pxsim_Array__getAt(globals.consoleStrings___23281, s.i___25543); + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = 4; + s.tmp_1 = r0 = s.top___25537; + r0 = (s.i___25543 * s.height___25532); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = globals.consoleColor___23280; + s.tmp_0.arg5 = globals.consoleFont___23289; + s.tmp_0.arg6 = undefined; + s.callLocIdx = 1135; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 11: + r0 = (s.i___25543 + 1); + s.i___25543 = (r0); + { step = 7; continue; } + case 12: + case 13: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P2530.info = {"start":1963,"length":127,"line":71,"column":4,"endLine":74,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"maxSpeed","argumentNames":["this","v"]} +game_consoleOverlay_draw__P21165.info = {"start":1364,"length":859,"line":44,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"draw","argumentNames":[]} -function ArcadePhysicsEngine_maxSpeed__P2530_mk(s) { +function game_consoleOverlay_draw__P21165_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P2530, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_draw__P21165, 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, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + height___25532: undefined, + top___25537: undefined, + i___25543: undefined, + t___25556: undefined, + tOff___25563: undefined, + tab___25565: undefined, + unnamed182___U6: undefined, + unnamed183___U7: undefined, + padding___25567: undefined, } } -function Fx_neg__P155(s) { +function scene_systemMenu_isVisible__P21146(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10101,29 +8700,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 = (0 - s.arg0); + r0 = pxsim_numops_toBoolDecr(globals.instance___23235); + 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() } } } -Fx_neg__P155.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} +scene_systemMenu_isVisible__P21146.info = {"start":13170,"length":62,"line":395,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"isVisible","argumentNames":[]} -function Fx_neg__P155_mk(s) { +function scene_systemMenu_isVisible__P21146_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_neg__P155, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_isVisible__P21146, 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, } } -function ArcadePhysicsEngine_maxSpeed__P2529(s) { +function helpers_imagePrint__P20028(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10133,38 +8736,506 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x0___25639 = undefined; + s.cp___25641 = undefined; + s.mult___25642 = undefined; + s.dataW___25647 = undefined; + s.dataH___25653 = undefined; + s.byteHeight___25659 = undefined; + s.charSize___25665 = undefined; + s.dataSize___25669 = undefined; + s.fontdata___25673 = undefined; + s.lastchar___25676 = undefined; + s.imgBuf___25683 = undefined; + s.xOffset___25707 = undefined; + s.yOffset___25708 = undefined; + s.ch___25723 = undefined; + s.l___25742 = undefined; + s.r___25743 = undefined; + s.off___25745 = undefined; + s.guess___25746 = undefined; + s.m___25765 = undefined; + s.v___25774 = undefined; + s.i___25830 = undefined; + s.j___25835 = undefined; + s.mask___25836 = undefined; + s.c___25837 = undefined; + s.n___25854 = 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, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 128); + 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_1 >> 8); - return leaveAccessor(s, 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__P20015_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 97; s.pc = 39; return s.tmp_2; + case 39: + r0 = s.retval; + s.arg5 = (r0); + 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___25639 = (s.arg2); + s.cp___25641 = (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 = 98; s.pc = 40; return s.tmp_1; } + } + case 40: + r0 = s.retval; + 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 = 99; 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___25642 = (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 = 100; 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___25642); + s.dataW___25647 = (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 = 101; 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___25642); + s.dataH___25653 = (r0); + r0 = (s.dataH___25653 + 7); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 3); + s.byteHeight___25659 = (r0); + r0 = (s.byteHeight___25659 * s.dataW___25647); + s.charSize___25665 = (r0); + r0 = (2 + s.charSize___25665); + s.dataSize___25669 = (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 = 102; s.pc = 44; return s.tmp_0; } + } + case 44: + r0 = s.retval; + s.fontdata___25673 = (r0); + r0 = pxsim.BufferMethods.length(s.fontdata___25673); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_1, s.dataSize___25669); + s.tmp_0 = r0; + r0 = (s.tmp_0 - 1); + s.lastchar___25676 = (r0); + r0 = (s.mult___25642 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + r0 = (8 + s.charSize___25665); + s.tmp_1 = r0; + r0 = pxsim.control.createBuffer(s.tmp_1); + s.imgBuf___25683 = (r0); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___25683, 0, 135); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___25683, 1, 1); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___25683, 2, s.dataW___25647); + r0 = pxsim.BufferMethods.setByte(s.imgBuf___25683, 4, s.dataH___25653); + case 7: + case 8: + case 9: + s.tmp_1 = r0 = s.cp___25641; + 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___25707 = (0); + s.yOffset___25708 = (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___25641; + 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___25641); + 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 = 103; s.pc = 45; return s.tmp_4; } + } + case 45: + r0 = s.retval; + s.xOffset___25707 = (r0); + s.tmp_0 = if_yOffset_1_mk(s); + r0 = pxsim_Array__getAt(s.arg6, s.cp___25641); + 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 = 104; s.pc = 46; return s.tmp_0; } + } + case 46: + r0 = s.retval; + s.yOffset___25708 = (r0); + case 12: + case 13: + s.tmp_0 = r0 = s.cp___25641; + r0 = (s.tmp_0 + 1); + s.cp___25641 = (r0); + r0 = pxsim_String_.charCodeAt(s.arg1, s.tmp_0); + s.ch___25723 = (r0); + r0 = (s.ch___25723 == 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 = 105; 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___25639); + case 14: + case 15: + r0 = (s.ch___25723 < 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___25742 = (0); + s.r___25743 = (s.lastchar___25676); + s.off___25745 = (0); + r0 = (s.ch___25723 - 32); + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.dataSize___25669); + s.guess___25746 = (r0); + r0 = pxsim.BufferMethods.getNumber(s.fontdata___25673, 4, s.guess___25746); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.ch___25723); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 18; continue; } + s.off___25745 = (s.guess___25746); + { step = 25; continue; } + case 18: + case 19: + r0 = (s.l___25742 <= s.r___25743); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 24; continue; } + s.tmp_1 = r0 = s.l___25742; + r0 = (s.r___25743 - s.l___25742); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_1 + s.tmp_2); + s.m___25765 = (r0); + s.tmp_0 = r0 = s.fontdata___25673; + r0 = (s.m___25765 * s.dataSize___25669); + s.tmp_1 = r0; + r0 = pxsim.BufferMethods.getNumber(s.tmp_0, 4, s.tmp_1); + s.v___25774 = (r0); + r0 = (s.v___25774 == s.ch___25723); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.m___25765 * s.dataSize___25669); + s.off___25745 = (r0); + { step = 24; continue; } + case 20: + case 21: + r0 = (s.v___25774 < s.ch___25723); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.m___25765 + 1); + s.l___25742 = (r0); + { step = 23; continue; } + case 22: + r0 = (s.m___25765 - 1); + s.r___25743 = (r0); + case 23: + { step = 19; continue; } + case 24: + case 25: + r0 = (s.mult___25642 == 1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 26; continue; } + s.tmp_1 = r0 = s.imgBuf___25683; + s.tmp_3 = r0 = s.fontdata___25673; + r0 = (s.off___25745 + 2); + s.tmp_4 = r0; + r0 = pxsim.BufferMethods.slice(s.tmp_3, s.tmp_4, s.charSize___25665); + s.tmp_2 = r0; + r0 = pxsim.BufferMethods.write(s.tmp_1, 8, s.tmp_2); + s.tmp_0 = helpers_imageDrawIcon__P19993_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.imgBuf___25683; + r0 = (s.arg2 + s.xOffset___25707); + s.tmp_0.arg2 = r0; + r0 = (s.arg3 + s.yOffset___25708); + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = s.arg4; + s.callLocIdx = 106; 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 = 107; 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___25745 + 2); + s.off___25745 = (r0); + s.i___25830 = (0); + case 27: + r0 = (s.i___25830 < s.dataW___25647); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 36; continue; } + s.j___25835 = (0); + s.mask___25836 = (1); + s.tmp_0 = r0 = s.off___25745; + r0 = (s.tmp_0 + 1); + s.off___25745 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___25673, s.tmp_0); + s.c___25837 = (r0); + case 28: + r0 = (s.j___25835 < s.dataH___25653); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 35; continue; } + r0 = (s.mask___25836 == 256); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 29; continue; } + s.tmp_2 = r0 = s.off___25745; + r0 = (s.tmp_2 + 1); + s.off___25745 = (r0); + r0 = pxsim.BufferMethods.getByte(s.fontdata___25673, s.tmp_2); + s.c___25837 = (r0); + s.mask___25836 = (1); + case 29: + case 30: + s.n___25854 = (0); + case 31: + r0 = (s.c___25837 & s.mask___25836); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 32; continue; } + r0 = (s.n___25854 + 1); + s.n___25854 = (r0); + r0 = (s.mask___25836 << 1); + s.mask___25836 = (r0); + { step = 31; continue; } + case 32: + r0 = pxsim_numops_toBoolDecr(s.n___25854); + if (!r0) { step = 33; continue; } + s.tmp_0 = helpers_imageFillRect__P19994_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg2; + r0 = (s.xOffset___25707 * s.mult___25642); + 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___25835 + s.yOffset___25708); + s.tmp_5 = r0; + r0 = (s.tmp_5 * s.mult___25642); + s.tmp_4 = r0; + r0 = (s.tmp_3 + s.tmp_4); + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.mult___25642; + r0 = (s.mult___25642 * s.n___25854); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = s.arg4; + s.callLocIdx = 108; s.pc = 50; return s.tmp_0; + case 50: + r0 = s.retval; + r0 = (s.j___25835 + s.n___25854); + s.j___25835 = (r0); + { step = 34; continue; } + case 33: + r0 = (s.mask___25836 << 1); + s.mask___25836 = (r0); + r0 = (s.j___25835 + 1); + s.j___25835 = (r0); + case 34: + { step = 28; continue; } + case 35: + r0 = (s.arg2 + s.mult___25642); + s.arg2 = (r0); + r0 = (s.i___25830 + 1); + s.i___25830 = (r0); + { step = 27; continue; } + case 36: + case 37: + { step = 9; continue; } + case 38: + r0 = undefined; + return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_maxSpeed__P2529.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__P2529.isGetter = true; +helpers_imagePrint__P20028.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 ArcadePhysicsEngine_maxSpeed__P2529_mk(s) { +function helpers_imagePrint__P20028_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_maxSpeed__P2529, depth: s.depth + 1, + parent: s, fn: helpers_imagePrint__P20028, 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___25639: undefined, + cp___25641: undefined, + mult___25642: undefined, + dataW___25647: undefined, + dataH___25653: undefined, + byteHeight___25659: undefined, + charSize___25665: undefined, + dataSize___25669: undefined, + fontdata___25673: undefined, + lastchar___25676: undefined, + imgBuf___25683: undefined, + xOffset___25707: undefined, + yOffset___25708: undefined, + ch___25723: undefined, + l___25742: undefined, + r___25743: undefined, + off___25745: undefined, + guess___25746: undefined, + m___25765: undefined, + v___25774: undefined, + i___25830: undefined, + j___25835: undefined, + mask___25836: undefined, + c___25837: undefined, + n___25854: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, + arg6: undefined, } } -function PhysicsEngine_constructor__P2512(s) { +function image_getFontForText__P20015(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10174,23 +9245,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___25971 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C2511_VT)) failedCast(r0); - r0 = undefined; + s.i___25971 = (0); + case 1: + s.tmp_1 = r0 = s.i___25971; + 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___25971); + 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___20014; + { step = 5; continue; } + case 2: + case 3: + r0 = (s.i___25971 + 1); + s.i___25971 = (r0); + { step = 1; continue; } + case 4: + r0 = globals.font8___20013; + case 5: return leave(s, r0) default: oops() } } } -PhysicsEngine_constructor__P2512.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} +image_getFontForText__P20015.info = {"start":11713,"length":259,"line":136,"column":4,"endLine":143,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"getFontForText","argumentNames":["text"]} -function PhysicsEngine_constructor__P2512_mk(s) { +function image_getFontForText__P20015_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_constructor__P2512, depth: s.depth + 1, + parent: s, fn: image_getFontForText__P20015, 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___25971: undefined, arg0: undefined, } } @@ -10198,7 +9298,7 @@ function PhysicsEngine_constructor__P2512_mk(s) { -function sprites_SpriteMap_constructor__P2447(s) { +function helpers_imageFillRect__P19994(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10210,35 +9310,58 @@ 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, sprites_SpriteMap__C2446_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + s.tmp_2 = helpers_pack__P22619_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 79; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); + s.tmp_4 = helpers_pack__P22619_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 80; 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() } } } -sprites_SpriteMap_constructor__P2447.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} +helpers_imageFillRect__P19994.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 sprites_SpriteMap_constructor__P2447_mk(s) { +function helpers_imageFillRect__P19994_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_constructor__P2447, depth: s.depth + 1, + parent: s, fn: helpers_imageFillRect__P19994, 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 control_pushEventContext__P409(s) { +function helpers_pack__P22619(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10248,63 +9371,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___9504 = undefined; - s.n___9510 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___4444); - 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___4444 = (r0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + s.tmp_2 = Math_clamp__P18165_mk(s); + s.tmp_2.arg0 = -30000; + s.tmp_2.arg1 = 30000; + r0 = (s.arg0 | 0); + s.tmp_2.arg2 = r0; + s.callLocIdx = 76; s.pc = 1; return s.tmp_2; case 1: - case 2: - s.tmp_0 = control_eventContext__P408_mk(s); - s.callLocIdx = 53; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; - s.ctx___9504 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___9504); - if (!r0) { step = 3; continue; } - s.tmp_0 = control_EventContext_unregister__P402_mk(s); - s.tmp_0.arg0 = s.ctx___9504; - s.callLocIdx = 54; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - case 3: - case 4: - r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C395_VT); + s.tmp_1 = r0; + r0 = (s.tmp_1 & 65535); s.tmp_0 = r0; - s.tmp_1 = control_EventContext_constructor__P399_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 55; s.pc = 7; return s.tmp_1; - case 7: + s.tmp_5 = Math_clamp__P18165_mk(s); + s.tmp_5.arg0 = -30000; + s.tmp_5.arg1 = 30000; + r0 = (s.arg1 | 0); + s.tmp_5.arg2 = r0; + s.callLocIdx = 77; s.pc = 2; return s.tmp_5; + case 2: r0 = s.retval; - s.n___9510 = (s.tmp_0); - r0 = pxsim_Array__push(globals.eventContexts___4444, s.n___9510); - r0 = s.n___9510; + 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() } } } -control_pushEventContext__P409.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} +helpers_pack__P22619.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 control_pushEventContext__P409_mk(s) { +function helpers_pack__P22619_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_pushEventContext__P409, depth: s.depth + 1, + parent: s, fn: helpers_pack__P22619, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - ctx___9504: undefined, - n___9510: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + arg0: undefined, + arg1: undefined, } } -function control_EventContext_unregister__P402(s) { +function Math_clamp__P18165(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10314,68 +9433,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___9539 = undefined; - s.unnamed58___U1 = undefined; - s.unnamed59___U2 = 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__C395_VT)) failedCast(r0); - s.h___9539 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed58___U1 = (r0); - s.unnamed59___U2 = (0); + s.tmp_0 = Math_min__P18169_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_1 = Math_max__P18168_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.arg2; + s.callLocIdx = 14; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 15; s.pc = 1; return s.tmp_0; case 1: - s.tmp_0 = r0 = s.unnamed59___U2; - r0 = pxsim_Array__length(s.unnamed58___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed58___U1, s.unnamed59___U2); - s.h___9539 = (r0); - s.tmp_2 = control_EventHandler_unregister__P4438_mk(s); - s.tmp_2.arg0 = s.h___9539; - s.callLocIdx = 49; s.pc = 3; return s.tmp_2; - case 3: r0 = s.retval; - r0 = (s.unnamed59___U2 + 1); - s.unnamed59___U2 = (r0); - { step = 1; continue; } - case 2: - s.unnamed58___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() } } } -control_EventContext_unregister__P402.info = {"start":4721,"length":131,"line":141,"column":8,"endLine":145,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +Math_clamp__P18165.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 control_EventContext_unregister__P402_mk(s) { +function Math_clamp__P18165_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_unregister__P402, depth: s.depth + 1, + parent: s, fn: Math_clamp__P18165, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - h___9539: undefined, - unnamed58___U1: undefined, - unnamed59___U2: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function control_EventHandler_unregister__P4438(s) { +function Math_min__P18169(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10387,39 +9484,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, control_EventHandler__C4436_VT)) failedCast(r0); - r0 = s.arg0.fields["src"]; + r0 = (s.arg0 <= s.arg1); 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__P4440, s.tmp_2); - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.arg0; + { step = 3; continue; } + case 1: + case 2: + r0 = s.arg1; + case 3: return leave(s, r0) default: oops() } } } -control_EventHandler_unregister__P4438.info = {"start":1136,"length":106,"line":36,"column":8,"endLine":38,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"unregister","argumentNames":["this"]} +Math_min__P18169.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 control_EventHandler_unregister__P4438_mk(s) { +function Math_min__P18169_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventHandler_unregister__P4438, depth: s.depth + 1, + parent: s, fn: Math_min__P18169, 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 control_doNothing__P4440(s) { +function helpers_imageDrawIcon__P19993(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10429,24 +9526,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.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__P22619_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg3; + s.callLocIdx = 78; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; + 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() } } } -control_doNothing__P4440.info = {"start":1254,"length":24,"line":41,"column":4,"endLine":41,"endColumn":28,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"doNothing","argumentNames":[]} +helpers_imageDrawIcon__P19993.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 control_doNothing__P4440_mk(s) { +function helpers_imageDrawIcon__P19993_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_doNothing__P4440, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawIcon__P19993, 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 control_EventContext_constructor__P399(s) { +function helpers_stringSplit__P18160(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10456,85 +9580,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.A___25994 = undefined; + s.lim___25996 = undefined; + s.s___26012 = undefined; + s.p___26015 = undefined; + s.R___26016 = undefined; + s.z___26030 = undefined; + s.T___26043 = undefined; + s.q___26044 = undefined; + s.e___26050 = 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__C395_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___397); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.A___25994 = (r0); + s.lim___25996 = (0); + r0 = (s.arg2 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_String_.mkEmpty(); - globals.control_EventContext_lastStats___397 = (r0); + r0 = (536870912 - 1); + s.lim___25996 = (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___25996 = (0); + { step = 3; continue; } case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -control_EventContext_constructor__P399.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} - -function control_EventContext_constructor__P399_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control_EventContext_constructor__P399, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function controller_pauseUntilAnyButtonIsPressed__P2205(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; - case 1: + r0 = (s.arg2 | 0); + s.lim___25996 = (r0); + case 3: + case 4: + r0 = pxsim_String_.length(s.arg0); + s.s___26012 = (r0); + s.p___26015 = (0); + s.R___26016 = (s.arg1); + r0 = (s.lim___25996 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + r0 = s.A___25994; + { step = 21; continue; } + 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___25994, 0, s.arg0); + r0 = s.A___25994; + { step = 21; continue; } + case 7: + case 8: + r0 = (s.s___26012 == 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.tmp_1 = helpers_splitMatch__P22405_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = 0; + s.tmp_1.arg2 = s.R___26016; + s.callLocIdx = 10; s.pc = 22; return s.tmp_1; + case 22: r0 = s.retval; - r0 = undefined; + s.z___26030 = (r0); + r0 = (s.z___26030 > -1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + r0 = s.A___25994; + { step = 21; continue; } + case 9: + case 10: + r0 = pxsim_Array_.setAt(s.A___25994, 0, s.arg0); + r0 = s.A___25994; + { step = 21; continue; } + case 11: + case 12: + s.q___26044 = (s.p___26015); + case 13: + r0 = (s.q___26044 != s.s___26012); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + s.tmp_1 = helpers_splitMatch__P22405_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_1.arg1 = s.q___26044; + s.tmp_1.arg2 = s.R___26016; + s.callLocIdx = 11; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + s.e___26050 = (r0); + r0 = (s.e___26050 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.q___26044 + 1); + s.q___26044 = (r0); + { step = 19; continue; } + case 14: + r0 = (s.e___26050 == s.p___26015); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = (s.q___26044 + 1); + s.q___26044 = (r0); + { step = 18; continue; } + case 15: + s.tmp_0 = helpers_stringSlice__P18157_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___26015; + s.tmp_0.arg2 = s.q___26044; + s.callLocIdx = 12; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.T___26043 = (r0); + r0 = pxsim_Array__push(s.A___25994, s.T___26043); + r0 = pxsim_Array__length(s.A___25994); + s.tmp_1 = r0; + r0 = (s.tmp_1 == s.lim___25996); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 16; continue; } + r0 = s.A___25994; + { step = 21; continue; } + case 16: + case 17: + s.p___26015 = (s.e___26050); + s.q___26044 = (s.p___26015); + case 18: + case 19: + { step = 13; continue; } + case 20: + s.tmp_0 = helpers_stringSlice__P18157_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.p___26015; + s.tmp_0.arg2 = s.q___26044; + s.callLocIdx = 13; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.T___26043 = (r0); + r0 = pxsim_Array__push(s.A___25994, s.T___26043); + r0 = s.A___25994; + case 21: return leave(s, r0) default: oops() } } } -controller_pauseUntilAnyButtonIsPressed__P2205.info = {"start":9968,"length":96,"line":287,"column":4,"endLine":289,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pauseUntilAnyButtonIsPressed","argumentNames":[]} +helpers_stringSplit__P18160.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 controller_pauseUntilAnyButtonIsPressed__P2205_mk(s) { +function helpers_stringSplit__P18160_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P2205, depth: s.depth + 1, + parent: s, fn: helpers_stringSplit__P18160, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + A___25994: undefined, + lim___25996: undefined, + s___26012: undefined, + p___26015: undefined, + R___26016: undefined, + z___26030: undefined, + T___26043: undefined, + q___26044: undefined, + e___26050: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_setWaitAnyButton__P3000(s) { +function helpers_splitMatch__P22405(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10544,30 +9769,85 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___26130 = undefined; + s.s___26133 = undefined; + s.i___26143 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - globals.__waitAnyButton___4948 = (s.arg0); - r0 = undefined; + r0 = pxsim_String_.length(s.arg2); + s.r___26130 = (r0); + r0 = pxsim_String_.length(s.arg0); + s.s___26133 = (r0); + r0 = (s.arg1 + s.r___26130); + s.tmp_1 = r0; + r0 = (s.tmp_1 > s.s___26133); + 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___26143 = (0); + case 3: + r0 = (s.i___26143 < s.r___26130); + 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___26143); + 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___26143); + 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___26143 + 1); + s.i___26143 = (r0); + { step = 3; continue; } + case 6: + r0 = (s.arg1 + s.r___26130); + case 7: return leave(s, r0) default: oops() } } } -game_setWaitAnyButton__P3000.info = {"start":4236,"length":83,"line":127,"column":4,"endLine":129,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setWaitAnyButton","argumentNames":["f"]} +helpers_splitMatch__P22405.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 game_setWaitAnyButton__P3000_mk(s) { +function helpers_splitMatch__P22405_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_setWaitAnyButton__P3000, depth: s.depth + 1, + parent: s, fn: helpers_splitMatch__P22405, 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___26130: undefined, + s___26133: undefined, + i___26143: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Math_FastRandom_constructor__P3061(s) { +function helpers_stringSlice__P18157(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10577,44 +9857,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___26095 = 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, Math_FastRandom__C3059_VT)) failedCast(r0); - r0 = (s.arg1 === undefined); + r0 = pxsim_String_.length(s.arg0); + s.len___26095 = (r0); + r0 = (s.arg1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim.Math_.randomRange(1, 65535); + s.tmp_1 = Math_max__P18168_mk(s); + r0 = (s.len___26095 + s.arg1); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 9; s.pc = 9; return s.tmp_1; + case 9: + r0 = s.retval; s.arg1 = (r0); case 1: case 2: - r0 = (s.arg0).fields["seed"] = (s.arg1); - r0 = (s.arg0).fields["lfsr"] = (s.arg1); - 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___26095); + { 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___26095 + 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() } } } -Math_FastRandom_constructor__P3061.info = {"start":1425,"length":175,"line":44,"column":8,"endLine":48,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"inline","argumentNames":["this","seed"]} +helpers_stringSlice__P18157.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 Math_FastRandom_constructor__P3061_mk(s) { +function helpers_stringSlice__P18157_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_constructor__P3061, depth: s.depth + 1, + parent: s, fn: helpers_stringSlice__P18157, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + len___26095: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function game_consoleOverlay_listener__P5278(s) { +function scene_Scene_render__P20910(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10624,96 +9941,147 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.s___26227 = undefined; + s.unnamed180___U1 = undefined; + s.unnamed181___U2 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C20881_VT)) failedCast(r0); + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 & 4); 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(s.arg1); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - // 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 | 4); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 3; continue; } - { step = 7; continue; } + 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: - s.tmp_4 = helpers_arrayForEach__P109_mk(s); - s.tmp_5 = helpers_arrayFilter__P110_mk(s); - s.tmp_6 = helpers_stringSplit__P122_mk(s); - s.tmp_6.arg0 = s.arg1; - s.tmp_6.arg1 = "\n"; - s.tmp_6.arg2 = undefined; - s.callLocIdx = 1125; s.pc = 10; return s.tmp_6; - case 10: - r0 = s.retval; - s.tmp_5.arg0 = r0; - s.tmp_5.arg1 = forEach_inline__P9742; - s.callLocIdx = 1126; s.pc = 9; return s.tmp_5; - case 9: + // 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__P20910_mk(s); + r0 = s.arg0.fields["previousScene"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 930; s.pc = 12; return s.tmp_3; + case 12: r0 = s.retval; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P9747; - s.callLocIdx = 1128; s.pc = 8; return s.tmp_4; - case 8: + { step = 6; continue; } + case 5: + s.tmp_0 = scene_Background_draw__P20716_mk(s); + r0 = s.arg0.fields["background"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 931; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; - r0 = pxsim_Array__length(globals.consoleStrings___5243); + case 6: + r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.consoleLines___5256); + r0 = (s.tmp_1 & 1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_arraySplice__P100_mk(s); - s.tmp_2.arg0 = globals.consoleStrings___5243; - s.tmp_2.arg1 = 0; - r0 = pxsim_Array__length(globals.consoleStrings___5243); - s.tmp_3 = r0; - r0 = (s.tmp_3 - globals.consoleLines___5256); - s.tmp_2.arg2 = r0; - s.callLocIdx = 1129; s.pc = 11; return s.tmp_2; - case 11: + if (!r0) { step = 7; continue; } + s.tmp_2 = helpers_arraySort__P18143_mk(s); + r0 = s.arg0.fields["allSprites"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = scene_Scene_render_inline__P26204; + s.callLocIdx = 936; s.pc = 14; return s.tmp_2; + case 14: r0 = s.retval; - case 5: - case 6: + 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); case 7: + case 8: + s.s___26227 = (undefined); + r0 = s.arg0.fields["allSprites"]; + s.unnamed180___U1 = (r0); + s.unnamed181___U2 = (0); + case 9: + 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.unnamed180___U1, s.unnamed181___U2); + s.s___26227 = (r0); + s.tmp_2 = if___draw_2_mk(s); + s.tmp_2.arg0 = s.s___26227; + r0 = s.arg0.fields["camera"]; + s.tmp_2.arg1 = r0; + if (!s.tmp_2.arg0.vtable.iface) { + setupLambda(s.tmp_2, pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "__draw"), 2); + s.callLocIdx = 937; s.pc = 15; return s.tmp_2; + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["__draw"]; + if (s.tmp_2.fn == null) { setupLambda(s.tmp_2, s.tmp_2.arg0.fields["__draw"], 2); s.callLocIdx = 937; s.pc = 15; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 937; s.pc = 15; return s.tmp_2;; } + else { s.callLocIdx = 937; s.pc = 15; return s.tmp_2; } + } + case 15: + r0 = s.retval; + r0 = (s.unnamed181___U2 + 1); + s.unnamed181___U2 = (r0); + { step = 9; continue; } + case 10: + s.unnamed180___U1 = (undefined); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & -5); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_listener__P5278.info = {"start":787,"length":571,"line":26,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"listener","argumentNames":["priority","text"]} +scene_Scene_render__P20910.info = {"start":8203,"length":917,"line":228,"column":8,"endLine":252,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"render","argumentNames":["this"]} -function game_consoleOverlay_listener__P5278_mk(s) { +function scene_Scene_render__P20910_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_listener__P5278, depth: s.depth + 1, + parent: s, fn: scene_Scene_render__P20910, 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___26227: undefined, + unnamed180___U1: undefined, + unnamed181___U2: undefined, arg0: undefined, - arg1: undefined, } } -function forEach_inline__P9742(s) { +function scene_Scene_render_inline__P26204(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10725,36 +10093,102 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); + s.tmp_2 = if_z_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, "z"); + } else { + s.tmp_2.fn = s.tmp_2.arg0.vtable.iface["z"]; + if (s.tmp_2.fn == null) { s.retval = s.tmp_2.arg0.fields["z"]; } + else if (!s.tmp_2.fn.isGetter) { s.retval = bind(s.tmp_2); } + else { s.callLocIdx = 932; s.pc = 3; return s.tmp_2; } + } + case 3: + r0 = s.retval; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_4 = if_z_1_mk(s); + s.tmp_4.arg0 = s.arg1; + if (!s.tmp_4.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_4.arg0, "z"); + } else { + s.tmp_4.fn = s.tmp_4.arg0.vtable.iface["z"]; + if (s.tmp_4.fn == null) { s.retval = s.tmp_4.arg0.fields["z"]; } + else if (!s.tmp_4.fn.isGetter) { s.retval = bind(s.tmp_4); } + else { s.callLocIdx = 933; s.pc = 4; return s.tmp_4; } + } + case 4: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_1 - s.tmp_3); 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: + s.tmp_6 = if_id_1_mk(s); + s.tmp_6.arg0 = s.arg0; + if (!s.tmp_6.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_6.arg0, "id"); + } else { + s.tmp_6.fn = s.tmp_6.arg0.vtable.iface["id"]; + if (s.tmp_6.fn == null) { s.retval = s.tmp_6.arg0.fields["id"]; } + else if (!s.tmp_6.fn.isGetter) { s.retval = bind(s.tmp_6); } + else { s.callLocIdx = 934; s.pc = 5; return s.tmp_6; } + } + case 5: + r0 = s.retval; + s.tmp_5 = r0; + s.tmp_8 = if_id_1_mk(s); + s.tmp_8.arg0 = s.arg1; + if (!s.tmp_8.arg0.vtable.iface) { + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_8.arg0, "id"); + } else { + s.tmp_8.fn = s.tmp_8.arg0.vtable.iface["id"]; + if (s.tmp_8.fn == null) { s.retval = s.tmp_8.arg0.fields["id"]; } + else if (!s.tmp_8.fn.isGetter) { s.retval = bind(s.tmp_8); } + else { s.callLocIdx = 935; s.pc = 6; return s.tmp_8; } + } + case 6: + r0 = s.retval; + s.tmp_7 = r0; + r0 = (s.tmp_5 - s.tmp_7); + case 2: + // jmp value (already in r0) + s.tmp_9 = r0; + r0 = s.tmp_9; return leave(s, r0) default: oops() } } } -forEach_inline__P9742.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +scene_Scene_render_inline__P26204.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 forEach_inline__P9742_mk(s) { +function scene_Scene_render_inline__P26204_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P9742, depth: s.depth + 1, + parent: s, fn: scene_Scene_render_inline__P26204, 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_consoleOverlay_listener_inline__P9747(s) { +function scene_Background_draw__P20716(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10764,53 +10198,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.j___9749 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.j___9749 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Background__C20707_VT)) failedCast(r0); + r0 = s.arg0.fields["color"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.fill(globals.screen___20070, 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___20070, s.tmp_1, 0, 0); case 1: - s.tmp_1 = r0 = s.j___9749; - r0 = pxsim_String_.length(s.arg0); - s.tmp_2 = r0; - r0 = (s.tmp_1 < s.tmp_2); + case 2: + r0 = s.arg0.fields["_layers"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_3 = r0 = globals.consoleStrings___5243; - s.tmp_5 = helpers_stringSlice__P119_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_5.arg1 = s.j___9749; - r0 = (s.j___9749 + globals.consoleColumns___5266); - s.tmp_5.arg2 = r0; - s.callLocIdx = 1127; s.pc = 3; return s.tmp_5; - case 3: + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, scene_Background_draw_inline__P26375); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P18147_mk(s); + r0 = s.arg0.fields["_layers"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 793; s.pc = 5; return s.tmp_2; + case 5: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); - r0 = (s.j___9749 + globals.consoleColumns___5266); - s.j___9749 = (r0); - { step = 1; continue; } - case 2: + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -game_consoleOverlay_listener_inline__P9747.info = {"start":1022,"length":189,"line":33,"column":21,"endLine":37,"endColumn":13,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} +scene_Background_draw__P20716.info = {"start":1166,"length":545,"line":48,"column":8,"endLine":60,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"draw","argumentNames":["this"]} -function game_consoleOverlay_listener_inline__P9747_mk(s) { +function scene_Background_draw__P20716_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_listener_inline__P9747, depth: s.depth + 1, + parent: s, fn: scene_Background_draw__P20716, 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___9749: undefined, arg0: undefined, } } @@ -10818,7 +10253,7 @@ function game_consoleOverlay_listener_inline__P9747_mk(s) { -function console_addListener__P383(s) { +function scene_Background_draw_inline__P26375(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10828,47 +10263,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.ox___26377 = undefined; + s.oy___26388 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_numops_toBoolDecr(s.arg0); + r0 = s.caps[0].fields["camera"]; + r0 = r0.fields["drawOffsetX"]; 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 = pxsim_Array_.indexOf(globals.listeners___4422, s.arg0, undefined); + r0 = s.arg0.fields["distance"]; + s.tmp_3 = r0; + r0 = (1 + s.tmp_3); s.tmp_2 = r0; - r0 = (s.tmp_2 > -1); - case 2: - // jmp value (already in r0) + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.round(s.tmp_0); + s.ox___26377 = (r0); + r0 = s.caps[0].fields["camera"]; + r0 = r0.fields["drawOffsetY"]; + s.tmp_1 = r0; + r0 = s.arg0.fields["distance"]; 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___4422, s.arg0); - case 5: + r0 = (1 + s.tmp_3); + s.tmp_2 = r0; + r0 = (s.tmp_1 / s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim.Math_.round(s.tmp_0); + s.oy___26388 = (r0); + s.tmp_0 = scene_BackgroundLayer_draw__P20725_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ox___26377; + s.tmp_0.arg2 = s.oy___26388; + s.callLocIdx = 792; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -console_addListener__P383.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} +scene_Background_draw_inline__P26375.info = {"start":1373,"length":312,"line":53,"column":37,"endLine":58,"endColumn":17,"fileName":"pxt_modules/game/background.ts","functionName":"inline","argumentNames":["layer"]} -function console_addListener__P383_mk(s) { +function scene_Background_draw_inline__P26375_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_addListener__P383, depth: s.depth + 1, + parent: s, fn: scene_Background_draw_inline__P26375, 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___26377: undefined, + oy___26388: undefined, arg0: undefined, } } @@ -10876,7 +10322,7 @@ function console_addListener__P383_mk(s) { -function listeners_inline__P4421(s) { +function scene_BackgroundLayer_draw__P20725(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -10886,127 +10332,251 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.w___26406 = undefined; + s.h___26409 = undefined; + s.pw___26412 = undefined; + s.ph___26416 = undefined; + s.rx___26425 = undefined; + s.ry___26428 = undefined; + s.y___26497 = undefined; + s.py___26498 = undefined; + s.dh___26507 = undefined; + s.x___26515 = undefined; + s.rxl___26516 = undefined; + s.px___26522 = undefined; + s.dw___26526 = 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.__log(s.arg0, s.arg1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -listeners_inline__P4421.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 listeners_inline__P4421_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: listeners_inline__P4421, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function scene_systemMenu_register__P3106(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.instance___5197); + r0 = s.arg0; + if (!checkSubtype(r0, scene_BackgroundLayer__C20717_VT)) failedCast(r0); + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.w___26406 = (r0); + r0 = pxsim_ImageMethods.height(globals.screen___20070); + s.h___26409 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_0); + s.pw___26412 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_0); + s.ph___26416 = (r0); + r0 = pxsim_numops_toBoolDecr(s.pw___26412); + 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; } - { step = 3; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = pxsim_numops_toBoolDecr(s.ph___26416); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); case 2: - s.tmp_0 = controller_Button_onEvent__P2196_mk(s); - s.tmp_0.arg0 = globals.menu___2119; - s.tmp_0.arg1 = 2049; - s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P3107; - s.callLocIdx = 1112; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); + if (!r0) { step = 3; continue; } + { step = 23; continue; } case 3: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_register__P3106.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} - -function scene_systemMenu_register__P3106_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_register__P3106, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, -} } - - - - - -function scene_systemMenu_showSystemMenu__P3107(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.instance___5197); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - case 1: - case 2: - s.tmp_0 = game_pushScene__P3003_mk(s); - s.callLocIdx = 1113; s.pc = 4; return s.tmp_0; case 4: - r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C3095_VT); + r0 = (0 - s.arg1); + s.rx___26425 = (r0); + r0 = (0 - s.arg2); + s.ry___26428 = (r0); + r0 = s.arg0.fields["alignX"]; s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P3096_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P3103; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 1114; s.pc = 5; return s.tmp_1; + r0 = pxsim_pxtcore.switch_eq(2, s.tmp_0); + if (r0) { step = 5; continue; } + r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); + if (r0) { step = 6; continue; } + r0 = s.tmp_0; + { step = 7; continue; } case 5: - r0 = s.retval; - globals.instance___5197 = (s.tmp_0); - s.tmp_0 = scene_systemMenu_PauseMenu_show__P3097_mk(s); - s.tmp_0.arg0 = globals.instance___5197; - s.callLocIdx = 1115; s.pc = 6; return s.tmp_0; + s.tmp_1 = r0 = s.rx___26425; + r0 = (s.w___26406 + s.pw___26412); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.rx___26425 = (r0); + { step = 7; continue; } case 6: + s.tmp_0 = r0 = s.rx___26425; + r0 = (s.w___26406 + s.pw___26412); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.rx___26425 = (r0); + case 7: + r0 = s.arg0.fields["alignY"]; + s.tmp_0 = r0; + r0 = pxsim_pxtcore.switch_eq(4, s.tmp_0); + if (r0) { step = 8; continue; } + r0 = pxsim_pxtcore.switch_eq(5, s.tmp_0); + if (r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 8: + s.tmp_1 = r0 = s.ry___26428; + r0 = (s.h___26409 + s.ph___26416); + s.tmp_2 = r0; + r0 = (s.tmp_1 - s.tmp_2); + s.ry___26428 = (r0); + { step = 10; continue; } + case 9: + s.tmp_0 = r0 = s.ry___26428; + r0 = (s.h___26409 + s.ph___26416); + s.tmp_2 = r0; + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 - s.tmp_1); + s.ry___26428 = (r0); + case 10: + r0 = (s.rx___26425 % s.w___26406); + s.rx___26425 = (r0); + r0 = (s.rx___26425 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + r0 = (s.rx___26425 + s.w___26406); + s.rx___26425 = (r0); + case 11: + case 12: + r0 = (s.ry___26428 % s.h___26409); + s.ry___26428 = (r0); + r0 = (s.ry___26428 < 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (s.ry___26428 + s.h___26409); + s.ry___26428 = (r0); + case 13: + case 14: + r0 = pxsim.Math_.floor(s.rx___26425); + s.rx___26425 = (r0); + r0 = pxsim.Math_.floor(s.ry___26428); + s.ry___26428 = (r0); + s.y___26497 = (0); + s.py___26498 = (0); + case 15: + r0 = (s.y___26497 < s.h___26409); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 22; continue; } + r0 = (s.y___26497 % s.ph___26416); + s.py___26498 = (r0); + s.tmp_0 = Math_min__P18169_mk(s); + r0 = (s.ph___26416 - s.py___26498); + s.tmp_0.arg0 = r0; + r0 = (s.h___26409 - s.ry___26428); + s.tmp_0.arg1 = r0; + s.callLocIdx = 795; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - case 3: + s.dh___26507 = (r0); + s.x___26515 = (0); + s.rxl___26516 = (s.rx___26425); + case 16: + r0 = (s.x___26515 < s.w___26406); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 19; continue; } + r0 = (s.x___26515 % s.pw___26412); + s.px___26522 = (r0); + s.tmp_0 = Math_min__P18169_mk(s); + r0 = (s.pw___26412 - s.px___26522); + s.tmp_0.arg0 = r0; + r0 = (s.w___26406 - s.rxl___26516); + s.tmp_0.arg1 = r0; + s.callLocIdx = 796; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.dw___26526 = (r0); + r0 = s.arg0.fields["img"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.drawImage(globals.screen___20070, s.tmp_0, s.rxl___26516, s.ry___26428); + r0 = (s.rxl___26516 + s.dw___26526); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.w___26406); + s.rxl___26516 = (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___26526; + { step = 18; continue; } + case 17: + r0 = s.w___26406; + case 18: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.x___26515 + s.tmp_1); + s.x___26515 = (r0); + { step = 16; continue; } + case 19: + r0 = (s.ry___26428 + s.dh___26507); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.h___26409); + s.ry___26428 = (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___26507; + { step = 21; continue; } + case 20: + r0 = s.h___26409; + case 21: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.y___26497 + s.tmp_1); + s.y___26497 = (r0); + { step = 15; continue; } + case 22: + case 23: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_showSystemMenu__P3107.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} +scene_BackgroundLayer_draw__P20725.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_systemMenu_showSystemMenu__P3107_mk(s) { +function scene_BackgroundLayer_draw__P20725_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_showSystemMenu__P3107, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_draw__P20725, 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___26406: undefined, + h___26409: undefined, + pw___26412: undefined, + ph___26416: undefined, + rx___26425: undefined, + ry___26428: undefined, + y___26497: undefined, + py___26498: undefined, + dh___26507: undefined, + x___26515: undefined, + rxl___26516: undefined, + px___26522: undefined, + dw___26526: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_buildOptionList__P3103(s) { +function helpers_arraySort__P18143(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11016,136 +10586,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.options___11784 = undefined; - r0 = pxsim_Array__mk(); - s.options___11784 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___3117; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11792; - s.tmp_1.arg3 = scene_systemMenu_volumeDown__P5203; - s.callLocIdx = 1095; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.VOLUME_UP_ICON___3114; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11806; - s.tmp_1.arg3 = scene_systemMenu_volumeUp__P5202; - s.callLocIdx = 1097; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, 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__C3087_VT); + 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; - s.tmp_2 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_2.arg0 = s.tmp_1; - s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___3115; - s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P11821; - s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P5205; - s.callLocIdx = 1100; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_1); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___3120; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11836; - s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P5204; - s.callLocIdx = 1102; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, 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__length(s.arg0); + s.tmp_2 = r0; + r0 = (s.tmp_2 > 1); case 2: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.STATS_ICON___3121; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11851; - s.tmp_1.arg3 = scene_systemMenu_toggleStats__P5207; - s.callLocIdx = 1103; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CONSOLE_ICON___3119; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11860; - s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P5208; - s.callLocIdx = 1105; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_0); - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.SLEEP_ICON___3118; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11869; - s.tmp_1.arg3 = scene_systemMenu_sleep__P5209; - s.callLocIdx = 1106; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_0); - r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___5198); + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } - s.tmp_0 = helpers_arrayConcat__P113_mk(s); - s.tmp_0.arg0 = s.options___11784; - s.tmp_0.arg1 = globals.customMenuOptions___5198; - s.callLocIdx = 1107; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.options___11784 = (r0); + s.arg1 = (helpers_arraySort_inline__P26249); case 3: case 4: - r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C3087_VT); - s.tmp_0 = r0; - s.tmp_1 = scene_systemMenu_MenuOption_constructor__P3088_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___3116; - s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P11882; - s.tmp_1.arg3 = scene_systemMenu_closeMenu__P3102; - s.callLocIdx = 1108; s.pc = 13; return s.tmp_1; - case 13: + s.tmp_0 = helpers_sortHelper__P22403_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 2; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - r0 = pxsim_Array__push(s.options___11784, s.tmp_0); - r0 = s.options___11784; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList__P3103.info = {"start":10499,"length":1149,"line":334,"column":4,"endLine":354,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"buildOptionList","argumentNames":[]} +helpers_arraySort__P18143.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 scene_systemMenu_buildOptionList__P3103_mk(s) { +function helpers_arraySort__P18143_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList__P3103, depth: s.depth + 1, + parent: s, fn: helpers_arraySort__P18143, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - options___11784: undefined, + tmp_3: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11792(s) { +function helpers_arraySort_inline__P26249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11155,44 +10649,142 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P1621_mk(s); - s.callLocIdx = 1094; s.pc = 1; return s.tmp_3; + s.aIsUndef___26252 = undefined; + s.bIsUndef___26256 = undefined; + s.aIsNull___26267 = undefined; + s.bIsNull___26271 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = (s.arg0 === undefined); + s.aIsUndef___26252 = (r0); + r0 = (s.arg1 === undefined); + s.bIsUndef___26256 = (r0); + s.tmp_0 = r0 = s.aIsUndef___26252; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = s.bIsUndef___26256; + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 3; continue; } + r0 = 0; + { step = 17; continue; } + { step = 8; continue; } + case 3: + r0 = pxsim_numops_toBoolDecr(s.aIsUndef___26252); + if (!r0) { step = 4; continue; } + r0 = 1; + { step = 17; continue; } + { step = 7; continue; } + case 4: + r0 = pxsim_numops_toBoolDecr(s.bIsUndef___26256); + if (!r0) { step = 5; continue; } + r0 = -1; + { step = 17; continue; } + case 5: + case 6: + case 7: + case 8: + r0 = (s.arg0 === null); + s.aIsNull___26267 = (r0); + r0 = (s.arg1 === null); + s.bIsNull___26271 = (r0); + s.tmp_0 = r0 = s.aIsNull___26267; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 9; continue; } + r0 = s.tmp_0; + { step = 10; continue; } + case 9: + r0 = s.bIsNull___26271; + case 10: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 11; continue; } + r0 = 0; + { step = 17; continue; } + { step = 16; continue; } + case 11: + r0 = pxsim_numops_toBoolDecr(s.aIsNull___26267); + if (!r0) { step = 12; continue; } + r0 = 1; + { step = 17; continue; } + { step = 15; continue; } + case 12: + r0 = pxsim_numops_toBoolDecr(s.bIsNull___26271); + if (!r0) { step = 13; continue; } + r0 = -1; + { step = 17; continue; } + case 13: + case 14: + case 15: + case 16: + 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_3 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_4 = r0; + r0 = pxsim_String__concat(s.tmp_3, s.tmp_4); s.tmp_2 = r0; - if ((s.tmp_2) && (s.tmp_2).vtable) { - setupResume(s, 2); - pxsim_String__stringConv(s.tmp_2); + if ((s.arg1) && (s.arg1).vtable) { + setupResume(s, 19); + pxsim_String__stringConv(s.arg1); checkResumeConsumed(); return; - } else { s.retval = (s.tmp_2) + ""; } - case 2: + } else { s.retval = (s.arg1) + ""; } + case 19: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat("VOLUME DOWN (", s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + s.tmp_6 = r0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_7 = r0; + r0 = pxsim_String__concat(s.tmp_6, s.tmp_7); + s.tmp_5 = r0; + r0 = pxsim_String_.compare(s.tmp_2, s.tmp_5); + case 17: return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11792.info = {"start":10644,"length":39,"line":337,"column":54,"endLine":337,"endColumn":93,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +helpers_arraySort_inline__P26249.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 scene_systemMenu_buildOptionList_inline__P11792_mk(s) { +function helpers_arraySort_inline__P26249_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11792, depth: s.depth + 1, + parent: s, fn: helpers_arraySort_inline__P26249, 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, + aIsUndef___26252: undefined, + bIsUndef___26256: undefined, + aIsNull___26267: undefined, + bIsNull___26271: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11806(s) { +function helpers_sortHelper__P22403(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11202,44 +10794,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_3 = music_volume__P1621_mk(s); - s.callLocIdx = 1096; s.pc = 1; return s.tmp_3; + s.len___26306 = undefined; + s.i___26309 = undefined; + s.j___26315 = 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.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; } case 1: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg1); 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) + ""; } + 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; } + r0 = s.arg0; + { step = 11; continue; } + case 3: + case 4: + r0 = pxsim_Array__length(s.arg0); + s.len___26306 = (r0); + s.i___26309 = (0); + case 5: + s.tmp_1 = r0 = s.i___26309; + r0 = (s.len___26306 - 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___26309 + 1); + s.j___26315 = (r0); + case 6: + r0 = (s.j___26315 < s.len___26306); + 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___26309); + s.tmp_3.arg0 = r0; + r0 = pxsim_Array__getAt(s.arg0, s.j___26315); + s.tmp_3.arg1 = r0; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 0; s.pc = 12; return s.tmp_3; + case 12: r0 = s.retval; + s.tmp_2 = r0; + r0 = (s.tmp_2 > 0); 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 = pxsim_numops_toBoolDecr(s.tmp_1); + if (!r0) { step = 7; continue; } + s.tmp_4 = helpers_swap__P22402_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.i___26309; + s.tmp_4.arg2 = s.j___26315; + s.callLocIdx = 1; s.pc = 13; return s.tmp_4; + case 13: + r0 = s.retval; + case 7: + case 8: + r0 = (s.j___26315 + 1); + s.j___26315 = (r0); + { step = 6; continue; } + case 9: + r0 = (s.i___26309 + 1); + s.i___26309 = (r0); + { step = 5; continue; } + case 10: + r0 = s.arg0; + case 11: return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11806.info = {"start":10751,"length":37,"line":338,"column":52,"endLine":338,"endColumn":89,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +helpers_sortHelper__P22403.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 scene_systemMenu_buildOptionList_inline__P11806_mk(s) { +function helpers_sortHelper__P22403_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11806, depth: s.depth + 1, + parent: s, fn: helpers_sortHelper__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, + len___26306: undefined, + i___26309: undefined, + j___26315: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11821(s) { +function helpers_swap__P22402(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11249,40 +10911,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___1951; + s.temp___26344 = 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__getAt(s.arg0, s.arg1); + s.temp___26344 = (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; - 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); - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = pxsim_Array_.setAt(s.tmp_0, s.tmp_1, s.tmp_2); + r0 = pxsim_Array_.setAt(s.arg0, s.arg2, s.temp___26344); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11821.info = {"start":10910,"length":48,"line":340,"column":62,"endLine":340,"endColumn":110,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +helpers_swap__P22402.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 scene_systemMenu_buildOptionList_inline__P11821_mk(s) { +function helpers_swap__P22402_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11821, depth: s.depth + 1, + parent: s, fn: helpers_swap__P22402, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + temp___26344: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11836(s) { +function scene_Camera_update__P20836(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11292,40 +10960,187 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = globals.brightness___1951; + s.elapsed___26613 = undefined; + s.percentComplete___26627 = undefined; + s.damp___26634 = undefined; + s.f___26643 = undefined; + s.x___26649 = undefined; + s.y___26656 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C20819_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__P20392_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 891; s.pc = 9; return s.tmp_3; + case 9: + r0 = s.retval; 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) + ""; } + r0 = (s.tmp_1).fields["_lastUpdatedSpriteX"] = (s.tmp_2); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 892; 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__P20825_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_x__P20392_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 893; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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 = 894; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = scene_Camera_offsetY__P20827_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_2 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 895; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + 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 = 896; 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___26613 = (r0); + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_1 = r0; + r0 = (s.elapsed___26613 >= 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: + r0 = s.arg0.fields["shakeDuration"]; + s.tmp_0 = r0; + r0 = (s.elapsed___26613 / s.tmp_0); + s.percentComplete___26627 = (r0); + s.damp___26634 = (1); + r0 = (s.percentComplete___26627 >= 0.75); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.tmp_1 = Math_max__P18168_mk(s); + s.tmp_1.arg0 = 0; + r0 = (1 - s.percentComplete___26627); + s.tmp_1.arg1 = r0; + s.callLocIdx = 899; s.pc = 15; return s.tmp_1; + case 15: r0 = s.retval; + s.damp___26634 = (r0); + case 4: + case 5: + r0 = s.arg0.fields["shakeAmplitude"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 * s.damp___26634); + s.f___26643 = (r0); + r0 = pxsim.Math_.random(); s.tmp_1 = r0; - r0 = pxsim_String__concat("BRIGHTNESS UP (", s.tmp_1); + r0 = (s.tmp_1 * s.f___26643); s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, ")"); + r0 = (s.tmp_0 >> 0); + s.x___26649 = (r0); + r0 = pxsim.Math_.random(); + s.tmp_1 = r0; + r0 = (s.tmp_1 * s.f___26643); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 0); + s.y___26656 = (r0); + s.tmp_0 = r0 = s.arg0; + r0 = s.tmp_0.fields["drawOffsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.x___26649); + 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___26656); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["drawOffsetY"] = (s.tmp_1); + case 6: + case 7: + case 8: + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11836.info = {"start":11038,"length":46,"line":341,"column":60,"endLine":341,"endColumn":106,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_Camera_update__P20836.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_systemMenu_buildOptionList_inline__P11836_mk(s) { +function scene_Camera_update__P20836_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11836, depth: s.depth + 1, + parent: s, fn: scene_Camera_update__P20836, 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___26613: undefined, + percentComplete___26627: undefined, + damp___26634: undefined, + f___26643: undefined, + x___26649: undefined, + y___26656: undefined, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11851(s) { +function scene_Camera_offsetY__P20827(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11335,34 +11150,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___2968); - if (!r0) { step = 1; continue; } - r0 = "HIDE STATS"; + s.scene___26675 = 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__C20819_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 882; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.scene___26675 = (r0); + r0 = s.scene___26675.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 = "SHOW STATS"; + r0 = s.scene___26675.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_0 = r0; - r0 = s.tmp_0; + 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__P20780_mk(s); + r0 = s.scene___26675.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 884; 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_systemMenu_buildOptionList_inline__P11851.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_Camera_offsetY__P20827.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_systemMenu_buildOptionList_inline__P11851_mk(s) { +function scene_Camera_offsetY__P20827_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11851, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P20827, 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___26675: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11860(s) { +function tiles_TileMap_enabled__P20785(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11372,20 +11246,135 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; s.tmp_3 = r0; - r0 = pxsim_Boolean__bang(s.tmp_3); + r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + return leaveAccessor(s, r0) + default: oops() +} } } +tiles_TileMap_enabled__P20785.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__P20785.isGetter = true; + +function tiles_TileMap_enabled__P20785_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_enabled__P20785, 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__P20780(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__C20773_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P18165_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P18168_mk(s); + s.tmp_3 = tiles_TileMap_areaHeight__P20782_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 821; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 822; 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 = 823; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + return leave(s, r0) + default: oops() +} } } +tiles_TileMap_offsetY__P20780.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 tiles_TileMap_offsetY__P20780_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_offsetY__P20780, 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 tiles_TileMap_areaHeight__P20782(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__C20773_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 = "HIDE CONSOLE"; + 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 = "SHOW CONSOLE"; + r0 = 0; case 2: // jmp value (already in r0) s.tmp_4 = r0; @@ -11393,25 +11382,26 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11860.info = {"start":11273,"length":71,"line":344,"column":50,"endLine":344,"endColumn":121,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +tiles_TileMap_areaHeight__P20782.info = {"start":9864,"length":93,"line":337,"column":8,"endLine":339,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaHeight","argumentNames":["this"]} -function scene_systemMenu_buildOptionList_inline__P11860_mk(s) { +function tiles_TileMap_areaHeight__P20782_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11860, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaHeight__P20782, 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 scene_systemMenu_buildOptionList_inline__P11869(s) { +function tiles_TileMap_scale__P20776(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11421,24 +11411,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "SLEEP"; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = s.arg0.fields["_scale"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11869.info = {"start":11411,"length":13,"line":345,"column":48,"endLine":345,"endColumn":61,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +tiles_TileMap_scale__P20776.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__P20776.isGetter = true; -function scene_systemMenu_buildOptionList_inline__P11869_mk(s) { +function tiles_TileMap_scale__P20776_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11869, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P20776, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function scene_systemMenu_buildOptionList_inline__P11882(s) { +function tiles_TileMapData_height__P20758(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11448,24 +11446,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = "CLOSE"; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_buildOptionList_inline__P11882.info = {"start":11590,"length":13,"line":351,"column":53,"endLine":351,"endColumn":66,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +tiles_TileMapData_height__P20758.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__P20758.isGetter = true; -function scene_systemMenu_buildOptionList_inline__P11882_mk(s) { +function tiles_TileMapData_height__P20758_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildOptionList_inline__P11882, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_height__P20758, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function scene_systemMenu_setScreenBrightnessSupported__P5210(s) { +function scene_Camera_offsetY__P20826(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11475,24 +11481,32 @@ 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, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightnessSupported__P5210.info = {"start":10398,"length":95,"line":330,"column":4,"endLine":332,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightnessSupported","argumentNames":[]} +scene_Camera_offsetY__P20826.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__P20826.isGetter = true; -function scene_systemMenu_setScreenBrightnessSupported__P5210_mk(s) { +function scene_Camera_offsetY__P20826_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P5210, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetY__P20826, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function scene_systemMenu_sleep__P5209(s) { +function scene_Camera_offsetX__P20825(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11502,25 +11516,93 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_pxtcore.deepSleep(); + s.scene___26735 = 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__C20819_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 879; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.scene___26735 = (r0); + r0 = s.scene___26735.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___26735.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_offsetX__P20779_mk(s); + r0 = s.scene___26735.fields["tileMap"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = s.arg1; + s.callLocIdx = 881; 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 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_sleep__P5209.info = {"start":10072,"length":51,"line":316,"column":4,"endLine":318,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"sleep","argumentNames":[]} +scene_Camera_offsetX__P20825.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_systemMenu_sleep__P5209_mk(s) { +function scene_Camera_offsetX__P20825_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_sleep__P5209, depth: s.depth + 1, + parent: s, fn: scene_Camera_offsetX__P20825, 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___26735: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_toggleConsole__P5208(s) { +function tiles_TileMap_offsetX__P20779(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11530,59 +11612,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); - 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__P3126_mk(s); - s.tmp_4.arg0 = false; - s.tmp_4.arg1 = undefined; - s.callLocIdx = 1088; s.pc = 3; return s.tmp_4; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P18165_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_1 = Math_max__P18168_mk(s); + s.tmp_3 = tiles_TileMap_areaWidth__P20781_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 818; s.pc = 3; return s.tmp_3; case 3: r0 = s.retval; - { step = 2; continue; } - case 1: - s.tmp_0 = game_consoleOverlay_setVisible__P3126_mk(s); - s.tmp_0.arg0 = true; - s.tmp_0.arg1 = undefined; - s.callLocIdx = 1089; s.pc = 4; return s.tmp_0; - case 4: + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_4 = r0; + r0 = (s.tmp_2 - s.tmp_4); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 0; + s.callLocIdx = 819; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.tmp_0 = console_log__P380_mk(s); - s.tmp_0.arg0 = "console"; - s.callLocIdx = 1090; s.pc = 5; return s.tmp_0; - case 5: + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 820; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - case 2: - r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_toggleConsole__P5208.info = {"start":9827,"length":239,"line":307,"column":4,"endLine":314,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleConsole","argumentNames":[]} +tiles_TileMap_offsetX__P20779.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 scene_systemMenu_toggleConsole__P5208_mk(s) { +function tiles_TileMap_offsetX__P20779_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleConsole__P5208, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_offsetX__P20779, 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__P3126(s) { +function tiles_TileMap_areaWidth__P20781(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11594,68 +11676,51 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_1 = r0 = s.arg0; - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); - 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); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; 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(); + r0 = s.arg0.fields["_map"]; + 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); { step = 2; continue; } case 1: - r0 = undefined; + r0 = 0; case 2: // jmp value (already in r0) - s.tmp_6 = r0; - globals.consoleStrings___5243 = (s.tmp_6); - case 3: - case 4: - r0 = (s.arg1 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - globals.consoleColor___5242 = (s.arg1); - case 5: - case 6: - r0 = undefined; + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -game_consoleOverlay_setVisible__P3126.info = {"start":562,"length":219,"line":19,"column":4,"endLine":24,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"setVisible","argumentNames":["value","col"]} +tiles_TileMap_areaWidth__P20781.info = {"start":9763,"length":91,"line":333,"column":8,"endLine":335,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"areaWidth","argumentNames":["this"]} -function game_consoleOverlay_setVisible__P3126_mk(s) { +function tiles_TileMap_areaWidth__P20781_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_setVisible__P3126, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_areaWidth__P20781, 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 console_log__P380(s) { +function tiles_TileMapData_width__P20757(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11669,24 +11734,20 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = console_add__P376_mk(s); - s.tmp_0.arg0 = 1; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 33; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; + return leaveAccessor(s, r0) default: oops() } } } -console_log__P380.info = {"start":1450,"length":86,"line":58,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]} +tiles_TileMapData_width__P20757.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__P20757.isGetter = true; -function console_log__P380_mk(s) { +function tiles_TileMapData_width__P20757_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_log__P380, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_width__P20757, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -11694,7 +11755,7 @@ function console_log__P380_mk(s) { -function console_add__P376(s) { +function scene_Camera_offsetX__P20824(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11704,87 +11765,82 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.text___11921 = undefined; - s.i___11930 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < globals.minPriority___375); - 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_1 = console_inspect__P382_mk(s); - s.tmp_1.arg0 = s.arg1; - s.tmp_1.arg1 = 20; - s.callLocIdx = 31; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.text___11921 = (r0); - if ((s.text___11921) && (s.text___11921).vtable) { - setupResume(s, 7); - pxsim_String__stringConv(s.text___11921); - checkResumeConsumed(); - return; - } else { s.retval = (s.text___11921) + ""; } - case 7: - r0 = s.retval; - s.tmp_0 = r0; - r0 = pxsim_String__concat(s.tmp_0, "\n"); - s.text___11921 = (r0); - s.i___11930 = (0); - case 3: - s.tmp_1 = r0 = s.i___11930; - r0 = pxsim_Array__length(globals.listeners___4422); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + return leaveAccessor(s, r0) + default: oops() +} } } +scene_Camera_offsetX__P20824.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__P20824.isGetter = true; + +function scene_Camera_offsetX__P20824_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Camera_offsetX__P20824, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Sprite_y__P20394(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__C20379_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); + 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___4422, s.i___11930); - s.tmp_3.argL = r0; - s.tmp_3.arg0 = s.arg0; - s.tmp_3.arg1 = s.text___11921; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 32; s.pc = 8; return s.tmp_3; - case 8: - r0 = s.retval; - r0 = (s.i___11930 + 1); - s.i___11930 = (r0); - { step = 3; continue; } - case 4: - case 5: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -console_add__P376.info = {"start":632,"length":317,"line":28,"column":4,"endLine":36,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"add","argumentNames":["priority","message"]} +Sprite_y__P20394.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__P20394.isGetter = true; -function console_add__P376_mk(s) { +function Sprite_y__P20394_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_add__P376, depth: s.depth + 1, + parent: s, fn: Sprite_y__P20394, 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___11921: undefined, - i___11930: undefined, + tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function console_inspect__P382(s) { +function Fx_div__P18200(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -11794,239 +11850,84 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.asArr___11961 = undefined; - s.asString___11979 = undefined; - s.keys___11991 = undefined; - s.snipped___11995 = 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.arg0 << 8); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } + r0 = pxsim.Math_.idiv(s.tmp_0, s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_div__P18200.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__P18200_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_div__P18200, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Sprite_x__P20392(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; - { step = 17; continue; } - { step = 16; continue; } - case 1: - r0 = pxsim_pxtcore.typeOf(s.arg0); + if (!checkSubtype(r0, Sprite__C20379_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 == "number"); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - r0 = pxsim_String_.mkEmpty(); + r0 = (s.tmp_3 << 8); 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___11961 = (s.arg0); - r0 = pxsim_Array__length(s.asArr___11961); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.arg1); + 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_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_2 = helpers_arrayJoin__P103_mk(s); - s.tmp_2.arg0 = s.asArr___11961; - s.tmp_2.arg1 = ","; - s.callLocIdx = 34; 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__P103_mk(s); - s.tmp_8 = helpers_arraySlice__P115_mk(s); - s.tmp_8.arg0 = s.asArr___11961; - s.tmp_8.arg1 = 0; - s.tmp_8.arg2 = s.arg1; - s.callLocIdx = 35; s.pc = 21; return s.tmp_8; - case 21: - r0 = s.retval; - s.tmp_7.arg0 = r0; - s.tmp_7.arg1 = ","; - s.callLocIdx = 36; 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: - 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___11979 = (r0); - r0 = (s.asString___11979 != "[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___11979 != "[Object]"); - 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___11979; - { step = 17; continue; } - case 8: - case 9: - r0 = pxsim_pxtrt.keysOf(s.arg0); - s.keys___11991 = (r0); - r0 = pxsim_Array__length(s.keys___11991); - s.tmp_0 = r0; - r0 = (s.tmp_0 > s.arg1); - s.snipped___11995 = (r0); - r0 = pxsim_numops_toBoolDecr(s.snipped___11995); - if (!r0) { step = 10; continue; } - s.tmp_0 = helpers_arraySlice__P115_mk(s); - s.tmp_0.arg0 = s.keys___11991; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 37; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.keys___11991 = (r0); - case 10: - case 11: - r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P12012); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_numops_toBoolDecr(s.snipped___11995); - 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__P112_mk(s); - s.tmp_7.arg0 = s.keys___11991; - s.tmp_7.arg1 = s.tmp_0; - r0 = pxsim_String_.mkEmpty(); - s.tmp_7.arg2 = r0; - s.callLocIdx = 38; 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) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -console_inspect__P382.info = {"start":2271,"length":1190,"line":81,"column":4,"endLine":114,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"inspect","argumentNames":["obj","maxElements"]} +Sprite_x__P20392.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__P20392.isGetter = true; -function console_inspect__P382_mk(s) { +function Sprite_x__P20392_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect__P382, depth: s.depth + 1, + parent: s, fn: Sprite_x__P20392, 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, - asArr___11961: undefined, - asString___11979: undefined, - keys___11991: undefined, - snipped___11995: undefined, arg0: undefined, - arg1: undefined, } } -function console_inspect_inline__P12012(s) { +function PhysicsEngine_move__P20555(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12041,69 +11942,19 @@ switch (step) { 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.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: - 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_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.retval; - s.tmp_1 = r0; - r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -console_inspect_inline__P12012.info = {"start":3293,"length":61,"line":108,"column":20,"endLine":108,"endColumn":81,"fileName":"pxt_modules/base/console.ts","functionName":"inline","argumentNames":["prev","currKey"]} +PhysicsEngine_move__P20555.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 console_inspect_inline__P12012_mk(s) { +function PhysicsEngine_move__P20555_mk(s) { checkStack(s.depth); return { - parent: s, fn: console_inspect_inline__P12012, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_move__P20555, 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, } } @@ -12112,7 +11963,7 @@ function console_inspect_inline__P12012_mk(s) { -function helpers_arraySlice__P115(s) { +function PhysicsEngine_draw__P20554(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12122,114 +11973,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___10516 = undefined; - s.len___10518 = undefined; - s.i___10552 = 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___10516 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___10518 = (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__P130_mk(s); - r0 = (s.len___10518 + s.arg1); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 0; - s.callLocIdx = 8; 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___10518); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = s.res___10516; - { 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___10518); - { 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___10518 + s.arg2); - s.arg2 = (r0); - case 8: - case 9: - case 10: - r0 = (s.arg2 > s.len___10518); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.arg2 = (s.len___10518); - case 11: - case 12: - s.i___10552 = (s.arg1); - case 13: - r0 = (s.i___10552 < s.arg2); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - s.tmp_1 = r0 = s.res___10516; - r0 = pxsim_Array__getAt(s.arg0, s.i___10552); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___10552 + 1); - s.i___10552 = (r0); - { step = 13; continue; } - case 14: - r0 = s.res___10516; - case 15: + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arraySlice__P115.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"]} +PhysicsEngine_draw__P20554.info = {"start":279,"length":10,"line":15,"column":4,"endLine":15,"endColumn":14,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} -function helpers_arraySlice__P115_mk(s) { +function PhysicsEngine_draw__P20554_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySlice__P115, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_draw__P20554, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - res___10516: undefined, - len___10518: undefined, - i___10552: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_arrayReduce__P112(s) { +function controller___update__P20203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12239,62 +12007,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.len___12039 = undefined; - s.i___12042 = undefined; + s.dtms___27067 = 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___12039 = (r0); - s.i___12042 = (0); - case 1: - r0 = (s.i___12042 < s.len___12039); + r0 = (s.arg0 * 1000); 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___12042); - s.tmp_1.arg1 = r0; - s.tmp_1.arg2 = s.i___12042; - setupLambda(s.tmp_1, s.tmp_1.argL); - s.callLocIdx = 7; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.arg2 = (r0); - r0 = (s.i___12042 + 1); - s.i___12042 = (r0); - { step = 1; continue; } + r0 = (s.tmp_0 | 0); + s.dtms___27067 = (r0); + r0 = pxsim_pxtcore_mkAction(1, controller___update_inline__P27074); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.dtms___27067); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_2 = controller_players__P20167_mk(s); + s.callLocIdx = 193; s.pc = 2; return s.tmp_2; case 2: - r0 = s.arg2; + r0 = s.retval; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 195; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayReduce__P112.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"]} +controller___update__P20203.info = {"start":13733,"length":137,"line":414,"column":4,"endLine":417,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"__update","argumentNames":["dt"]} -function helpers_arrayReduce__P112_mk(s) { +function controller___update__P20203_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayReduce__P112, depth: s.depth + 1, + parent: s, fn: controller___update__P20203, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - len___12039: undefined, - i___12042: undefined, + tmp_2: undefined, + dtms___27067: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function helpers_arrayJoin__P103(s) { +function controller___update_inline__P27074(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12304,153 +12061,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.r___12067 = undefined; - s.len___12068 = undefined; - s.i___12071 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - 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; } + s.tmp_0 = controller_Controller___update__P20201_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.caps[0]; + s.callLocIdx = 194; s.pc = 1; return s.tmp_0; 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___12067 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___12068 = (r0); - s.i___12071 = (0); - case 5: - r0 = (s.i___12071 < s.len___12068); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.i___12071 > 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___12067) && (s.r___12067).vtable) { - setupResume(s, 15); - pxsim_String__stringConv(s.r___12067); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___12067) + ""; } - 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___12067 = (r0); - case 8: - case 9: - r0 = pxsim_Array__getAt(s.arg0, s.i___12071); - 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___12071); - 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___12071); - case 13: - // jmp value (already in r0) - s.tmp_4 = r0; - if ((s.r___12067) && (s.r___12067).vtable) { - setupResume(s, 17); - pxsim_String__stringConv(s.r___12067); - checkResumeConsumed(); - return; - } else { s.retval = (s.r___12067) + ""; } - 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___12067 = (r0); - r0 = (s.i___12071 + 1); - s.i___12071 = (r0); - { step = 5; continue; } - case 14: - r0 = s.r___12067; + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayJoin__P103.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"]} +controller___update_inline__P27074.info = {"start":13835,"length":27,"line":416,"column":26,"endLine":416,"endColumn":53,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function helpers_arrayJoin__P103_mk(s) { +function controller___update_inline__P27074_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayJoin__P103, depth: s.depth + 1, + parent: s, fn: controller___update_inline__P27074, 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___12067: undefined, - len___12068: undefined, - i___12071: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_toggleStats__P5207(s) { +function controller_Controller___update__P20201(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12460,94 +12100,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.stats___2968); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + r0 = pxsim_pxtrt.mklocRef(); s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - globals.stats___2968 = (r0); - r0 = pxsim_numops_toBoolDecr(globals.stats___2968); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + 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__P27087); 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_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + r0 = s.arg0.fields["buttons"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 192; s.pc = 1; return s.tmp_1; case 1: - r0 = globals.control_EventContext_onStats___398; - 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___398; - r0 = pxsim_String_.mkEmpty(); - s.tmp_3.arg0 = r0; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 1086; s.pc = 5; return s.tmp_3; - case 5: r0 = s.retval; - case 3: - case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_toggleStats__P5207.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} +controller_Controller___update__P20201.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 scene_systemMenu_toggleStats__P5207_mk(s) { +function controller_Controller___update__P20201_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_toggleStats__P5207, depth: s.depth + 1, + parent: s, fn: controller_Controller___update__P20201, 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 scene_systemMenu_brightnessDown__P5205(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_setScreenBrightness__P5206_mk(s); - r0 = globals.brightness___1951; - s.tmp_1 = r0; - r0 = (s.tmp_1 - 5); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1082; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -scene_systemMenu_brightnessDown__P5205.info = {"start":9198,"length":87,"line":289,"column":4,"endLine":291,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessDown","argumentNames":[]} - -function scene_systemMenu_brightnessDown__P5205_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: scene_systemMenu_brightnessDown__P5205, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, -} } - - - - - -function scene_systemMenu_setScreenBrightness__P5206(s) { +function controller_Controller___update_inline__P27087(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12561,29 +12164,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = helpers_setScreenBrightness__P1965_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1083; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.tmp_0 = settings_writeNumber__P2063_mk(s); - s.tmp_0.arg0 = "#brightness"; - r0 = globals.brightness___1951; + s.tmp_0 = controller_Button___update__P20241_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); s.tmp_0.arg1 = r0; - s.callLocIdx = 1085; s.pc = 2; return s.tmp_0; - case 2: + s.callLocIdx = 191; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setScreenBrightness__P5206.info = {"start":9291,"length":345,"line":293,"column":4,"endLine":298,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightness","argumentNames":["b"]} +controller_Controller___update_inline__P27087.info = {"start":13298,"length":25,"line":398,"column":33,"endLine":398,"endColumn":58,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["btn"]} -function scene_systemMenu_setScreenBrightness__P5206_mk(s) { +function controller_Controller___update_inline__P27087_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setScreenBrightness__P5206, depth: s.depth + 1, + parent: s, fn: controller_Controller___update_inline__P27087, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -12593,7 +12190,7 @@ function scene_systemMenu_setScreenBrightness__P5206_mk(s) { -function settings_writeNumber__P2063(s) { +function controller_Button___update__P20241(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12603,338 +12200,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.delay___27103 = undefined; + s.interval___27112 = undefined; + s.count___27125 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C20227_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_Array__push(s.tmp_0, s.arg1); - s.tmp_1 = settings_writeBuffer__P2060_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = msgpack_packNumberArray__P184_mk(s); - s.tmp_2.arg0 = s.tmp_0; - s.callLocIdx = 124; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; - s.tmp_1.arg1 = r0; - s.callLocIdx = 125; s.pc = 1; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + { step = 11; continue; } case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -settings_writeNumber__P2063.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 settings_writeNumber__P2063_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_writeNumber__P2063, 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 settings_writeBuffer__P2060(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.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); - case 1: - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -settings_writeBuffer__P2060.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 settings_writeBuffer__P2060_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_writeBuffer__P2060, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function msgpack_packNumberArray__P184(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.off___12157 = undefined; - s.n___12159 = undefined; - s.unnamed50___U2 = undefined; - s.unnamed51___U3 = undefined; - s.buf___12169 = undefined; - s.n___12175 = undefined; - s.unnamed52___U6 = undefined; - s.unnamed53___U7 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - s.off___12157 = (0); - s.n___12159 = (undefined); - s.unnamed50___U2 = (s.arg0); - s.unnamed51___U3 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed51___U3; - r0 = pxsim_Array__length(s.unnamed50___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed50___U2, s.unnamed51___U3); - s.n___12159 = (r0); - s.tmp_2 = r0 = s.off___12157; - s.tmp_4 = msgpack_packNumberCore__P4381_mk(s); - s.tmp_4.arg0 = null; - s.tmp_4.arg1 = s.off___12157; - s.tmp_4.arg2 = s.n___12159; - s.callLocIdx = 21; 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___12157 = (r0); - r0 = (s.unnamed51___U3 + 1); - s.unnamed51___U3 = (r0); - { step = 1; continue; } case 2: - s.unnamed50___U2 = (undefined); - r0 = pxsim.control.createBuffer(s.off___12157); - s.buf___12169 = (r0); - s.off___12157 = (0); - s.n___12175 = (undefined); - s.unnamed52___U6 = (s.arg0); - s.unnamed53___U7 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed53___U7; - r0 = pxsim_Array__length(s.unnamed52___U6); + 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_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed52___U6, s.unnamed53___U7); - s.n___12175 = (r0); - s.tmp_2 = r0 = s.off___12157; - s.tmp_4 = msgpack_packNumberCore__P4381_mk(s); - s.tmp_4.arg0 = s.buf___12169; - s.tmp_4.arg1 = s.off___12157; - s.tmp_4.arg2 = s.n___12175; - s.callLocIdx = 22; 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___12157 = (r0); - r0 = (s.unnamed53___U7 + 1); - s.unnamed53___U7 = (r0); - { step = 3; continue; } - case 4: - s.unnamed52___U6 = (undefined); - r0 = s.buf___12169; - return leave(s, r0) - default: oops() -} } } -msgpack_packNumberArray__P184.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} - -function msgpack_packNumberArray__P184_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: msgpack_packNumberArray__P184, 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___12157: undefined, - n___12159: undefined, - unnamed50___U2: undefined, - unnamed51___U3: undefined, - buf___12169: undefined, - n___12175: undefined, - unnamed52___U6: undefined, - unnamed53___U7: undefined, - arg0: undefined, -} } - - - - - -function msgpack_packNumberCore__P4381(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.tag___12189 = undefined; - s.fmt___12232 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - s.tag___12189 = (203); - s.tmp_1 = r0 = s.arg2; - r0 = (s.arg2 << 0); - s.tmp_2 = r0; - r0 = (s.tmp_1 == s.tmp_2); + 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: - 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; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = globals.defaultRepeatDelay___22780; { step = 4; continue; } case 3: - r0 = (s.arg2 <= 127); + r0 = s.arg0.fields["repeatDelay"]; 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); + s.tmp_2 = r0; + s.delay___27103 = (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 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.arg2); + r0 = globals.defaultRepeatInterval___22782; + { step = 6; continue; } case 5: + r0 = s.arg0.fields["repeatInterval"]; case 6: - r0 = 1; - { step = 23; continue; } - { step = 18; continue; } - case 7: - r0 = (0 <= s.arg2); + // jmp value (already in r0) + s.tmp_2 = r0; + s.interval___27112 = (s.tmp_2); + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 < s.delay___27103); 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___12189 = (204); + if (!r0) { step = 7; continue; } { step = 11; continue; } + case 7: case 8: - r0 = (s.arg2 <= 65535); + r0 = s.arg0.fields["_pressedElasped"]; + s.tmp_5 = r0; + r0 = (s.tmp_5 - s.delay___27103); + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.interval___27112); + s.tmp_3 = r0; + r0 = (s.tmp_3 / s.interval___27112); + s.tmp_2 = r0; + r0 = pxsim.Math_.floor(s.tmp_2); + s.count___27125 = (r0); + r0 = s.arg0.fields["_repeatCount"]; + s.tmp_1 = r0; + r0 = (s.count___27125 != s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - s.tag___12189 = (205); - { step = 10; continue; } + s.tmp_2 = controller_Button_raiseButtonRepeat__P22769_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 207; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + r0 = (s.arg0).fields["_repeatCount"] = (s.count___27125); case 9: - s.tag___12189 = (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___12189 = (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___12189 = (209); - { step = 15; continue; } - case 14: - s.tag___12189 = (210); - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - s.tmp_0 = msgpack_tagFormat__P4380_mk(s); - s.tmp_0.arg0 = s.tag___12189; - s.callLocIdx = 17; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.fmt___12232 = (r0); - r0 = pxsim_numops_toBoolDecr(s.arg0); - if (!r0) { step = 21; continue; } - r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___12189); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.fmt___12232; - 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__P175_mk(s); - s.tmp_1.arg0 = s.fmt___12232; - s.callLocIdx = 18; s.pc = 25; return s.tmp_1; - case 25: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - case 23: + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_packNumberCore__P4381.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"]} +controller_Button___update__P20241.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 msgpack_packNumberCore__P4381_mk(s) { +function controller_Button___update__P20241_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_packNumberCore__P4381, depth: s.depth + 1, + parent: s, fn: controller_Button___update__P20241, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -12942,20 +12306,18 @@ function msgpack_packNumberCore__P4381_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - tag___12189: undefined, - fmt___12232: undefined, + delay___27103: undefined, + interval___27112: undefined, + count___27125: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function msgpack_tagFormat__P4380(s) { +function controller_Button_raiseButtonRepeat__P22769(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -12969,58 +12331,29 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - 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; } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___22778); + 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 = 16; - { step = 9; continue; } + r0 = s.arg0.fields["id"]; + s.tmp_0 = r0; + r0 = pxsim.control.raiseEvent(2055, s.tmp_0); 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() } } } -msgpack_tagFormat__P4380.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} +controller_Button_raiseButtonRepeat__P22769.info = {"start":3303,"length":211,"line":110,"column":8,"endLine":115,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonRepeat","argumentNames":["this"]} -function msgpack_tagFormat__P4380_mk(s) { +function controller_Button_raiseButtonRepeat__P22769_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_tagFormat__P4380, depth: s.depth + 1, + parent: s, fn: controller_Button_raiseButtonRepeat__P22769, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -13030,7 +12363,7 @@ function msgpack_tagFormat__P4380_mk(s) { -function pins_sizeOf__P175(s) { +function controller_players__P20167(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13040,128 +12373,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.lambdaArgs = null; - } - s.tmp_0 = Buffer_sizeOfNumberFormat__P215_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 16; s.pc = 1; return s.tmp_0; + s.tmp_0 = controller__player1__P20166_mk(s); + s.callLocIdx = 152; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - return leave(s, r0) - default: oops() -} } } -pins_sizeOf__P175.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} - -function pins_sizeOf__P175_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: pins_sizeOf__P175, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function Buffer_sizeOfNumberFormat__P215(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 = 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: + s.tmp_0 = helpers_arrayFilter__P18148_mk(s); + s.tmp_0.arg0 = globals._players___22698; + s.tmp_0.arg1 = controller_players_inline__P27057; + s.callLocIdx = 153; s.pc = 2; return s.tmp_0; 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.retval; return leave(s, r0) default: oops() } } } -Buffer_sizeOfNumberFormat__P215.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} +controller_players__P20167.info = {"start":1645,"length":144,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"players","argumentNames":[]} -function Buffer_sizeOfNumberFormat__P215_mk(s) { +function controller_players__P20167_mk(s) { checkStack(s.depth); return { - parent: s, fn: Buffer_sizeOfNumberFormat__P215, depth: s.depth + 1, + parent: s, fn: controller_players__P20167, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function helpers_setScreenBrightness__P1965(s) { +function controller_players_inline__P27057(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13173,78 +12412,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 10; - s.tmp_0.arg1 = 100; - r0 = (s.arg1 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 87; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.arg1 = (r0); - globals.brightness___1951 = (s.arg1); - r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___1951); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -helpers_setScreenBrightness__P1965.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 helpers_setScreenBrightness__P1965_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: helpers_setScreenBrightness__P1965, 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__P5204(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_setScreenBrightness__P5206_mk(s); - r0 = globals.brightness___1951; + r0 = pxsim_numops_toBoolDecr(s.arg0); + s.tmp_2 = r0; + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_1 + 5); - s.tmp_0.arg0 = r0; - s.callLocIdx = 1080; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -scene_systemMenu_brightnessUp__P5204.info = {"start":9107,"length":85,"line":285,"column":4,"endLine":287,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessUp","argumentNames":[]} +controller_players_inline__P27057.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_brightnessUp__P5204_mk(s) { +function controller_players_inline__P27057_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_brightnessUp__P5204, depth: s.depth + 1, + parent: s, fn: controller_players_inline__P27057, 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_volumeDown__P5203(s) { +function controller__moveSprites__P20171(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13254,54 +12451,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___12505 = undefined; - s.remainder___12508 = undefined; - s.newVolume___12511 = undefined; - s.tmp_0 = music_volume__P1621_mk(s); - s.callLocIdx = 1077; s.pc = 3; return s.tmp_0; - case 3: + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1 = controller_players__P20167_mk(s); + s.callLocIdx = 154; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.v___12505 = (r0); - r0 = (s.v___12505 % 32); - s.remainder___12508 = (r0); - r0 = pxsim_numops_toBoolDecr(s.remainder___12508); - if (!r0) { step = 1; continue; } - r0 = s.remainder___12508; - { step = 2; continue; } + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = controller__moveSprites_inline__P26826; + s.callLocIdx = 156; s.pc = 1; return s.tmp_0; case 1: - r0 = 32; - case 2: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = (s.v___12505 - s.tmp_0); - s.newVolume___12511 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P5201_mk(s); - s.tmp_0.arg0 = s.newVolume___12511; - s.callLocIdx = 1078; s.pc = 4; return s.tmp_0; - case 4: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_volumeDown__P5203.info = {"start":8914,"length":187,"line":278,"column":4,"endLine":283,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeDown","argumentNames":[]} +controller__moveSprites__P20171.info = {"start":2005,"length":180,"line":67,"column":4,"endLine":71,"endColumn":5,"fileName":"pxt_modules/game/controller.ts","functionName":"_moveSprites","argumentNames":[]} -function scene_systemMenu_volumeDown__P5203_mk(s) { +function controller__moveSprites__P20171_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeDown__P5203, depth: s.depth + 1, + parent: s, fn: controller__moveSprites__P20171, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - v___12505: undefined, - remainder___12508: undefined, - newVolume___12511: undefined, + tmp_1: undefined, } } -function scene_systemMenu_setVolume__P5201(s) { +function controller__moveSprites_inline__P26826(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13315,33 +12494,21 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = music_setVolume__P1620_mk(s); + s.tmp_0 = controller_Controller___preUpdate__P20200_mk(s); s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1072; s.pc = 1; return s.tmp_0; + s.callLocIdx = 155; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; - s.tmp_0 = music_playTone__P1622_mk(s); - s.tmp_0.arg0 = 440; - s.tmp_0.arg1 = 500; - s.callLocIdx = 1073; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = settings_writeNumber__P2063_mk(s); - s.tmp_0.arg0 = "#volume"; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 1074; s.pc = 3; return s.tmp_0; - case 3: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_setVolume__P5201.info = {"start":8565,"length":166,"line":265,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setVolume","argumentNames":["newVolume"]} +controller__moveSprites_inline__P26826.info = {"start":2151,"length":26,"line":70,"column":26,"endLine":70,"endColumn":52,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["ctrl"]} -function scene_systemMenu_setVolume__P5201_mk(s) { +function controller__moveSprites_inline__P26826_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_setVolume__P5201, depth: s.depth + 1, + parent: s, fn: controller__moveSprites_inline__P26826, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -13351,7 +12518,7 @@ function scene_systemMenu_setVolume__P5201_mk(s) { -function music_playTone__P1622(s) { +function controller_Controller___preUpdate__P20200(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13361,191 +12528,334 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.id___12346 = undefined; + s.deadSprites___26833 = undefined; + s.svx___26834 = undefined; + s.svy___26835 = undefined; + s.svxInCricle___26870 = undefined; + s.svyInCircle___26872 = undefined; + s.sq___26874 = undefined; + s.scale___26889 = 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); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + s.tmp_3 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 166; s.pc = 18; return s.tmp_3; + case 18: + r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 == 0); + r0 = pxsim_numops_toBoolDecr(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_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_pxtrt_stlocRef(s.arg1, 86400000); + { step = 17; continue; } case 1: case 2: - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_1 = r0; - r0 = (s.tmp_1 <= 2000); + r0 = pxsim_pxtrt.mklocRef(); + s.deadSprites___26833 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.deadSprites___26833, false); + r0 = pxsim_pxtrt.mklocRef(); + s.svx___26834 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svx___26834, 0); + r0 = pxsim_pxtrt.mklocRef(); + s.svy___26835 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.svy___26835, 0); + r0 = s.arg0.fields["analog"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - s.tmp_2 = music_playNoteCore__P4480_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 = 64; s.pc = 5; return s.tmp_2; - case 5: + s.tmp_1 = r0 = s.svx___26834; + s.tmp_5 = controller_Button_pressureLevel__P20239_mk(s); + s.tmp_6 = controller_Controller_right__P20182_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 167; s.pc = 20; return s.tmp_6; + case 20: r0 = s.retval; - s.tmp_0 = pause__P413_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.arg1); - s.tmp_0.arg0 = r0; - s.callLocIdx = 65; s.pc = 6; return s.tmp_0; - case 6: + s.tmp_5.arg0 = r0; + s.callLocIdx = 168; s.pc = 19; return s.tmp_5; + case 19: r0 = s.retval; - { step = 4; continue; } - case 3: - r0 = (globals.playToneID___4482 + 1); - s.tmp_0 = r0; - globals.playToneID___4482 = (r0); - s.id___12346 = (s.tmp_0); - r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P12352); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___12346); - 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() -} } } -music_playTone__P1622.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 music_playTone__P1622_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: music_playTone__P1622, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - id___12346: undefined, - arg0: undefined, - arg1: undefined, -} } - - - - - -function music_playTone_inline__P12352(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.pos___12353 = undefined; - s.now___12363 = undefined; - s.d___12366 = undefined; - s.t___12370 = undefined; - r0 = pxsim.control.millis(); - s.pos___12353 = (r0); - case 1: - r0 = (s.caps[0] == globals.playToneID___4482); - 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_4 = r0; + s.tmp_8 = controller_Button_pressureLevel__P20239_mk(s); + s.tmp_9 = controller_Controller_left__P20181_mk(s); + s.tmp_9.arg0 = s.arg0; + s.callLocIdx = 169; s.pc = 22; return s.tmp_9; + case 22: + r0 = s.retval; + s.tmp_8.arg0 = r0; + s.callLocIdx = 170; 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_pxtrt_stlocRef(s.tmp_1, s.tmp_2); + s.tmp_0 = r0 = s.svy___26835; + s.tmp_4 = controller_Button_pressureLevel__P20239_mk(s); + s.tmp_5 = controller_Controller_down__P20184_mk(s); + s.tmp_5.arg0 = s.arg0; + s.callLocIdx = 171; s.pc = 24; return s.tmp_5; + case 24: + r0 = s.retval; + s.tmp_4.arg0 = r0; + s.callLocIdx = 172; s.pc = 23; return s.tmp_4; + case 23: + r0 = s.retval; + s.tmp_3 = r0; + s.tmp_7 = controller_Button_pressureLevel__P20239_mk(s); + s.tmp_8 = controller_Controller_up__P20183_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 173; s.pc = 26; return s.tmp_8; + case 26: + r0 = s.retval; + s.tmp_7.arg0 = r0; + s.callLocIdx = 174; 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 = (s.tmp_1 > 0); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + { step = 12; continue; } case 3: + s.tmp_1 = controller_Button__C20227_v0_1_mk(s); + s.tmp_2 = controller_Controller_right__P20182_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 175; 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__C20227_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_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_3 = r0; + s.tmp_5 = controller_Button__C20227_v0_1_mk(s); + s.tmp_6 = controller_Controller_left__P20181_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 176; 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__C20227_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 = pxsim.control.millis(); - s.now___12363 = (r0); - r0 = (s.pos___12353 - s.now___12363); - s.d___12366 = (r0); - s.tmp_0 = Math_min__P131_mk(s); - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = 500; - s.callLocIdx = 66; s.pc = 7; return s.tmp_0; + 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___26834; + 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__C20227_v0_1_mk(s); + s.tmp_2 = controller_Controller_down__P20184_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 177; s.pc = 32; return s.tmp_2; + case 32: r0 = s.retval; - s.t___12370 = (r0); - s.tmp_0 = r0 = s.caps[1]; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_1.arg0 = r0; + if (!checkSubtype(s.tmp_1.arg0, controller_Button__C20227_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__C20227_v0_1_mk(s); + s.tmp_6 = controller_Controller_up__P20183_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 178; 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__C20227_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___26835; + 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___26870 = (r0); + s.tmp_0 = r0 = s.svxInCricle___26870; + r0 = pxsim_pxtrt_ldlocRef(s.svx___26834); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt.mklocRef(); + s.svyInCircle___26872 = (r0); + s.tmp_0 = r0 = s.svyInCircle___26872; + r0 = pxsim_pxtrt_ldlocRef(s.svy___26835); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = pxsim_pxtrt_ldlocRef(s.svx___26834); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svx___26834); + s.tmp_2 = r0; + r0 = (s.tmp_1 * s.tmp_2); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___26835); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_ldlocRef(s.svy___26835); + s.tmp_5 = r0; + r0 = (s.tmp_4 * s.tmp_5); + s.tmp_3 = r0; + r0 = (s.tmp_0 + s.tmp_3); + s.sq___26874 = (r0); + r0 = (s.sq___26874 > 65536); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 13; continue; } + r0 = (65536 / s.sq___26874); + s.tmp_1 = r0; + r0 = pxsim.Math_.sqrt(s.tmp_1); + s.scale___26889 = (r0); + s.tmp_0 = r0 = s.svxInCricle___26870; + s.tmp_3 = r0 = s.scale___26889; + r0 = pxsim_pxtrt_ldlocRef(s.svx___26834); + s.tmp_4 = r0; + r0 = (s.tmp_3 * s.tmp_4); s.tmp_2 = r0; - r0 = (s.tmp_2 - s.t___12370); + r0 = (s.tmp_2 | 0); s.tmp_1 = r0; r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); - r0 = (s.pos___12353 + s.t___12370); - s.pos___12353 = (r0); - s.tmp_0 = music_playNoteCore__P4480_mk(s); - r0 = (s.d___12366 - 1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.caps[2]; - s.tmp_0.arg2 = s.t___12370; - s.callLocIdx = 67; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0 = r0 = s.svyInCircle___26872; + s.tmp_3 = r0 = s.scale___26889; + r0 = pxsim_pxtrt_ldlocRef(s.svy___26835); + 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 = (s.tmp_1 == 0); + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + case 13: + case 14: + r0 = pxsim_pxtcore_mkAction(5, controller_Controller___preUpdate_inline__P26907); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.deadSprites___26833); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.svx___26834); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.svy___26835); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 3, s.svxInCricle___26870); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 4, s.svyInCircle___26872); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_2 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 179; 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 = 187; s.pc = 35; return s.tmp_1; + case 35: + r0 = s.retval; + r0 = pxsim_pxtrt_ldlocRef(s.deadSprites___26833); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.tmp_2 = pause__P413_mk(s); - r0 = (s.d___12366 + s.t___12370); + if (!r0) { step = 15; continue; } + s.tmp_1 = controller_Controller__controlledSprites__P20178_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = helpers_arrayFilter__P18148_mk(s); + s.tmp_3 = controller_Controller__controlledSprites__P20177_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 188; s.pc = 39; return s.tmp_3; + case 39: + r0 = s.retval; s.tmp_2.arg0 = r0; - s.callLocIdx = 68; s.pc = 9; return s.tmp_2; - case 9: + s.tmp_2.arg1 = controller_Controller___preUpdate_inline__P26964; + s.callLocIdx = 189; s.pc = 38; return s.tmp_2; + case 38: r0 = s.retval; - { step = 5; continue; } - case 4: - s.tmp_0 = pause__P413_mk(s); - r0 = (s.d___12366 + s.t___12370); - s.tmp_1 = r0; - r0 = (s.tmp_1 - 100); - s.tmp_0.arg0 = r0; - s.callLocIdx = 69; s.pc = 10; return s.tmp_0; - case 10: + s.tmp_1.arg1 = r0; + s.callLocIdx = 190; s.pc = 37; return s.tmp_1; + case 37: r0 = s.retval; - case 5: - { step = 1; continue; } - case 6: + case 15: + case 16: + case 17: r0 = undefined; return leave(s, r0) default: oops() } } } -music_playTone_inline__P12352.info = {"start":2911,"length":515,"line":93,"column":34,"endLine":107,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} +controller_Controller___preUpdate__P20200.info = {"start":10666,"length":2535,"line":330,"column":8,"endLine":394,"endColumn":9,"fileName":"pxt_modules/game/controller.ts","functionName":"__preUpdate","argumentNames":["this"]} -function music_playTone_inline__P12352_mk(s) { +function controller_Controller___preUpdate__P20200_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playTone_inline__P12352, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate__P20200, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - pos___12353: undefined, - now___12363: undefined, - d___12366: undefined, - t___12370: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + deadSprites___26833: undefined, + svx___26834: undefined, + svy___26835: undefined, + svxInCricle___26870: undefined, + svyInCircle___26872: undefined, + sq___26874: undefined, + scale___26889: undefined, + arg0: undefined, } } -function music_playNoteCore__P4480(s) { +function controller_Controller___preUpdate_inline__P26907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13555,57 +12865,175 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___12400 = undefined; + s.s___26910 = undefined; + s.vx___26911 = undefined; + s.vy___26912 = 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___12400 = (r0); - s.tmp_0 = music_addNote__P1636_mk(s); - s.tmp_0.arg0 = s.buf___12400; - 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__P1621_mk(s); - s.callLocIdx = 62; s.pc = 2; return s.tmp_1; - case 2: + 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 = 180; s.pc = 22; return s.tmp_0; } + } + case 22: r0 = s.retval; - s.tmp_0.arg7 = r0; - s.tmp_0.arg8 = s.arg1; - s.callLocIdx = 63; s.pc = 1; return s.tmp_0; - case 1: + s.s___26910 = (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 = 181; s.pc = 23; return s.tmp_2; } + } + case 23: + r0 = s.retval; + s.vx___26911 = (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 = 182; s.pc = 24; return s.tmp_3; } + } + case 24: r0 = s.retval; - r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___12400); + s.vy___26912 = (r0); + r0 = s.s___26910.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___26911); + if (!r0) { step = 3; continue; } + r0 = (s.s___26910).fields["_vx"] = (0); + case 3: + case 4: + r0 = pxsim_numops_toBoolDecr(s.vy___26912); + if (!r0) { step = 5; continue; } + r0 = (s.s___26910).fields["_vy"] = (0); + case 5: + case 6: + case 7: + case 8: + r0 = pxsim_pxtrt_ldlocRef(s.caps[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___26911; + r0 = pxsim_numops_toBool(s.tmp_2); + if (r0) { step = 11; continue; } + r0 = s.tmp_2; + { step = 12; continue; } + case 11: + r0 = s.vy___26912; + 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___26910; + r0 = pxsim_pxtrt_ldlocRef(s.caps[3]); + s.tmp_6 = r0; + r0 = pxsim.Math_.imul(s.tmp_6, s.vx___26911); + s.tmp_5 = r0; + r0 = (s.tmp_4).fields["_vx"] = (s.tmp_5); + s.tmp_0 = r0 = s.s___26910; + r0 = pxsim_pxtrt_ldlocRef(s.caps[4]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___26912); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vy"] = (s.tmp_1); + { step = 18; continue; } + case 13: + r0 = pxsim_numops_toBoolDecr(s.vx___26911); + if (!r0) { step = 14; continue; } + s.tmp_0 = r0 = s.s___26910; + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vx___26911); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + { step = 17; continue; } + case 14: + r0 = pxsim_numops_toBoolDecr(s.vy___26912); + if (!r0) { step = 15; continue; } + s.tmp_0 = r0 = s.s___26910; + r0 = pxsim_pxtrt_ldlocRef(s.caps[2]); + s.tmp_2 = r0; + r0 = pxsim.Math_.imul(s.tmp_2, s.vy___26912); + 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; return leave(s, r0) default: oops() } } } -music_playNoteCore__P4480.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"]} +controller_Controller___preUpdate_inline__P26907.info = {"start":11849,"length":1171,"line":361,"column":44,"endLine":389,"endColumn":13,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["controlledSprite"]} -function music_playNoteCore__P4480_mk(s) { +function controller_Controller___preUpdate_inline__P26907_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_playNoteCore__P4480, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P26907, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - buf___12400: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + s___26910: undefined, + vx___26911: undefined, + vy___26912: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function music_addNote__P1636(s) { +function controller_Controller___preUpdate_inline__P26964(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13617,89 +13045,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.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); - 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); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 6); + r0 = s.arg0.fields["s"]; + r0 = r0.fields["flags"]; 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); + r0 = (s.tmp_2 & 2); 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; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -music_addNote__P1636.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"]} +controller_Controller___preUpdate_inline__P26964.info = {"start":13147,"length":42,"line":393,"column":28,"endLine":393,"endColumn":70,"fileName":"pxt_modules/game/controller.ts","functionName":"inline","argumentNames":["s"]} -function music_addNote__P1636_mk(s) { +function controller_Controller___preUpdate_inline__P26964_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_addNote__P1636, depth: s.depth + 1, + parent: s, fn: controller_Controller___preUpdate_inline__P26964, 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, - arg8: undefined, } } -function music_setVolume__P1620(s) { +function controller_Button_pressureLevel__P20239(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13713,40 +13089,58 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 0; - s.tmp_0.arg1 = 255; - r0 = (s.arg0 | 0); - s.tmp_0.arg2 = r0; - s.callLocIdx = 59; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.globalVolume___4475 = (r0); - r0 = (globals.globalVolume___4475 > 0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C20227_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 = 3; continue; } + s.tmp_3 = controller_Button__C20227_v0_1_mk(s); + s.tmp_3.arg0 = s.arg0; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C20227_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.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - r0 = 1; + r0 = 512; { step = 2; continue; } case 1: r0 = 0; case 2: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = undefined; + 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() } } } -music_setVolume__P1620.info = {"start":1533,"length":153,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"setVolume","argumentNames":["volume"]} +controller_Button_pressureLevel__P20239.info = {"start":6453,"length":311,"line":192,"column":8,"endLine":199,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"pressureLevel","argumentNames":["this"]} -function music_setVolume__P1620_mk(s) { +function controller_Button_pressureLevel__P20239_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_setVolume__P1620, depth: s.depth + 1, + parent: s, fn: controller_Button_pressureLevel__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, + tmp_5: undefined, arg0: undefined, } } @@ -13754,7 +13148,7 @@ function music_setVolume__P1620_mk(s) { -function music_enableAmp__P4478(s) { +function controller_Controller_down__P20184(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13768,17 +13162,26 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_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) default: oops() } } } -music_enableAmp__P4478.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} +controller_Controller_down__P20184.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__P20184.isGetter = true; -function music_enableAmp__P4478_mk(s) { +function controller_Controller_down__P20184_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_enableAmp__P4478, depth: s.depth + 1, + parent: s, fn: controller_Controller_down__P20184, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -13786,7 +13189,7 @@ function music_enableAmp__P4478_mk(s) { -function scene_systemMenu_volumeUp__P5202(s) { +function controller_Controller_button__P22763(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13796,47 +13199,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.v___12314 = undefined; - s.remainder___12317 = undefined; - s.newVolume___12320 = undefined; - s.tmp_0 = music_volume__P1621_mk(s); - s.callLocIdx = 1075; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.v___12314 = (r0); - r0 = (s.v___12314 % 32); - s.remainder___12317 = (r0); - r0 = (s.v___12314 + 32); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = (s.tmp_0 - s.remainder___12317); - s.newVolume___12320 = (r0); - s.tmp_0 = scene_systemMenu_setVolume__P5201_mk(s); - s.tmp_0.arg0 = s.newVolume___12320; - s.callLocIdx = 1076; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -scene_systemMenu_volumeUp__P5202.info = {"start":8737,"length":171,"line":271,"column":4,"endLine":276,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeUp","argumentNames":[]} +controller_Controller_button__P22763.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 scene_systemMenu_volumeUp__P5202_mk(s) { +function controller_Controller_button__P22763_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_volumeUp__P5202, depth: s.depth + 1, + parent: s, fn: controller_Controller_button__P22763, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - v___12314: undefined, - remainder___12317: undefined, - newVolume___12320: undefined, + tmp_1: undefined, + arg0: undefined, + arg1: undefined, } } -function game_consoleOverlay_isVisible__P3124(s) { +function controller_Controller_up__P20183(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13846,33 +13241,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___5243); - s.tmp_2 = r0; - r0 = pxsim_Boolean__bang(s.tmp_2); - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leave(s, r0) + r0 = (2 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -game_consoleOverlay_isVisible__P3124.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} +controller_Controller_up__P20183.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__P20183.isGetter = true; -function game_consoleOverlay_isVisible__P3124_mk(s) { +function controller_Controller_up__P20183_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_consoleOverlay_isVisible__P3124, depth: s.depth + 1, + parent: s, fn: controller_Controller_up__P20183, 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_closeMenu__P3102(s) { +function controller_Controller_right__P20182(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13882,44 +13282,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.instance___5197); - if (!r0) { step = 1; continue; } - s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P3101_mk(s); - s.tmp_0.arg0 = globals.instance___5197; - s.callLocIdx = 1091; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - globals.instance___5197 = (undefined); - s.tmp_0 = controller__setUserEventsEnabled__P2206_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 1092; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = game_popScene__P3004_mk(s); - s.callLocIdx = 1093; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; - return leave(s, r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, controller_Controller__C20172_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() } } } -scene_systemMenu_closeMenu__P3102.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} +controller_Controller_right__P20182.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__P20182.isGetter = true; -function scene_systemMenu_closeMenu__P3102_mk(s) { +function controller_Controller_right__P20182_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_closeMenu__P3102, depth: s.depth + 1, + parent: s, fn: controller_Controller_right__P20182, 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_PauseMenu_dispose__P3101(s) { +function controller_Controller_left__P20181(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13934,31 +13328,22 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C3095_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + if (!checkSubtype(r0, controller_Controller__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["buttons"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - r0 = s.arg0.fields["options"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P10635; - s.callLocIdx = 1068; 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) + r0 = (1 - 1); + s.tmp_1 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose__P3101.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +controller_Controller_left__P20181.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__P20181.isGetter = true; -function scene_systemMenu_PauseMenu_dispose__P3101_mk(s) { +function controller_Controller_left__P20181_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose__P3101, depth: s.depth + 1, + parent: s, fn: controller_Controller_left__P20181, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -13969,7 +13354,7 @@ function scene_systemMenu_PauseMenu_dispose__P3101_mk(s) { -function scene_systemMenu_PauseMenu_dispose_inline__P10635(s) { +function Fx_imul__P18199(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -13981,33 +13366,29 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = scene_systemMenu_MenuOption_dispose__P3094_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1067; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + r0 = pxsim.Math_.imul(s.arg0, s.arg1); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_dispose_inline__P10635.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} +Fx_imul__P18199.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 scene_systemMenu_PauseMenu_dispose_inline__P10635_mk(s) { +function Fx_imul__P18199_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P10635, depth: s.depth + 1, + parent: s, fn: Fx_imul__P18199, 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_dispose__P3094(s) { +function power_checkDeepSleep__P19968(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14017,57 +13398,94 @@ 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, scene_systemMenu_MenuOption__C3087_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__P2428_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = undefined; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 987; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_destroy__P2428_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 988; s.pc = 4; return s.tmp_0; - case 4: + s.p___25487 = undefined; + s.to___25490 = undefined; + s.tmp_0 = power_init__P22607_mk(s); + s.callLocIdx = 75; s.pc = 11; return s.tmp_0; + case 11: r0 = s.retval; - r0 = (s.arg0).fields["card"] = (undefined); - r0 = (s.arg0).fields["icon"] = (undefined); + s.tmp_0 = r0 = globals._poked___22605; + 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_1 = r0; + s.p___25487 = (s.tmp_1); + s.tmp_0 = r0 = globals._timeout___22606; + 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___25490 = (s.tmp_1); + r0 = (s.to___25490 > 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___25487); + s.tmp_1 = r0; + r0 = (s.tmp_1 > s.to___25490); + 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_systemMenu_MenuOption_dispose__P3094.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} +power_checkDeepSleep__P19968.info = {"start":1087,"length":298,"line":36,"column":4,"endLine":46,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"checkDeepSleep","argumentNames":[]} -function scene_systemMenu_MenuOption_dispose__P3094_mk(s) { +function power_checkDeepSleep__P19968_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_dispose__P3094, depth: s.depth + 1, + parent: s, fn: power_checkDeepSleep__P19968, 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, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + p___25487: undefined, + to___25490: undefined, } } -function Sprite_destroy__P2428(s) { +function power_init__P22607(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14077,74 +13495,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.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 2); + r0 = (globals._timeout___22606 !== undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 5; continue; } + { step = 7; 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 | 2); - s.tmp_3 = r0; - 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__P3265_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 = 431; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; + r0 = pxsim_pxtcore.getConfig(212, -1); + s.tmp_1 = r0; + r0 = (s.tmp_1 * 1000); + globals._timeout___22606 = (r0); + r0 = (globals._timeout___22606 > 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 = Sprite__destroyCore__P2429_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 432; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; + r0 = (globals._timeout___22606 < 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___22606 = (300000); case 5: + case 6: + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_destroy__P2428.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"]} +power_init__P22607.info = {"start":1610,"length":376,"line":57,"column":4,"endLine":66,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"init","argumentNames":[]} -function Sprite_destroy__P2428_mk(s) { +function power_init__P22607_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_destroy__P2428, depth: s.depth + 1, + parent: s, fn: power_init__P22607, 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 effects_ParticleEffect_destroy__P3265(s) { +function power_poke__P19967(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14154,88 +13552,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.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__C3262_VT)) failedCast(r0); - s.tmp_0 = Sprite_setFlag__P2419_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = 7168; - s.tmp_0.arg2 = true; - s.callLocIdx = 1252; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = effects_ParticleEffect_start__P3264_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 = 1253; 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 = power_init__P22607_mk(s); + s.callLocIdx = 74; 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__P3292_mk(s); - s.tmp_0.arg0 = globals.dissolve___3295; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1254; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; + r0 = pxsim.control.millis(); + globals._poked___22605 = (r0); r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_destroy__P3265.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"]} +power_poke__P19967.info = {"start":795,"length":81,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/power/power.ts","functionName":"poke","argumentNames":[]} -function effects_ParticleEffect_destroy__P3265_mk(s) { +function power_poke__P19967_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_destroy__P3265, depth: s.depth + 1, + parent: s, fn: power_poke__P19967, 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__P10780(s) { +function control_EventContext_deltaTime__P18438(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14245,105 +13586,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___10783 = undefined; - s.x___10794 = undefined; - s.y___10800 = undefined; - s.w___10806 = undefined; - s.h___10810 = 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___10783 = (r0); - case 1: - r0 = (s.i___10783 > 0); + r0 = s.arg0; + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); + r0 = s.arg0.fields["deltaTimeMillis"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P3063_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; - s.x___10794 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P3063_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___10800 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P3063_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___10806 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P3063_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___10810 = (r0); - s.tmp_0 = helpers_imageDrawRect__P1959_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.x___10794; - s.tmp_0.arg2 = s.y___10800; - s.tmp_0.arg3 = s.w___10806; - s.tmp_0.arg4 = s.h___10810; - s.tmp_0.arg5 = 0; - s.callLocIdx = 56; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = (s.i___10783 - 1); - s.i___10783 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 1000); + return leaveAccessor(s, r0) default: oops() } } } -dissolve_inline__P10780.info = {"start":2199,"length":360,"line":60,"column":49,"endLine":69,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +control_EventContext_deltaTime__P18438.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__P18438.isGetter = true; -function dissolve_inline__P10780_mk(s) { +function control_EventContext_deltaTime__P18438_mk(s) { checkStack(s.depth); return { - parent: s, fn: dissolve_inline__P10780, depth: s.depth + 1, + parent: s, fn: control_EventContext_deltaTime__P18438, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - i___10783: undefined, - x___10794: undefined, - y___10800: undefined, - w___10806: undefined, - h___10810: undefined, arg0: undefined, - arg1: undefined, } } -function helpers_imageDrawRect__P1959(s) { +function scene_Scene_constructor__P20904(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14357,106 +13628,114 @@ 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.arg3 == 0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C20881_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__C20565_VT); 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_1 = ArcadePhysicsEngine_constructor__P20566_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 = 904; s.pc = 1; return s.tmp_1; 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__P1958_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 = 83; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P1958_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 = 84; s.pc = 7; return s.tmp_0; - case 7: r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P1958_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 = 85; s.pc = 8; return s.tmp_0; - case 8: + r0 = (s.arg0).fields["physicsEngine"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Camera__C20819_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_Camera_constructor__P20823_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 905; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - s.tmp_0 = helpers_imageDrawLine__P1958_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 = 86; s.pc = 9; return s.tmp_0; - case 9: + r0 = (s.arg0).fields["camera"] = (s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_Background__C20707_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_Background_constructor__P20711_mk(s); + s.tmp_1.arg0 = s.tmp_0; + r0 = s.arg0.fields["camera"]; + s.tmp_1.arg1 = r0; + s.callLocIdx = 906; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - 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() } } } -helpers_imageDrawRect__P1959.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"]} +scene_Scene_constructor__P20904.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 helpers_imageDrawRect__P1959_mk(s) { +function scene_Scene_constructor__P20904_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawRect__P1959, depth: s.depth + 1, + parent: s, fn: scene_Scene_constructor__P20904, 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__P1958(s) { +function scene_Camera_constructor__P20823(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14468,58 +13747,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.lambdaArgs = null; } - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = helpers_pack__P4581_mk(s); - s.tmp_2.arg0 = s.arg1; - s.tmp_2.arg1 = s.arg2; - s.callLocIdx = 81; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = helpers_pack__P4581_mk(s); - s.tmp_4.arg0 = s.arg3; - s.tmp_4.arg1 = s.arg4; - s.callLocIdx = 82; s.pc = 2; return s.tmp_4; - case 2: - r0 = s.retval; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods._drawLine(s.tmp_0, s.tmp_1, s.tmp_3, s.arg5); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C20819_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() } } } -helpers_imageDrawLine__P1958.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"]} +scene_Camera_constructor__P20823.info = {"start":550,"length":156,"line":17,"column":8,"endLine":23,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"inline","argumentNames":["this"]} -function helpers_imageDrawLine__P1958_mk(s) { +function scene_Camera_constructor__P20823_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageDrawLine__P1958, depth: s.depth + 1, + parent: s, fn: scene_Camera_constructor__P20823, 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 Math_FastRandom_randomRange__P3063(s) { +function scene_Background_constructor__P20711(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14532,59 +13786,38 @@ 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__C3059_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__P3062_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 969; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; + if (!checkSubtype(r0, scene_Background__C20707_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.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); + r0 = (s.tmp_0).fields["_layers"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_randomRange__P3063.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"]} +scene_Background_constructor__P20711.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 Math_FastRandom_randomRange__P3063_mk(s) { +function scene_Background_constructor__P20711_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_randomRange__P3063, depth: s.depth + 1, + parent: s, fn: scene_Background_constructor__P20711, 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__P3062(s) { +function ArcadePhysicsEngine_constructor__P20566(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14596,53 +13829,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, Math_FastRandom__C3059_VT)) failedCast(r0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = undefined; 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); + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); - r0 = s.tmp_1; + r0 = (s.tmp_0).fields["sprites"] = (s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(sprites_SpriteMap__C20484_VT); + s.tmp_0 = r0; + s.tmp_1 = sprites_SpriteMap_constructor__P20485_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 525; 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__P20568_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 526; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + s.tmp_0 = ArcadePhysicsEngine_maxStep__P20572_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 527; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = ArcadePhysicsEngine_minStep__P20570_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 528; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_FastRandom_next__P3062.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} +ArcadePhysicsEngine_constructor__P20566.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 Math_FastRandom_next__P3062_mk(s) { +function ArcadePhysicsEngine_constructor__P20566_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_next__P3062, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_constructor__P20566, 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, + arg3: undefined, } } -function effects_ImageEffect_constructor__P3291(s) { +function ArcadePhysicsEngine_maxStep__P20572(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14655,46 +13903,39 @@ 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, effects_ImageEffect__C3290_VT)) failedCast(r0); - r0 = (s.arg0).fields["effect"] = (s.arg2); - r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C3059_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P3061_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1262; s.pc = 1; return s.tmp_1; - 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); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_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() } } } -effects_ImageEffect_constructor__P3291.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"]} +ArcadePhysicsEngine_maxStep__P20572.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 effects_ImageEffect_constructor__P3291_mk(s) { +function ArcadePhysicsEngine_maxStep__P20572_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_constructor__P3291, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P20572, 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 effects_ImageEffect_applyTo__P3292(s) { +function ArcadePhysicsEngine_maxStep__P20571(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14704,80 +13945,38 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.clonedImage___10959 = 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__C3290_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = s.arg0.fields["maxSingleStep"]; 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___10959 = (r0); - s.tmp_0 = effects_ImageEffect_change__P3293_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.clonedImage___10959; - s.callLocIdx = 1265; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = Sprite_setImage__P2391_mk(s); - s.tmp_0.arg0 = s.arg1; - s.tmp_0.arg1 = s.clonedImage___10959; - s.callLocIdx = 1266; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - case 5: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 + 128); + s.tmp_1 = r0; + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -effects_ImageEffect_applyTo__P3292.info = {"start":823,"length":218,"line":21,"column":8,"endLine":26,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"applyTo","argumentNames":["this","sprite"]} +ArcadePhysicsEngine_maxStep__P20571.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__P20571.isGetter = true; -function effects_ImageEffect_applyTo__P3292_mk(s) { +function ArcadePhysicsEngine_maxStep__P20571_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_applyTo__P3292, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxStep__P20571, 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___10959: undefined, arg0: undefined, - arg1: undefined, } } -function effects_ImageEffect_change__P3293(s) { +function Fx_toInt__P18210(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14789,48 +13988,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, effects_ImageEffect__C3290_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 = 1267; 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 = 1267; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1267; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 1267; s.pc = 1; return s.tmp_0; } - } - case 1: - r0 = s.retval; - r0 = undefined; + r0 = (s.arg0 + 128); + s.tmp_0 = r0; + r0 = (s.tmp_0 >> 8); return leave(s, r0) default: oops() } } } -effects_ImageEffect_change__P3293.info = {"start":1151,"length":81,"line":32,"column":8,"endLine":34,"endColumn":9,"fileName":"pxt_modules/game/effects.ts","functionName":"change","argumentNames":["this","input"]} +Fx_toInt__P18210.info = {"start":2379,"length":86,"line":74,"column":4,"endLine":76,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toInt","argumentNames":["v"]} -function effects_ImageEffect_change__P3293_mk(s) { +function Fx_toInt__P18210_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ImageEffect_change__P3293, depth: s.depth + 1, + parent: s, fn: Fx_toInt__P18210, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_setImage__P2391(s) { +function ArcadePhysicsEngine_minStep__P20570(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14846,51 +14027,27 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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; } - case 1: - r0 = s.arg0.fields["_image"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (s.arg1 * 256); 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__C2341_v5_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C2341_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 = (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() } } } -Sprite_setImage__P2391.info = {"start":9299,"length":131,"line":332,"column":4,"endLine":336,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setImage","argumentNames":["this","img"]} +ArcadePhysicsEngine_minStep__P20570.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 Sprite_setImage__P2391_mk(s) { +function ArcadePhysicsEngine_minStep__P20570_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setImage__P2391, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P20570, 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, } } @@ -14899,7 +14056,7 @@ function Sprite_setImage__P2391_mk(s) { -function Sprite_recalcSize__P4752(s) { +function ArcadePhysicsEngine_minStep__P20569(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14914,67 +14071,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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__P2370_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 343; 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 * 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__P2372_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 345; 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); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = s.arg0.fields["minSingleStep"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); - s.tmp_0 = Sprite_resetHitbox__P2393_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 347; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_1 >> 8); + return leaveAccessor(s, r0) default: oops() } } } -Sprite_recalcSize__P4752.info = {"start":9982,"length":178,"line":363,"column":4,"endLine":367,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"recalcSize","argumentNames":["this"]} +ArcadePhysicsEngine_minStep__P20569.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__P20569.isGetter = true; -function Sprite_recalcSize__P4752_mk(s) { +function ArcadePhysicsEngine_minStep__P20569_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_recalcSize__P4752, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_minStep__P20569, 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, } } @@ -14982,7 +14097,7 @@ function Sprite_recalcSize__P4752_mk(s) { -function Sprite_resetHitbox__P2393(s) { +function ArcadePhysicsEngine_maxSpeed__P20568(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -14994,38 +14109,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, Sprite__C2341_VT)) failedCast(r0); - r0 = (s.arg0).fields["_hitbox"] = (null); - s.tmp_0 = Sprite__C2341_v4_1_mk(s); - s.tmp_0.arg0 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C2341_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; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_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); + 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() } } } -Sprite_resetHitbox__P2393.info = {"start":9580,"length":76,"line":342,"column":4,"endLine":345,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"resetHitbox","argumentNames":["this"]} +ArcadePhysicsEngine_maxSpeed__P20568.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 Sprite_resetHitbox__P2393_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P20568_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_resetHitbox__P2393, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P20568, 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_setHitbox__P2394(s) { +function Fx_neg__P18193(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15039,43 +14162,17 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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__P2222_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 341; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - { step = 2; continue; } - case 1: - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = game_calculateHitBox__P2224_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 342; 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); - case 2: - r0 = undefined; + r0 = (0 - s.arg0); return leave(s, r0) default: oops() } } } -Sprite_setHitbox__P2394.info = {"start":9662,"length":173,"line":347,"column":4,"endLine":353,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setHitbox","argumentNames":["this"]} +Fx_neg__P18193.info = {"start":311,"length":88,"line":14,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"neg","argumentNames":["a"]} -function Sprite_setHitbox__P2394_mk(s) { +function Fx_neg__P18193_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setHitbox__P2394, depth: s.depth + 1, + parent: s, fn: Fx_neg__P18193, 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, } } @@ -15083,7 +14180,7 @@ function Sprite_setHitbox__P2394_mk(s) { -function game_calculateHitBox__P2224(s) { +function ArcadePhysicsEngine_maxSpeed__P20567(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15093,207 +14190,30 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___11024 = undefined; - s.minX___11027 = undefined; - s.minY___11031 = undefined; - s.maxX___11035 = undefined; - s.maxY___11037 = undefined; - s.c___11039 = undefined; - s.fxc___11040 = undefined; - s.r___11047 = undefined; - s.fxr___11048 = undefined; - s.width___11112 = undefined; - s.height___11120 = 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__P2220_mk(s); - r0 = s.arg0.fields["_hitbox"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 275; 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___11024 = (r0); - r0 = pxsim_ImageMethods.width(s.i___11024); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.minX___11027 = (r0); - r0 = pxsim_ImageMethods.height(s.i___11024); - s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_1 = r0; - r0 = (s.tmp_1 | 0); - s.minY___11031 = (r0); - s.maxX___11035 = (0); - s.maxY___11037 = (0); - s.c___11039 = (0); - s.fxc___11040 = (0); - case 5: - s.tmp_1 = r0 = s.c___11039; - r0 = pxsim_ImageMethods.width(s.i___11024); - 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___11047 = (0); - s.fxr___11048 = (0); - case 6: - s.tmp_1 = r0 = s.r___11047; - r0 = pxsim_ImageMethods.height(s.i___11024); - 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___11024, s.c___11039, s.r___11047); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 7; continue; } - s.tmp_4 = Fx_min__P166_mk(s); - s.tmp_4.arg0 = s.minX___11027; - s.tmp_4.arg1 = s.fxc___11040; - s.callLocIdx = 279; s.pc = 13; return s.tmp_4; - case 13: - r0 = s.retval; - s.minX___11027 = (r0); - s.tmp_0 = Fx_min__P166_mk(s); - s.tmp_0.arg0 = s.minY___11031; - s.tmp_0.arg1 = s.fxr___11048; - s.callLocIdx = 280; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.minY___11031 = (r0); - s.tmp_0 = Fx_max__P167_mk(s); - s.tmp_0.arg0 = s.maxX___11035; - s.tmp_0.arg1 = s.fxc___11040; - s.callLocIdx = 281; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - s.maxX___11035 = (r0); - s.tmp_0 = Fx_max__P167_mk(s); - s.tmp_0.arg0 = s.maxY___11037; - s.tmp_0.arg1 = s.fxr___11048; - s.callLocIdx = 282; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - s.maxY___11037 = (r0); - case 7: - case 8: - r0 = (s.r___11047 + 1); - s.r___11047 = (r0); - r0 = (s.fxr___11048 + 256); - s.tmp_0 = r0; - s.fxr___11048 = (r0); - r0 = s.tmp_0; - { step = 6; continue; } - case 9: - r0 = (s.c___11039 + 1); - s.c___11039 = (r0); - r0 = (s.fxc___11040 + 256); - s.tmp_0 = r0; - s.fxc___11040 = (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___11027, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minX___11027 = (r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.minY___11031, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.minY___11031 = (r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxX___11035, s.tmp_0); - s.tmp_1 = r0; - r0 = (s.tmp_1 >> 8); - s.maxX___11035 = (r0); - r0 = s.arg0.fields["_sy"]; + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = s.arg0.fields["maxVelocity"]; s.tmp_0 = r0; - r0 = pxsim.Math_.imul(s.maxY___11037, s.tmp_0); + r0 = (s.tmp_0 + 128); s.tmp_1 = r0; r0 = (s.tmp_1 >> 8); - s.maxY___11037 = (r0); - r0 = (s.maxX___11035 - s.minX___11027); - s.tmp_0 = r0; - r0 = s.arg0.fields["_sx"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.width___11112 = (r0); - r0 = (s.maxY___11037 - s.minY___11031); - s.tmp_0 = r0; - r0 = s.arg0.fields["_sy"]; - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - s.height___11120 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(game_Hitbox__C2208_VT); - s.tmp_0 = r0; - s.tmp_1 = game_Hitbox_constructor__P2215_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.tmp_1.arg2 = s.width___11112; - s.tmp_1.arg3 = s.height___11120; - r0 = (s.minX___11027 & -256); - s.tmp_1.arg4 = r0; - r0 = (s.minY___11031 & -256); - s.tmp_1.arg5 = r0; - s.callLocIdx = 295; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - r0 = s.tmp_0; - case 11: - return leave(s, r0) + return leaveAccessor(s, r0) default: oops() } } } -game_calculateHitBox__P2224.info = {"start":3223,"length":1086,"line":103,"column":4,"endLine":132,"endColumn":5,"fileName":"pxt_modules/game/hitbox.ts","functionName":"calculateHitBox","argumentNames":["s"]} +ArcadePhysicsEngine_maxSpeed__P20567.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__P20567.isGetter = true; -function game_calculateHitBox__P2224_mk(s) { +function ArcadePhysicsEngine_maxSpeed__P20567_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_calculateHitBox__P2224, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_maxSpeed__P20567, 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___11024: undefined, - minX___11027: undefined, - minY___11031: undefined, - maxX___11035: undefined, - maxY___11037: undefined, - c___11039: undefined, - fxc___11040: undefined, - r___11047: undefined, - fxr___11048: undefined, - width___11112: undefined, - height___11120: undefined, arg0: undefined, } } @@ -15301,7 +14221,7 @@ function game_calculateHitBox__P2224_mk(s) { -function game_Hitbox_isValid__P2220(s) { +function PhysicsEngine_constructor__P20550(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15316,30 +14236,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C2208_VT)) failedCast(r0); - r0 = s.arg0.fields["hash"]; - s.tmp_0 = r0; - s.tmp_2 = Sprite_calcDimensionalHash__P2392_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 228; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_0 === s.tmp_1); + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_isValid__P2220.info = {"start":935,"length":89,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"isValid","argumentNames":["this"]} +PhysicsEngine_constructor__P20550.info = {"start":26,"length":21,"line":1,"column":4,"endLine":2,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["this"]} -function game_Hitbox_isValid__P2220_mk(s) { +function PhysicsEngine_constructor__P20550_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_isValid__P2220, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_constructor__P20550, 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, } } @@ -15347,7 +14255,7 @@ function game_Hitbox_isValid__P2220_mk(s) { -function Sprite_calcDimensionalHash__P2392(s) { +function sprites_SpriteMap_constructor__P20485(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15362,45 +14270,24 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.revision(s.tmp_2); + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = pxsim_Array__mk(); 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); + r0 = (s.tmp_0).fields["buckets"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_calcDimensionalHash__P2392.info = {"start":9436,"length":138,"line":338,"column":4,"endLine":340,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"calcDimensionalHash","argumentNames":["this"]} +sprites_SpriteMap_constructor__P20485.info = {"start":237,"length":56,"line":8,"column":8,"endLine":10,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["this"]} -function Sprite_calcDimensionalHash__P2392_mk(s) { +function sprites_SpriteMap_constructor__P20485_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_calcDimensionalHash__P2392, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_constructor__P20485, 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, } } @@ -15408,7 +14295,7 @@ function Sprite_calcDimensionalHash__P2392_mk(s) { -function Fx_toIntShifted__P156(s) { +function control_pushEventContext__P18447(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15418,36 +14305,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; - } - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 + 8); + s.ctx___27542 = undefined; + s.n___27548 = undefined; + r0 = pxsim_numops_toBoolDecr(globals.eventContexts___22482); s.tmp_1 = r0; - r0 = (s.tmp_0 >> s.tmp_1); + 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___22482 = (r0); + case 1: + case 2: + s.tmp_0 = control_eventContext__P18446_mk(s); + s.callLocIdx = 53; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.ctx___27542 = (r0); + r0 = pxsim_numops_toBoolDecr(s.ctx___27542); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_EventContext_unregister__P18440_mk(s); + s.tmp_0.arg0 = s.ctx___27542; + s.callLocIdx = 54; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(control_EventContext__C18433_VT); + s.tmp_0 = r0; + s.tmp_1 = control_EventContext_constructor__P18437_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 55; s.pc = 7; return s.tmp_1; + case 7: + r0 = s.retval; + s.n___27548 = (s.tmp_0); + r0 = pxsim_Array__push(globals.eventContexts___22482, s.n___27548); + r0 = s.n___27548; return leave(s, r0) default: oops() } } } -Fx_toIntShifted__P156.info = {"start":404,"length":102,"line":17,"column":4,"endLine":19,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"toIntShifted","argumentNames":["a","n"]} +control_pushEventContext__P18447.info = {"start":7310,"length":340,"line":220,"column":4,"endLine":231,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"pushEventContext","argumentNames":[]} -function Fx_toIntShifted__P156_mk(s) { +function control_pushEventContext__P18447_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_toIntShifted__P156, depth: s.depth + 1, + parent: s, fn: control_pushEventContext__P18447, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - arg0: undefined, - arg1: undefined, + ctx___27542: undefined, + n___27548: undefined, } } -function game_Hitbox_constructor__P2215(s) { +function control_EventContext_constructor__P18437(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15459,55 +14373,50 @@ 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, game_Hitbox__C2208_VT)) failedCast(r0); + if (!checkSubtype(r0, control_EventContext__C18433_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Sprite_calcDimensionalHash__P2392_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 219; s.pc = 1; return s.tmp_2; - case 1: - r0 = s.retval; + r0 = pxsim_Array__mk(); 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 = (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___18435); + 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___18435 = (r0); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_constructor__P2215.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"]} +control_EventContext_constructor__P18437.info = {"start":1778,"length":347,"line":59,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"inline","argumentNames":["this"]} -function game_Hitbox_constructor__P2215_mk(s) { +function control_EventContext_constructor__P18437_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_constructor__P2215, depth: s.depth + 1, + parent: s, fn: control_EventContext_constructor__P18437, 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 Fx_floor__P168(s) { +function particles_disableAll__P21220(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15517,29 +14426,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.lambdaArgs = null; - } - r0 = (s.arg0 & -256); + s.sources___30688 = undefined; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1192; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___30688 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___30688); + if (!r0) { step = 1; continue; } + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + s.tmp_0.arg0 = s.sources___30688; + s.tmp_0.arg1 = particles_disableAll_inline__P30694; + s.callLocIdx = 1194; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = particles_pruneParticles__P23328_mk(s); + s.callLocIdx = 1195; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_floor__P168.info = {"start":1919,"length":103,"line":62,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"floor","argumentNames":["v"]} +particles_disableAll__P21220.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} -function Fx_floor__P168_mk(s) { +function particles_disableAll__P21220_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_floor__P168, depth: s.depth + 1, + parent: s, fn: particles_disableAll__P21220, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + sources___30688: undefined, } } -function Fx_max__P167(s) { +function particles_disableAll_inline__P30694(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15551,42 +14477,34 @@ 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 = particles_ParticleSource_enabled__P21202_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1193; s.pc = 1; return s.tmp_0; case 1: - r0 = s.arg1; - { step = 3; continue; } - case 2: - r0 = undefined; - case 3: + r0 = s.retval; + r0 = false; return leave(s, r0) default: oops() } } } -Fx_max__P167.info = {"start":1797,"length":117,"line":56,"column":4,"endLine":61,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"max","argumentNames":["a","b"]} +particles_disableAll_inline__P30694.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function Fx_max__P167_mk(s) { +function particles_disableAll_inline__P30694_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_max__P167, depth: s.depth + 1, + parent: s, fn: particles_disableAll_inline__P30694, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_min__P166(s) { +function particles_clearAll__P21219(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15596,44 +14514,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.lambdaArgs = null; - } - r0 = (s.arg0 < s.arg1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + s.sources___30699 = undefined; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1188; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.sources___30699 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___30699); if (!r0) { step = 1; continue; } - r0 = s.arg0; - { step = 3; continue; } - { step = 2; continue; } + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + s.tmp_0.arg0 = s.sources___30699; + s.tmp_0.arg1 = particles_clearAll_inline__P30705; + s.callLocIdx = 1190; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = particles_pruneParticles__P23328_mk(s); + s.callLocIdx = 1191; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; case 1: - r0 = s.arg1; - { step = 3; continue; } case 2: r0 = undefined; - case 3: return leave(s, r0) default: oops() } } } -Fx_min__P166.info = {"start":1675,"length":117,"line":50,"column":4,"endLine":55,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"min","argumentNames":["a","b"]} +particles_clearAll__P21219.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} -function Fx_min__P166_mk(s) { +function particles_clearAll__P21219_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_min__P166, depth: s.depth + 1, + parent: s, fn: particles_clearAll__P21219, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + sources___30699: undefined, } } -function Fx_mul__P160(s) { +function particles_clearAll_inline__P30705(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15645,32 +14565,68 @@ 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); - s.tmp_0 = r0; - r0 = (s.tmp_0 >> 8); + s.tmp_0 = particles_ParticleSource_clear__P21204_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1189; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_mul__P160.info = {"start":872,"length":133,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"mul","argumentNames":["a","b"]} +particles_clearAll_inline__P30705.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} -function Fx_mul__P160_mk(s) { +function particles_clearAll_inline__P30705_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_mul__P160, depth: s.depth + 1, + parent: s, fn: particles_clearAll_inline__P30705, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, - arg1: undefined, } } -function Fx_sub__P159(s) { +function particles_ParticleSource_clear__P21204(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, particles_ParticleSource__C21189_VT)) failedCast(r0); + r0 = (s.arg0).fields["head"] = (undefined); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +particles_ParticleSource_clear__P21204.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} + +function particles_ParticleSource_clear__P21204_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_clear__P21204, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_SplashDialog_setSubtext__P20979(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15685,17 +14641,65 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 - s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, game_SplashDialog__C20970_VT)) failedCast(r0); + r0 = (s.arg0).fields["subtext"] = (s.arg1); + s.tmp_0 = game_SplashDialog_updateFont__P22955_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 75; s.pc = 1; return s.tmp_0; + 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 = 76; 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___20070); + 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; return leave(s, r0) default: oops() } } } -Fx_sub__P159.info = {"start":749,"length":118,"line":26,"column":4,"endLine":28,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"sub","argumentNames":["a","b"]} +game_SplashDialog_setSubtext__P20979.info = {"start":9748,"length":200,"line":300,"column":8,"endLine":304,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setSubtext","argumentNames":["this","sub"]} -function Fx_sub__P159_mk(s) { +function game_SplashDialog_setSubtext__P20979_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_sub__P159, depth: s.depth + 1, + parent: s, fn: game_SplashDialog_setSubtext__P20979, 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, } } @@ -15704,7 +14708,7 @@ function Fx_sub__P159_mk(s) { -function game_Hitbox_updateIfInvalid__P2222(s) { +function game_SplashDialog_updateFont__P22955(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15714,147 +14718,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.newHitBox___11221 = undefined; - s.oMinX___11226 = undefined; - s.oMinY___11229 = undefined; - s.oMaxX___11232 = undefined; - s.oMaxY___11238 = undefined; - s.nMinX___11244 = undefined; - s.nMinY___11247 = undefined; - s.nMaxX___11250 = undefined; - s.nMaxY___11256 = undefined; - s.xDiff___11262 = undefined; - s.yDiff___11273 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_Hitbox__C2208_VT)) failedCast(r0); - s.tmp_1 = game_Hitbox_isValid__P2220_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 233; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; + if (!checkSubtype(r0, game_SplashDialog__C20970_VT)) failedCast(r0); + r0 = s.arg0.fields["text"]; 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_String_.mkEmpty(); case 2: - s.tmp_2 = game_calculateHitBox__P2224_mk(s); - r0 = s.arg0.fields["parent"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 234; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - s.newHitBox___11221 = (r0); - r0 = s.arg0.fields["ox"]; - s.oMinX___11226 = (r0); - r0 = s.arg0.fields["oy"]; - s.oMinY___11229 = (r0); - r0 = s.arg0.fields["width"]; - s.tmp_0 = r0; - r0 = (s.oMinX___11226 + s.tmp_0); - s.oMaxX___11232 = (r0); - r0 = s.arg0.fields["height"]; - s.tmp_0 = r0; - r0 = (s.oMinY___11229 + s.tmp_0); - s.oMaxY___11238 = (r0); - r0 = s.newHitBox___11221.fields["ox"]; - s.nMinX___11244 = (r0); - r0 = s.newHitBox___11221.fields["oy"]; - s.nMinY___11247 = (r0); - r0 = s.newHitBox___11221.fields["width"]; - s.tmp_0 = r0; - r0 = (s.nMinX___11244 + s.tmp_0); - s.nMaxX___11250 = (r0); - r0 = s.newHitBox___11221.fields["height"]; - s.tmp_0 = r0; - r0 = (s.nMinY___11247 + s.tmp_0); - s.nMaxY___11256 = (r0); - s.tmp_1 = Fx_abs__P165_mk(s); - r0 = (s.oMinX___11226 - s.nMinX___11244); - s.tmp_1.arg0 = r0; - s.callLocIdx = 240; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P165_mk(s); - r0 = (s.oMaxX___11232 - s.nMaxX___11250); - s.tmp_3.arg0 = r0; - s.callLocIdx = 242; 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___11262 = (r0); - s.tmp_1 = Fx_abs__P165_mk(s); - r0 = (s.oMinY___11229 - s.nMinY___11247); - s.tmp_1.arg0 = r0; - s.callLocIdx = 245; s.pc = 12; return s.tmp_1; - case 12: - r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Fx_abs__P165_mk(s); - r0 = (s.oMaxY___11238 - s.nMaxY___11256); - s.tmp_3.arg0 = r0; - s.callLocIdx = 247; s.pc = 13; return s.tmp_3; - case 13: - r0 = s.retval; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.arg0.fields["subtext"]; s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - s.yDiff___11273 = (r0); - r0 = (s.xDiff___11262 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBool(s.tmp_2); if (!r0) { step = 3; continue; } - r0 = (s.arg0).fields["ox"] = (s.nMinX___11244); - r0 = s.newHitBox___11221.fields["width"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["width"] = (s.tmp_0); + r0 = s.tmp_2; + { step = 4; continue; } case 3: + r0 = pxsim_String_.mkEmpty(); case 4: - r0 = (s.yDiff___11273 > 512); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - r0 = (s.arg0).fields["oy"] = (s.nMinY___11247); - r0 = s.newHitBox___11221.fields["height"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["height"] = (s.tmp_0); - case 5: - case 6: - r0 = s.newHitBox___11221.fields["hash"]; - s.tmp_0 = r0; - r0 = (s.arg0).fields["hash"] = (s.tmp_0); + // jmp value (already in r0) + s.tmp_3 = r0; + s.tmp_4 = game_BaseDialog_setFont__P22952_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_5 = image_getFontForText__P20015_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 = 71; s.pc = 6; return s.tmp_5; + case 6: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.callLocIdx = 72; s.pc = 5; return s.tmp_4; + case 5: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_updateIfInvalid__P2222.info = {"start":1188,"length":1317,"line":48,"column":8,"endLine":85,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"updateIfInvalid","argumentNames":["this"]} +game_SplashDialog_updateFont__P22955.info = {"start":9357,"length":122,"line":288,"column":8,"endLine":290,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"updateFont","argumentNames":["this"]} -function game_Hitbox_updateIfInvalid__P2222_mk(s) { +function game_SplashDialog_updateFont__P22955_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_updateIfInvalid__P2222, depth: s.depth + 1, + parent: s, fn: game_SplashDialog_updateFont__P22955, 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___11221: undefined, - oMinX___11226: undefined, - oMinY___11229: undefined, - oMaxX___11232: undefined, - oMaxY___11238: undefined, - nMinX___11244: undefined, - nMinY___11247: undefined, - nMaxX___11250: undefined, - nMaxY___11256: undefined, - xDiff___11262: undefined, - yDiff___11273: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, } } @@ -15862,7 +14802,7 @@ function game_Hitbox_updateIfInvalid__P2222_mk(s) { -function Fx_abs__P165(s) { +function game_BaseDialog_setFont__P22952(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15874,40 +14814,32 @@ switch (step) { 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_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = (0 - s.arg0); - { step = 3; continue; } - { step = 2; continue; } - case 1: r0 = s.arg0; - { step = 3; continue; } - case 2: + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = (s.arg0).fields["font"] = (s.arg1); r0 = undefined; - case 3: return leave(s, r0) default: oops() } } } -Fx_abs__P165.info = {"start":1506,"length":164,"line":44,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"abs","argumentNames":["a"]} +game_BaseDialog_setFont__P22952.info = {"start":5994,"length":77,"line":190,"column":8,"endLine":192,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setFont","argumentNames":["this","font"]} -function Fx_abs__P165_mk(s) { +function game_BaseDialog_setFont__P22952_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_abs__P165, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_setFont__P22952, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_sy__P2372(s) { +function game_SplashDialog_setText__P20978(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15919,33 +14851,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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_sy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, game_SplashDialog__C20970_VT)) failedCast(r0); + r0 = (s.arg0).fields["text"] = (s.arg1); + s.tmp_0 = game_SplashDialog_updateFont__P22955_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 73; 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 = 74; 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___20070); + 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) default: oops() } } } -Sprite_sy__P2372.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__P2372.isGetter = true; +game_SplashDialog_setText__P20978.info = {"start":9489,"length":249,"line":292,"column":8,"endLine":298,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","text"]} -function Sprite_sy__P2372_mk(s) { +function game_SplashDialog_setText__P20978_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_sy__P2372, depth: s.depth + 1, + parent: s, fn: game_SplashDialog_setText__P20978, 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 Sprite_sx__P2370(s) { +function game_SplashDialog_constructor__P20977(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15957,33 +14935,94 @@ 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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, game_SplashDialog__C20970_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_constructor__P20953_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__P22967_mk(s); + s.callLocIdx = 69; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg3 = r0; + s.tmp_0.arg4 = undefined; + s.tmp_0.arg5 = undefined; + s.callLocIdx = 70; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = (s.arg0).fields["maxOffset"] = (-1); + r0 = (s.arg0).fields["maxSubOffset"] = (-1); + r0 = (s.arg0).fields["textColor"] = (1); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_sx__P2370.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__P2370.isGetter = true; +game_SplashDialog_constructor__P20977.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"]} -function Sprite_sx__P2370_mk(s) { +function game_SplashDialog_constructor__P20977_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_sx__P2370, depth: s.depth + 1, + parent: s, fn: game_SplashDialog_constructor__P20977, 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_defaultSplashFrame__P22967(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_ImageMethods.isMono(globals.screen___20070); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = pxsim.image.ofBuffer(_hex36488); + { step = 2; continue; } + case 1: + r0 = pxsim.image.ofBuffer(_hex36490); + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; + return leave(s, r0) + default: oops() +} } } +game_defaultSplashFrame__P22967.info = {"start":27877,"length":220,"line":768,"column":4,"endLine":781,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultSplashFrame","argumentNames":[]} + +function game_defaultSplashFrame__P22967_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_defaultSplashFrame__P22967, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, } } +const _hex36488 = pxsim.BufferMethods.createBufferFromHex("8704030003000000010100000101000001010000") +const _hex36490 = pxsim.BufferMethods.createBufferFromHex("8704030003000000f1010000f1010000f1010000") -function Sprite_image__P2390(s) { +function game_BaseDialog_constructor__P20953(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -15995,30 +15034,51 @@ 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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = (s.arg0).fields["cursorCount"] = (0); + s.tmp_0 = game_BaseDialog_resize__P20954_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 = 38; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_image__P2390.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__P2390.isGetter = true; +game_BaseDialog_constructor__P20953.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"]} -function Sprite_image__P2390_mk(s) { +function game_BaseDialog_constructor__P20953_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_image__P2390, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_constructor__P20953, 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, + arg5: undefined, } } -function effects_ParticleEffect_start__P3264(s) { +function game_BaseDialog_resize__P20954(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16028,112 +15088,190 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.src___11342 = 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, effects_ParticleEffect__C3262_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 (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg3; + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 9; continue; } + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = globals.dialogFrame___22939; case 2: - r0 = pxsim_numops_toBoolDecr(s.arg3); + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = pxsim_numops_toBool(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = s.arg3; + r0 = s.tmp_1; { step = 4; continue; } case 3: - r0 = s.arg0.fields["defaultRate"]; + s.tmp_3 = game_defaultFrame__P22966_mk(s); + s.callLocIdx = 39; s.pc = 13; return s.tmp_3; + case 13: + r0 = s.retval; + s.tmp_2 = r0; + globals.dialogFrame___22939 = (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; - 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 = 1250; 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 = 1250; s.pc = 10; return s.tmp_4; } - else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1250; s.pc = 10; return s.tmp_4;; } - else { s.callLocIdx = 1250; s.pc = 10; return s.tmp_4; } - } - case 10: - r0 = s.retval; - s.src___11342 = (r0); - s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P3162_mk(s); - s.tmp_0.arg0 = s.src___11342; - r0 = pxsim_numops_toBoolDecr(s.arg4); + 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 = pxsim_Boolean__bang(s.tmp_3); + r0 = (s.arg1 / s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim.Math_.floor(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 1251; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - 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); + r0 = (s.tmp_0).fields["columns"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + r0 = s.arg0.fields["unit"]; + 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); + 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"]; + 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.arg2; + r0 = s.tmp_0; { step = 6; continue; } case 5: - r0 = s.arg0.fields["defaultLifespan"]; + r0 = globals.font8___20013; case 6: // jmp value (already in r0) s.tmp_1 = r0; - r0 = (s.src___11342).fields["lifespan"] = (s.tmp_1); + 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___22940; 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; } case 9: + s.tmp_3 = game_defaultCursorImage__P22968_mk(s); + s.callLocIdx = 40; s.pc = 14; return s.tmp_3; + case 14: + r0 = s.retval; + s.tmp_2 = r0; + globals.dialogCursor___22940 = (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___22941 == undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + globals.dialogTextColor___22941 = (15); + r0 = 15; + { step = 12; continue; } + case 11: + r0 = globals.dialogTextColor___22941; + case 12: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = (s.arg0).fields["textColor"] = (s.tmp_1); + s.tmp_0 = game_BaseDialog_drawBorder__P22944_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 41; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_clearInterior__P22946_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 42; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ParticleEffect_start__P3264.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"]} +game_BaseDialog_resize__P20954.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"]} -function effects_ParticleEffect_start__P3264_mk(s) { +function game_BaseDialog_resize__P20954_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ParticleEffect_start__P3264, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_resize__P20954, 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___11342: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, arg2: undefined, arg3: undefined, arg4: undefined, + arg5: undefined, } } -function particles_ParticleSource_setRelativeToCamera__P3162(s) { +function game_defaultCursorImage__P22968(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16143,59 +15281,39 @@ 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__C3151_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + r0 = pxsim_ImageMethods.isMono(globals.screen___20070); + 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["pFlags"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 | 4); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["pFlags"] = (s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex36686); { step = 2; continue; } case 1: - 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_0).fields["pFlags"] = (s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex36688); case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setRelativeToCamera__P3162.info = {"start":6439,"length":173,"line":211,"column":8,"endLine":214,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRelativeToCamera","argumentNames":["this","on"]} +game_defaultCursorImage__P22968.info = {"start":28103,"length":690,"line":783,"column":4,"endLine":809,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultCursorImage","argumentNames":[]} -function particles_ParticleSource_setRelativeToCamera__P3162_mk(s) { +function game_defaultCursorImage__P22968_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRelativeToCamera__P3162, depth: s.depth + 1, + parent: s, fn: game_defaultCursorImage__P22968, 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 _hex36686 = pxsim.BufferMethods.createBufferFromHex("87040a000800000011111101010000010111010111100001011101010100000101000001100010000001010000100000") +const _hex36688 = pxsim.BufferMethods.createBufferFromHex("87040b000b00000000606686080000006076776686000000607777676608000076171111670800007671177766080000767117776608000076711777660800007617111167080000607777676608000060767766860000000060668608000000") -function Sprite_setFlag__P2419(s) { +function game_defaultFrame__P22966(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16205,61 +15323,39 @@ 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__C2341_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg2); + r0 = pxsim_ImageMethods.isMono(globals.screen___20070); + 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); + r0 = pxsim.image.ofBuffer(_hex36692); { step = 2; continue; } 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); + r0 = pxsim.image.ofBuffer(_hex36694); case 2: - r0 = undefined; + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -Sprite_setFlag__P2419.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"]} +game_defaultFrame__P22966.info = {"start":27315,"length":556,"line":744,"column":4,"endLine":766,"endColumn":5,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"defaultFrame","argumentNames":[]} -function Sprite_setFlag__P2419_mk(s) { +function game_defaultFrame__P22966_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setFlag__P2419, depth: s.depth + 1, + parent: s, fn: game_defaultFrame__P22966, 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, } } +const _hex36692 = pxsim.BufferMethods.createBufferFromHex("8704030003000000110100000101000011010000") +const _hex36694 = pxsim.BufferMethods.createBufferFromHex("87040c000c0000000000000000000000b0bbbbbbbb0b0000b0bbbbbbbbcb0000b0db1111bdcb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b01b1111b1cb0000b0db1111bdcb0000b0bbbbbbbbcb0000b0bbbbbbbbcb000000cccccccccc0000") -function Sprite__destroyCore__P2429(s) { +function game_BaseDialog_clearInterior__P22946(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16269,126 +15365,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___10685 = undefined; + s.d___36278 = undefined; + s.s___36285 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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__P2999_mk(s); - s.callLocIdx = 433; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.scene___10685 = (r0); - r0 = s.scene___10685.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - r0 = s.arg0.fields["_kind"]; + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = s.arg0.fields["unit"]; s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); + r0 = (s.tmp_1 == 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___10685.fields["spritesByKind"]; - s.tmp_2 = r0; - r0 = s.arg0.fields["_kind"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = game_BaseDialog_fastFill__P22945_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 = pxsim_pxtrt.mapGetGeneric(s.tmp_2, s.tmp_3); - case 2: - // jmp value (already in r0) + r0 = (s.tmp_3 - 2); + s.tmp_2.arg4 = r0; + r0 = s.arg0.fields["rows"]; s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - s.tmp_5 = sprites_SpriteSet_remove__P2470_mk(s); - r0 = s.scene___10685.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 = 437; s.pc = 8; return s.tmp_5; + r0 = (s.tmp_4 - 2); + s.tmp_2.arg5 = r0; + s.callLocIdx = 65; s.pc = 8; return s.tmp_2; case 8: r0 = s.retval; + { step = 7; continue; } + case 1: + case 2: + s.d___36278 = (1); case 3: + s.tmp_1 = r0 = s.d___36278; + 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___36285 = (1); case 4: - s.tmp_0 = PhysicsEngine__C2511_v1_2_mk(s); - r0 = s.scene___10685.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C2511_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_1 = r0 = s.s___36285; + 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_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 = 438; 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 = 438; s.pc = 10; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 438; s.pc = 10; return s.tmp_1;; } - else { s.callLocIdx = 438; s.pc = 10; return s.tmp_1; } - } - case 10: + s.tmp_4 = game_BaseDialog_drawPartial__P22947_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 4; + s.tmp_4.arg2 = s.d___36278; + s.tmp_4.arg3 = s.s___36285; + s.callLocIdx = 66; s.pc = 9; return s.tmp_4; + case 9: r0 = s.retval; + r0 = (s.s___36285 + 1); + s.s___36285 = (r0); + { step = 4; continue; } case 5: + r0 = (s.d___36278 + 1); + s.d___36278 = (r0); + { step = 3; continue; } case 6: - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P10714); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P10721); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P109_mk(s); - s.tmp_3 = helpers_arrayFilter__P110_mk(s); - r0 = s.scene___10685.fields["destroyedHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 440; 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 = 442; s.pc = 11; return s.tmp_2; - case 11: - r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite__destroyCore__P2429.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} +game_BaseDialog_clearInterior__P22946.info = {"start":4543,"length":342,"line":146,"column":8,"endLine":155,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"clearInterior","argumentNames":["this"]} -function Sprite__destroyCore__P2429_mk(s) { +function game_BaseDialog_clearInterior__P22946_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore__P2429, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_clearInterior__P22946, 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___10685: undefined, + d___36278: undefined, + s___36285: undefined, arg0: undefined, } } @@ -16396,7 +15462,7 @@ function Sprite__destroyCore__P2429_mk(s) { -function forEach_inline__P10714(s) { +function game_BaseDialog_drawPartial__P22947(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16406,35 +15472,125 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.x0___36303 = undefined; + s.y0___36311 = undefined; + s.xf___36319 = undefined; + s.yf___36326 = undefined; + s.e___36333 = undefined; + s.t___36339 = 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.fields["kind"]; + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = s.arg0.fields["innerLeft"]; s.tmp_0 = r0; - r0 = s.caps[0].fields["_kind"]; + 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); + r0 = (s.tmp_0 + s.tmp_1); + s.x0___36303 = (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___36311 = (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___36319 = (r0); + r0 = pxsim.Math_.idiv(s.arg1, 3); + s.tmp_0 = r0; + r0 = s.arg0.fields["unit"]; + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.yf___36326 = (r0); + s.e___36333 = (0); + case 1: + r0 = s.arg0.fields["unit"]; + s.tmp_1 = r0; + r0 = (s.e___36333 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.t___36339 = (0); + case 2: + r0 = s.arg0.fields["unit"]; + s.tmp_1 = r0; + r0 = (s.t___36339 < 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___36303 + s.e___36333); + s.tmp_3 = r0; + r0 = (s.y0___36311 + s.t___36339); + s.tmp_4 = r0; + r0 = s.arg0.fields["frame"]; + s.tmp_6 = r0; + r0 = (s.xf___36319 + s.e___36333); + s.tmp_7 = r0; + r0 = (s.yf___36326 + s.t___36339); + 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___36339 + 1); + s.t___36339 = (r0); + { step = 2; continue; } + case 3: + r0 = (s.e___36333 + 1); + s.e___36333 = (r0); + { step = 1; continue; } + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -forEach_inline__P10714.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +game_BaseDialog_drawPartial__P22947.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"]} -function forEach_inline__P10714_mk(s) { +function game_BaseDialog_drawPartial__P22947_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P10714, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawPartial__P22947, 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___36303: undefined, + y0___36311: undefined, + xf___36319: undefined, + yf___36326: undefined, + e___36333: undefined, + t___36339: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function Sprite__destroyCore_inline__P10721(s) { +function game_BaseDialog_fastFill__P22945(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16444,44 +15600,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.color___36375 = 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; } - 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 = 441; 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 = 441; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 441; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 441; s.pc = 1; return s.tmp_0; } - } + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_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___36375 = (r0); + s.tmp_0 = helpers_imageFillRect__P19994_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___36375; + s.callLocIdx = 64; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite__destroyCore_inline__P10721.info = {"start":27286,"length":20,"line":881,"column":21,"endLine":881,"endColumn":41,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +game_BaseDialog_fastFill__P22945.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"]} -function Sprite__destroyCore_inline__P10721_mk(s) { +function game_BaseDialog_fastFill__P22945_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite__destroyCore_inline__P10721, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_fastFill__P22945, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + color___36375: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, + arg5: undefined, } } -function PhysicsEngine_removeSprite__P2514(s) { +function game_BaseDialog_drawBorder__P22944(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16491,33 +15674,279 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.y___36617 = undefined; + s.c___36633 = undefined; + s.r___36667 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C2511_VT)) failedCast(r0); + if (!checkSubtype(r0, game_BaseDialog__C20941_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__P22945_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 = 48; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_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 = 49; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_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 = 50; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_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 = 51; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_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 = 52; 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___36617 = (r0); + s.tmp_0 = game_BaseDialog_fastFill__P22945_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 6; + s.tmp_0.arg2 = 0; + s.tmp_0.arg3 = s.y___36617; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = 1; + s.callLocIdx = 53; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 7; + s.tmp_0.arg2 = 1; + s.tmp_0.arg3 = s.y___36617; + 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 = 54; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_fastFill__P22945_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___36617; + s.tmp_0.arg4 = 1; + s.tmp_0.arg5 = 1; + s.callLocIdx = 55; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + { step = 11; continue; } + case 1: + case 2: + s.c___36633 = (0); + case 3: + r0 = s.arg0.fields["columns"]; + s.tmp_1 = r0; + r0 = (s.c___36633 < s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + r0 = (s.c___36633 == 0); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 4; continue; } + s.tmp_3 = game_BaseDialog_drawPartial__P22947_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 = 56; s.pc = 20; return s.tmp_3; + case 20: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P22947_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 = 57; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + { step = 7; continue; } + case 4: + s.tmp_1 = r0 = s.c___36633; + 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__P22947_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 2; + s.tmp_4.arg2 = s.c___36633; + s.tmp_4.arg3 = 0; + s.callLocIdx = 58; s.pc = 22; return s.tmp_4; + case 22: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P22947_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 8; + s.tmp_0.arg2 = s.c___36633; + r0 = s.arg0.fields["rows"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0.arg3 = r0; + s.callLocIdx = 59; s.pc = 23; return s.tmp_0; + case 23: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = game_BaseDialog_drawPartial__P22947_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 1; + s.tmp_0.arg2 = s.c___36633; + s.tmp_0.arg3 = 0; + s.callLocIdx = 60; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P22947_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 7; + s.tmp_0.arg2 = s.c___36633; + r0 = s.arg0.fields["rows"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 1); + s.tmp_0.arg3 = r0; + s.callLocIdx = 61; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + case 6: + case 7: + r0 = (s.c___36633 + 1); + s.c___36633 = (r0); + { step = 3; continue; } + case 8: + s.r___36667 = (1); + case 9: + s.tmp_1 = r0 = s.r___36667; + 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 = 10; continue; } + s.tmp_4 = game_BaseDialog_drawPartial__P22947_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = 3; + s.tmp_4.arg2 = 0; + s.tmp_4.arg3 = s.r___36667; + s.callLocIdx = 62; s.pc = 26; return s.tmp_4; + case 26: + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawPartial__P22947_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___36667; + s.callLocIdx = 63; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + r0 = (s.r___36667 + 1); + s.r___36667 = (r0); + { step = 9; continue; } + case 10: + case 11: r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_removeSprite__P2514.info = {"start":159,"length":32,"line":10,"column":4,"endLine":10,"endColumn":36,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} +game_BaseDialog_drawBorder__P22944.info = {"start":2953,"length":1321,"line":103,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawBorder","argumentNames":["this"]} -function PhysicsEngine_removeSprite__P2514_mk(s) { +function game_BaseDialog_drawBorder__P22944_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_removeSprite__P2514, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawBorder__P22944, 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___36617: undefined, + c___36633: undefined, + r___36667: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_SpriteSet_remove__P2470(s) { +function game_BaseDialog_update__P20955(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16527,58 +15956,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.i___10730 = 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__C2463_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_0, s.arg1, undefined); - s.i___10730 = (r0); - r0 = (s.i___10730 > -1); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_arraySplice__P100_mk(s); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.i___10730; - s.tmp_1.arg2 = 1; - s.callLocIdx = 516; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - r0 = true; - { step = 3; continue; } + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + s.tmp_0 = game_BaseDialog_clearInterior__P22946_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 43; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = game_BaseDialog__C20941_v2_1_mk(s); + s.tmp_0.arg0 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, game_BaseDialog__C20941_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 = false; + r0 = s.retval; + s.tmp_0 = game_BaseDialog_drawCursorRow__P20958_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 44; s.pc = 3; return s.tmp_0; case 3: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_remove__P2470.info = {"start":1827,"length":235,"line":66,"column":8,"endLine":73,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"remove","argumentNames":["this","sprite"]} +game_BaseDialog_update__P20955.info = {"start":2171,"length":121,"line":74,"column":8,"endLine":78,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"update","argumentNames":["this"]} -function sprites_SpriteSet_remove__P2470_mk(s) { +function game_BaseDialog_update__P20955_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_remove__P2470, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_update__P20955, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - i___10730: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_kind__P2407(s) { +function game_BaseDialog_drawCursorRow__P20958(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16588,23 +16008,117 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.offset___36183 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_kind"]; + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + s.offset___36183 = (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___36183 = (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__P22950_mk(s); + s.tmp_8.arg0 = s.arg0; + s.callLocIdx = 45; s.pc = 3; return s.tmp_8; + 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___36183); + 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__P22951_mk(s); + s.tmp_19.arg0 = s.arg0; + s.callLocIdx = 46; s.pc = 4; return s.tmp_19; + 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); + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_kind__P2407.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} +game_BaseDialog_drawCursorRow__P20958.info = {"start":2464,"length":479,"line":88,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawCursorRow","argumentNames":["this"]} -function Sprite_kind__P2407_mk(s) { +function game_BaseDialog_drawCursorRow__P20958_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_kind__P2407, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawCursorRow__P20958, 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___36183: undefined, arg0: undefined, } } @@ -16612,7 +16126,7 @@ function Sprite_kind__P2407_mk(s) { -function game_popScene__P3004(s) { +function game_BaseDialog_textAreaHeight__P22951(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16622,84 +16136,59 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___10396 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 954; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.oldScene___10396 = (r0); - s.tmp_0 = r0 = globals._sceneStack___4945; - 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___4945); - case 2: - // jmp value (already in r0) + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = s.arg0.fields["image"]; + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.height(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = pxsim_Array_.pop(globals._sceneStack___4945); - globals._scene___4944 = (r0); - s.tmp_0 = control_popEventContext__P410_mk(s); - s.callLocIdx = 955; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - { step = 6; continue; } - case 3: - r0 = pxsim_numops_toBoolDecr(globals._scene___4944); - if (!r0) { step = 4; continue; } - s.tmp_0 = control_popEventContext__P410_mk(s); - s.callLocIdx = 956; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - globals._scene___4944 = (undefined); - case 4: - case 5: - case 6: - r0 = pxsim_numops_toBoolDecr(globals._scene___4944); - if (!r0) { step = 7; continue; } - s.tmp_0 = particles_enableAll__P3183_mk(s); - s.callLocIdx = 957; s.pc = 14; return s.tmp_0; - case 14: + r0 = s.arg0.fields["innerTop"]; + s.tmp_5 = r0; + s.tmp_7 = Math_min__P18169_mk(s); + r0 = s.arg0.fields["unit"]; + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = 12; + s.callLocIdx = 68; s.pc = 1; return s.tmp_7; + case 1: r0 = s.retval; - case 7: - case 8: - r0 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___4947); - if (!r0) { step = 9; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_popScene_inline__P10417); + 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 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___10396); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_1.arg0 = globals._scenePopHandlers___4947; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 959; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - case 9: - case 10: - r0 = undefined; + r0 = (s.tmp_0 - 1); return leave(s, r0) default: oops() } } } -game_popScene__P3004.info = {"start":5133,"length":548,"line":161,"column":4,"endLine":179,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"popScene","argumentNames":[]} +game_BaseDialog_textAreaHeight__P22951.info = {"start":5841,"length":143,"line":186,"column":8,"endLine":188,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaHeight","argumentNames":["this"]} -function game_popScene__P3004_mk(s) { +function game_BaseDialog_textAreaHeight__P22951_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene__P3004, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_textAreaHeight__P22951, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - oldScene___10396: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + arg0: undefined, } } -function game_popScene_inline__P10417(s) { +function game_BaseDialog_textAreaWidth__P22950(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16713,25 +16202,47 @@ switch (step) { 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 = 958; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_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__P18169_mk(s); + r0 = s.arg0.fields["unit"]; + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = 12; + s.callLocIdx = 67; s.pc = 1; return s.tmp_7; case 1: r0 = s.retval; - r0 = undefined; + 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); return leave(s, r0) default: oops() } } } -game_popScene_inline__P10417.info = {"start":5645,"length":18,"line":177,"column":38,"endLine":177,"endColumn":56,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +game_BaseDialog_textAreaWidth__P22950.info = {"start":5689,"length":142,"line":182,"column":8,"endLine":184,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"textAreaWidth","argumentNames":["this"]} -function game_popScene_inline__P10417_mk(s) { +function game_BaseDialog_textAreaWidth__P22950_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_popScene_inline__P10417, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_textAreaWidth__P22950, 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, } } @@ -16739,7 +16250,7 @@ function game_popScene_inline__P10417_mk(s) { -function particles_enableAll__P3183(s) { +function game_BaseDialog_cursorRowHeight__P22948(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16749,46 +16260,37 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___10421 = undefined; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1196; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___10421 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___10421); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - s.tmp_0.arg0 = s.sources___10421; - s.tmp_0.arg1 = particles_enableAll_inline__P10427; - s.callLocIdx = 1198; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P5290_mk(s); - s.callLocIdx = 1199; 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.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_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); return leave(s, r0) default: oops() } } } -particles_enableAll__P3183.info = {"start":12649,"length":193,"line":413,"column":4,"endLine":419,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"enableAll","argumentNames":[]} +game_BaseDialog_cursorRowHeight__P22948.info = {"start":5509,"length":82,"line":174,"column":8,"endLine":176,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"cursorRowHeight","argumentNames":["this"]} -function particles_enableAll__P3183_mk(s) { +function game_BaseDialog_cursorRowHeight__P22948_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll__P3183, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_cursorRowHeight__P22948, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___10421: undefined, + tmp_1: undefined, + arg0: undefined, } } -function particles_enableAll_inline__P10427(s) { +function game_BaseDialog_drawTextCore__P20957(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16802,24 +16304,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource_enabled__P3164_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1197; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = true; + r0 = s.arg0; + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_enableAll_inline__P10427.info = {"start":12773,"length":21,"line":416,"column":28,"endLine":416,"endColumn":49,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +game_BaseDialog_drawTextCore__P20957.info = {"start":2389,"length":65,"line":84,"column":8,"endLine":86,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} -function particles_enableAll_inline__P10427_mk(s) { +function game_BaseDialog_drawTextCore__P20957_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_enableAll_inline__P10427, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_drawTextCore__P20957, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -16827,7 +16324,7 @@ function particles_enableAll_inline__P10427_mk(s) { -function particles_particleSources__P5294(s) { +function scene_setBackgroundImage__P20923(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16837,87 +16334,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___10595 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 1200; s.pc = 1; return s.tmp_0; + s.scene___36152 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 36; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = r0.fields["particleSources"]; - s.sources___10595 = (r0); - r0 = s.sources___10595; - return leave(s, r0) - default: oops() -} } } -particles_particleSources__P5294.info = {"start":12848,"length":119,"line":421,"column":4,"endLine":424,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"particleSources","argumentNames":[]} - -function particles_particleSources__P5294_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_particleSources__P5294, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - sources___10595: undefined, -} } - - - - - -function particles_pruneParticles__P5290(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.sources___10432 = undefined; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1183; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___10432 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___10432); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - s.tmp_1 = helpers_arraySlice__P115_mk(s); - s.tmp_1.arg0 = s.sources___10432; - s.tmp_1.arg1 = 0; - r0 = pxsim_Array__length(s.sources___10432); - s.tmp_1.arg2 = r0; - s.callLocIdx = 1184; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; + s.scene___36152 = (r0); + s.tmp_0 = scene_Background_image__P20714_mk(s); + r0 = s.scene___36152.fields["background"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = particles_pruneParticles_inline__P10441; - s.callLocIdx = 1186; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - case 1: + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 37; s.pc = 2; return s.tmp_0; case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_pruneParticles__P5290.info = {"start":9864,"length":156,"line":327,"column":4,"endLine":330,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"pruneParticles","argumentNames":[]} +scene_setBackgroundImage__P20923.info = {"start":1962,"length":135,"line":78,"column":4,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundImage","argumentNames":["img"]} -function particles_pruneParticles__P5290_mk(s) { +function scene_setBackgroundImage__P20923_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles__P5290, depth: s.depth + 1, + parent: s, fn: scene_setBackgroundImage__P20923, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - sources___10432: undefined, + scene___36152: undefined, + arg0: undefined, } } -function particles_pruneParticles_inline__P10441(s) { +function scene_Background_image__P20714(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16929,33 +16383,32 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = particles_ParticleSource__prune__P3159_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1185; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, scene_Background__C20707_VT)) failedCast(r0); + r0 = (s.arg0).fields["_image"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_pruneParticles_inline__P10441.info = {"start":9997,"length":15,"line":329,"column":62,"endLine":329,"endColumn":77,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +scene_Background_image__P20714.info = {"start":1003,"length":68,"line":40,"column":8,"endLine":42,"endColumn":9,"fileName":"pxt_modules/game/background.ts","functionName":"image","argumentNames":["this","image"]} -function particles_pruneParticles_inline__P10441_mk(s) { +function scene_Background_image__P20714_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_pruneParticles_inline__P10441, depth: s.depth + 1, + parent: s, fn: scene_Background_image__P20714, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource__prune__P3159(s) { +function scene_Background_image__P20713(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -16965,137 +16418,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___10471 = undefined; - s.sources___10479 = undefined; - s.current___10493 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C3151_VT)) failedCast(r0); - case 1: - 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) + if (!checkSubtype(r0, scene_Background__C20707_VT)) failedCast(r0); + r0 = s.arg0.fields["_image"]; 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__P2999_mk(s); - s.callLocIdx = 1158; s.pc = 21; return s.tmp_5; - case 21: - r0 = s.retval; - s.scene___10471 = (r0); - r0 = pxsim_numops_toBoolDecr(s.scene___10471); - if (!r0) { step = 7; continue; } - r0 = s.scene___10471.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg0); - case 7: - case 8: - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1159; s.pc = 22; return s.tmp_0; - case 22: - r0 = s.retval; - s.sources___10479 = (r0); - s.tmp_0 = r0 = s.sources___10479; - 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___10479); - 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___10479, s.arg0); - case 11: - case 12: - r0 = s.arg0.fields["anchor"]; + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = (s.tmp_0 == undefined); - case 13: - case 14: - r0 = s.arg0.fields["head"]; - s.current___10493 = (r0); - case 15: - s.tmp_0 = r0 = s.current___10493; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 16; continue; } - r0 = s.tmp_0; - { step = 17; continue; } - case 16: - r0 = s.current___10493.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___10493.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___10493.fields["next"]; - r0 = r0.fields["next"]; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_3 = r0 = s.arg0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_5 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + s.tmp_6 = r0; + r0 = pxsim.image.create(s.tmp_5, s.tmp_6); s.tmp_4 = r0; - r0 = (s.current___10493).fields["next"] = (s.tmp_4); - { step = 19; continue; } - case 18: - r0 = s.current___10493.fields["next"]; - s.current___10493 = (r0); - case 19: - { step = 15; continue; } - case 20: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_3).fields["_image"] = (s.tmp_4); + case 1: + case 2: + r0 = s.arg0.fields["_image"]; + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource__prune__P3159.info = {"start":5104,"length":830,"line":166,"column":8,"endLine":189,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_prune","argumentNames":["this"]} +scene_Background_image__P20713.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__P20713.isGetter = true; -function particles_ParticleSource__prune__P3159_mk(s) { +function scene_Background_image__P20713_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__prune__P3159, depth: s.depth + 1, + parent: s, fn: scene_Background_image__P20713, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17103,9 +16460,7 @@ function particles_ParticleSource__prune__P3159_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - scene___10471: undefined, - sources___10479: undefined, - current___10493: undefined, + tmp_6: undefined, arg0: undefined, } } @@ -17113,7 +16468,7 @@ function particles_ParticleSource__prune__P3159_mk(s) { -function particles_ParticleSource_enabled__P3164(s) { +function controller__setUserEventsEnabled__P20244(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17125,66 +16480,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, particles_ParticleSource__C3151_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = particles_ParticleSource_enabled__P3163_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1162; s.pc = 5; return s.tmp_3; - case 5: - 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 = 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; } - 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: + globals._userEventsEnabled___22778 = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P3164.info = {"start":6816,"length":214,"line":223,"column":8,"endLine":228,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"enabled","argumentNames":["this","v"]} +controller__setUserEventsEnabled__P20244.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} -function particles_ParticleSource_enabled__P3164_mk(s) { +function controller__setUserEventsEnabled__P20244_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P3164, depth: s.depth + 1, + parent: s, fn: controller__setUserEventsEnabled__P20244, 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__P3163(s) { +function controller_Button_isPressed__P20238(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17199,34 +16516,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C3151_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_numops_toBoolDecr(s.tmp_1); - s.tmp_0 = r0; - r0 = pxsim_Boolean__bang(s.tmp_0); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; + return leave(s, r0) default: oops() } } } -particles_ParticleSource_enabled__P3163.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__P3163.isGetter = true; +controller_Button_isPressed__P20238.info = {"start":6303,"length":57,"line":185,"column":8,"endLine":187,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"isPressed","argumentNames":["this"]} -function particles_ParticleSource_enabled__P3163_mk(s) { +function controller_Button_isPressed__P20238_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_enabled__P3163, depth: s.depth + 1, + parent: s, fn: controller_Button_isPressed__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, arg0: undefined, } } @@ -17234,7 +16535,7 @@ function particles_ParticleSource_enabled__P3163_mk(s) { -function control_popEventContext__P410(s) { +function console_inspect__P18420(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17244,75 +16545,239 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctx___10602 = undefined; - s.context___10610 = undefined; - r0 = pxsim_numops_toBoolDecr(globals.eventContexts___4444); + s.asArr___29999 = undefined; + s.asString___30017 = undefined; + s.keys___30029 = undefined; + s.snipped___30033 = 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 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 == "string"); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; continue; } + r0 = s.arg0; + { step = 17; continue; } + { step = 16; 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_.pop(globals.eventContexts___4444); - s.ctx___10602 = (r0); - r0 = pxsim_numops_toBoolDecr(s.ctx___10602); + r0 = pxsim_Array_.isArray(s.arg0); + s.tmp_6 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_6); + if (!r0) { step = 5; continue; } + s.asArr___29999 = (s.arg0); + r0 = pxsim_Array__length(s.asArr___29999); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_1 <= s.arg1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - { step = 7; continue; } + s.tmp_2 = helpers_arrayJoin__P18141_mk(s); + s.tmp_2.arg0 = s.asArr___29999; + s.tmp_2.arg1 = ","; + s.callLocIdx = 34; s.pc = 19; return s.tmp_2; + case 19: + r0 = s.retval; + { step = 17; continue; } + { step = 4; continue; } case 3: - case 4: - s.tmp_2 = control_EventContext_unregister__P402_mk(s); - s.tmp_2.arg0 = s.ctx___10602; - s.callLocIdx = 56; s.pc = 8; return s.tmp_2; - case 8: + r0 = pxsim_String_.mkEmpty(); + s.tmp_4 = r0; + s.tmp_7 = helpers_arrayJoin__P18141_mk(s); + s.tmp_8 = helpers_arraySlice__P18153_mk(s); + s.tmp_8.arg0 = s.asArr___29999; + s.tmp_8.arg1 = 0; + s.tmp_8.arg2 = s.arg1; + s.callLocIdx = 35; s.pc = 21; return s.tmp_8; + case 21: r0 = s.retval; - s.tmp_0 = r0 = globals.eventContexts___4444; - r0 = pxsim_Array__length(globals.eventContexts___4444); - 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___10610 = (r0); - r0 = pxsim_numops_toBoolDecr(s.context___10610); - if (!r0) { step = 5; continue; } - s.tmp_0 = control_EventContext_register__P401_mk(s); - s.tmp_0.arg0 = s.context___10610; - s.callLocIdx = 57; s.pc = 9; return s.tmp_0; - case 9: + s.tmp_7.arg0 = r0; + s.tmp_7.arg1 = ","; + s.callLocIdx = 36; s.pc = 20; return s.tmp_7; + case 20: r0 = s.retval; - { step = 6; continue; } + 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: - globals.eventContexts___4444 = (undefined); + 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___30017 = (r0); + r0 = (s.asString___30017 != "[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___30017 != "[Object]"); 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___30017; + { step = 17; continue; } + case 8: + case 9: + r0 = pxsim_pxtrt.keysOf(s.arg0); + s.keys___30029 = (r0); + r0 = pxsim_Array__length(s.keys___30029); + s.tmp_0 = r0; + r0 = (s.tmp_0 > s.arg1); + s.snipped___30033 = (r0); + r0 = pxsim_numops_toBoolDecr(s.snipped___30033); + if (!r0) { step = 10; continue; } + s.tmp_0 = helpers_arraySlice__P18153_mk(s); + s.tmp_0.arg0 = s.keys___30029; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 37; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.keys___30029 = (r0); + case 10: + case 11: + r0 = pxsim_pxtcore_mkAction(1, console_inspect_inline__P30050); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_numops_toBoolDecr(s.snipped___30033); + 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__P18150_mk(s); + s.tmp_7.arg0 = s.keys___30029; + s.tmp_7.arg1 = s.tmp_0; + r0 = pxsim_String_.mkEmpty(); + s.tmp_7.arg2 = r0; + s.callLocIdx = 38; 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() } } } -control_popEventContext__P410.info = {"start":7755,"length":413,"line":236,"column":4,"endLine":250,"endColumn":5,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"popEventContext","argumentNames":[]} +console_inspect__P18420.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 control_popEventContext__P410_mk(s) { +function console_inspect__P18420_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_popEventContext__P410, depth: s.depth + 1, + parent: s, fn: console_inspect__P18420, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - ctx___10602: undefined, - context___10610: 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, + asArr___29999: undefined, + asString___30017: undefined, + keys___30029: undefined, + snipped___30033: undefined, + arg0: undefined, + arg1: undefined, } } -function control_EventContext_register__P401(s) { +function console_inspect_inline__P30050(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17322,67 +16787,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.h___10623 = undefined; - s.unnamed56___U1 = undefined; - s.unnamed57___U2 = 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__C395_VT)) failedCast(r0); - s.h___10623 = (undefined); - r0 = s.arg0.fields["handlers"]; - s.unnamed56___U1 = (r0); - s.unnamed57___U2 = (0); + if ((s.arg0) && (s.arg0).vtable) { + setupResume(s, 1); + pxsim_String__stringConv(s.arg0); + checkResumeConsumed(); + return; + } else { s.retval = (s.arg0) + ""; } case 1: - s.tmp_0 = r0 = s.unnamed57___U2; - r0 = pxsim_Array__length(s.unnamed56___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed56___U1, s.unnamed57___U2); - s.h___10623 = (r0); - s.tmp_2 = control_EventHandler_register__P4437_mk(s); - s.tmp_2.arg0 = s.h___10623; - s.callLocIdx = 47; s.pc = 3; return s.tmp_2; - case 3: r0 = s.retval; - r0 = (s.unnamed57___U2 + 1); - s.unnamed57___U2 = (r0); - { step = 1; continue; } + 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: - s.unnamed56___U1 = (undefined); - s.tmp_0 = control_EventContext_registerFrameCallbacks__P4442_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 48; s.pc = 4; return s.tmp_0; + 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_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.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat(s.tmp_0, s.tmp_1); return leave(s, r0) default: oops() } } } -control_EventContext_register__P401.info = {"start":4573,"length":138,"line":135,"column":8,"endLine":139,"endColumn":9,"fileName":"pxt_modules/base/eventcontext.ts","functionName":"register","argumentNames":["this"]} +console_inspect_inline__P30050.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 control_EventContext_register__P401_mk(s) { +function console_inspect_inline__P30050_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_EventContext_register__P401, depth: s.depth + 1, + parent: s, fn: console_inspect_inline__P30050, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - h___10623: undefined, - unnamed56___U1: undefined, - unnamed57___U2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, arg0: undefined, + arg1: undefined, } } -function controller__setUserEventsEnabled__P2206(s) { +function helpers_arrayReduce__P18150(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17392,30 +16873,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___30077 = undefined; + s.i___30080 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.arg2 = (s.lambdaArgs[2]); s.lambdaArgs = null; } - globals._userEventsEnabled___4740 = (s.arg0); - r0 = undefined; + r0 = pxsim_Array__length(s.arg0); + s.len___30077 = (r0); + s.i___30080 = (0); + case 1: + r0 = (s.i___30080 < s.len___30077); + 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___30080); + s.tmp_1.arg1 = r0; + s.tmp_1.arg2 = s.i___30080; + setupLambda(s.tmp_1, s.tmp_1.argL); + s.callLocIdx = 7; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; + s.arg2 = (r0); + r0 = (s.i___30080 + 1); + s.i___30080 = (r0); + { step = 1; continue; } + case 2: + r0 = s.arg2; return leave(s, r0) default: oops() } } } -controller__setUserEventsEnabled__P2206.info = {"start":10070,"length":101,"line":291,"column":4,"endLine":293,"endColumn":5,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"_setUserEventsEnabled","argumentNames":["enabled"]} +helpers_arrayReduce__P18150.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 controller__setUserEventsEnabled__P2206_mk(s) { +function helpers_arrayReduce__P18150_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller__setUserEventsEnabled__P2206, depth: s.depth + 1, + parent: s, fn: helpers_arrayReduce__P18150, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + len___30077: undefined, + i___30080: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function scene_systemMenu_MenuOption_constructor__P3088(s) { +function helpers_arrayJoin__P18141(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17425,40 +16938,153 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.r___30105 = undefined; + s.len___30106 = undefined; + s.i___30109 = 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_systemMenu_MenuOption__C3087_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() -} } } -scene_systemMenu_MenuOption_constructor__P3088.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 scene_systemMenu_MenuOption_constructor__P3088_mk(s) { + 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___30105 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___30106 = (r0); + s.i___30109 = (0); + case 5: + r0 = (s.i___30109 < s.len___30106); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.i___30109 > 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___30105) && (s.r___30105).vtable) { + setupResume(s, 15); + pxsim_String__stringConv(s.r___30105); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___30105) + ""; } + 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___30105 = (r0); + case 8: + case 9: + r0 = pxsim_Array__getAt(s.arg0, s.i___30109); + 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___30109); + 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___30109); + case 13: + // jmp value (already in r0) + s.tmp_4 = r0; + if ((s.r___30105) && (s.r___30105).vtable) { + setupResume(s, 17); + pxsim_String__stringConv(s.r___30105); + checkResumeConsumed(); + return; + } else { s.retval = (s.r___30105) + ""; } + 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___30105 = (r0); + r0 = (s.i___30109 + 1); + s.i___30109 = (r0); + { step = 5; continue; } + case 14: + r0 = s.r___30105; + return leave(s, r0) + default: oops() +} } } +helpers_arrayJoin__P18141.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 helpers_arrayJoin__P18141_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_constructor__P3088, depth: s.depth + 1, + parent: s, fn: helpers_arrayJoin__P18141, 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___30105: undefined, + len___30106: undefined, + i___30109: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function helpers_screenBrightness__P1966(s) { +function pauseUntil__P18405(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17470,27 +17096,75 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = globals.brightness___1951; + 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 = 29; 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__P18404_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 30; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_screenBrightness__P1966.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} +pauseUntil__P18405.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 helpers_screenBrightness__P1966_mk(s) { +function pauseUntil__P18405_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_screenBrightness__P1966, depth: s.depth + 1, + parent: s, fn: pauseUntil__P18405, 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 music_volume__P1621(s) { +function control___queuePollEvent__P18404(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17500,29 +17174,97 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = music_initVolume__P4479_mk(s); - s.callLocIdx = 61; s.pc = 1; return s.tmp_0; + s.ev___27397 = 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__C22453_VT); + s.tmp_0 = r0; + s.tmp_1 = control_PollEvent_constructor__P22454_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 = 27; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.ev___27397 = (s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals._pollEventQueue___22456); + 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___27397); + globals._pollEventQueue___22456 = (s.tmp_2); + r0 = pxsim.control.runInParallel(control_pollEvents__P22457); + { step = 2; continue; } case 1: + r0 = pxsim_Array__push(globals._pollEventQueue___22456, s.ev___27397); + case 2: + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 3; continue; } + s.tmp_0 = control_onEvent__P18429_mk(s); + r0 = s.ev___27397.fields["eid"]; + s.tmp_0.arg0 = r0; + r0 = s.ev___27397.fields["vid"]; + s.tmp_0.arg1 = r0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = 16; + s.callLocIdx = 28; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; - r0 = globals.globalVolume___4475; + { step = 4; continue; } + case 3: + r0 = s.ev___27397.fields["eid"]; + s.tmp_0 = r0; + r0 = s.ev___27397.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() } } } -music_volume__P1621.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} +control___queuePollEvent__P18404.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 music_volume__P1621_mk(s) { +function control___queuePollEvent__P18404_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_volume__P1621, depth: s.depth + 1, + parent: s, fn: control___queuePollEvent__P18404, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + ev___27397: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function music_initVolume__P4479(s) { +function control_pollEvents__P22457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17532,29 +17274,258 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.globalVolume___4475 === null); + s.now___27440 = undefined; + s.i___27443 = undefined; + s.ev___27449 = undefined; + case 1: + r0 = pxsim_Array__length(globals._pollEventQueue___22456); + 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; } - globals.globalVolume___4475 = (0); - s.tmp_0 = music_setVolume__P1620_mk(s); - r0 = pxsim_pxtcore.getConfig(59, 128); - s.tmp_0.arg0 = r0; - s.callLocIdx = 58; s.pc = 3; return s.tmp_0; + if (!r0) { step = 12; continue; } + r0 = pxsim.control.millis(); + s.now___27440 = (r0); + s.i___27443 = (0); + case 2: + s.tmp_1 = r0 = s.i___27443; + r0 = pxsim_Array__length(globals._pollEventQueue___22456); + 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___22456, s.i___27443); + s.ev___27449 = (r0); + s.tmp_1 = if_condition_1_mk(s); + s.tmp_1.arg0 = s.ev___27449; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "condition"), 1); + s.callLocIdx = 24; 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 = 24; s.pc = 13; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 24; s.pc = 13; return s.tmp_1;; } + else { s.callLocIdx = 24; s.pc = 13; return s.tmp_1; } + } + 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___27449.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___27449.fields["start"]; + s.tmp_5 = r0; + r0 = (s.now___27440 - s.tmp_5); + s.tmp_4 = r0; + r0 = s.ev___27449.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___27449.fields["eid"]; + s.tmp_9 = r0; + r0 = s.ev___27449.fields["vid"]; + s.tmp_10 = r0; + r0 = pxsim.control.raiseEvent(s.tmp_9, s.tmp_10); + r0 = s.ev___27449.fields["once"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = helpers_arraySplice__P18138_mk(s); + s.tmp_1.arg0 = globals._pollEventQueue___22456; + s.tmp_1.arg1 = s.i___27443; + s.tmp_1.arg2 = 1; + s.callLocIdx = 25; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + r0 = (s.i___27443 - 1); + s.i___27443 = (r0); + case 7: + case 8: + case 9: + case 10: + r0 = (s.i___27443 + 1); + s.i___27443 = (r0); + { step = 2; continue; } + case 11: + s.tmp_0 = pause__P18451_mk(s); + s.tmp_0.arg0 = 50; + s.callLocIdx = 26; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; + { step = 1; continue; } + case 12: + globals._pollEventQueue___22456 = (undefined); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control_pollEvents__P22457.info = {"start":618,"length":638,"line":20,"column":4,"endLine":37,"endColumn":5,"fileName":"pxt_modules/base/poll.ts","functionName":"pollEvents","argumentNames":[]} + +function control_pollEvents__P22457_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_pollEvents__P22457, 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___27440: undefined, + i___27443: undefined, + ev___27449: undefined, +} } + + + + + +function control_PollEvent_constructor__P22454(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__C22453_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__P22454.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__P22454_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control_PollEvent_constructor__P22454, 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 scene_setBackgroundColor__P20921(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___25061 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 938; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; + s.scene___25061 = (r0); + r0 = s.scene___25061.fields["background"]; + s.tmp_0 = r0; + r0 = (s.tmp_0).fields["color"] = (s.arg0); r0 = undefined; return leave(s, r0) default: oops() } } } -music_initVolume__P4479.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} +scene_setBackgroundColor__P20921.info = {"start":1231,"length":140,"line":53,"column":4,"endLine":56,"endColumn":5,"fileName":"pxt_modules/game/scenes.ts","functionName":"setBackgroundColor","argumentNames":["color"]} + +function scene_setBackgroundColor__P20921_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_setBackgroundColor__P20921, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + scene___25061: undefined, + arg0: undefined, +} } + + + + + +function game_eventContext__P21040(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__P22990_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 944; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals._scene___22982.fields["eventContext"]; + return leave(s, r0) + default: oops() +} } } +game_eventContext__P21040.info = {"start":4442,"length":112,"line":136,"column":4,"endLine":139,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"eventContext","argumentNames":[]} -function music_initVolume__P4479_mk(s) { +function game_eventContext__P21040_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_initVolume__P4479, depth: s.depth + 1, + parent: s, fn: game_eventContext__P21040, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -17563,7 +17534,73 @@ function music_initVolume__P4479_mk(s) { -function helpers_arrayConcat__P113(s) { +function controller_pauseUntilAnyButtonIsPressed__P20243(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; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +controller_pauseUntilAnyButtonIsPressed__P20243.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__P20243_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_pauseUntilAnyButtonIsPressed__P20243, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function game_setWaitAnyButton__P21038(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___22986 = (s.arg0); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_setWaitAnyButton__P21038.info = {"start":4236,"length":83,"line":127,"column":4,"endLine":129,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"setWaitAnyButton","argumentNames":["f"]} + +function game_setWaitAnyButton__P21038_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_setWaitAnyButton__P21038, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Math_FastRandom_constructor__P21099(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17573,74 +17610,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.out___11887 = undefined; - s.value___11890 = undefined; - s.unnamed46___U2 = undefined; - s.unnamed47___U3 = undefined; - s.value___11897 = undefined; - s.unnamed48___U5 = undefined; - s.unnamed49___U6 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.out___11887 = (r0); - s.value___11890 = (undefined); - s.unnamed46___U2 = (s.arg0); - s.unnamed47___U3 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, Math_FastRandom__C21097_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: - s.tmp_0 = r0 = s.unnamed47___U3; - r0 = pxsim_Array__length(s.unnamed46___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 2; continue; } - r0 = pxsim_Array__getAt(s.unnamed46___U2, s.unnamed47___U3); - s.value___11890 = (r0); - r0 = pxsim_Array__push(s.out___11887, s.value___11890); - r0 = (s.unnamed47___U3 + 1); - s.unnamed47___U3 = (r0); - { step = 1; continue; } case 2: - s.unnamed46___U2 = (undefined); - s.value___11897 = (undefined); - s.unnamed48___U5 = (s.arg1); - s.unnamed49___U6 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed49___U6; - r0 = pxsim_Array__length(s.unnamed48___U5); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed48___U5, s.unnamed49___U6); - s.value___11897 = (r0); - r0 = pxsim_Array__push(s.out___11887, s.value___11897); - r0 = (s.unnamed49___U6 + 1); - s.unnamed49___U6 = (r0); - { step = 3; continue; } - case 4: - s.unnamed48___U5 = (undefined); - r0 = s.out___11887; + r0 = (s.arg0).fields["seed"] = (s.arg1); + r0 = (s.arg0).fields["lfsr"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -helpers_arrayConcat__P113.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"]} +Math_FastRandom_constructor__P21099.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 helpers_arrayConcat__P113_mk(s) { +function Math_FastRandom_constructor__P21099_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayConcat__P113, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_constructor__P21099, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - out___11887: undefined, - value___11890: undefined, - unnamed46___U2: undefined, - unnamed47___U3: undefined, - value___11897: undefined, - unnamed48___U5: undefined, - unnamed49___U6: undefined, arg0: undefined, arg1: undefined, } } @@ -17649,7 +17647,7 @@ function helpers_arrayConcat__P113_mk(s) { -function scene_systemMenu_PauseMenu_show__P3097(s) { +function game_consoleOverlay_listener__P23316(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17659,300 +17657,79 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___9827 = undefined; - s.i___9828 = 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__C3095_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 = 1000; 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 = 1000; s.pc = 3; return s.tmp_2; } - else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1000; s.pc = 3; return s.tmp_2;; } - else { s.callLocIdx = 1000; s.pc = 3; return s.tmp_2; } - } - case 3: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___23281); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["options"] = (s.tmp_1); - r0 = (s.arg0).fields["selection"] = (0); - s.i___9828 = (0); + 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_1 = r0 = s.i___9828; - r0 = s.arg0.fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + r0 = pxsim_numops_toBoolDecr(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 = 2; continue; } - r0 = s.arg0.fields["options"]; - s.tmp_4 = r0; - r0 = pxsim_Array__getAt(s.tmp_4, s.i___9828); - s.current___9827 = (r0); - s.tmp_0 = scene_systemMenu_MenuOption_show__P3089_mk(s); - s.tmp_0.arg0 = s.current___9827; - s.callLocIdx = 1001; s.pc = 4; return s.tmp_0; + 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: case 4: + s.tmp_4 = helpers_arrayForEach__P18147_mk(s); + s.tmp_5 = helpers_arrayFilter__P18148_mk(s); + s.tmp_6 = helpers_stringSplit__P18160_mk(s); + s.tmp_6.arg0 = s.arg1; + s.tmp_6.arg1 = "\n"; + s.tmp_6.arg2 = undefined; + s.callLocIdx = 1125; s.pc = 10; return s.tmp_6; + case 10: r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P3092_mk(s); - s.tmp_0.arg0 = s.current___9827; - r0 = s.arg0.fields["theme"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1002; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_MenuOption_position__P3090_mk(s); - s.tmp_0.arg0 = s.current___9827; - 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 = 1003; s.pc = 7; return s.tmp_2; } - } - case 7: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_5 = r0 = s.i___9828; - 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 = 1004; 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 = 1005; s.pc = 9; return s.tmp_10; } - } + s.tmp_5.arg0 = r0; + s.tmp_5.arg1 = forEach_inline__P27780; + s.callLocIdx = 1126; s.pc = 9; return s.tmp_5; 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 = 1006; s.pc = 10; return s.tmp_12; } - } - case 10: + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = game_consoleOverlay_listener_inline__P27785; + s.callLocIdx = 1128; s.pc = 8; return s.tmp_4; + case 8: 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); + r0 = pxsim_Array__length(globals.consoleStrings___23281); + s.tmp_1 = r0; + r0 = (s.tmp_1 > globals.consoleLines___23294); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = helpers_arraySplice__P18138_mk(s); + s.tmp_2.arg0 = globals.consoleStrings___23281; + s.tmp_2.arg1 = 0; + r0 = pxsim_Array__length(globals.consoleStrings___23281); 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 = 1007; s.pc = 11; return s.tmp_14; } - } + r0 = (s.tmp_3 - globals.consoleLines___23294); + s.tmp_2.arg2 = r0; + s.callLocIdx = 1129; s.pc = 11; return s.tmp_2; case 11: r0 = s.retval; - s.tmp_13 = r0; - s.tmp_17 = r0 = s.i___9828; - 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 = 1008; 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 = 1009; 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 = 1010; 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 = 1011; s.pc = 6; return s.tmp_0; + case 5: case 6: - r0 = s.retval; - r0 = (s.i___9828 + 1); - s.i___9828 = (r0); - { step = 1; continue; } - case 2: - s.tmp_0 = controller__setUserEventsEnabled__P2206_mk(s); - s.tmp_0.arg0 = false; - s.callLocIdx = 1012; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9891); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.A___2113; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1014; s.pc = 16; return s.tmp_1; - case 16: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9911); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.A___2113; - s.tmp_1.arg1 = 2052; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1016; s.pc = 17; return s.tmp_1; - case 17: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P2196_mk(s); - s.tmp_0.arg0 = globals.B___2114; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P9940; - s.callLocIdx = 1018; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = controller_Button_onEvent__P2196_mk(s); - s.tmp_0.arg0 = globals.menu___2119; - s.tmp_0.arg1 = 2053; - s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P9945; - s.callLocIdx = 1020; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9950); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.up___2116; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1024; s.pc = 20; return s.tmp_1; - case 20: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9962); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.left___2115; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1027; s.pc = 21; return s.tmp_1; - case 21: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9971); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.down___2118; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1031; s.pc = 22; return s.tmp_1; - case 22: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9987); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = controller_Button_onEvent__P2196_mk(s); - s.tmp_1.arg0 = globals.right___2117; - s.tmp_1.arg1 = 2053; - s.tmp_1.arg2 = s.tmp_0; - s.callLocIdx = 1034; s.pc = 23; return s.tmp_1; - case 23: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P9999); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = game_onShade__P3017_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.callLocIdx = 1037; s.pc = 24; return s.tmp_1; - case 24: - r0 = s.retval; - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P3099_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1038; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; + case 7: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show__P3097.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +game_consoleOverlay_listener__P23316.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 scene_systemMenu_PauseMenu_show__P3097_mk(s) { +function game_consoleOverlay_listener__P23316_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show__P3097, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener__P23316, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -17961,34 +17738,15 @@ function scene_systemMenu_PauseMenu_show__P3097_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, - 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___9827: undefined, - i___9828: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P9891(s) { +function forEach_inline__P27780(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -17998,56 +17756,86 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = s.caps[0].fields["options"]; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + r0 = pxsim_Boolean__bang(s.tmp_2); s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_numops_toBoolDecr(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_Boolean__bang(s.tmp_0); + return leave(s, r0) + default: oops() +} } } +forEach_inline__P27780.info = {"start":985,"length":14,"line":32,"column":20,"endLine":32,"endColumn":34,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} + +function forEach_inline__P27780_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: forEach_inline__P27780, 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 game_consoleOverlay_listener_inline__P27785(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.j___27787 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.j___27787 = (0); 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_1 = r0 = s.j___27787; + 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___23281; + s.tmp_5 = helpers_stringSlice__P18157_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_5.arg1 = s.j___27787; + r0 = (s.j___27787 + globals.consoleColumns___23304); + s.tmp_5.arg2 = r0; + s.callLocIdx = 1127; s.pc = 3; return s.tmp_5; case 3: - case 4: - s.tmp_8 = scene_systemMenu_MenuOption_setState__P3093_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 = 1013; s.pc = 6; return s.tmp_8; - case 6: r0 = s.retval; - case 5: + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_3, s.tmp_4); + r0 = (s.j___27787 + globals.consoleColumns___23304); + s.j___27787 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9891.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +game_consoleOverlay_listener_inline__P27785.info = {"start":1022,"length":189,"line":33,"column":21,"endLine":37,"endColumn":13,"fileName":"pxt_modules/game/console.ts","functionName":"inline","argumentNames":["line"]} -function scene_systemMenu_PauseMenu_show_inline__P9891_mk(s) { +function game_consoleOverlay_listener_inline__P27785_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9891, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_listener_inline__P27785, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -18055,18 +17843,15 @@ function scene_systemMenu_PauseMenu_show_inline__P9891_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, + j___27787: undefined, + arg0: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P9911(s) { +function console_addListener__P18421(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18076,9 +17861,11 @@ 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); + 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; @@ -18087,72 +17874,42 @@ switch (step) { 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); + r0 = pxsim_Array_.indexOf(globals.listeners___22460, s.arg0, undefined); + s.tmp_2 = r0; + r0 = (s.tmp_2 > -1); case 2: // jmp value (already in r0) - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); + s.tmp_3 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 3; continue; } { step = 5; continue; } case 3: case 4: - s.tmp_8 = scene_systemMenu_MenuOption_setState__P3093_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 = 1015; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - r0 = s.caps[0].fields["options"]; - 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"]; - s.tmp_0 = r0; - r0 = pxsim.control.runInParallel(s.tmp_0); + r0 = pxsim_Array__push(globals.listeners___22460, s.arg0); case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9911.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +console_addListener__P18421.info = {"start":3558,"length":197,"line":121,"column":4,"endLine":124,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"addListener","argumentNames":["listener"]} -function scene_systemMenu_PauseMenu_show_inline__P9911_mk(s) { +function console_addListener__P18421_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9911, depth: s.depth + 1, + parent: s, fn: console_addListener__P18421, 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 scene_systemMenu_PauseMenu_show_inline__P9940(s) { +function listeners_inline__P22459(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18162,29 +17919,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_closeMenu__P3102_mk(s); - s.callLocIdx = 1017; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + 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 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9940.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +listeners_inline__P22459.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 scene_systemMenu_PauseMenu_show_inline__P9940_mk(s) { +function listeners_inline__P22459_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9940, depth: s.depth + 1, + parent: s, fn: listeners_inline__P22459, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P9945(s) { +function scene_systemMenu_register__P21144(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18194,20 +17954,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_closeMenu__P3102_mk(s); - s.callLocIdx = 1019; s.pc = 1; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(globals.instance___23235); + if (!r0) { step = 1; continue; } + { step = 3; continue; } case 1: + case 2: + s.tmp_0 = controller_Button_onEvent__P20234_mk(s); + s.tmp_0.arg0 = globals.menu___20157; + s.tmp_0.arg1 = 2049; + s.tmp_0.arg2 = scene_systemMenu_showSystemMenu__P21145; + s.callLocIdx = 1112; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9945.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_register__P21144.info = {"start":12793,"length":193,"line":382,"column":4,"endLine":386,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"register","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P9945_mk(s) { +function scene_systemMenu_register__P21144_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9945, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_register__P21144, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -18216,7 +17985,7 @@ function scene_systemMenu_PauseMenu_show_inline__P9945_mk(s) { -function scene_systemMenu_PauseMenu_show_inline__P9950(s) { +function scene_systemMenu_showSystemMenu__P21145(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18226,58 +17995,51 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P3099_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P130_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"); - } 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 = 1021; s.pc = 3; return s.tmp_4; } - } - case 3: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_2 - s.tmp_3); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1022; s.pc = 2; return s.tmp_1; + r0 = pxsim_numops_toBoolDecr(globals.instance___23235); + if (!r0) { step = 1; continue; } + { step = 3; continue; } + case 1: case 2: + s.tmp_0 = game_pushScene__P21041_mk(s); + s.callLocIdx = 1113; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1023; s.pc = 1; return s.tmp_0; - case 1: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_PauseMenu__C21133_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_PauseMenu_constructor__P21134_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = scene_systemMenu_buildOptionList__P21141; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 1114; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + globals.instance___23235 = (s.tmp_0); + s.tmp_0 = scene_systemMenu_PauseMenu_show__P21135_mk(s); + s.tmp_0.arg0 = globals.instance___23235; + s.callLocIdx = 1115; s.pc = 6; return s.tmp_0; + case 6: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9950.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_showSystemMenu__P21145.info = {"start":12992,"length":172,"line":388,"column":4,"endLine":393,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"showSystemMenu","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P9950_mk(s) { +function scene_systemMenu_showSystemMenu__P21145_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9950, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_showSystemMenu__P21145, 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, } } -function scene_systemMenu_PauseMenu_show_inline__P9962(s) { +function scene_systemMenu_buildOptionList__P21141(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18287,42 +18049,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P3099_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_max__P130_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 = 1025; s.pc = 2; return s.tmp_1; - case 2: + s.options___29822 = undefined; + r0 = pxsim_Array__mk(); + s.options___29822 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_DOWN_ICON___21155; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29830; + s.tmp_1.arg3 = scene_systemMenu_volumeDown__P23241; + s.callLocIdx = 1095; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 1026; s.pc = 1; return s.tmp_0; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.VOLUME_UP_ICON___21152; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29844; + s.tmp_1.arg3 = scene_systemMenu_volumeUp__P23240; + s.callLocIdx = 1097; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, 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__C21125_VT); + s.tmp_1 = r0; + s.tmp_2 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_2.arg0 = s.tmp_1; + s.tmp_2.arg1 = globals.BRIGHTNESS_DOWN_ICON___21153; + s.tmp_2.arg2 = scene_systemMenu_buildOptionList_inline__P29859; + s.tmp_2.arg3 = scene_systemMenu_brightnessDown__P23243; + s.callLocIdx = 1100; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, s.tmp_1); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.BRIGHTNESS_UP_ICON___21158; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29874; + s.tmp_1.arg3 = scene_systemMenu_brightnessUp__P23242; + s.callLocIdx = 1102; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); case 1: + case 2: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.STATS_ICON___21159; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29889; + s.tmp_1.arg3 = scene_systemMenu_toggleStats__P23245; + s.callLocIdx = 1103; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - r0 = undefined; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.CONSOLE_ICON___21157; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29898; + s.tmp_1.arg3 = scene_systemMenu_toggleConsole__P23246; + s.callLocIdx = 1105; s.pc = 10; return s.tmp_1; + case 10: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.SLEEP_ICON___21156; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29907; + s.tmp_1.arg3 = scene_systemMenu_sleep__P23247; + s.callLocIdx = 1106; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.customMenuOptions___23236); + if (!r0) { step = 3; continue; } + s.tmp_0 = helpers_arrayConcat__P18151_mk(s); + s.tmp_0.arg0 = s.options___29822; + s.tmp_0.arg1 = globals.customMenuOptions___23236; + s.callLocIdx = 1107; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.options___29822 = (r0); + case 3: + case 4: + r0 = pxsim_pxtcore_mkClassInstance(scene_systemMenu_MenuOption__C21125_VT); + s.tmp_0 = r0; + s.tmp_1 = scene_systemMenu_MenuOption_constructor__P21126_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = globals.CLOSE_MENU_ICON___21154; + s.tmp_1.arg2 = scene_systemMenu_buildOptionList_inline__P29920; + s.tmp_1.arg3 = scene_systemMenu_closeMenu__P21140; + s.callLocIdx = 1108; s.pc = 13; return s.tmp_1; + case 13: + r0 = s.retval; + r0 = pxsim_Array__push(s.options___29822, s.tmp_0); + r0 = s.options___29822; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9962.info = {"start":4927,"length":89,"line":163,"column":53,"endLine":165,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList__P21141.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_PauseMenu_show_inline__P9962_mk(s) { +function scene_systemMenu_buildOptionList__P21141_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9962, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList__P21141, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + options___29822: undefined, } } -function scene_systemMenu_PauseMenu_show_inline__P9971(s) { +function scene_systemMenu_buildOptionList_inline__P29830(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18332,65 +18188,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P3099_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P131_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; - 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 = 1028; s.pc = 3; return s.tmp_6; } - } - case 3: + s.tmp_3 = music_volume__P19659_mk(s); + s.callLocIdx = 1094; s.pc = 1; return s.tmp_3; + case 1: r0 = s.retval; - s.tmp_5 = r0; - r0 = (s.tmp_4 + s.tmp_5); - s.tmp_1.arg1 = r0; - s.callLocIdx = 1029; s.pc = 2; return s.tmp_1; + 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_0.arg1 = r0; - s.callLocIdx = 1030; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat("VOLUME DOWN (", s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9971.info = {"start":5073,"length":132,"line":167,"column":53,"endLine":169,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P29830.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_PauseMenu_show_inline__P9971_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29830_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9971, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29830, 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, } } -function scene_systemMenu_PauseMenu_show_inline__P9987(s) { +function scene_systemMenu_buildOptionList_inline__P29844(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18400,49 +18235,44 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P3099_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_1 = Math_min__P131_mk(s); - r0 = s.caps[0].fields["options"]; - s.tmp_3 = r0; - r0 = pxsim_Array__length(s.tmp_3); + s.tmp_3 = music_volume__P19659_mk(s); + s.callLocIdx = 1096; s.pc = 1; return s.tmp_3; + case 1: + r0 = s.retval; 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 = 1032; s.pc = 2; return s.tmp_1; + 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_0.arg1 = r0; - s.callLocIdx = 1033; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat("VOLUME UP (", s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9987.info = {"start":5263,"length":111,"line":171,"column":54,"endLine":173,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P29844.info = {"start":10751,"length":37,"line":338,"column":52,"endLine":338,"endColumn":89,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P9987_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29844_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9987, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29844, 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, } } -function scene_systemMenu_PauseMenu_show_inline__P9999(s) { +function scene_systemMenu_buildOptionList_inline__P29859(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18452,35 +18282,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P3098_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1035; s.pc = 1; return s.tmp_0; + r0 = globals.brightness___19989; + 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_0 = scene_systemMenu_PauseMenu_drawText__P3100_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.callLocIdx = 1036; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = undefined; + s.tmp_1 = r0; + r0 = pxsim_String__concat("BRIGHTNESS DOWN (", s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_show_inline__P9999.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_buildOptionList_inline__P29859.info = {"start":10910,"length":48,"line":340,"column":62,"endLine":340,"endColumn":110,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_show_inline__P9999_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29859_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P9999, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29859, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, } } -function scene_systemMenu_PauseMenu_drawText__P3100(s) { +function scene_systemMenu_buildOptionList_inline__P29874(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18490,296 +18325,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; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C3095_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + r0 = globals.brightness___19989; 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; } + 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: - case 2: - s.tmp_3 = helpers_imageFillRect__P1956_mk(s); - s.tmp_3.arg0 = globals.screen___2032; - s.tmp_3.arg1 = 0; - s.tmp_3.arg2 = 0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - 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 = 1049; 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 = 1050; s.pc = 4; return s.tmp_3; - case 4: - r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P1989_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - 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 = 1051; s.pc = 7; return s.tmp_1; } - } - case 7: - 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 = 1052; s.pc = 8; return s.tmp_2; } - } - case 8: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1053; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P1956_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - 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 = 1054; 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___2032); - s.tmp_0.arg3 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___2032); - 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 = 1055; s.pc = 11; return s.tmp_6; } - } - case 11: - 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 = 1056; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = helpers_imageFillRect__P1956_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - 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 = 1057; 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 = 1058; s.pc = 14; return s.tmp_2; } - } - case 14: - r0 = s.retval; - s.tmp_0.arg2 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - 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 = 1059; 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 = 1060; 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 = 1061; 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 = 1062; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = helpers_imagePrintCenter__P1989_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - 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 = 1063; 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 = 1063; s.pc = 19; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1063; s.pc = 19; return s.tmp_1;; } - else { s.callLocIdx = 1063; 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 = 1064; 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 = 1065; s.pc = 21; return s.tmp_6; } - } - case 21: - r0 = s.retval; - s.tmp_0.arg4 = r0; - s.callLocIdx = 1066; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = pxsim_String__concat("BRIGHTNESS UP (", s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, ")"); return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_drawText__P3100.info = {"start":6927,"length":795,"line":224,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"drawText","argumentNames":["this"]} +scene_systemMenu_buildOptionList_inline__P29874.info = {"start":11038,"length":46,"line":341,"column":60,"endLine":341,"endColumn":106,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_drawText__P3100_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29874_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_drawText__P3100, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29874, 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, } } -function helpers_imagePrintCenter__P1989(s) { +function scene_systemMenu_buildOptionList_inline__P29889(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18789,92 +18368,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.w___10086 = undefined; - s.x___10092 = 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); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21006); if (!r0) { step = 1; continue; } - s.tmp_2 = image_getFontForText__P1977_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 94; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - s.arg4 = (r0); + r0 = "HIDE STATS"; + { step = 2; continue; } case 1: + r0 = "SHOW STATS"; 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 = 95; 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___10086 = (r0); - r0 = pxsim_ImageMethods.width(s.arg0); - s.tmp_1 = r0; - r0 = (s.tmp_1 - s.w___10086); + // jmp value (already in r0) s.tmp_0 = r0; - r0 = (s.tmp_0 / 2); - s.x___10092 = (r0); - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.x___10092; - 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 = 96; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = undefined; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -helpers_imagePrintCenter__P1989.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"]} +scene_systemMenu_buildOptionList_inline__P29889.info = {"start":11160,"length":46,"line":343,"column":48,"endLine":343,"endColumn":94,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function helpers_imagePrintCenter__P1989_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29889_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imagePrintCenter__P1989, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29889, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - w___10086: undefined, - x___10092: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function scene_systemMenu_PauseMenu_setSelection__P3099(s) { +function scene_systemMenu_buildOptionList_inline__P29898(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -18884,14 +18405,9 @@ 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, scene_systemMenu_PauseMenu__C3095_VT)) failedCast(r0); - r0 = s.arg0.fields["options"]; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___23281); + 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; @@ -18899,104 +18415,36 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 9; continue; } + r0 = "HIDE CONSOLE"; + { step = 2; continue; } case 1: + r0 = "SHOW CONSOLE"; 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__P3093_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 = 1046; 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__C2189_v0_1_mk(s); - s.tmp_4.arg0 = globals.A___2113; - if (!checkSubtype(s.tmp_4.arg0, controller_Button__C2189_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__P3093_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 = 1047; s.pc = 12; return s.tmp_6; - case 12: - r0 = s.retval; - case 7: - case 8: - s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P5200_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1048; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - case 9: - r0 = undefined; + s.tmp_4 = r0; + r0 = s.tmp_4; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_setSelection__P3099.info = {"start":6436,"length":481,"line":208,"column":8,"endLine":222,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setSelection","argumentNames":["this","selection"]} +scene_systemMenu_buildOptionList_inline__P29898.info = {"start":11273,"length":71,"line":344,"column":50,"endLine":344,"endColumn":121,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_PauseMenu_setSelection__P3099_mk(s) { +function scene_systemMenu_buildOptionList_inline__P29898_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P3099, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29898, 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__P5200(s) { +function scene_systemMenu_buildOptionList_inline__P29907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19006,141 +18454,168 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.row___10348 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C3095_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 = 1069; 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___10348 = (r0); - r0 = s.arg0.fields["scrollRow"]; + r0 = "SLEEP"; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_buildOptionList_inline__P29907.info = {"start":11411,"length":13,"line":345,"column":48,"endLine":345,"endColumn":61,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} + +function scene_systemMenu_buildOptionList_inline__P29907_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29907, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_systemMenu_buildOptionList_inline__P29920(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 = "CLOSE"; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_buildOptionList_inline__P29920.info = {"start":11590,"length":13,"line":351,"column":53,"endLine":351,"endColumn":66,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} + +function scene_systemMenu_buildOptionList_inline__P29920_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_buildOptionList_inline__P29920, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_systemMenu_setScreenBrightnessSupported__P23248(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 = 0; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_setScreenBrightnessSupported__P23248.info = {"start":10398,"length":95,"line":330,"column":4,"endLine":332,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setScreenBrightnessSupported","argumentNames":[]} + +function scene_systemMenu_setScreenBrightnessSupported__P23248_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_setScreenBrightnessSupported__P23248, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_systemMenu_sleep__P23247(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_pxtcore.deepSleep(); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_sleep__P23247.info = {"start":10072,"length":51,"line":316,"column":4,"endLine":318,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"sleep","argumentNames":[]} + +function scene_systemMenu_sleep__P23247_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_sleep__P23247, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, +} } + + + + + +function scene_systemMenu_toggleConsole__P23246(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___23281); + 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 = (s.row___10348 === s.tmp_1); + 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; + s.tmp_4 = game_consoleOverlay_setVisible__P21164_mk(s); + s.tmp_4.arg0 = false; + s.tmp_4.arg1 = undefined; + s.callLocIdx = 1088; s.pc = 3; return s.tmp_4; + case 3: + r0 = s.retval; { step = 2; continue; } case 1: - r0 = (s.row___10348 - 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) - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - { step = 7; continue; } - case 3: + s.tmp_0 = game_consoleOverlay_setVisible__P21164_mk(s); + s.tmp_0.arg0 = true; + s.tmp_0.arg1 = undefined; + s.callLocIdx = 1089; s.pc = 4; return s.tmp_0; case 4: - r0 = s.arg0.fields["scrollRow"]; - s.tmp_6 = r0; - r0 = (s.row___10348 > 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 = 1070; 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 = 1071; s.pc = 10; return s.tmp_7; } - } - case 10: + s.tmp_0 = console_log__P18418_mk(s); + s.tmp_0.arg0 = "console"; + s.callLocIdx = 1090; s.pc = 5; return s.tmp_0; + case 5: 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: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_updateScrollTarget__P5200.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} +scene_systemMenu_toggleConsole__P23246.info = {"start":9827,"length":239,"line":307,"column":4,"endLine":314,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleConsole","argumentNames":[]} -function scene_systemMenu_PauseMenu_updateScrollTarget__P5200_mk(s) { +function scene_systemMenu_toggleConsole__P23246_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P5200, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_toggleConsole__P23246, 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___10348: undefined, - arg0: undefined, } } -function scene_systemMenu_PauseMenu_onUpdate__P3098(s) { +function game_consoleOverlay_setVisible__P21164(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19150,160 +18625,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.t___10108 = undefined; - s.i___10112 = undefined; - s.dt___10141 = 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__C3095_VT)) failedCast(r0); - r0 = pxsim.control.millis(); - s.tmp_0 = r0; - r0 = (s.tmp_0 / 250); - s.t___10108 = (r0); - s.i___10112 = (0); - case 1: - s.tmp_1 = r0 = s.i___10112; - 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__P3091_mk(s); - r0 = s.arg0.fields["options"]; + s.tmp_1 = r0 = s.arg0; + r0 = pxsim_numops_toBoolDecr(globals.consoleStrings___23281); s.tmp_5 = r0; - r0 = pxsim_Array__getAt(s.tmp_5, s.i___10112); - s.tmp_4.arg0 = r0; - s.tmp_8 = r0 = s.t___10108; - s.tmp_11 = r0 = s.i___10112; - 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 = 1039; 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 = 1040; s.pc = 10; return s.tmp_4; - case 10: - r0 = s.retval; - r0 = (s.i___10112 + 1); - s.i___10112 = (r0); - { step = 1; continue; } - case 2: - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 1041; 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___10141 = (r0); - r0 = s.arg0.fields["scrollOffset"]; - s.tmp_1 = r0; - r0 = s.arg0.fields["scrollTarget"]; + 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); + 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___10141 * 100); + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 1; continue; } + r0 = pxsim_Array__mk(); + { step = 2; continue; } + case 1: + r0 = undefined; + case 2: + // jmp value (already in r0) 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; } + globals.consoleStrings___23281 = (s.tmp_6); 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); + case 4: + r0 = (s.arg1 !== undefined); 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___10141 * 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; } + if (!r0) { step = 5; continue; } + globals.consoleColor___23280 = (s.arg1); case 5: case 6: - s.tmp_2 = Math_abs__P128_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 = 1043; 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__P2789_mk(s); - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 1044; 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 = 1045; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_onUpdate__P3098.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} +game_consoleOverlay_setVisible__P21164.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 scene_systemMenu_PauseMenu_onUpdate__P3098_mk(s) { +function game_consoleOverlay_setVisible__P21164_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P3098, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_setVisible__P21164, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -19312,24 +18680,15 @@ function scene_systemMenu_PauseMenu_onUpdate__P3098_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, - tmp_12: undefined, - tmp_13: undefined, - t___10108: undefined, - i___10112: undefined, - dt___10141: undefined, arg0: undefined, + arg1: undefined, } } -function scene_systemMenu_MenuOption_setOffset__P3091(s) { +function console_log__P18418(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19341,56 +18700,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, scene_systemMenu_MenuOption__C3087_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P2404_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 = 982; s.pc = 1; return s.tmp_0; + s.tmp_0 = console_add__P18414_mk(s); + s.tmp_0.arg0 = 1; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 33; s.pc = 1; return s.tmp_0; case 1: - r0 = s.retval; - s.tmp_0 = Sprite_y__P2357_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P2356_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 983; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 984; s.pc = 2; return s.tmp_0; - case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setOffset__P3091.info = {"start":1411,"length":123,"line":61,"column":8,"endLine":64,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setOffset","argumentNames":["this","offset"]} +console_log__P18418.info = {"start":1450,"length":86,"line":58,"column":4,"endLine":60,"endColumn":5,"fileName":"pxt_modules/base/console.ts","functionName":"log","argumentNames":["value"]} -function scene_systemMenu_MenuOption_setOffset__P3091_mk(s) { +function console_log__P18418_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setOffset__P3091, depth: s.depth + 1, + parent: s, fn: console_log__P18418, 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 Sprite_top__P2404(s) { +function console_add__P18414(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19400,53 +18737,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___10225 = undefined; + s.text___29959 = undefined; + s.i___29968 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 359; s.pc = 1; return s.tmp_0; + r0 = (s.arg0 < globals.minPriority___18413); + 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_1 = console_inspect__P18420_mk(s); + s.tmp_1.arg0 = s.arg1; + s.tmp_1.arg1 = 20; + s.callLocIdx = 31; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___10225 = (r0); - s.tmp_0 = PhysicsEngine__C2511_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___10225; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = 0; - r0 = (s.arg1 * 256); + s.text___29959 = (r0); + if ((s.text___29959) && (s.text___29959).vtable) { + setupResume(s, 7); + pxsim_String__stringConv(s.text___29959); + checkResumeConsumed(); + return; + } else { s.retval = (s.text___29959) + ""; } + case 7: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_String__concat(s.tmp_0, "\n"); + s.text___29959 = (r0); + s.i___29968 = (0); + case 3: + s.tmp_1 = r0 = s.i___29968; + r0 = pxsim_Array__length(globals.listeners___22460); 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__C2511_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.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___22460, s.i___29968); + s.tmp_3.argL = r0; + s.tmp_3.arg0 = s.arg0; + s.tmp_3.arg1 = s.text___29959; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 32; s.pc = 8; return s.tmp_3; + case 8: r0 = s.retval; + r0 = (s.i___29968 + 1); + s.i___29968 = (r0); + { step = 3; continue; } + case 4: + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_top__P2404.info = {"start":11687,"length":256,"line":421,"column":4,"endLine":431,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"top","argumentNames":["this","value"]} +console_add__P18414.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 Sprite_top__P2404_mk(s) { +function console_add__P18414_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P2404, depth: s.depth + 1, + parent: s, fn: console_add__P18414, 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___10225: undefined, + text___29959: undefined, + i___29968: undefined, arg0: undefined, arg1: undefined, } } @@ -19455,7 +18817,7 @@ function Sprite_top__P2404_mk(s) { -function PhysicsEngine_moveSprite__P2515(s) { +function scene_systemMenu_toggleStats__P23245(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19465,37 +18827,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.arg1 = (s.lambdaArgs[1]); - s.arg2 = (s.lambdaArgs[2]); - s.arg3 = (s.lambdaArgs[3]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, PhysicsEngine__C2511_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21006); + s.tmp_0 = r0; + r0 = pxsim_Boolean__bang(s.tmp_0); + globals.stats___21006 = (r0); + r0 = pxsim_numops_toBoolDecr(globals.stats___21006); + 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 = globals.control_EventContext_onStats___18436; + 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___18436; + r0 = pxsim_String_.mkEmpty(); + s.tmp_3.arg0 = r0; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 1086; s.pc = 5; return s.tmp_3; + case 5: + r0 = s.retval; + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_moveSprite__P2515.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"]} +scene_systemMenu_toggleStats__P23245.info = {"start":9642,"length":179,"line":300,"column":4,"endLine":305,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"toggleStats","argumentNames":[]} -function PhysicsEngine_moveSprite__P2515_mk(s) { +function scene_systemMenu_toggleStats__P23245_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_moveSprite__P2515, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_toggleStats__P23245, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, } } -function Sprite_top__P2403(s) { +function scene_systemMenu_brightnessDown__P23243(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19505,35 +18887,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.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.tmp_0 = scene_systemMenu_setScreenBrightness__P23244_mk(s); + r0 = globals.brightness___19989; + s.tmp_1 = r0; + r0 = (s.tmp_1 - 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1082; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_top__P2403.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__P2403.isGetter = true; +scene_systemMenu_brightnessDown__P23243.info = {"start":9198,"length":87,"line":289,"column":4,"endLine":291,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessDown","argumentNames":[]} -function Sprite_top__P2403_mk(s) { +function scene_systemMenu_brightnessDown__P23243_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_top__P2403, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessDown__P23243, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, + tmp_1: undefined, } } -function Sprite_y__P2357(s) { +function scene_systemMenu_setScreenBrightness__P23244(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19545,52 +18926,41 @@ 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__C2341_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P2404_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_height__P2398_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 310; s.pc = 2; return s.tmp_4; - case 2: + s.tmp_0 = helpers_setScreenBrightness__P20003_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1083; s.pc = 1; return s.tmp_0; + case 1: 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 = settings_writeNumber__P20101_mk(s); + s.tmp_0.arg0 = "#brightness"; + r0 = globals.brightness___19989; s.tmp_0.arg1 = r0; - s.callLocIdx = 311; s.pc = 1; return s.tmp_0; - case 1: + s.callLocIdx = 1085; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_y__P2357.info = {"start":3081,"length":65,"line":126,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"y","argumentNames":["this","v"]} +scene_systemMenu_setScreenBrightness__P23244.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_y__P2357_mk(s) { +function scene_systemMenu_setScreenBrightness__P23244_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_y__P2357, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setScreenBrightness__P23244, 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 Sprite_height__P2398(s) { +function settings_writeNumber__P20101(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19602,33 +18972,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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_height"]; + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_1 = settings_writeBuffer__P20098_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = msgpack_packNumberArray__P18222_mk(s); + s.tmp_2.arg0 = s.tmp_0; + s.callLocIdx = 124; s.pc = 2; return s.tmp_2; + case 2: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.callLocIdx = 125; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_height__P2398.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__P2398.isGetter = true; +settings_writeNumber__P20101.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 Sprite_height__P2398_mk(s) { +function settings_writeNumber__P20101_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_height__P2398, depth: s.depth + 1, + parent: s, fn: settings_writeNumber__P20101, 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 Math_abs__P128(s) { +function settings_writeBuffer__P20098(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19640,40 +19023,38 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 < 0); + 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 = (0 - s.arg0); - { step = 2; continue; } + r0 = pxsim.settings._userClean(); + r0 = pxsim_pxtrt.panic(920); case 1: - r0 = s.arg0; case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + r0 = undefined; return leave(s, r0) default: oops() } } } -Math_abs__P128.info = {"start":16120,"length":77,"line":539,"column":4,"endLine":541,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"abs","argumentNames":["x"]} +settings_writeBuffer__P20098.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 Math_abs__P128_mk(s) { +function settings_writeBuffer__P20098_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_abs__P128, depth: s.depth + 1, + parent: s, fn: settings_writeBuffer__P20098, 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_setState__P3093(s) { +function msgpack_packNumberArray__P18222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19683,51 +19064,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.off___30195 = undefined; + s.n___30197 = undefined; + s.unnamed142___U2 = undefined; + s.unnamed143___U3 = undefined; + s.buf___30207 = undefined; + s.n___30213 = 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; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_systemMenu_MenuOption__C3087_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; } + s.off___30195 = (0); + s.n___30197 = (undefined); + s.unnamed142___U2 = (s.arg0); + s.unnamed143___U3 = (0); case 1: - case 2: - r0 = (s.arg0).fields["state"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P5199_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 986; s.pc = 4; return s.tmp_0; - case 4: + 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); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed142___U2, s.unnamed143___U3); + s.n___30197 = (r0); + s.tmp_2 = r0 = s.off___30195; + s.tmp_4 = msgpack_packNumberCore__P22419_mk(s); + s.tmp_4.arg0 = null; + s.tmp_4.arg1 = s.off___30195; + s.tmp_4.arg2 = s.n___30197; + s.callLocIdx = 21; 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___30195 = (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___30195); + s.buf___30207 = (r0); + s.off___30195 = (0); + s.n___30213 = (undefined); + s.unnamed144___U6 = (s.arg0); + s.unnamed145___U7 = (0); case 3: - r0 = undefined; + 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___30213 = (r0); + s.tmp_2 = r0 = s.off___30195; + s.tmp_4 = msgpack_packNumberCore__P22419_mk(s); + s.tmp_4.arg0 = s.buf___30207; + s.tmp_4.arg1 = s.off___30195; + s.tmp_4.arg2 = s.n___30213; + s.callLocIdx = 22; 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___30195 = (r0); + r0 = (s.unnamed145___U7 + 1); + s.unnamed145___U7 = (r0); + { step = 3; continue; } + case 4: + s.unnamed144___U6 = (undefined); + r0 = s.buf___30207; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setState__P3093.info = {"start":1655,"length":147,"line":71,"column":8,"endLine":75,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setState","argumentNames":["this","state"]} +msgpack_packNumberArray__P18222.info = {"start":3427,"length":330,"line":117,"column":4,"endLine":128,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"packNumberArray","argumentNames":["nums"]} -function scene_systemMenu_MenuOption_setState__P3093_mk(s) { +function msgpack_packNumberArray__P18222_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setState__P3093, depth: s.depth + 1, + parent: s, fn: msgpack_packNumberArray__P18222, 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___30195: undefined, + n___30197: undefined, + unnamed142___U2: undefined, + unnamed143___U3: undefined, + buf___30207: undefined, + n___30213: undefined, + unnamed144___U6: undefined, + unnamed145___U7: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_MenuOption_updateCard__P5199(s) { +function msgpack_packNumberCore__P22419(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19737,136 +19175,133 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.tag___30227 = undefined; + s.fmt___30270 = 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_MenuOption__C3087_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; + s.tag___30227 = (203); + s.tmp_1 = r0 = s.arg2; + r0 = (s.arg2 << 0); 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); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 7; 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: - r0 = s.arg0.fields["state"]; - s.tmp_3 = r0; - r0 = pxsim_pxtcore.switch_eq(2, s.tmp_3); + // 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 = 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; } + r0 = s.tmp_6; + { step = 4; continue; } case 3: - s.tmp_4 = Sprite_setImage__P2391_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 = 989; s.pc = 9; return s.tmp_5; } - } - case 9: - r0 = s.retval; - s.tmp_4.arg1 = r0; - s.callLocIdx = 990; s.pc = 8; return s.tmp_4; - case 8: - r0 = s.retval; - { step = 6; continue; } + r0 = (s.arg2 <= 127); case 4: - s.tmp_0 = Sprite_setImage__P2391_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 = 991; s.pc = 11; return s.tmp_1; } - } - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 992; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; - { step = 6; continue; } + // 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: - s.tmp_0 = Sprite_setImage__P2391_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 = 993; s.pc = 13; return s.tmp_1; } - } - case 13: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 994; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; case 6: - s.tmp_0 = Sprite_x__P2355_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P2354_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 995; s.pc = 15; return s.tmp_1; - case 15: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 996; s.pc = 14; return s.tmp_0; + 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___30227 = (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___30227 = (205); + { step = 10; continue; } + case 9: + s.tag___30227 = (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___30227 = (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___30227 = (209); + { step = 15; continue; } case 14: - r0 = s.retval; - s.tmp_0 = Sprite_y__P2357_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P2356_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 997; s.pc = 17; return s.tmp_1; + s.tag___30227 = (210); + case 15: + case 16: case 17: + case 18: + case 19: + case 20: + s.tmp_0 = msgpack_tagFormat__P22418_mk(s); + s.tmp_0.arg0 = s.tag___30227; + s.callLocIdx = 17; s.pc = 24; return s.tmp_0; + case 24: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 998; s.pc = 16; return s.tmp_0; - case 16: + s.fmt___30270 = (r0); + r0 = pxsim_numops_toBoolDecr(s.arg0); + if (!r0) { step = 21; continue; } + r0 = pxsim.BufferMethods.setByte(s.arg0, s.arg1, s.tag___30227); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.fmt___30270; + 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__P18213_mk(s); + s.tmp_1.arg0 = s.fmt___30270; + s.callLocIdx = 18; s.pc = 25; return s.tmp_1; + case 25: r0 = s.retval; - case 7: - r0 = undefined; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + case 23: return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_updateCard__P5199.info = {"start":2038,"length":497,"line":86,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateCard","argumentNames":["this"]} +msgpack_packNumberCore__P22419.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 scene_systemMenu_MenuOption_updateCard__P5199_mk(s) { +function msgpack_packNumberCore__P22419_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_updateCard__P5199, depth: s.depth + 1, + parent: s, fn: msgpack_packNumberCore__P22419, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -19874,14 +19309,20 @@ function scene_systemMenu_MenuOption_updateCard__P5199_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tag___30227: undefined, + fmt___30270: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function Sprite_x__P2355(s) { +function msgpack_tagFormat__P22418(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19893,52 +19334,70 @@ 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__C2341_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P2400_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_4 = Sprite_width__P2397_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 305; 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 = 306; s.pc = 1; return s.tmp_0; + 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 = s.retval; + 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() } } } -Sprite_x__P2355.info = {"start":2724,"length":65,"line":115,"column":4,"endLine":117,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"x","argumentNames":["this","v"]} +msgpack_tagFormat__P22418.info = {"start":1145,"length":481,"line":42,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"tagFormat","argumentNames":["tag"]} -function Sprite_x__P2355_mk(s) { +function msgpack_tagFormat__P22418_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_x__P2355, depth: s.depth + 1, + parent: s, fn: msgpack_tagFormat__P22418, 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 Sprite_left__P2400(s) { +function pins_sizeOf__P18213(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -19948,62 +19407,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.physics___11465 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 351; s.pc = 1; return s.tmp_0; + s.tmp_0 = Buffer_sizeOfNumberFormat__P18253_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 16; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = r0.fields["physicsEngine"]; - s.physics___11465 = (r0); - s.tmp_0 = PhysicsEngine__C2511_v2_4_mk(s); - s.tmp_0.arg0 = s.physics___11465; - 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__C2511_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() } } } -Sprite_left__P2400.info = {"start":10853,"length":257,"line":391,"column":4,"endLine":401,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"left","argumentNames":["this","value"]} +pins_sizeOf__P18213.info = {"start":42,"length":101,"line":2,"column":4,"endLine":4,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOf","argumentNames":["format"]} -function Sprite_left__P2400_mk(s) { +function pins_sizeOf__P18213_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P2400, depth: s.depth + 1, + parent: s, fn: pins_sizeOf__P18213, 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___11465: undefined, arg0: undefined, - arg1: undefined, } } -function Sprite_left__P2399(s) { +function Buffer_sizeOfNumberFormat__P18253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20017,21 +19448,77 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, 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: + return leave(s, r0) default: oops() } } } -Sprite_left__P2399.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__P2399.isGetter = true; +Buffer_sizeOfNumberFormat__P18253.info = {"start":14912,"length":856,"line":508,"column":4,"endLine":532,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"sizeOfNumberFormat","argumentNames":["format"]} -function Sprite_left__P2399_mk(s) { +function Buffer_sizeOfNumberFormat__P18253_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_left__P2399, depth: s.depth + 1, + parent: s, fn: Buffer_sizeOfNumberFormat__P18253, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -20041,7 +19528,7 @@ function Sprite_left__P2399_mk(s) { -function Sprite_width__P2397(s) { +function helpers_setScreenBrightness__P20003(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20053,33 +19540,41 @@ 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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_width"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.tmp_0 = Math_clamp__P18165_mk(s); + s.tmp_0.arg0 = 10; + s.tmp_0.arg1 = 100; + r0 = (s.arg1 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 87; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.arg1 = (r0); + globals.brightness___19989 = (s.arg1); + r0 = pxsim_pxtcore.setScreenBrightness(globals.brightness___19989); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_width__P2397.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__P2397.isGetter = true; +helpers_setScreenBrightness__P20003.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 Sprite_width__P2397_mk(s) { +function helpers_setScreenBrightness__P20003_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_width__P2397, depth: s.depth + 1, + parent: s, fn: helpers_setScreenBrightness__P20003, 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__P3092(s) { +function scene_systemMenu_brightnessUp__P23242(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20089,40 +19584,91 @@ 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, scene_systemMenu_MenuOption__C3087_VT)) failedCast(r0); - r0 = (s.arg0).fields["theme"] = (s.arg1); - s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P5199_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 985; s.pc = 1; return s.tmp_0; + s.tmp_0 = scene_systemMenu_setScreenBrightness__P23244_mk(s); + r0 = globals.brightness___19989; + s.tmp_1 = r0; + r0 = (s.tmp_1 + 5); + s.tmp_0.arg0 = r0; + s.callLocIdx = 1080; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_setTheme__P3092.info = {"start":1544,"length":101,"line":66,"column":8,"endLine":69,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setTheme","argumentNames":["this","theme"]} +scene_systemMenu_brightnessUp__P23242.info = {"start":9107,"length":85,"line":285,"column":4,"endLine":287,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"brightnessUp","argumentNames":[]} -function scene_systemMenu_MenuOption_setTheme__P3092_mk(s) { +function scene_systemMenu_brightnessUp__P23242_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_setTheme__P3092, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_brightnessUp__P23242, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, +} } + + + + + +function scene_systemMenu_volumeDown__P23241(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.v___30543 = undefined; + s.remainder___30546 = undefined; + s.newVolume___30549 = undefined; + s.tmp_0 = music_volume__P19659_mk(s); + s.callLocIdx = 1077; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.v___30543 = (r0); + r0 = (s.v___30543 % 32); + s.remainder___30546 = (r0); + r0 = pxsim_numops_toBoolDecr(s.remainder___30546); + if (!r0) { step = 1; continue; } + r0 = s.remainder___30546; + { step = 2; continue; } + case 1: + r0 = 32; + case 2: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = (s.v___30543 - s.tmp_0); + s.newVolume___30549 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P23239_mk(s); + s.tmp_0.arg0 = s.newVolume___30549; + s.callLocIdx = 1078; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_volumeDown__P23241.info = {"start":8914,"length":187,"line":278,"column":4,"endLine":283,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeDown","argumentNames":[]} + +function scene_systemMenu_volumeDown__P23241_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_volumeDown__P23241, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + v___30543: undefined, + remainder___30546: undefined, + newVolume___30549: undefined, } } -function scene_systemMenu_MenuOption_position__P3090(s) { +function scene_systemMenu_setVolume__P23239(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20134,76 +19680,45 @@ 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_systemMenu_MenuOption__C3087_VT)) failedCast(r0); - r0 = (s.arg0).fields["top"] = (s.arg2); - s.tmp_0 = Sprite_left__P2400_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 976; s.pc = 1; return s.tmp_0; + s.tmp_0 = music_setVolume__P19658_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1072; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = Sprite_top__P2404_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 977; s.pc = 2; return s.tmp_0; + s.tmp_0 = music_playTone__P19660_mk(s); + s.tmp_0.arg0 = 440; + s.tmp_0.arg1 = 500; + s.callLocIdx = 1073; s.pc = 2; return s.tmp_0; case 2: r0 = s.retval; - s.tmp_0 = Sprite_x__P2355_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_x__P2354_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 978; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 979; s.pc = 3; return s.tmp_0; + s.tmp_0 = settings_writeNumber__P20101_mk(s); + s.tmp_0.arg0 = "#volume"; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 1074; s.pc = 3; return s.tmp_0; case 3: - r0 = s.retval; - s.tmp_0 = Sprite_y__P2357_mk(s); - r0 = s.arg0.fields["icon"]; - s.tmp_0.arg0 = r0; - s.tmp_1 = Sprite_y__P2356_mk(s); - r0 = s.arg0.fields["card"]; - s.tmp_1.arg0 = r0; - s.callLocIdx = 980; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.callLocIdx = 981; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_position__P3090.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"]} +scene_systemMenu_setVolume__P23239.info = {"start":8565,"length":166,"line":265,"column":4,"endLine":269,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"setVolume","argumentNames":["newVolume"]} -function scene_systemMenu_MenuOption_position__P3090_mk(s) { +function scene_systemMenu_setVolume__P23239_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_position__P3090, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_setVolume__P23239, 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_MenuOption_show__P3089(s) { +function music_playTone__P19660(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20213,108 +19728,191 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.id___30384 = 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_MenuOption__C3087_VT)) failedCast(r0); - r0 = s.arg0.fields["theme"]; + r0 = pxsim_pxtrt.mklocRef(); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + 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; } - 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 = 971; s.pc = 3; return s.tmp_1; } - } - case 3: - r0 = s.retval; - { step = 2; 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__P22518_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 = 64; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + s.tmp_0 = pause__P18451_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.arg1); + s.tmp_0.arg0 = r0; + s.callLocIdx = 65; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + r0 = (globals.playToneID___22520 + 1); + s.tmp_0 = r0; + globals.playToneID___22520 = (r0); + s.id___30384 = (s.tmp_0); + r0 = pxsim_pxtcore_mkAction(3, music_playTone_inline__P30390); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.id___30384); + 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() +} } } +music_playTone__P19660.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 music_playTone__P19660_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_playTone__P19660, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + id___30384: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function music_playTone_inline__P30390(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.pos___30391 = undefined; + s.now___30401 = undefined; + s.d___30404 = undefined; + s.t___30408 = undefined; + r0 = pxsim.control.millis(); + s.pos___30391 = (r0); case 1: - r0 = globals.CARD_NORMAL___3111; + r0 = (s.caps[0] == globals.playToneID___22520); + 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; - s.tmp_3 = r0 = s.arg0; - s.tmp_5 = sprites_create__P2275_mk(s); - s.tmp_5.arg0 = s.tmp_2; - s.tmp_5.arg1 = undefined; - s.callLocIdx = 972; s.pc = 4; return s.tmp_5; - case 4: + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 6; continue; } + r0 = pxsim.control.millis(); + s.now___30401 = (r0); + r0 = (s.pos___30391 - s.now___30401); + s.d___30404 = (r0); + s.tmp_0 = Math_min__P18169_mk(s); + r0 = pxsim_pxtrt_ldlocRef(s.caps[1]); + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = 500; + s.callLocIdx = 66; s.pc = 7; return s.tmp_0; + case 7: 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.t___30408 = (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___30408); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stlocRef(s.tmp_0, s.tmp_1); + r0 = (s.pos___30391 + s.t___30408); + s.pos___30391 = (r0); + s.tmp_0 = music_playNoteCore__P22518_mk(s); + r0 = (s.d___30404 - 1); 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 = 973; s.pc = 5; return s.tmp_0; } - } - case 5: + s.tmp_0.arg1 = s.caps[2]; + s.tmp_0.arg2 = s.t___30408; + s.callLocIdx = 67; s.pc = 8; return s.tmp_0; + case 8: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = sprites_create__P2275_mk(s); - r0 = s.arg0.fields["iconImage"]; + 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__P18451_mk(s); + r0 = (s.d___30404 + s.t___30408); s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = undefined; - s.callLocIdx = 974; s.pc = 6; return s.tmp_2; - case 6: + s.callLocIdx = 68; s.pc = 9; return s.tmp_2; + case 9: r0 = s.retval; + { step = 5; continue; } + case 4: + s.tmp_0 = pause__P18451_mk(s); + r0 = (s.d___30404 + s.t___30408); 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"]; + r0 = (s.tmp_1 - 100); 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 = 975; s.pc = 7; return s.tmp_0; } - } - case 7: + s.callLocIdx = 69; s.pc = 10; return s.tmp_0; + case 10: r0 = s.retval; - r0 = (s.arg0).fields["state"] = (2); + case 5: + { step = 1; continue; } + case 6: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_MenuOption_show__P3089.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} +music_playTone_inline__P30390.info = {"start":2911,"length":515,"line":93,"column":34,"endLine":107,"endColumn":13,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":[]} -function scene_systemMenu_MenuOption_show__P3089_mk(s) { +function music_playTone_inline__P30390_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_MenuOption_show__P3089, depth: s.depth + 1, + parent: s, fn: music_playTone_inline__P30390, 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, + pos___30391: undefined, + now___30401: undefined, + d___30404: undefined, + t___30408: undefined, } } -function sprites_create__P2275(s) { +function music_playNoteCore__P22518(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20324,87 +19922,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___11545 = undefined; - s.sprite___11548 = undefined; + s.buf___30438 = 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 = game_currentScene__P2999_mk(s); - s.callLocIdx = 296; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.scene___11545 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(Sprite__C2341_VT); - s.tmp_0 = r0; - s.tmp_1 = Sprite_constructor__P2388_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 297; s.pc = 2; return s.tmp_1; + r0 = pxsim.control.createBuffer(12); + s.buf___30438 = (r0); + s.tmp_0 = music_addNote__P19674_mk(s); + s.tmp_0.arg0 = s.buf___30438; + 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__P19659_mk(s); + s.callLocIdx = 62; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.sprite___11548 = (s.tmp_0); - s.tmp_0 = Sprite_setKind__P2408_mk(s); - s.tmp_0.arg0 = s.sprite___11548; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 298; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = PhysicsEngine__C2511_v0_2_mk(s); - r0 = s.scene___11545.fields["physicsEngine"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.sprite___11548; - if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C2511_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__P11563); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtcore_mkAction(1, sprites_create_inline__P11569); - s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.sprite___11548); - s.tmp_2 = helpers_arrayForEach__P109_mk(s); - s.tmp_3 = helpers_arrayFilter__P110_mk(s); - r0 = s.scene___11545.fields["createdHandlers"]; - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 299; 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 = 301; s.pc = 5; return s.tmp_2; - case 5: + s.tmp_0.arg7 = r0; + s.tmp_0.arg8 = s.arg1; + s.callLocIdx = 63; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = s.sprite___11548; + r0 = pxsim.music.queuePlayInstructions(s.arg0, s.buf___30438); + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_create__P2275.info = {"start":890,"length":400,"line":35,"column":4,"endLine":47,"endColumn":5,"fileName":"pxt_modules/game/sprites.ts","functionName":"create","argumentNames":["img","kind"]} +music_playNoteCore__P22518.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 sprites_create__P2275_mk(s) { +function music_playNoteCore__P22518_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create__P2275, depth: s.depth + 1, + parent: s, fn: music_playNoteCore__P22518, 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___11545: undefined, - sprite___11548: undefined, + buf___30438: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function forEach_inline__P11563(s) { +function music_addNote__P19674(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20416,30 +19984,89 @@ 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.fields["kind"]; + r0 = (s.arg2 > 0); s.tmp_0 = r0; - r0 = (s.tmp_0 == s.caps[0]); + 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); + 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() } } } -forEach_inline__P11563.info = {"start":1195,"length":19,"line":43,"column":20,"endLine":43,"endColumn":39,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +music_addNote__P19674.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 forEach_inline__P11563_mk(s) { +function music_addNote__P19674_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P11563, depth: s.depth + 1, + parent: s, fn: music_addNote__P19674, 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, + arg8: undefined, } } -function sprites_create_inline__P11569(s) { +function music_setVolume__P19658(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20453,32 +20080,40 @@ switch (step) { 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 = 300; 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 = 300; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 300; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 300; s.pc = 1; return s.tmp_0; } - } - case 1: + s.tmp_0 = Math_clamp__P18165_mk(s); + s.tmp_0.arg0 = 0; + s.tmp_0.arg1 = 255; + r0 = (s.arg0 | 0); + s.tmp_0.arg2 = r0; + s.callLocIdx = 59; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; + globals.globalVolume___22513 = (r0); + r0 = (globals.globalVolume___22513 > 0); + s.tmp_0 = 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() } } } -sprites_create_inline__P11569.info = {"start":1237,"length":22,"line":44,"column":21,"endLine":44,"endColumn":43,"fileName":"pxt_modules/game/sprites.ts","functionName":"inline","argumentNames":["h"]} +music_setVolume__P19658.info = {"start":1533,"length":153,"line":51,"column":4,"endLine":54,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"setVolume","argumentNames":["volume"]} -function sprites_create_inline__P11569_mk(s) { +function music_setVolume__P19658_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_create_inline__P11569, depth: s.depth + 1, + parent: s, fn: music_setVolume__P19658, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -20486,7 +20121,7 @@ function sprites_create_inline__P11569_mk(s) { -function PhysicsEngine_addSprite__P2513(s) { +function music_enableAmp__P22516(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20498,31 +20133,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, PhysicsEngine__C2511_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -PhysicsEngine_addSprite__P2513.info = {"start":124,"length":29,"line":8,"column":4,"endLine":8,"endColumn":33,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +music_enableAmp__P22516.info = {"start":944,"length":64,"line":29,"column":4,"endLine":31,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"enableAmp","argumentNames":["en"]} -function PhysicsEngine_addSprite__P2513_mk(s) { +function music_enableAmp__P22516_mk(s) { checkStack(s.depth); return { - parent: s, fn: PhysicsEngine_addSprite__P2513, depth: s.depth + 1, + parent: s, fn: music_enableAmp__P22516, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, - arg1: undefined, } } -function Sprite_setKind__P2408(s) { +function scene_systemMenu_volumeUp__P23240(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20532,153 +20163,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.spritesByKind___11587 = undefined; - s.overlapMap___11616 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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; } + s.v___30352 = undefined; + s.remainder___30355 = undefined; + s.newVolume___30358 = undefined; + s.tmp_0 = music_volume__P19659_mk(s); + s.callLocIdx = 1075; s.pc = 1; return s.tmp_0; 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__P2999_mk(s); - s.callLocIdx = 366; s.pc = 16; return s.tmp_3; - case 16: r0 = s.retval; - r0 = r0.fields["spritesByKind"]; - s.spritesByKind___11587 = (r0); - r0 = s.arg0.fields["_kind"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 >= 0); + s.v___30352 = (r0); + r0 = (s.v___30352 % 32); + s.remainder___30355 = (r0); + r0 = (s.v___30352 + 32); 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___11587, 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__P2470_mk(s); - r0 = s.arg0.fields["_kind"]; - s.tmp_5 = r0; - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___11587, s.tmp_5); - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.arg0; - s.callLocIdx = 367; s.pc = 17; return s.tmp_4; - case 17: + r0 = (s.tmp_0 - s.remainder___30355); + s.newVolume___30358 = (r0); + s.tmp_0 = scene_systemMenu_setVolume__P23239_mk(s); + s.tmp_0.arg0 = s.newVolume___30358; + s.callLocIdx = 1076; s.pc = 2; return s.tmp_0; + case 2: 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___11587, s.arg1); - s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +scene_systemMenu_volumeUp__P23240.info = {"start":8737,"length":171,"line":271,"column":4,"endLine":276,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"volumeUp","argumentNames":[]} + +function scene_systemMenu_volumeUp__P23240_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_systemMenu_volumeUp__P23240, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + v___30352: undefined, + remainder___30355: undefined, + newVolume___30358: undefined, +} } + + + + + +function game_consoleOverlay_isVisible__P21162(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___23281); 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__C2463_VT); - s.tmp_4 = r0; - s.tmp_5 = sprites_SpriteSet_constructor__P2465_mk(s); - s.tmp_5.arg0 = s.tmp_4; - s.callLocIdx = 368; s.pc = 18; return s.tmp_5; - case 18: - r0 = s.retval; - r0 = pxsim_pxtrt.mapSetGeneric(s.spritesByKind___11587, s.arg1, s.tmp_4); - case 9: - case 10: - s.tmp_0 = sprites_SpriteSet_add__P2468_mk(s); - r0 = pxsim_pxtrt.mapGetGeneric(s.spritesByKind___11587, s.arg1); - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 369; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - case 11: - case 12: - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 370; s.pc = 20; return s.tmp_0; - case 20: - r0 = s.retval; - r0 = r0.fields["overlapMap"]; - s.overlapMap___11616 = (r0); - r0 = pxsim_pxtrt.mapGetGeneric(s.overlapMap___11616, 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___11616; - 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___11616, 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; + r0 = pxsim_Boolean__bang(s.tmp_0); return leave(s, r0) default: oops() } } } -Sprite_setKind__P2408.info = {"start":12841,"length":663,"line":464,"column":4,"endLine":484,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"setKind","argumentNames":["this","value"]} +game_consoleOverlay_isVisible__P21162.info = {"start":422,"length":68,"line":11,"column":4,"endLine":13,"endColumn":5,"fileName":"pxt_modules/game/console.ts","functionName":"isVisible","argumentNames":[]} -function Sprite_setKind__P2408_mk(s) { +function game_consoleOverlay_isVisible__P21162_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_setKind__P2408, depth: s.depth + 1, + parent: s, fn: game_consoleOverlay_isVisible__P21162, 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___11587: undefined, - overlapMap___11616: undefined, - arg0: undefined, - arg1: undefined, } } -function sprites_SpriteSet_add__P2468(s) { +function scene_systemMenu_closeMenu__P21140(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20688,65 +20249,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.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C2463_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); + r0 = pxsim_numops_toBoolDecr(globals.instance___23235); if (!r0) { step = 1; continue; } - r0 = false; - { step = 5; continue; } - 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; } + s.tmp_0 = scene_systemMenu_PauseMenu_dispose__P21139_mk(s); + s.tmp_0.arg0 = globals.instance___23235; + s.callLocIdx = 1091; s.pc = 3; return s.tmp_0; case 3: + r0 = s.retval; + globals.instance___23235 = (undefined); + s.tmp_0 = controller__setUserEventsEnabled__P20244_mk(s); + s.tmp_0.arg0 = true; + s.callLocIdx = 1092; s.pc = 4; return s.tmp_0; case 4: - r0 = s.arg0.fields["_sprites"]; - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_5, s.arg1); - r0 = true; + r0 = s.retval; + s.tmp_0 = game_popScene__P21042_mk(s); + s.callLocIdx = 1093; s.pc = 5; return s.tmp_0; case 5: + r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_add__P2468.info = {"start":1041,"length":263,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"add","argumentNames":["this","sprite"]} +scene_systemMenu_closeMenu__P21140.info = {"start":10129,"length":216,"line":320,"column":4,"endLine":327,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"closeMenu","argumentNames":[]} -function sprites_SpriteSet_add__P2468_mk(s) { +function scene_systemMenu_closeMenu__P21140_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_add__P2468, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_closeMenu__P21140, 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__P2471(s) { +function scene_systemMenu_PauseMenu_dispose__P21139(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20758,37 +20298,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, sprites_SpriteSet__C2463_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_1 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_1, s.arg1, undefined); + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_VT)) failedCast(r0); + r0 = s.arg0.fields["options"]; s.tmp_0 = r0; - r0 = (s.tmp_0 > -1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = scene_systemMenu_PauseMenu_dispose_inline__P28673; + s.callLocIdx = 1068; 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() } } } -sprites_SpriteSet_contains__P2471.info = {"start":2172,"length":100,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"contains","argumentNames":["this","sprite"]} +scene_systemMenu_PauseMenu_dispose__P21139.info = {"start":7732,"length":165,"line":243,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function sprites_SpriteSet_contains__P2471_mk(s) { +function scene_systemMenu_PauseMenu_dispose__P21139_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_contains__P2471, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose__P21139, 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 sprites_SpriteSet_constructor__P2465(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P28673(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20802,25 +20350,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C2463_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); + s.tmp_0 = scene_systemMenu_MenuOption_dispose__P21132_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1067; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteSet_constructor__P2465.info = {"start":485,"length":57,"line":19,"column":8,"endLine":21,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"inline","argumentNames":["this"]} +scene_systemMenu_PauseMenu_dispose_inline__P28673.info = {"start":7813,"length":16,"line":245,"column":37,"endLine":245,"endColumn":53,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":["o"]} -function sprites_SpriteSet_constructor__P2465_mk(s) { +function scene_systemMenu_PauseMenu_dispose_inline__P28673_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_constructor__P2465, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_dispose_inline__P28673, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -20828,7 +20374,7 @@ function sprites_SpriteSet_constructor__P2465_mk(s) { -function Sprite_constructor__P2388(s) { +function scene_systemMenu_MenuOption_dispose__P21132(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20840,139 +20386,55 @@ 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__C2341_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P2096_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 328; s.pc = 1; return s.tmp_0; - case 1: + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_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__P20466_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = undefined; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 987; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - 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___2032); - 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 = (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__P2359_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 331; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - s.tmp_0 = Sprite_vy__P2361_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 332; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.tmp_0 = Sprite_ax__P2363_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 333; s.pc = 4; return s.tmp_0; + s.tmp_0 = Sprite_destroy__P20466_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 988; s.pc = 4; return s.tmp_0; case 4: r0 = s.retval; - s.tmp_0 = Sprite_ay__P2365_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 334; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = Sprite_fx__P2367_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 335; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = Sprite_fy__P2369_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 336; 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__P2391_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 337; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - s.tmp_0 = Sprite_setKind__P2408_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = -1; - s.callLocIdx = 338; 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 = (s.arg0).fields["card"] = (undefined); + r0 = (s.arg0).fields["icon"] = (undefined); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_constructor__P2388.info = {"start":7406,"length":678,"line":278,"column":4,"endLine":300,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["this","img"]} +scene_systemMenu_MenuOption_dispose__P21132.info = {"start":1812,"length":216,"line":77,"column":8,"endLine":84,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"dispose","argumentNames":["this"]} -function Sprite_constructor__P2388_mk(s) { +function scene_systemMenu_MenuOption_dispose__P21132_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_constructor__P2388, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_dispose__P21132, 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 Sprite_fy__P2369(s) { +function Sprite_destroy__P20466(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -20985,33 +20447,55 @@ 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__C2341_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P130_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 324; s.pc = 1; return s.tmp_3; + if (!checkSubtype(r0, Sprite__C20379_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; } + { step = 5; continue; } case 1: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); + case 2: + s.tmp_2 = r0 = s.arg0; + r0 = s.tmp_2.fields["flags"]; s.tmp_4 = r0; - r0 = (s.tmp_4 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_fy"] = (s.tmp_1); + r0 = (s.tmp_4 | 2); + s.tmp_3 = r0; + 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__P21303_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 = 431; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + { step = 4; continue; } + case 3: + s.tmp_0 = Sprite__destroyCore__P20467_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 432; 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_fy__P2369.info = {"start":5109,"length":64,"line":191,"column":4,"endLine":193,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fy","argumentNames":["this","v"]} +Sprite_destroy__P20466.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 Sprite_fy__P2369_mk(s) { +function Sprite_destroy__P20466_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P2369, depth: s.depth + 1, + parent: s, fn: Sprite_destroy__P20466, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -21020,13 +20504,14 @@ function Sprite_fy__P2369_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function Sprite_fy__P2368(s) { +function effects_ParticleEffect_destroy__P21303(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21038,33 +20523,86 @@ 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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_fy"]; + if (!checkSubtype(r0, effects_ParticleEffect__C21300_VT)) failedCast(r0); + s.tmp_0 = Sprite_setFlag__P20457_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = 7168; + s.tmp_0.arg2 = true; + s.callLocIdx = 1252; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = effects_ParticleEffect_start__P21302_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 = 1253; 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; } + case 1: + r0 = s.arg0.fields["defaultLifespan"]; s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, 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__P21330_mk(s); + s.tmp_0.arg0 = globals.dissolve___21333; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1254; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_fy__P2368.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__P2368.isGetter = true; +effects_ParticleEffect_destroy__P21303.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 Sprite_fy__P2368_mk(s) { +function effects_ParticleEffect_destroy__P21303_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fy__P2368, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_destroy__P21303, 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 Sprite_fx__P2367(s) { +function dissolve_inline__P28818(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21074,42 +20612,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.i___28821 = undefined; + s.x___28832 = undefined; + s.y___28838 = undefined; + s.w___28844 = undefined; + s.h___28848 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_3 = Math_max__P130_mk(s); - s.tmp_3.arg0 = 0; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 321; s.pc = 1; return s.tmp_3; + 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___28821 = (r0); case 1: + r0 = (s.i___28821 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P21101_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; - 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["_fx"] = (s.tmp_1); + s.x___28832 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P21101_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___28838 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P21101_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___28844 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P21101_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___28848 = (r0); + s.tmp_0 = helpers_imageDrawRect__P19997_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.x___28832; + s.tmp_0.arg2 = s.y___28838; + s.tmp_0.arg3 = s.w___28844; + s.tmp_0.arg4 = s.h___28848; + s.tmp_0.arg5 = 0; + s.callLocIdx = 56; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + r0 = (s.i___28821 - 1); + s.i___28821 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_fx__P2367.info = {"start":4766,"length":64,"line":181,"column":4,"endLine":183,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"fx","argumentNames":["this","v"]} +dissolve_inline__P28818.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 Sprite_fx__P2367_mk(s) { +function dissolve_inline__P28818_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P2367, depth: s.depth + 1, + parent: s, fn: dissolve_inline__P28818, 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___28821: undefined, + x___28832: undefined, + y___28838: undefined, + w___28844: undefined, + h___28848: undefined, arg0: undefined, arg1: undefined, } } @@ -21118,7 +20710,7 @@ function Sprite_fx__P2367_mk(s) { -function Sprite_fx__P2366(s) { +function helpers_imageDrawRect__P19997(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21130,33 +20722,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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_fx"]; + r0 = (s.arg3 == 0); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - 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__P19996_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 = 83; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P19996_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 = 84; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P19996_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 = 85; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + s.tmp_0 = helpers_imageDrawLine__P19996_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 = 86; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + case 5: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_fx__P2366.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__P2366.isGetter = true; +helpers_imageDrawRect__P19997.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 Sprite_fx__P2366_mk(s) { +function helpers_imageDrawRect__P19997_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_fx__P2366, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawRect__P19997, 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 Sprite_ay__P2365(s) { +function helpers_imageDrawLine__P19996(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21169,39 +20836,57 @@ 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, Sprite__C2341_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + s.tmp_2 = helpers_pack__P22619_mk(s); + s.tmp_2.arg0 = s.arg1; + s.tmp_2.arg1 = s.arg2; + s.callLocIdx = 81; s.pc = 1; return s.tmp_2; + case 1: + r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_ay"] = (s.tmp_1); + s.tmp_4 = helpers_pack__P22619_mk(s); + s.tmp_4.arg0 = s.arg3; + s.tmp_4.arg1 = s.arg4; + s.callLocIdx = 82; s.pc = 2; return s.tmp_4; + case 2: + r0 = s.retval; + 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() } } } -Sprite_ay__P2365.info = {"start":4435,"length":51,"line":170,"column":4,"endLine":172,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ay","argumentNames":["this","v"]} +helpers_imageDrawLine__P19996.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 Sprite_ay__P2365_mk(s) { +function helpers_imageDrawLine__P19996_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P2365, depth: s.depth + 1, + parent: s, fn: helpers_imageDrawLine__P19996, 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 Sprite_ay__P2364(s) { +function Math_FastRandom_randomRange__P21101(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21213,33 +20898,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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_ay"]; + if (!checkSubtype(r0, Math_FastRandom__C21097_VT)) failedCast(r0); + r0 = (s.arg2 > s.arg1); 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; } + s.tmp_2 = Math_FastRandom_next__P21100_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 969; 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() } } } -Sprite_ay__P2364.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__P2364.isGetter = true; +Math_FastRandom_randomRange__P21101.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 Sprite_ay__P2364_mk(s) { +function Math_FastRandom_randomRange__P21101_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ay__P2364, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_randomRange__P21101, 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 Sprite_ax__P2363(s) { +function Math_FastRandom_next__P21100(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21251,40 +20963,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, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Math_FastRandom__C21097_VT)) failedCast(r0); s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + r0 = s.arg0.fields["lfsr"]; + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 1); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + 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["_ax"] = (s.tmp_1); - r0 = undefined; + r0 = (s.tmp_0).fields["lfsr"] = (s.tmp_1); + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -Sprite_ax__P2363.info = {"start":4096,"length":51,"line":159,"column":4,"endLine":161,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"ax","argumentNames":["this","v"]} +Math_FastRandom_next__P21100.info = {"start":1713,"length":107,"line":53,"column":8,"endLine":55,"endColumn":9,"fileName":"pxt_modules/game/mathUtil.ts","functionName":"next","argumentNames":["this"]} -function Sprite_ax__P2363_mk(s) { +function Math_FastRandom_next__P21100_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P2363, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_next__P21100, 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 Sprite_ax__P2362(s) { +function effects_ImageEffect_constructor__P21329(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21296,33 +21021,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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_ax"]; + if (!checkSubtype(r0, effects_ImageEffect__C21328_VT)) failedCast(r0); + r0 = (s.arg0).fields["effect"] = (s.arg2); + r0 = pxsim_pxtcore_mkClassInstance(Math_FastRandom__C21097_VT); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + s.tmp_1 = Math_FastRandom_constructor__P21099_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1262; s.pc = 1; return s.tmp_1; + 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); + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_ax__P2362.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__P2362.isGetter = true; +effects_ImageEffect_constructor__P21329.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 Sprite_ax__P2362_mk(s) { +function effects_ImageEffect_constructor__P21329_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_ax__P2362, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_constructor__P21329, 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 Sprite_vy__P2361(s) { +function effects_ImageEffect_applyTo__P21330(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21332,33 +21071,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.clonedImage___28997 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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__C21328_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vy"] = (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___28997 = (r0); + s.tmp_0 = effects_ImageEffect_change__P21331_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.clonedImage___28997; + s.callLocIdx = 1265; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = Sprite_setImage__P20429_mk(s); + s.tmp_0.arg0 = s.arg1; + s.tmp_0.arg1 = s.clonedImage___28997; + s.callLocIdx = 1266; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_vy__P2361.info = {"start":3757,"length":51,"line":148,"column":4,"endLine":150,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"vy","argumentNames":["this","v"]} +effects_ImageEffect_applyTo__P21330.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 Sprite_vy__P2361_mk(s) { +function effects_ImageEffect_applyTo__P21330_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P2361, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_applyTo__P21330, 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___28997: undefined, arg0: undefined, arg1: undefined, } } @@ -21367,7 +21144,7 @@ function Sprite_vy__P2361_mk(s) { -function Sprite_vy__P2360(s) { +function effects_ImageEffect_change__P21331(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21379,33 +21156,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, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, effects_ImageEffect__C21328_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 = 1267; 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 = 1267; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 1267; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 1267; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_vy__P2360.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__P2360.isGetter = true; +effects_ImageEffect_change__P21331.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 Sprite_vy__P2360_mk(s) { +function effects_ImageEffect_change__P21331_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vy__P2360, depth: s.depth + 1, + parent: s, fn: effects_ImageEffect_change__P21331, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_vx__P2359(s) { +function effects_ParticleEffect_start__P21302(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21415,80 +21207,112 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.src___29380 = 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, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = (s.arg1 * 256); + if (!checkSubtype(r0, effects_ParticleEffect__C21300_VT)) failedCast(r0); + r0 = s.arg0.fields["sourceFactory"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -Sprite_vx__P2359.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 Sprite_vx__P2359_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_vx__P2359, 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_vx__P2358(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_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 = 1250; 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 = 1250; s.pc = 10; return s.tmp_4; } + else if (s.tmp_4.fn.isGetter) { s.tmp_4.stage2Call = true; s.callLocIdx = 1250; s.pc = 10; return s.tmp_4;; } + else { s.callLocIdx = 1250; s.pc = 10; return s.tmp_4; } } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_vx"]; + case 10: + r0 = s.retval; + s.src___29380 = (r0); + s.tmp_0 = particles_ParticleSource_setRelativeToCamera__P21200_mk(s); + s.tmp_0.arg0 = s.src___29380; + 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 = 1251; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.arg2); + if (!r0) { step = 7; continue; } + r0 = (s.arg2 > 0); s.tmp_0 = r0; - r0 = (s.tmp_0 / 256); - return leaveAccessor(s, 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___29380).fields["lifespan"] = (s.tmp_1); + case 7: + case 8: + case 9: + r0 = undefined; + return leave(s, r0) default: oops() } } } -Sprite_vx__P2358.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__P2358.isGetter = true; +effects_ParticleEffect_start__P21302.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 Sprite_vx__P2358_mk(s) { +function effects_ParticleEffect_start__P21302_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_vx__P2358, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_start__P21302, 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___29380: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function sprites_BaseSprite_constructor__P2096(s) { +function particles_ParticleSource_setRelativeToCamera__P21200(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21504,36 +21328,44 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C2094_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_z__P2099_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 129; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_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; } case 1: - r0 = s.retval; - s.tmp_0 = scene_Scene_addSprite__P2870_mk(s); - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 130; 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 = 131; s.pc = 2; return s.tmp_0; + 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_0).fields["pFlags"] = (s.tmp_1); case 2: - r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite_constructor__P2096.info = {"start":344,"length":170,"line":15,"column":8,"endLine":20,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"inline","argumentNames":["this","z"]} +particles_ParticleSource_setRelativeToCamera__P21200.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 sprites_BaseSprite_constructor__P2096_mk(s) { +function particles_ParticleSource_setRelativeToCamera__P21200_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_constructor__P2096, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRelativeToCamera__P21200, 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, } } @@ -21542,7 +21374,7 @@ function sprites_BaseSprite_constructor__P2096_mk(s) { -function scene_Scene_addSprite__P2870(s) { +function Sprite_setFlag__P20457(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21555,56 +21387,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, scene_Scene__C2843_VT)) failedCast(r0); - r0 = s.arg0.fields["allSprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); + if (!checkSubtype(r0, Sprite__C20379_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["spriteNextId"]; + r0 = s.tmp_0.fields["flags"]; s.tmp_2 = r0; - r0 = (s.tmp_2 + 1); + r0 = (s.tmp_2 | 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 = 929; s.pc = 1; return s.tmp_3; } - } + 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() } } } -scene_Scene_addSprite__P2870.info = {"start":7218,"length":128,"line":200,"column":8,"endLine":203,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +Sprite_setFlag__P20457.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 scene_Scene_addSprite__P2870_mk(s) { +function Sprite_setFlag__P20457_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_addSprite__P2870, depth: s.depth + 1, + parent: s, fn: Sprite_setFlag__P20457, 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 sprites_BaseSprite_z__P2099(s) { +function Sprite__destroyCore__P20467(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21614,56 +21448,134 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scene___28723 = 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__C2094_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; + if (!checkSubtype(r0, Sprite__C20379_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_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__P2999_mk(s); - s.callLocIdx = 132; s.pc = 3; return s.tmp_1; - case 3: + r0 = (s.tmp_0).fields["flags"] = (s.tmp_1); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 433; s.pc = 7; return s.tmp_0; + case 7: r0 = s.retval; + s.scene___28723 = (r0); + r0 = s.scene___28723.fields["allSprites"]; s.tmp_0 = r0; - r0 = s.tmp_0.fields["flags"]; - s.tmp_3 = r0; - r0 = (s.tmp_3 | 1); - s.tmp_2 = r0; - r0 = (s.tmp_0).fields["flags"] = (s.tmp_2); + 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; } case 1: + r0 = s.scene___28723.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__P20508_mk(s); + r0 = s.scene___28723.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 = 437; s.pc = 8; return s.tmp_5; + case 8: + r0 = s.retval; + case 3: + case 4: + s.tmp_0 = PhysicsEngine__C20549_v1_2_mk(s); + r0 = s.scene___28723.fields["physicsEngine"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg0; + if (!checkSubtype(s.tmp_0.arg0, PhysicsEngine__C20549_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 = 438; 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 = 438; s.pc = 10; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 438; s.pc = 10; return s.tmp_1;; } + else { s.callLocIdx = 438; s.pc = 10; return s.tmp_1; } + } + case 10: + r0 = s.retval; + case 5: + case 6: + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P28752); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite__destroyCore_inline__P28759); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P18147_mk(s); + s.tmp_3 = helpers_arrayFilter__P18148_mk(s); + r0 = s.scene___28723.fields["destroyedHandlers"]; + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 440; 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 = 442; s.pc = 11; return s.tmp_2; + case 11: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSprite_z__P2099.info = {"start":656,"length":174,"line":30,"column":8,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"z","argumentNames":["this","v"]} +Sprite__destroyCore__P20467.info = {"start":26792,"length":522,"line":870,"column":4,"endLine":882,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"_destroyCore","argumentNames":["this"]} -function sprites_BaseSprite_z__P2099_mk(s) { +function Sprite__destroyCore__P20467_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P2099, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore__P20467, 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___28723: undefined, arg0: undefined, - arg1: undefined, } } -function sprites_BaseSprite_z__P2098(s) { +function forEach_inline__P28752(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21677,20 +21589,23 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C2094_VT)) failedCast(r0); - r0 = s.arg0.fields["_z"]; - return leaveAccessor(s, r0) + 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() } } } -sprites_BaseSprite_z__P2098.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__P2098.isGetter = true; +forEach_inline__P28752.info = {"start":27237,"length":26,"line":880,"column":20,"endLine":880,"endColumn":46,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} -function sprites_BaseSprite_z__P2098_mk(s) { +function forEach_inline__P28752_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite_z__P2098, depth: s.depth + 1, + parent: s, fn: forEach_inline__P28752, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -21698,7 +21613,7 @@ function sprites_BaseSprite_z__P2098_mk(s) { -function game_onShade__P3017(s) { +function Sprite__destroyCore_inline__P28759(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21712,42 +21627,32 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_init__P4952_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 960; 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; } + 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 = 441; 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 = 441; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 441; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 441; s.pc = 1; return s.tmp_0; } + } case 1: - case 2: - s.tmp_2 = scene_createRenderable__P2805_mk(s); - s.tmp_2.arg0 = 80; - s.tmp_2.arg1 = s.arg0; - s.tmp_2.arg2 = undefined; - s.callLocIdx = 961; s.pc = 5; return s.tmp_2; - case 5: r0 = s.retval; - case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -game_onShade__P3017.info = {"start":15517,"length":145,"line":464,"column":4,"endLine":468,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} +Sprite__destroyCore_inline__P28759.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_onShade__P3017_mk(s) { +function Sprite__destroyCore_inline__P28759_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onShade__P3017, depth: s.depth + 1, + parent: s, fn: Sprite__destroyCore_inline__P28759, 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, } } @@ -21755,7 +21660,7 @@ function game_onShade__P3017_mk(s) { -function scene_createRenderable__P2805(s) { +function PhysicsEngine_removeSprite__P20552(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21765,60 +21670,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.renderable___10263 = 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__C2800_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__P10269; - case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - s.tmp_3 = scene_Renderable_constructor__P2801_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 = 903; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; - s.renderable___10263 = (s.tmp_0); - r0 = s.renderable___10263; + r0 = s.arg0; + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -scene_createRenderable__P2805.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"]} +PhysicsEngine_removeSprite__P20552.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 scene_createRenderable__P2805_mk(s) { +function PhysicsEngine_removeSprite__P20552_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_createRenderable__P2805, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_removeSprite__P20552, 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___10263: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function renderable_inline__P10269(s) { +function Sprite_kind__P20445(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21828,24 +21706,31 @@ 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.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_kind"]; return leave(s, r0) default: oops() } } } -renderable_inline__P10269.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} +Sprite_kind__P20445.info = {"start":12573,"length":41,"line":453,"column":4,"endLine":455,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"kind","argumentNames":["this"]} -function renderable_inline__P10269_mk(s) { +function Sprite_kind__P20445_mk(s) { checkStack(s.depth); return { - parent: s, fn: renderable_inline__P10269, depth: s.depth + 1, + parent: s, fn: Sprite_kind__P20445, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, } } -function scene_Renderable_constructor__P2801(s) { +function scene_systemMenu_MenuOption_constructor__P21126(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21863,27 +21748,21 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C2800_VT)) failedCast(r0); - r0 = (s.arg0).fields["handler"] = (s.arg1); - r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); - s.tmp_0 = sprites_BaseSprite_constructor__P2096_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg3; - s.callLocIdx = 900; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_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() } } } -scene_Renderable_constructor__P2801.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"]} +scene_systemMenu_MenuOption_constructor__P21126.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 scene_Renderable_constructor__P2801_mk(s) { +function scene_systemMenu_MenuOption_constructor__P21126_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable_constructor__P2801, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_constructor__P21126, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -21894,7 +21773,7 @@ function scene_Renderable_constructor__P2801_mk(s) { -function scene_systemMenu_PauseMenu_constructor__P3096(s) { +function helpers_screenBrightness__P20004(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21906,59 +21785,27 @@ 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_systemMenu_PauseMenu__C3095_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: - s.tmp_1 = scene_systemMenu_buildMenuTheme__P3104_mk(s); - r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___3111); - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = 3; - s.tmp_1.arg2 = undefined; - s.tmp_1.arg3 = undefined; - s.callLocIdx = 999; 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; + r0 = globals.brightness___19989; return leave(s, r0) default: oops() } } } -scene_systemMenu_PauseMenu_constructor__P3096.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"]} +helpers_screenBrightness__P20004.info = {"start":9161,"length":98,"line":288,"column":4,"endLine":290,"endColumn":5,"fileName":"pxt_modules/screen/image.ts","functionName":"screenBrightness","argumentNames":["img"]} -function scene_systemMenu_PauseMenu_constructor__P3096_mk(s) { +function helpers_screenBrightness__P20004_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_PauseMenu_constructor__P3096, depth: s.depth + 1, + parent: s, fn: helpers_screenBrightness__P20004, 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__P3104(s) { +function music_volume__P19659(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -21968,150 +21815,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cardsPerRow___12550 = 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___2032); - s.tmp_0 = r0; - r0 = (s.arg0 + s.arg1); - s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); - s.cardsPerRow___12550 = (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; } + s.tmp_0 = music_initVolume__P22517_mk(s); + s.callLocIdx = 61; s.pc = 1; return s.tmp_0; case 1: - r0 = globals.font8___1975; - 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__P1978_mk(s); - s.tmp_1.arg0 = s.arg2; - s.callLocIdx = 1109; 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___12550); - r0 = pxsim_ImageMethods.width(globals.screen___2032); - s.tmp_3 = r0; - r0 = (s.cardsPerRow___12550 * s.arg0); - s.tmp_5 = r0; - r0 = (s.cardsPerRow___12550 - 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 = 1110; 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___2032); - 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 = 1111; 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___3112); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___3113); - r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___3111); - r0 = s.tmp_0; + r0 = globals.globalVolume___22513; return leave(s, r0) default: oops() } } } -scene_systemMenu_buildMenuTheme__P3104.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"]} +music_volume__P19659.info = {"start":1781,"length":90,"line":61,"column":4,"endLine":64,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"volume","argumentNames":[]} -function scene_systemMenu_buildMenuTheme__P3104_mk(s) { +function music_volume__P19659_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_buildMenuTheme__P3104, depth: s.depth + 1, + parent: s, fn: music_volume__P19659, 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___12550: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function image_doubledFont__P1978(s) { +function music_initVolume__P22517(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22121,35 +21847,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; - } - s.tmp_0 = image_scaledFont__P1979_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 2; - s.callLocIdx = 88; s.pc = 1; return s.tmp_0; - case 1: + r0 = (globals.globalVolume___22513 === null); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + globals.globalVolume___22513 = (0); + s.tmp_0 = music_setVolume__P19658_mk(s); + r0 = pxsim_pxtcore.getConfig(59, 128); + s.tmp_0.arg0 = r0; + s.callLocIdx = 58; s.pc = 3; return s.tmp_0; + case 3: r0 = s.retval; + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -image_doubledFont__P1978.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} +music_initVolume__P22517.info = {"start":1014,"length":180,"line":33,"column":4,"endLine":38,"endColumn":5,"fileName":"pxt_modules/mixer/melody.ts","functionName":"initVolume","argumentNames":[]} -function image_doubledFont__P1978_mk(s) { +function music_initVolume__P22517_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_doubledFont__P1978, depth: s.depth + 1, + parent: s, fn: music_initVolume__P22517, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function image_scaledFont__P1979(s) { +function helpers_arrayConcat__P18151(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22159,117 +21888,386 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.out___29925 = undefined; + s.value___29928 = undefined; + s.unnamed138___U2 = undefined; + s.unnamed139___U3 = undefined; + s.value___29935 = 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.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 = 5; continue; } + r0 = pxsim_Array__mk(); + s.out___29925 = (r0); + s.value___29928 = (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 < s.tmp_1); + if (!r0) { step = 2; continue; } + r0 = pxsim_Array__getAt(s.unnamed138___U2, s.unnamed139___U3); + s.value___29928 = (r0); + r0 = pxsim_Array__push(s.out___29925, s.value___29928); + r0 = (s.unnamed139___U3 + 1); + s.unnamed139___U3 = (r0); + { step = 1; continue; } case 2: - r0 = pxsim_pxtrt.mkMap(); + s.unnamed138___U2 = (undefined); + s.value___29935 = (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; - 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"); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed140___U5, s.unnamed141___U6); + s.value___29935 = (r0); + r0 = pxsim_Array__push(s.out___29925, s.value___29935); + r0 = (s.unnamed141___U6 + 1); + s.unnamed141___U6 = (r0); + { step = 3; continue; } + case 4: + s.unnamed140___U5 = (undefined); + r0 = s.out___29925; + return leave(s, r0) + default: oops() +} } } +helpers_arrayConcat__P18151.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 helpers_arrayConcat__P18151_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: helpers_arrayConcat__P18151, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + out___29925: undefined, + value___29928: undefined, + unnamed138___U2: undefined, + unnamed139___U3: undefined, + value___29935: undefined, + unnamed140___U5: undefined, + unnamed141___U6: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function scene_systemMenu_PauseMenu_show__P21135(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.current___27865 = undefined; + s.i___27866 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_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 = 1000; s.pc = 3; return s.tmp_2; } 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 = 89; s.pc = 6; return s.tmp_4; } + 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 = 1000; s.pc = 3; return s.tmp_2; } + else if (s.tmp_2.fn.isGetter) { s.tmp_2.stage2Call = true; s.callLocIdx = 1000; s.pc = 3; return s.tmp_2;; } + else { s.callLocIdx = 1000; s.pc = 3; return s.tmp_2; } } - case 6: + 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___27866 = (0); + case 1: + s.tmp_1 = r0 = s.i___27866; + r0 = s.arg0.fields["options"]; s.tmp_3 = r0; - r0 = (s.tmp_3 * s.arg1); + r0 = pxsim_Array__length(s.tmp_3); 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"); + r0 = (s.tmp_1 < s.tmp_2); + 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___27866); + s.current___27865 = (r0); + s.tmp_0 = scene_systemMenu_MenuOption_show__P21127_mk(s); + s.tmp_0.arg0 = s.current___27865; + s.callLocIdx = 1001; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_MenuOption_setTheme__P21130_mk(s); + s.tmp_0.arg0 = s.current___27865; + r0 = s.arg0.fields["theme"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1002; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_MenuOption_position__P21128_mk(s); + s.tmp_0.arg0 = s.current___27865; + 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_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 = 90; s.pc = 7; return s.tmp_7; } + 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 = 1003; s.pc = 7; return s.tmp_2; } } 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"); + s.tmp_1 = r0; + s.tmp_5 = r0 = s.i___27866; + 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_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 = 91; s.pc = 8; return s.tmp_9; } + 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 = 1004; s.pc = 8; return s.tmp_7; } } 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"); + 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_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 = 92; s.pc = 9; return s.tmp_11; } + 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 = 1005; s.pc = 9; return s.tmp_10; } } case 9: r0 = s.retval; - 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; + 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 = 1006; 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, "multiplier"); + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_14.arg0, "cardsTop"); } 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"]; } + 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 = 93; s.pc = 10; return s.tmp_14; } + else { s.callLocIdx = 1007; s.pc = 11; return s.tmp_14; } } - case 10: + case 11: 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_17 = r0 = s.i___27866; + 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 = 1008; 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 = 1009; 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 = 1010; 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 = pxsim_pxtrt.mapSetByString(s.tmp_1, "multiplier", s.tmp_15); - r0 = s.tmp_1; - case 5: + r0 = (s.tmp_13 + s.tmp_15); + s.tmp_0.arg2 = r0; + s.callLocIdx = 1011; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + r0 = (s.i___27866 + 1); + s.i___27866 = (r0); + { step = 1; continue; } + case 2: + s.tmp_0 = controller__setUserEventsEnabled__P20244_mk(s); + s.tmp_0.arg0 = false; + s.callLocIdx = 1012; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P27929); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.A___20151; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1014; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P27949); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.A___20151; + s.tmp_1.arg1 = 2052; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1016; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P20234_mk(s); + s.tmp_0.arg0 = globals.B___20152; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P27978; + s.callLocIdx = 1018; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = controller_Button_onEvent__P20234_mk(s); + s.tmp_0.arg0 = globals.menu___20157; + s.tmp_0.arg1 = 2053; + s.tmp_0.arg2 = scene_systemMenu_PauseMenu_show_inline__P27983; + s.callLocIdx = 1020; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P27988); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.up___20154; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1024; s.pc = 20; return s.tmp_1; + case 20: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P28000); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.left___20153; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1027; s.pc = 21; return s.tmp_1; + case 21: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P28009); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.down___20156; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1031; s.pc = 22; return s.tmp_1; + case 22: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P28025); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = controller_Button_onEvent__P20234_mk(s); + s.tmp_1.arg0 = globals.right___20155; + s.tmp_1.arg1 = 2053; + s.tmp_1.arg2 = s.tmp_0; + s.callLocIdx = 1034; s.pc = 23; return s.tmp_1; + case 23: + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, scene_systemMenu_PauseMenu_show_inline__P28037); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = game_onShade__P21055_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.callLocIdx = 1037; s.pc = 24; return s.tmp_1; + case 24: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P21137_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1038; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -image_scaledFont__P1979.info = {"start":12096,"length":331,"line":150,"column":4,"endLine":160,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"scaledFont","argumentNames":["f","size"]} +scene_systemMenu_PauseMenu_show__P21135.info = {"start":3296,"length":2241,"line":123,"column":8,"endLine":181,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function image_scaledFont__P1979_mk(s) { +function scene_systemMenu_PauseMenu_show__P21135_mk(s) { checkStack(s.depth); return { - parent: s, fn: image_scaledFont__P1979, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show__P21135, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22287,15 +22285,25 @@ function image_scaledFont__P1979_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, + tmp_24: undefined, + current___27865: undefined, + i___27866: undefined, arg0: undefined, - arg1: undefined, } } -function game_pushScene__P3003(s) { +function scene_systemMenu_PauseMenu_show_inline__P27929(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22305,70 +22313,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.oldScene___12629 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 948; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.oldScene___12629 = (r0); - s.tmp_0 = particles_clearAll__P3181_mk(s); - s.callLocIdx = 949; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_disableAll__P3182_mk(s); - s.callLocIdx = 950; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._sceneStack___4945); + 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); + r0 = pxsim_numops_toBool(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._sceneStack___4945 = (r0); + 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: - r0 = pxsim_Array__push(globals._sceneStack___4945, globals._scene___4944); - s.tmp_0 = game_init__P4952_mk(s); - s.tmp_0.arg0 = true; - s.callLocIdx = 951; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___4946); + // jmp value (already in r0) + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); if (!r0) { step = 3; continue; } - r0 = pxsim_pxtcore_mkAction(1, game_pushScene_inline__P12646); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.oldScene___12629); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_1.arg0 = globals._scenePushHandlers___4946; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 953; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; + { step = 5; continue; } case 3: case 4: + s.tmp_8 = scene_systemMenu_MenuOption_setState__P21131_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 = 1013; s.pc = 6; return s.tmp_8; + case 6: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -game_pushScene__P3003.info = {"start":4760,"length":367,"line":148,"column":4,"endLine":159,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"pushScene","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P27929.info = {"start":4025,"length":170,"line":140,"column":50,"endLine":143,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function game_pushScene__P3003_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P27929_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene__P3003, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P27929, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - oldScene___12629: 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 game_pushScene_inline__P12646(s) { +function scene_systemMenu_PauseMenu_show_inline__P27949(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22378,37 +22391,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; - } - 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 = 952; s.pc = 1; return s.tmp_0; + 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.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__P21131_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 = 1015; s.pc = 6; return s.tmp_8; + case 6: r0 = s.retval; + r0 = s.caps[0].fields["options"]; + 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"]; + s.tmp_0 = r0; + r0 = pxsim.control.runInParallel(s.tmp_0); + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -game_pushScene_inline__P12646.info = {"start":5091,"length":18,"line":157,"column":39,"endLine":157,"endColumn":57,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["cb"]} +scene_systemMenu_PauseMenu_show_inline__P27949.info = {"start":4247,"length":247,"line":145,"column":48,"endLine":149,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function game_pushScene_inline__P12646_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P27949_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_pushScene_inline__P12646, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P27949, 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, + 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 particles_disableAll__P3182(s) { +function scene_systemMenu_PauseMenu_show_inline__P27978(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22418,46 +22477,29 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___12650 = undefined; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1192; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.sources___12650 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___12650); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - s.tmp_0.arg0 = s.sources___12650; - s.tmp_0.arg1 = particles_disableAll_inline__P12656; - s.callLocIdx = 1194; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P5290_mk(s); - s.callLocIdx = 1195; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; + s.tmp_0 = scene_systemMenu_closeMenu__P21140_mk(s); + s.callLocIdx = 1017; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_disableAll__P3182.info = {"start":12370,"length":195,"line":402,"column":4,"endLine":408,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"disableAll","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P27978.info = {"start":4548,"length":50,"line":151,"column":50,"endLine":153,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_disableAll__P3182_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P27978_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll__P3182, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P27978, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___12650: undefined, } } -function particles_disableAll_inline__P12656(s) { +function scene_systemMenu_PauseMenu_show_inline__P27983(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22467,36 +22509,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.lambdaArgs = null; - } - s.tmp_0 = particles_ParticleSource_enabled__P3164_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1193; s.pc = 1; return s.tmp_0; + s.tmp_0 = scene_systemMenu_closeMenu__P21140_mk(s); + s.callLocIdx = 1019; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = false; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_disableAll_inline__P12656.info = {"start":12495,"length":22,"line":405,"column":28,"endLine":405,"endColumn":50,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} +scene_systemMenu_PauseMenu_show_inline__P27983.info = {"start":4655,"length":50,"line":155,"column":53,"endLine":157,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_disableAll_inline__P12656_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P27983_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_disableAll_inline__P12656, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P27983, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, } } -function particles_clearAll__P3181(s) { +function scene_systemMenu_PauseMenu_show_inline__P27988(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22506,46 +22541,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___12661 = undefined; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1188; s.pc = 3; return s.tmp_0; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P21137_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P18168_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"); + } 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 = 1021; s.pc = 3; return s.tmp_4; } + } case 3: r0 = s.retval; - s.sources___12661 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___12661); - if (!r0) { step = 1; continue; } - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - s.tmp_0.arg0 = s.sources___12661; - s.tmp_0.arg1 = particles_clearAll_inline__P12667; - s.callLocIdx = 1190; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = particles_pruneParticles__P5290_mk(s); - s.callLocIdx = 1191; s.pc = 5; return s.tmp_0; - case 5: + s.tmp_3 = r0; + r0 = (s.tmp_2 - s.tmp_3); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1022; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1023; s.pc = 1; return s.tmp_0; case 1: - case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_clearAll__P3181.info = {"start":12098,"length":185,"line":391,"column":4,"endLine":397,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"clearAll","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P27988.info = {"start":4760,"length":110,"line":159,"column":51,"endLine":161,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_clearAll__P3181_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P27988_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_clearAll__P3181, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P27988, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - sources___12661: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, } } -function particles_clearAll_inline__P12667(s) { +function scene_systemMenu_PauseMenu_show_inline__P28000(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22555,70 +22602,42 @@ 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 = particles_ParticleSource_clear__P3166_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1189; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_clearAll_inline__P12667.info = {"start":12221,"length":14,"line":394,"column":28,"endLine":394,"endColumn":42,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["s"]} - -function particles_clearAll_inline__P12667_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_clearAll_inline__P12667, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - arg0: undefined, -} } - - - - - -function particles_ParticleSource_clear__P3166(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, particles_ParticleSource__C3151_VT)) failedCast(r0); - r0 = (s.arg0).fields["head"] = (undefined); + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P21137_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_max__P18168_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 = 1025; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1026; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_clear__P3166.info = {"start":7424,"length":54,"line":243,"column":8,"endLine":245,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"clear","argumentNames":["this"]} +scene_systemMenu_PauseMenu_show_inline__P28000.info = {"start":4927,"length":89,"line":163,"column":53,"endLine":165,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function particles_ParticleSource_clear__P3166_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P28000_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_clear__P3166, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P28000, 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, } } -function controller_Button_onEvent__P2196(s) { +function scene_systemMenu_PauseMenu_show_inline__P28009(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22628,46 +22647,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.eventHandler___12679 = 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 = scene_systemMenu_PauseMenu_setSelection__P21137_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P18169_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; + 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 = 1028; s.pc = 3; return s.tmp_6; } } - r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C2189_VT)) failedCast(r0); - s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P4733_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 202; s.pc = 1; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_4 + s.tmp_5); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1029; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 1030; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.eventHandler___12679 = (r0); - r0 = (s.eventHandler___12679).fields["callback"] = (s.arg2); r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_onEvent__P2196.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"]} +scene_systemMenu_PauseMenu_show_inline__P28009.info = {"start":5073,"length":132,"line":167,"column":53,"endLine":169,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Button_onEvent__P2196_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P28009_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_onEvent__P2196, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P28009, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - eventHandler___12679: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, + tmp_1: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, } } -function controller_Button_getOrCreateHandlerForEvent__P4733(s) { +function scene_systemMenu_PauseMenu_show_inline__P28025(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22677,155 +22715,49 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___12700 = undefined; - s.eventHandler___12709 = undefined; - s.unnamed68___U2 = undefined; - s.unnamed69___U3 = undefined; - s.newHandler___12725 = 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__C2189_VT)) failedCast(r0); - s.tmp_3 = controller_Button_handlerState__P4728_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 212; 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 (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonEventHandlerState__C2185_VT); - s.tmp_4 = r0; - s.tmp_5 = controller_ButtonEventHandlerState_constructor__P2186_mk(s); - s.tmp_5.arg0 = s.tmp_4; - r0 = s.arg0.fields["id"]; - s.tmp_5.arg1 = r0; - s.callLocIdx = 214; s.pc = 11; return s.tmp_5; - case 11: - r0 = s.retval; - s.tmp_7 = game_currentScene__P2999_mk(s); - s.callLocIdx = 213; 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__P4728_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 215; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - s.handlerState___12700 = (r0); - r0 = s.handlerState___12700.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___12700; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = (s.tmp_3).fields["user"] = (s.tmp_4); - case 3: - case 4: - s.eventHandler___12709 = (undefined); - r0 = s.handlerState___12700.fields["user"]; - s.unnamed68___U2 = (r0); - s.unnamed69___U3 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed69___U3; - r0 = pxsim_Array__length(s.unnamed68___U2); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 8; continue; } - r0 = pxsim_Array__getAt(s.unnamed68___U2, s.unnamed69___U3); - s.eventHandler___12709 = (r0); - r0 = s.eventHandler___12709.fields["event"]; + s.tmp_0 = scene_systemMenu_PauseMenu_setSelection__P21137_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_1 = Math_min__P18169_mk(s); + r0 = s.caps[0].fields["options"]; s.tmp_3 = r0; - r0 = (s.tmp_3 === s.arg1); + r0 = pxsim_Array__length(s.tmp_3); s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 6; continue; } - r0 = s.eventHandler___12709; - { step = 9; continue; } - case 6: - case 7: - r0 = (s.unnamed69___U3 + 1); - s.unnamed69___U3 = (r0); - { step = 5; continue; } - case 8: - s.unnamed68___U2 = (undefined); - r0 = pxsim_pxtcore_mkAction(2, controller_Button_getOrCreateHandlerForEvent_inline__P12722); + r0 = (s.tmp_2 - 1); + s.tmp_1.arg0 = r0; + r0 = s.caps[0].fields["selection"]; 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__P391_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 = 217; s.pc = 14; return s.tmp_5; - case 14: + r0 = (s.tmp_4 + 1); + s.tmp_1.arg1 = r0; + s.callLocIdx = 1032; s.pc = 2; return s.tmp_1; + case 2: r0 = s.retval; - r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C2183_VT); - s.tmp_0 = r0; - s.tmp_1 = controller_ButtonHandler_constructor__P2184_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.arg1; - s.tmp_1.arg2 = undefined; - s.callLocIdx = 218; s.pc = 15; return s.tmp_1; - case 15: + s.tmp_0.arg1 = r0; + s.callLocIdx = 1033; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.newHandler___12725 = (s.tmp_0); - r0 = s.handlerState___12700.fields["user"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.newHandler___12725); - r0 = s.newHandler___12725; - case 9: + r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent__P4733.info = {"start":8550,"length":829,"line":250,"column":8,"endLine":270,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"getOrCreateHandlerForEvent","argumentNames":["this","event"]} +scene_systemMenu_PauseMenu_show_inline__P28025.info = {"start":5263,"length":111,"line":171,"column":54,"endLine":173,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Button_getOrCreateHandlerForEvent__P4733_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P28025_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P4733, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P28025, 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___12700: undefined, - eventHandler___12709: undefined, - unnamed68___U2: undefined, - unnamed69___U3: undefined, - newHandler___12725: undefined, - arg0: undefined, - arg1: undefined, } } -function controller_Button_getOrCreateHandlerForEvent_inline__P12722(s) { +function scene_systemMenu_PauseMenu_show_inline__P28037(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22835,22 +22767,26 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_runButtonEvents__P4732_mk(s); + s.tmp_0 = scene_systemMenu_PauseMenu_onUpdate__P21136_mk(s); s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.caps[1]; - s.callLocIdx = 216; s.pc = 1; return s.tmp_0; + s.callLocIdx = 1035; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = scene_systemMenu_PauseMenu_drawText__P21138_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.callLocIdx = 1036; s.pc = 2; return s.tmp_0; + case 2: r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_getOrCreateHandlerForEvent_inline__P12722.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +scene_systemMenu_PauseMenu_show_inline__P28037.info = {"start":5403,"length":87,"line":175,"column":25,"endLine":178,"endColumn":13,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"inline","argumentNames":[]} -function controller_Button_getOrCreateHandlerForEvent_inline__P12722_mk(s) { +function scene_systemMenu_PauseMenu_show_inline__P28037_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P12722, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_show_inline__P28037, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, } } @@ -22859,7 +22795,7 @@ function controller_Button_getOrCreateHandlerForEvent_inline__P12722_mk(s) { -function controller_Button_runButtonEvents__P4732(s) { +function scene_systemMenu_PauseMenu_drawText__P21138(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -22869,123 +22805,277 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.handlerState___12739 = undefined; - s.userHandler___12743 = undefined; - s.eventHandler___12754 = undefined; - s.unnamed66___U3 = undefined; - s.unnamed67___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__C2189_VT)) failedCast(r0); - s.tmp_0 = controller_Button_handlerState__P4728_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 208; s.pc = 14; return s.tmp_0; - case 14: - r0 = s.retval; - s.handlerState___12739 = (r0); - r0 = pxsim_numops_toBoolDecr(s.handlerState___12739); + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_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_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - { step = 13; continue; } + { step = 3; continue; } case 1: case 2: - s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P4733_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 209; s.pc = 15; return s.tmp_2; - case 15: + s.tmp_3 = helpers_imageFillRect__P19994_mk(s); + s.tmp_3.arg0 = globals.screen___20070; + s.tmp_3.arg1 = 0; + s.tmp_3.arg2 = 0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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 = 1049; s.pc = 5; return s.tmp_5; } + } + case 5: r0 = s.retval; - s.userHandler___12743 = (r0); - r0 = s.userHandler___12743.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___12743; + s.tmp_4 = r0; + r0 = (s.tmp_4 - 2); + s.tmp_3.arg4 = r0; + s.tmp_3.arg5 = 15; + s.callLocIdx = 1050; s.pc = 4; return s.tmp_3; + case 4: + r0 = s.retval; + s.tmp_0 = helpers_imagePrintCenter__P20027_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + 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) { - setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); - s.callLocIdx = 210; s.pc = 16; return s.tmp_1; + s.retval = pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "headerText"); } 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 = 210; s.pc = 16; return s.tmp_1; } - else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 210; s.pc = 16; return s.tmp_1;; } - else { s.callLocIdx = 210; s.pc = 16; return s.tmp_1; } + 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 = 1051; s.pc = 7; return s.tmp_1; } } - case 16: + case 7: + 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 = 1052; s.pc = 8; return s.tmp_2; } + } + case 8: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.callLocIdx = 1053; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P19994_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + 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 = 1054; s.pc = 10; return s.tmp_2; } + } + case 10: r0 = s.retval; - case 3: - case 4: - r0 = s.handlerState___12739.fields["system"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 11; continue; } - s.eventHandler___12754 = (undefined); - r0 = s.handlerState___12739.fields["system"]; - s.unnamed66___U3 = (r0); - s.unnamed67___U4 = (0); - case 5: - s.tmp_0 = r0 = s.unnamed67___U4; - r0 = pxsim_Array__length(s.unnamed66___U3); s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 10; continue; } - r0 = pxsim_Array__getAt(s.unnamed66___U3, s.unnamed67___U4); - s.eventHandler___12754 = (r0); - r0 = s.eventHandler___12754.fields["event"]; + r0 = (s.tmp_1 - 3); + s.tmp_0.arg2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_0.arg3 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + 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 = 1055; s.pc = 11; return s.tmp_6; } + } + case 11: + r0 = s.retval; + s.tmp_5 = r0; + r0 = (s.tmp_4 - s.tmp_5); 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___12754.fields["callback"]; - case 7: - // jmp value (already in r0) + r0 = (s.tmp_3 + 6); + s.tmp_0.arg4 = r0; + s.tmp_0.arg5 = 15; + s.callLocIdx = 1056; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = helpers_imageFillRect__P19994_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + 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 = 1057; 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 = 1058; s.pc = 14; return s.tmp_2; } + } + case 14: + r0 = s.retval; + s.tmp_0.arg2 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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 = 1059; 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 = 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___12754; - if (!s.tmp_5.arg0.vtable.iface) { - setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); - s.callLocIdx = 211; s.pc = 17; return s.tmp_5; + 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_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 = 211; s.pc = 17; return s.tmp_5; } - else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 211; s.pc = 17; return s.tmp_5;; } - else { s.callLocIdx = 211; s.pc = 17; return s.tmp_5; } + 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 = 1060; s.pc = 17; return s.tmp_9; } } case 17: r0 = s.retval; - case 8: - case 9: - r0 = (s.unnamed67___U4 + 1); - s.unnamed67___U4 = (r0); - { step = 5; continue; } - case 10: - s.unnamed66___U3 = (undefined); - case 11: + 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 = 1061; 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 = 1062; s.pc = 12; return s.tmp_0; case 12: - case 13: + r0 = s.retval; + s.tmp_0 = helpers_imagePrintCenter__P20027_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + 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 = 1063; 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 = 1063; s.pc = 19; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 1063; s.pc = 19; return s.tmp_1;; } + else { s.callLocIdx = 1063; 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 = 1064; 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 = 1065; s.pc = 21; return s.tmp_6; } + } + case 21: + r0 = s.retval; + s.tmp_0.arg4 = r0; + s.callLocIdx = 1066; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_runButtonEvents__P4732.info = {"start":8005,"length":535,"line":236,"column":8,"endLine":248,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"runButtonEvents","argumentNames":["this","event"]} +scene_systemMenu_PauseMenu_drawText__P21138.info = {"start":6927,"length":795,"line":224,"column":8,"endLine":241,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"drawText","argumentNames":["this"]} -function controller_Button_runButtonEvents__P4732_mk(s) { +function scene_systemMenu_PauseMenu_drawText__P21138_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_runButtonEvents__P4732, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_drawText__P21138, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -22993,20 +23083,18 @@ function controller_Button_runButtonEvents__P4732_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - handlerState___12739: undefined, - userHandler___12743: undefined, - eventHandler___12754: undefined, - unnamed66___U3: undefined, - unnamed67___U4: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, arg0: undefined, - arg1: undefined, } } -function controller_Button_handlerState__P4728(s) { +function helpers_imagePrintCenter__P20027(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23016,114 +23104,92 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.state___12770 = undefined; - s.unnamed64___U1 = undefined; - s.unnamed65___U2 = undefined; + s.w___28124 = undefined; + s.x___28130 = 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, controller_Button__C2189_VT)) failedCast(r0); - s.state___12770 = (undefined); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 198; s.pc = 6; return s.tmp_0; - case 6: + 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 = 1; continue; } + s.tmp_2 = image_getFontForText__P20015_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 94; s.pc = 3; return s.tmp_2; + case 3: r0 = s.retval; - r0 = r0.fields["buttonEventHandlers"]; - s.unnamed64___U1 = (r0); - s.unnamed65___U2 = (0); + s.arg4 = (r0); case 1: - s.tmp_0 = r0 = s.unnamed65___U2; - r0 = pxsim_Array__length(s.unnamed64___U1); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 4; continue; } - r0 = pxsim_Array__getAt(s.unnamed64___U1, s.unnamed65___U2); - s.state___12770 = (r0); - r0 = s.state___12770.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___12770; - { step = 5; continue; } case 2: - case 3: - r0 = (s.unnamed65___U2 + 1); - s.unnamed65___U2 = (r0); - { step = 1; continue; } - case 4: - s.unnamed64___U1 = (undefined); - r0 = undefined; - case 5: - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Button_handlerState__P4728.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__P4728.isGetter = true; - -function controller_Button_handlerState__P4728_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Button_handlerState__P4728, 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___12770: undefined, - unnamed64___U1: undefined, - unnamed65___U2: undefined, - arg0: undefined, -} } - - - - - -function controller_ButtonEventHandlerState_constructor__P2186(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_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 = 95; s.pc = 4; return s.tmp_2; } } - r0 = s.arg0; - if (!checkSubtype(r0, controller_ButtonEventHandlerState__C2185_VT)) failedCast(r0); - r0 = (s.arg0).fields["id"] = (s.arg1); + case 4: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_0 * s.tmp_1); + s.w___28124 = (r0); + r0 = pxsim_ImageMethods.width(s.arg0); + s.tmp_1 = r0; + r0 = (s.tmp_1 - s.w___28124); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 2); + s.x___28130 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.x___28130; + 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 = 96; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -controller_ButtonEventHandlerState_constructor__P2186.info = {"start":1122,"length":33,"line":48,"column":8,"endLine":48,"endColumn":41,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":["this","id"]} +helpers_imagePrintCenter__P20027.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 controller_ButtonEventHandlerState_constructor__P2186_mk(s) { +function helpers_imagePrintCenter__P20027_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_ButtonEventHandlerState_constructor__P2186, depth: s.depth + 1, + parent: s, fn: helpers_imagePrintCenter__P20027, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + w___28124: undefined, + x___28130: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function controller_ButtonHandler_constructor__P2184(s) { +function scene_systemMenu_PauseMenu_setSelection__P21137(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23136,83 +23202,116 @@ 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__C2183_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__P2184.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__P2184_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_ButtonHandler_constructor__P2184, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function scene_systemMenu_initScreen__P5212(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.brightness___12782 = undefined; - s.tmp_0 = settings_readNumber__P2068_mk(s); - s.tmp_0.arg0 = "#brightness"; - s.callLocIdx = 1118; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.brightness___12782 = (r0); - r0 = (s.brightness___12782 !== undefined); + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_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_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_1 = helpers_setScreenBrightness__P1965_mk(s); - s.tmp_1.arg0 = globals.screen___2032; - s.tmp_1.arg1 = s.brightness___12782; - s.callLocIdx = 1119; s.pc = 4; return s.tmp_1; - case 4: - r0 = s.retval; + { 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__P21131_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 = 1046; 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__C20227_v0_1_mk(s); + s.tmp_4.arg0 = globals.A___20151; + if (!checkSubtype(s.tmp_4.arg0, controller_Button__C20227_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__P21131_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 = 1047; s.pc = 12; return s.tmp_6; + case 12: + r0 = s.retval; + case 7: + case 8: + s.tmp_0 = scene_systemMenu_PauseMenu_updateScrollTarget__P23238_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1048; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + case 9: r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_initScreen__P5212.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} +scene_systemMenu_PauseMenu_setSelection__P21137.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 scene_systemMenu_initScreen__P5212_mk(s) { +function scene_systemMenu_PauseMenu_setSelection__P21137_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initScreen__P5212, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_setSelection__P21137, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - brightness___12782: 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 settings_readNumber__P2068(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P23238(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23222,101 +23321,133 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___12793 = undefined; - s.nums___12800 = undefined; + s.row___28386 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); - s.buf___12793 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___12793); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_VT)) failedCast(r0); + r0 = s.arg0.fields["selection"]; 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__P183_mk(s); - s.tmp_2.arg0 = s.buf___12793; - s.tmp_2.arg1 = 0; - s.callLocIdx = 128; s.pc = 8; return s.tmp_2; + 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 = 1069; s.pc = 8; return s.tmp_2; } + } case 8: r0 = s.retval; - s.nums___12800 = (r0); - s.tmp_0 = r0 = s.nums___12800; + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); + s.row___28386 = (r0); + r0 = s.arg0.fields["scrollRow"]; + s.tmp_1 = r0; + r0 = (s.row___28386 === s.tmp_1); + s.tmp_0 = r0; 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 = (s.row___28386 - 1); + s.tmp_2 = r0; + r0 = s.arg0.fields["scrollRow"]; + s.tmp_3 = r0; + r0 = (s.tmp_2 === s.tmp_3); case 2: - r0 = pxsim_Array__length(s.nums___12800); - 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___12800, 0); + 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___28386 > 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: - r0 = undefined; - { step = 7; continue; } + 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: - r0 = undefined; + 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 = 1070; 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 = 1071; 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() } } } -settings_readNumber__P2068.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} +scene_systemMenu_PauseMenu_updateScrollTarget__P23238.info = {"start":7907,"length":458,"line":250,"column":8,"endLine":260,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateScrollTarget","argumentNames":["this"]} -function settings_readNumber__P2068_mk(s) { +function scene_systemMenu_PauseMenu_updateScrollTarget__P23238_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readNumber__P2068, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_updateScrollTarget__P23238, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - buf___12793: undefined, - nums___12800: undefined, - arg0: undefined, -} } - - - - - -function settings_readBuffer__P2065(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.settings._get(s.arg0); - return leave(s, r0) - default: oops() -} } } -settings_readBuffer__P2065.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} - -function settings_readBuffer__P2065_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: settings_readBuffer__P2065, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, + tmp_7: undefined, + tmp_8: undefined, + tmp_9: undefined, + row___28386: undefined, arg0: undefined, } } @@ -23324,7 +23455,7 @@ function settings_readBuffer__P2065_mk(s) { -function msgpack_unpackNumberArray__P183(s) { +function scene_systemMenu_PauseMenu_onUpdate__P21136(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23334,120 +23465,186 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___12813 = undefined; - s.fmt___12820 = undefined; - s.v___12829 = undefined; + s.t___28146 = undefined; + s.i___28150 = undefined; + s.dt___28179 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___12813 = (r0); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_PauseMenu__C21133_VT)) failedCast(r0); + r0 = pxsim.control.millis(); + s.tmp_0 = r0; + r0 = (s.tmp_0 / 250); + s.t___28146 = (r0); + s.i___28150 = (0); case 1: - s.tmp_1 = r0 = s.arg1; - r0 = pxsim.BufferMethods.length(s.arg0); + s.tmp_1 = r0 = s.i___28150; + 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 = 10; continue; } - s.tmp_3 = r0 = s.arg1; - r0 = (s.tmp_3 + 1); - s.arg1 = (r0); - s.tmp_4 = msgpack_tagFormat__P4380_mk(s); - r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); + if (!r0) { step = 2; continue; } + s.tmp_4 = scene_systemMenu_MenuOption_setOffset__P21129_mk(s); + r0 = s.arg0.fields["options"]; + s.tmp_5 = r0; + r0 = pxsim_Array__getAt(s.tmp_5, s.i___28150); s.tmp_4.arg0 = r0; - s.callLocIdx = 19; s.pc = 12; return s.tmp_4; + s.tmp_8 = r0 = s.t___28146; + s.tmp_11 = r0 = s.i___28150; + 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 = 1039; 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 = 1040; s.pc = 10; return s.tmp_4; + case 10: + r0 = s.retval; + r0 = (s.i___28150 + 1); + s.i___28150 = (r0); + { step = 1; continue; } + case 2: + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 1041; s.pc = 12; return s.tmp_1; case 12: r0 = s.retval; - s.fmt___12820 = (r0); - r0 = (s.fmt___12820 === null); + r0 = r0.fields["eventContext"]; 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); + r0 = s.tmp_0.fields["deltaTimeMillis"]; s.tmp_2 = r0; - r0 = pxsim.BufferMethods.getNumber(s.tmp_1, 6, s.tmp_2); - s.v___12829 = (r0); - r0 = (-31 <= s.v___12829); + r0 = (s.tmp_2 / 1000); + s.dt___28179 = (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_toBool(s.tmp_0); - if (r0) { step = 2; continue; } - r0 = s.tmp_0; - { step = 3; continue; } - case 2: - r0 = (s.v___12829 <= 127); + 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___28179 * 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: - // jmp value (already in r0) + r0 = s.arg0.fields["scrollOffset"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + 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; } - r0 = pxsim_Array__push(s.res___12813, s.v___12829); + s.tmp_3 = r0 = s.arg0; + r0 = s.tmp_3.fields["scrollOffset"]; + s.tmp_5 = r0; + r0 = (s.dt___28179 * 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: - r0 = null; - { step = 11; continue; } + { step = 9; continue; } case 5: - { step = 7; continue; } case 6: - s.tmp_0 = r0 = s.res___12813; - r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___12820, 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__P175_mk(s); - s.tmp_2.arg0 = s.fmt___12820; - s.callLocIdx = 20; s.pc = 13; return s.tmp_2; + s.tmp_2 = Math_abs__P18166_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 = 1043; 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); + r0 = (s.tmp_1 < 2); 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; } + 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__P20827_mk(s); + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 1044; 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 = 1045; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; case 9: - { step = 1; continue; } - case 10: - r0 = s.res___12813; - case 11: + r0 = undefined; return leave(s, r0) default: oops() } } } -msgpack_unpackNumberArray__P183.info = {"start":2650,"length":669,"line":91,"column":4,"endLine":111,"endColumn":5,"fileName":"pxt_modules/base/buffer.ts","functionName":"unpackNumberArray","argumentNames":["buf","offset"]} +scene_systemMenu_PauseMenu_onUpdate__P21136.info = {"start":5547,"length":879,"line":183,"column":8,"endLine":206,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"onUpdate","argumentNames":["this"]} -function msgpack_unpackNumberArray__P183_mk(s) { +function scene_systemMenu_PauseMenu_onUpdate__P21136_mk(s) { checkStack(s.depth); return { - parent: s, fn: msgpack_unpackNumberArray__P183, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_onUpdate__P21136, 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___12813: undefined, - fmt___12820: undefined, - v___12829: 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___28146: undefined, + i___28150: undefined, + dt___28179: undefined, arg0: undefined, - arg1: undefined, } } -function scene_systemMenu_initVolume__P5211(s) { +function scene_systemMenu_MenuOption_setOffset__P21129(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23457,45 +23654,58 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.vol___12874 = undefined; - s.tmp_0 = settings_readNumber__P2068_mk(s); - s.tmp_0.arg0 = "#volume"; - s.callLocIdx = 1116; s.pc = 3; return s.tmp_0; - case 3: + 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__C21125_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P20442_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 = 982; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.vol___12874 = (r0); - r0 = (s.vol___12874 !== undefined); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = music_setVolume__P1620_mk(s); - s.tmp_1.arg0 = s.vol___12874; - s.callLocIdx = 1117; s.pc = 4; return s.tmp_1; - case 4: + s.tmp_0 = Sprite_y__P20395_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 983; s.pc = 3; return s.tmp_1; + case 3: r0 = s.retval; - case 1: + s.tmp_0.arg1 = r0; + s.callLocIdx = 984; s.pc = 2; return s.tmp_0; case 2: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -scene_systemMenu_initVolume__P5211.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} +scene_systemMenu_MenuOption_setOffset__P21129.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_initVolume__P5211_mk(s) { +function scene_systemMenu_MenuOption_setOffset__P21129_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_systemMenu_initVolume__P5211, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setOffset__P21129, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - vol___12874: undefined, + arg0: undefined, + arg1: undefined, } } -function game_GameOverConfig_constructor__P2988(s) { +function Sprite_top__P20442(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23505,37 +23715,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.physics___28263 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, game_GameOverConfig__C2973_VT)) failedCast(r0); - s.tmp_0 = game_GameOverConfig_init__P2989_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 939; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 359; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -game_GameOverConfig_constructor__P2988.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} - -function game_GameOverConfig_constructor__P2988_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: game_GameOverConfig_constructor__P2988, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + r0 = r0.fields["physicsEngine"]; + s.physics___28263 = (r0); + s.tmp_0 = PhysicsEngine__C20549_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___28263; + 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__C20549_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() +} } } +Sprite_top__P20442.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 Sprite_top__P20442_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_top__P20442, 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___28263: undefined, arg0: undefined, + arg1: undefined, } } -function game_GameOverConfig_init__P2989(s) { +function PhysicsEngine_moveSprite__P20553(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23547,60 +23782,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, game_GameOverConfig__C2973_VT)) failedCast(r0); - r0 = (s.arg0).fields["scoringType"] = (0); - r0 = (s.arg0).fields["winEffect"] = (globals.confetti___3274); - r0 = (s.arg0).fields["loseEffect"] = (globals.melt___3296); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = music_melodyPlayable__P1923_mk(s); - s.tmp_2.arg0 = globals.powerUp___1650; - s.callLocIdx = 940; 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__P1923_mk(s); - s.tmp_2.arg0 = globals.wawawawaa___1647; - s.callLocIdx = 941; 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); + if (!checkSubtype(r0, PhysicsEngine__C20549_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -game_GameOverConfig_init__P2989.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} +PhysicsEngine_moveSprite__P20553.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 game_GameOverConfig_init__P2989_mk(s) { +function PhysicsEngine_moveSprite__P20553_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_GameOverConfig_init__P2989, depth: s.depth + 1, + parent: s, fn: PhysicsEngine_moveSprite__P20553, 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 melt_inline__P12937(s) { +function Sprite_top__P20441(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23610,96 +23820,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rounds___12940 = undefined; - s.j___12948 = undefined; - s.x___12953 = undefined; - s.y___12959 = undefined; - s.c___12965 = 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___12940 = (r0); - s.j___12948 = (0); - case 1: - r0 = (s.j___12948 < s.rounds___12940); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_y"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = Math_FastRandom_randomRange__P3063_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___12953 = (r0); - s.tmp_0 = Math_FastRandom_randomRange__P3063_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___12959 = (r0); - r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___12953, s.y___12959); - s.c___12965 = (r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___12953; - r0 = (s.y___12959 + 1); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___12965); - s.tmp_0 = r0 = s.arg0; - s.tmp_1 = r0 = s.x___12953; - r0 = (s.y___12959 + 2); - s.tmp_2 = r0; - r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___12965); - r0 = (s.j___12948 + 1); - s.j___12948 = (r0); - { step = 1; continue; } - case 2: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -melt_inline__P12937.info = {"start":2652,"length":386,"line":72,"column":45,"endLine":81,"endColumn":5,"fileName":"pxt_modules/game/effects.ts","functionName":"inline","argumentNames":["input","r"]} +Sprite_top__P20441.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__P20441.isGetter = true; -function melt_inline__P12937_mk(s) { +function Sprite_top__P20441_mk(s) { checkStack(s.depth); return { - parent: s, fn: melt_inline__P12937, depth: s.depth + 1, + parent: s, fn: Sprite_top__P20441, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - rounds___12940: undefined, - j___12948: undefined, - x___12953: undefined, - y___12959: undefined, - c___12965: undefined, arg0: undefined, - arg1: undefined, } } -function confetti_inline__P12991(s) { +function Sprite_y__P20395(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23709,89 +23858,45 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.factory___12994 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore_mkClassInstance(particles_ConfettiFactory__C3218_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; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P20442_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_height__P20436_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 310; s.pc = 2; return s.tmp_4; case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = particles_ConfettiFactory_constructor__P3219_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___12994 = (s.tmp_0); - s.tmp_0 = particles_SprayFactory_setSpeed__P3195_mk(s); - s.tmp_0.arg0 = s.factory___12994; - 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__C3151_VT); - s.tmp_0 = r0; - s.tmp_1 = particles_ParticleSource_constructor__P3156_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___12994; - s.callLocIdx = 50; s.pc = 7; return s.tmp_1; - case 7: + 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 = 311; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - r0 = s.tmp_0; + r0 = undefined; return leave(s, r0) default: oops() } } } -confetti_inline__P12991.info = {"start":7534,"length":284,"line":191,"column":59,"endLine":195,"endColumn":5,"fileName":"pxt_modules/game/particleeffects.ts","functionName":"inline","argumentNames":["anchor","particlesPerSecond"]} +Sprite_y__P20395.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 confetti_inline__P12991_mk(s) { +function Sprite_y__P20395_mk(s) { checkStack(s.depth); return { - parent: s, fn: confetti_inline__P12991, depth: s.depth + 1, + parent: s, fn: Sprite_y__P20395, 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___12994: undefined, arg0: undefined, arg1: undefined, } } @@ -23800,7 +23905,7 @@ function confetti_inline__P12991_mk(s) { -function particles_ParticleSource_constructor__P3156(s) { +function Sprite_height__P20436(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23810,130 +23915,80 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___13015 = undefined; - s.removedSource___13024 = 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__C3151_VT)) failedCast(r0); - s.tmp_0 = sprites_BaseSprite_constructor__P2096_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.callLocIdx = 1138; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.tmp_0 = particles_init__P5288_mk(s); - s.callLocIdx = 1139; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1140; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.sources___13015 = (r0); - r0 = pxsim_Array__length(s.sources___13015); - s.tmp_1 = r0; - r0 = (s.tmp_1 >= globals.MAX_SOURCES___5280); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_height"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) + default: oops() +} } } +Sprite_height__P20436.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__P20436.isGetter = true; + +function Sprite_height__P20436_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_height__P20436, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Math_abs__P18166(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; } - s.tmp_2 = particles_sortSources__P5291_mk(s); - s.tmp_2.arg0 = s.sources___13015; - s.callLocIdx = 1141; s.pc = 8; return s.tmp_2; - case 8: - r0 = s.retval; - r0 = pxsim_Array_.removeAt(s.sources___13015, 0); - s.removedSource___13024 = (r0); - s.tmp_0 = particles_ParticleSource_clear__P3166_mk(s); - s.tmp_0.arg0 = s.removedSource___13024; - s.callLocIdx = 1143; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_destroy__P3165_mk(s); - s.tmp_0.arg0 = s.removedSource___13024; - s.callLocIdx = 1144; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; + r0 = (0 - s.arg0); + { step = 2; continue; } case 1: + r0 = s.arg0; case 2: - r0 = (s.arg0).fields["pFlags"] = (0); - s.tmp_0 = particles_ParticleSource_setRate__P3168_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.callLocIdx = 1145; s.pc = 11; return s.tmp_0; - case 11: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAcceleration__P3160_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = 0; - s.tmp_0.arg2 = 0; - s.callLocIdx = 1146; s.pc = 12; return s.tmp_0; - case 12: - r0 = s.retval; - s.tmp_0 = particles_ParticleSource_setAnchor__P3167_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1147; 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___3171; - case 4: // jmp value (already in r0) s.tmp_1 = r0; - s.tmp_2 = particles_ParticleSource_setFactory__P3170_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.tmp_1; - s.callLocIdx = 1148; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - r0 = pxsim_Array__push(s.sources___13015, s.arg0); - s.tmp_0 = particles_ParticleSource_enabled__P3164_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = true; - s.callLocIdx = 1149; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = undefined; + r0 = s.tmp_1; return leave(s, r0) default: oops() } } } -particles_ParticleSource_constructor__P3156.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"]} +Math_abs__P18166.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 particles_ParticleSource_constructor__P3156_mk(s) { +function Math_abs__P18166_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_constructor__P3156, depth: s.depth + 1, + parent: s, fn: Math_abs__P18166, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - tmp_2: undefined, - sources___13015: undefined, - removedSource___13024: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function particles_sortSources__P5291(s) { +function scene_systemMenu_MenuOption_setState__P21131(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23945,34 +24000,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = helpers_arraySort__P105_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = particles_sortSources_inline__P13222; - s.callLocIdx = 1187; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_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__P23237_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 986; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_sortSources__P5291.info = {"start":10026,"length":129,"line":332,"column":4,"endLine":334,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} +scene_systemMenu_MenuOption_setState__P21131.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 particles_sortSources__P5291_mk(s) { +function scene_systemMenu_MenuOption_setState__P21131_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources__P5291, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setState__P21131, 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 particles_sortSources_inline__P13222(s) { +function scene_systemMenu_MenuOption_updateCard__P23237(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -23984,38 +24054,134 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0.fields["priority"]; - s.tmp_1 = r0; - r0 = s.arg1.fields["priority"]; + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; 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_toBool(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } + { step = 7; 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); case 2: - // jmp value (already in r0) - s.tmp_5 = r0; - r0 = s.tmp_5; + 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__P20429_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 = 989; s.pc = 9; return s.tmp_5; } + } + case 9: + r0 = s.retval; + s.tmp_4.arg1 = r0; + s.callLocIdx = 990; s.pc = 8; return s.tmp_4; + case 8: + r0 = s.retval; + { step = 6; continue; } + case 4: + s.tmp_0 = Sprite_setImage__P20429_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 = 991; s.pc = 11; return s.tmp_1; } + } + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 992; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + { step = 6; continue; } + case 5: + s.tmp_0 = Sprite_setImage__P20429_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 = 993; s.pc = 13; return s.tmp_1; } + } + case 13: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 994; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + case 6: + s.tmp_0 = Sprite_x__P20393_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P20392_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 995; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 996; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.tmp_0 = Sprite_y__P20395_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 997; s.pc = 17; return s.tmp_1; + case 17: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 998; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + case 7: + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_sortSources_inline__P13222.info = {"start":10097,"length":50,"line":333,"column":21,"endLine":333,"endColumn":71,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":["a","b"]} +scene_systemMenu_MenuOption_updateCard__P23237.info = {"start":2038,"length":497,"line":86,"column":8,"endLine":97,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"updateCard","argumentNames":["this"]} -function particles_sortSources_inline__P13222_mk(s) { +function scene_systemMenu_MenuOption_updateCard__P23237_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_sortSources_inline__P13222, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_updateCard__P23237, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -24024,14 +24190,13 @@ function particles_sortSources_inline__P13222_mk(s) { tmp_4: undefined, tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function particles_init__P5288(s) { +function Sprite_x__P20393(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24041,59 +24206,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___13261 = undefined; - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 1177; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.scene___13261 = (r0); - r0 = s.scene___13261.fields["particleSources"]; - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 3; continue; } - 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__C20379_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P20438_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_4 = Sprite_width__P20435_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 305; s.pc = 2; return s.tmp_4; case 2: - s.tmp_1 = r0 = s.scene___13261; - r0 = pxsim_Array__mk(); - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); - r0 = pxsim.control.millis(); - globals.lastUpdate___5283 = (r0); - s.tmp_0 = game_onUpdate__P3023_mk(s); - s.tmp_0.arg0 = particles_updateParticles__P5289; - s.callLocIdx = 1178; s.pc = 5; return s.tmp_0; - case 5: r0 = s.retval; - s.tmp_0 = game_onUpdateInterval__P3024_mk(s); - s.tmp_0.arg0 = 250; - s.tmp_0.arg1 = particles_pruneParticles__P5290; - s.callLocIdx = 1179; s.pc = 6; return s.tmp_0; - case 6: + 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 = 306; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_init__P5288.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} +Sprite_x__P20393.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 particles_init__P5288_mk(s) { +function Sprite_x__P20393_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_init__P5288, depth: s.depth + 1, + parent: s, fn: Sprite_x__P20393, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - scene___13261: undefined, + tmp_3: undefined, + tmp_4: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_updateParticles__P5289(s) { +function Sprite_left__P20438(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24103,81 +24263,62 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sources___13303 = undefined; - s.time___13310 = undefined; - s.dt___13313 = undefined; - s.i___13319 = undefined; - s.tmp_0 = particles_particleSources__P5294_mk(s); - s.callLocIdx = 1180; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sources___13303 = (r0); - r0 = pxsim_numops_toBoolDecr(s.sources___13303); - 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; } + s.physics___29503 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 351; s.pc = 1; return s.tmp_0; case 1: - case 2: - s.tmp_2 = particles_sortSources__P5291_mk(s); - s.tmp_2.arg0 = s.sources___13303; - s.callLocIdx = 1181; s.pc = 7; return s.tmp_2; - case 7: r0 = s.retval; - r0 = pxsim.control.millis(); - s.time___13310 = (r0); - r0 = (s.time___13310 - globals.lastUpdate___5283); - s.dt___13313 = (r0); - globals.lastUpdate___5283 = (s.time___13310); - s.i___13319 = (0); - case 3: - s.tmp_1 = r0 = s.i___13319; - r0 = pxsim_Array__length(s.sources___13303); + r0 = r0.fields["physicsEngine"]; + s.physics___29503 = (r0); + s.tmp_0 = PhysicsEngine__C20549_v2_4_mk(s); + s.tmp_0.arg0 = s.physics___29503; + s.tmp_0.arg1 = s.arg0; + r0 = (s.arg1 * 256); 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__P3158_mk(s); - r0 = pxsim_Array__getAt(s.sources___13303, s.i___13319); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.dt___13313; - s.callLocIdx = 1182; s.pc = 8; return s.tmp_3; - case 8: + 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__C20549_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.i___13319 + 1); - s.i___13319 = (r0); - { step = 3; continue; } - case 4: - case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_updateParticles__P5289.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} +Sprite_left__P20438.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 particles_updateParticles__P5289_mk(s) { +function Sprite_left__P20438_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_updateParticles__P5289, depth: s.depth + 1, + parent: s, fn: Sprite_left__P20438, 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___13303: undefined, - time___13310: undefined, - dt___13313: undefined, - i___13319: undefined, + physics___29503: undefined, + arg0: undefined, + arg1: undefined, } } -function particles_ParticleSource__update__P3158(s) { +function Sprite_left__P20437(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24187,266 +24328,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___13382 = undefined; - s.current___13401 = undefined; - s.fixedDt___13409 = 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__C3151_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"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 !== undefined); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_x"]; 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.tmp_4 - s.arg1); - 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__P3165_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1153; s.pc = 28; return s.tmp_0; - case 28: - r0 = s.retval; - 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 = 1154; 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 = 1155; 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__P3163_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 1156; 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__C3187_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__C3187_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___13382 = (r0); - r0 = pxsim_numops_toBoolDecr(s.p___13382); - 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___13382).fields["next"] = (s.tmp_2); - r0 = (s.arg0).fields["head"] = (s.p___13382); - { 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___13401 = (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___13409 = (r0); - r0 = pxsim_numops_toBoolDecr(s.fixedDt___13409); - if (!r0) { step = 23; continue; } - case 19: - r0 = s.current___13401.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___13401; - 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__C3151_v4_3_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.current___13401; - s.tmp_0.arg2 = s.fixedDt___13409; - if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C3151_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___13401.fields["next"]; - s.tmp_0 = r0; - s.current___13401 = (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___13401; - 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___13401.fields["next"]; - s.tmp_0 = r0; - s.current___13401 = (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) + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource__update__P3158.info = {"start":3694,"length":1400,"line":124,"column":8,"endLine":164,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"_update","argumentNames":["this","dt"]} +Sprite_left__P20437.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__P20437.isGetter = true; -function particles_ParticleSource__update__P3158_mk(s) { +function Sprite_left__P20437_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource__update__P3158, depth: s.depth + 1, + parent: s, fn: Sprite_left__P20437, 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___13382: undefined, - current___13401: undefined, - fixedDt___13409: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_updateParticle__P5285(s) { +function Sprite_width__P20435(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24458,89 +24368,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, particles_ParticleSource__C3151_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); - 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.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); - 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) + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_width"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 / 256); + return leaveAccessor(s, r0) default: oops() } } } -particles_ParticleSource_updateParticle__P5285.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"]} +Sprite_width__P20435.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__P20435.isGetter = true; -function particles_ParticleSource_updateParticle__P5285_mk(s) { +function Sprite_width__P20435_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_updateParticle__P5285, depth: s.depth + 1, + parent: s, fn: Sprite_width__P20435, 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 Fx_rightShift__P171(s) { +function scene_systemMenu_MenuOption_setTheme__P21130(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24555,17 +24409,26 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 >> s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_VT)) failedCast(r0); + r0 = (s.arg0).fields["theme"] = (s.arg1); + s.tmp_0 = scene_systemMenu_MenuOption_updateCard__P23237_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 985; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_rightShift__P171.info = {"start":2266,"length":108,"line":71,"column":4,"endLine":73,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"rightShift","argumentNames":["a","n"]} +scene_systemMenu_MenuOption_setTheme__P21130.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 Fx_rightShift__P171_mk(s) { +function scene_systemMenu_MenuOption_setTheme__P21130_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_rightShift__P171, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_setTheme__P21130, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, arg1: undefined, } } @@ -24574,7 +24437,7 @@ function Fx_rightShift__P171_mk(s) { -function particles_ParticleFactory_createParticle__P3189(s) { +function scene_systemMenu_MenuOption_position__P21128(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24584,83 +24447,78 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___13492 = 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_ParticleFactory__C3187_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C3132_VT); - s.p___13492 = (r0); - s.tmp_0 = r0 = s.p___13492; - 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 = 1207; s.pc = 1; return s.tmp_3; } - } + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_VT)) failedCast(r0); + r0 = (s.arg0).fields["top"] = (s.arg2); + s.tmp_0 = Sprite_left__P20438_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 976; s.pc = 1; return s.tmp_0; case 1: 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["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___13492; - 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 = 1209; s.pc = 2; return s.tmp_3; } - } + s.tmp_0 = Sprite_top__P20442_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 977; s.pc = 2; return s.tmp_0; 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["_y"] = (s.tmp_1); - r0 = (s.p___13492).fields["vx"] = (0); - r0 = (s.p___13492).fields["vy"] = (0); - r0 = (s.p___13492).fields["lifespan"] = (500); - r0 = s.p___13492; + s.tmp_0 = Sprite_x__P20393_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_x__P20392_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 978; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 979; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.tmp_0 = Sprite_y__P20395_mk(s); + r0 = s.arg0.fields["icon"]; + s.tmp_0.arg0 = r0; + s.tmp_1 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["card"]; + s.tmp_1.arg0 = r0; + s.callLocIdx = 980; s.pc = 6; return s.tmp_1; + case 6: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.callLocIdx = 981; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_createParticle__P3189.info = {"start":1822,"length":282,"line":67,"column":8,"endLine":77,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +scene_systemMenu_MenuOption_position__P21128.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 particles_ParticleFactory_createParticle__P3189_mk(s) { +function scene_systemMenu_MenuOption_position__P21128_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_createParticle__P3189, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_position__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, - tmp_4: undefined, - p___13492: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function game_onUpdateInterval__P3024(s) { +function scene_systemMenu_MenuOption_show__P21127(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24670,74 +24528,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.timer___13283 = 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); + r0 = s.arg0; + if (!checkSubtype(r0, scene_systemMenu_MenuOption__C21125_VT)) failedCast(r0); + r0 = s.arg0.fields["theme"]; 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_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 = 971; s.pc = 3; return s.tmp_1; } + } + case 3: + r0 = s.retval; { step = 2; continue; } case 1: - r0 = (s.arg0 < 0); + r0 = globals.CARD_NORMAL___21149; 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: + s.tmp_3 = r0 = s.arg0; + s.tmp_5 = sprites_create__P20313_mk(s); + s.tmp_5.arg0 = s.tmp_2; + s.tmp_5.arg1 = undefined; + s.callLocIdx = 972; s.pc = 4; return s.tmp_5; case 4: - r0 = pxsim_pxtrt.mklocRef(); - s.timer___13283 = (r0); - r0 = pxsim_pxtrt_stlocRef(s.timer___13283, 0); - r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P13287); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___13283); - 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__P403_mk(s); - s.tmp_2 = game_eventContext__P3002_mk(s); - s.callLocIdx = 964; 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 = 968; s.pc = 6; return s.tmp_1; + 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 = 973; s.pc = 5; return s.tmp_0; } + } + case 5: + r0 = s.retval; + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = sprites_create__P20313_mk(s); + r0 = s.arg0.fields["iconImage"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = undefined; + s.callLocIdx = 974; s.pc = 6; return s.tmp_2; case 6: r0 = s.retval; - case 5: + 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 = 975; 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() } } } -game_onUpdateInterval__P3024.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_systemMenu_MenuOption_show__P21127.info = {"start":904,"length":264,"line":41,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"show","argumentNames":["this"]} -function game_onUpdateInterval__P3024_mk(s) { +function scene_systemMenu_MenuOption_show__P21127_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval__P3024, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_MenuOption_show__P21127, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - timer___13283: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, arg0: undefined, - arg1: undefined, } } -function game_onUpdateInterval_inline__P13287(s) { +function game_onShade__P21055(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24747,55 +24639,54 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.time___13288 = undefined; - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 965; s.pc = 3; return s.tmp_1; - case 3: + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = game_init__P22990_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 960; s.pc = 4; return s.tmp_0; + case 4: r0 = s.retval; - s.tmp_0 = r0; - r0 = s.tmp_0.fields["_millis"]; - s.time___13288 = (r0); - r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.time___13288); + 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 = r0 = s.caps[0]; - r0 = (s.time___13288 + 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 = 967; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; + { step = 3; continue; } case 1: case 2: + s.tmp_2 = scene_createRenderable__P20843_mk(s); + s.tmp_2.arg0 = 80; + s.tmp_2.arg1 = s.arg0; + s.tmp_2.arg2 = undefined; + s.callLocIdx = 961; s.pc = 5; return s.tmp_2; + case 5: + r0 = s.retval; + case 3: r0 = undefined; return leave(s, r0) default: oops() } } } -game_onUpdateInterval_inline__P13287.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} +game_onShade__P21055.info = {"start":15517,"length":145,"line":464,"column":4,"endLine":468,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"onShade","argumentNames":["a"]} -function game_onUpdateInterval_inline__P13287_mk(s) { +function game_onShade__P21055_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdateInterval_inline__P13287, depth: s.depth + 1, + parent: s, fn: game_onShade__P21055, 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___13288: undefined, + arg0: undefined, } } -function scene_Scene_millis__P2869(s) { +function scene_createRenderable__P20843(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24805,31 +24696,60 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.renderable___28301 = 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_Scene__C2843_VT)) failedCast(r0); - r0 = s.arg0.fields["_millis"]; + r0 = pxsim_pxtcore_mkClassInstance(scene_Renderable__C20838_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__P28307; + case 2: + // jmp value (already in r0) + s.tmp_2 = r0; + s.tmp_3 = scene_Renderable_constructor__P20839_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 = 903; s.pc = 3; return s.tmp_3; + case 3: + r0 = s.retval; + s.renderable___28301 = (s.tmp_0); + r0 = s.renderable___28301; return leave(s, r0) default: oops() } } } -scene_Scene_millis__P2869.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} +scene_createRenderable__P20843.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_Scene_millis__P2869_mk(s) { +function scene_createRenderable__P20843_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_millis__P2869, depth: s.depth + 1, + parent: s, fn: scene_createRenderable__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, + renderable___28301: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function game_onUpdate__P3023(s) { +function renderable_inline__P28307(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24839,54 +24759,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 = 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 = control_EventContext_registerFrameHandler__P403_mk(s); - s.tmp_3 = game_eventContext__P3002_mk(s); - s.callLocIdx = 962; 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 = 963; s.pc = 4; return s.tmp_2; - case 4: - r0 = s.retval; - case 3: - r0 = undefined; + r0 = true; return leave(s, r0) default: oops() } } } -game_onUpdate__P3023.info = {"start":327,"length":153,"line":13,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/gameutil.ts","functionName":"onUpdate","argumentNames":["a"]} +renderable_inline__P28307.info = {"start":875,"length":10,"line":31,"column":32,"endLine":31,"endColumn":42,"fileName":"pxt_modules/game/renderable.ts","functionName":"inline","argumentNames":[]} -function game_onUpdate__P3023_mk(s) { +function renderable_inline__P28307_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_onUpdate__P3023, depth: s.depth + 1, + parent: s, fn: renderable_inline__P28307, 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 MAX_SOURCES_inline__P13237(s) { +function scene_Renderable_constructor__P20839(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24896,54 +24786,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sz___13238 = undefined; - s.tmp_0 = control_ramSize__P346_mk(s); - s.callLocIdx = 42; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.sz___13238 = (r0); - r0 = (s.sz___13238 <= 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; } + 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__C20838_VT)) failedCast(r0); + r0 = (s.arg0).fields["handler"] = (s.arg1); + r0 = (s.arg0).fields["shouldBeVisible"] = (s.arg2); + s.tmp_0 = sprites_BaseSprite_constructor__P20134_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg3; + s.callLocIdx = 900; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.sz___13238 <= 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 = s.retval; r0 = undefined; - case 5: return leave(s, r0) default: oops() } } } -MAX_SOURCES_inline__P13237.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} +scene_Renderable_constructor__P20839.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 MAX_SOURCES_inline__P13237_mk(s) { +function scene_Renderable_constructor__P20839_mk(s) { checkStack(s.depth); return { - parent: s, fn: MAX_SOURCES_inline__P13237, depth: s.depth + 1, + parent: s, fn: scene_Renderable_constructor__P20839, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - tmp_1: undefined, - sz___13238: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function control_ramSize__P346(s) { +function scene_systemMenu_PauseMenu_constructor__P21134(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -24953,64 +24835,61 @@ 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; + 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__C21133_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 = 33554432; + s.tmp_1 = scene_systemMenu_buildMenuTheme__P21142_mk(s); + r0 = pxsim_ImageMethods.width(globals.CARD_NORMAL___21149); + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = 3; + s.tmp_1.arg2 = undefined; + s.tmp_1.arg3 = undefined; + s.callLocIdx = 999; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; case 2: // jmp value (already in r0) - s.tmp_1 = r0; - r0 = s.tmp_1; + 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() } } } -control_ramSize__P346.info = {"start":4847,"length":100,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]} +scene_systemMenu_PauseMenu_constructor__P21134.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 control_ramSize__P346_mk(s) { +function scene_systemMenu_PauseMenu_constructor__P21134_mk(s) { checkStack(s.depth); return { - parent: s, fn: control_ramSize__P346, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_PauseMenu_constructor__P21134, 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 control__ramSize__P4407(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__P4407.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__P4407_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: control__ramSize__P4407, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, -} } - - - - - -function particles_SprayFactory_constructor__P3192(s) { +function scene_systemMenu_buildMenuTheme__P21142(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25020,6 +24899,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.cardsPerRow___30588 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -25027,38 +24907,131 @@ switch (step) { s.arg3 = (s.lambdaArgs[3]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C3191_VT)) failedCast(r0); - r0 = undefined; - s.tmp_0 = particles_initTrig__P5309_mk(s); - s.callLocIdx = 1214; s.pc = 1; return s.tmp_0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_0 = r0; + r0 = (s.arg0 + s.arg1); + s.tmp_1 = r0; + r0 = pxsim.Math_.idiv(s.tmp_0, s.tmp_1); + s.cardsPerRow___30588 = (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; - s.tmp_0 = particles_SprayFactory_setSpeed__P3195_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1215; s.pc = 2; return s.tmp_0; + r0 = globals.font8___20013; case 2: - r0 = s.retval; - s.tmp_0 = particles_SprayFactory_setDirection__P3196_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg2; - s.tmp_0.arg2 = s.arg3; - s.callLocIdx = 1216; s.pc = 3; return s.tmp_0; + // 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__P20016_mk(s); + s.tmp_1.arg0 = s.arg2; + s.callLocIdx = 1109; s.pc = 5; return s.tmp_1; + case 5: r0 = s.retval; - r0 = undefined; + 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___30588); + r0 = pxsim_ImageMethods.width(globals.screen___20070); + s.tmp_3 = r0; + r0 = (s.cardsPerRow___30588 * s.arg0); + s.tmp_5 = r0; + r0 = (s.cardsPerRow___30588 - 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 = 1110; 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___20070); + 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 = 1111; 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___21150); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "activeCard", globals.CARD_ACTIVE___21151); + r0 = pxsim_pxtrt.mapSetByString(s.tmp_0, "basicCard", globals.CARD_NORMAL___21149); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -particles_SprayFactory_constructor__P3192.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"]} +scene_systemMenu_buildMenuTheme__P21142.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 particles_SprayFactory_constructor__P3192_mk(s) { +function scene_systemMenu_buildMenuTheme__P21142_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_constructor__P3192, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_buildMenuTheme__P21142, 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___30588: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -25069,7 +25042,7 @@ function particles_SprayFactory_constructor__P3192_mk(s) { -function particles_initTrig__P5309(s) { +function image_doubledFont__P20016(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25079,47 +25052,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.cachedSin___5295); - 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__P3185_mk(s); - s.tmp_2.arg0 = 100; - s.callLocIdx = 1202; s.pc = 3; return s.tmp_2; - case 3: - r0 = s.retval; - globals.cachedSin___5295 = (r0); - s.tmp_0 = particles_cacheCos__P3186_mk(s); - s.tmp_0.arg0 = 100; - s.callLocIdx = 1203; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - globals.cachedCos___5296 = (r0); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + s.tmp_0 = image_scaledFont__P20017_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 2; + s.callLocIdx = 88; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = undefined; + r0 = s.retval; return leave(s, r0) default: oops() } } } -particles_initTrig__P5309.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} +image_doubledFont__P20016.info = {"start":12008,"length":82,"line":146,"column":4,"endLine":148,"endColumn":5,"fileName":"pxt_modules/screen/text.ts","functionName":"doubledFont","argumentNames":["f"]} -function particles_initTrig__P5309_mk(s) { +function image_doubledFont__P20016_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_initTrig__P5309, depth: s.depth + 1, + parent: s, fn: image_doubledFont__P20016, 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 particles_cacheCos__P3186(s) { +function image_scaledFont__P20017(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25129,47 +25090,117 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.cos___13118 = undefined; - s.anglePerSlice___13120 = undefined; - s.i___13126 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.cos___13118 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___13120 = (r0); - s.i___13126 = (0); - case 1: - r0 = (s.i___13126 < s.arg0); + 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 = 2; continue; } - s.tmp_1 = r0 = s.cos___13118; - r0 = (s.i___13126 * s.anglePerSlice___13120); - s.tmp_4 = r0; - r0 = pxsim.Math_.cos(s.tmp_4); + if (!r0) { step = 1; continue; } + r0 = s.arg0; + { step = 5; continue; } + 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 = 89; s.pc = 6; return s.tmp_4; } + } + case 6: + r0 = s.retval; s.tmp_3 = r0; - r0 = (s.tmp_3 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); + r0 = (s.tmp_3 * s.arg1); s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___13126 + 1); - s.i___13126 = (r0); - { step = 1; continue; } - case 2: - r0 = s.cos___13118; + 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 = 90; 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 = 91; 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 = 92; s.pc = 9; return s.tmp_11; } + } + case 9: + r0 = s.retval; + 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 = 93; 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() } } } -particles_cacheCos__P3186.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} +image_scaledFont__P20017.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 particles_cacheCos__P3186_mk(s) { +function image_scaledFont__P20017_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheCos__P3186, depth: s.depth + 1, + parent: s, fn: image_scaledFont__P20017, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -25177,17 +25208,25 @@ function particles_cacheCos__P3186_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - cos___13118: undefined, - anglePerSlice___13120: undefined, - i___13126: 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, } } -function particles_cacheSin__P3185(s) { +function controller_Button_onEvent__P20234(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25197,65 +25236,46 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.sin___13144 = undefined; - s.anglePerSlice___13146 = undefined; - s.i___13152 = undefined; + s.eventHandler___30717 = 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___13144 = (r0); - r0 = (6.283185307179586 / s.arg0); - s.anglePerSlice___13146 = (r0); - s.i___13152 = (0); + r0 = s.arg0; + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + s.tmp_0 = controller_Button_getOrCreateHandlerForEvent__P22771_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 202; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.i___13152 < s.arg0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.sin___13144; - r0 = (s.i___13152 * s.anglePerSlice___13146); - 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 = (s.tmp_5 | 0); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___13152 + 1); - s.i___13152 = (r0); - { step = 1; continue; } - case 2: - r0 = s.sin___13144; + r0 = s.retval; + s.eventHandler___30717 = (r0); + r0 = (s.eventHandler___30717).fields["callback"] = (s.arg2); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_cacheSin__P3185.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} +controller_Button_onEvent__P20234.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 particles_cacheSin__P3185_mk(s) { +function controller_Button_onEvent__P20234_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_cacheSin__P3185, depth: s.depth + 1, + parent: s, fn: controller_Button_onEvent__P20234, 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, - sin___13144: undefined, - anglePerSlice___13146: undefined, - i___13152: undefined, + eventHandler___30717: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function particles_SprayFactory_setDirection__P3196(s) { +function controller_Button_getOrCreateHandlerForEvent__P22771(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25265,52 +25285,132 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.handlerState___30738 = undefined; + s.eventHandler___30747 = undefined; + s.unnamed160___U2 = undefined; + s.unnamed161___U3 = undefined; + s.newHandler___30763 = 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_SprayFactory__C3191_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P5314_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 = 1224; s.pc = 1; return s.tmp_4; - case 1: + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + s.tmp_3 = controller_Button_handlerState__P22766_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 212; s.pc = 10; return s.tmp_3; + case 10: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___5308); s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["minAngle"] = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_4 = particles_toRadians__P5314_mk(s); - s.tmp_4.arg0 = s.arg2; - s.callLocIdx = 1225; s.pc = 2; return s.tmp_4; + 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(controller_ButtonEventHandlerState__C20223_VT); + s.tmp_4 = r0; + s.tmp_5 = controller_ButtonEventHandlerState_constructor__P20224_mk(s); + s.tmp_5.arg0 = s.tmp_4; + r0 = s.arg0.fields["id"]; + s.tmp_5.arg1 = r0; + s.callLocIdx = 214; s.pc = 11; return s.tmp_5; + case 11: + r0 = s.retval; + s.tmp_7 = game_currentScene__P21037_mk(s); + s.callLocIdx = 213; 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__P22766_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 215; s.pc = 13; return s.tmp_0; + case 13: r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / globals.angleSlice___5308); + s.handlerState___30738 = (r0); + r0 = s.handlerState___30738.fields["user"]; s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); + r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["spread"] = (s.tmp_1); - r0 = undefined; + 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___30738; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = (s.tmp_3).fields["user"] = (s.tmp_4); + case 3: + case 4: + s.eventHandler___30747 = (undefined); + r0 = s.handlerState___30738.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___30747 = (r0); + r0 = s.eventHandler___30747.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___30747; + { step = 9; continue; } + case 6: + 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__P30760); + 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__P18429_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 = 217; s.pc = 14; return s.tmp_5; + case 14: + r0 = s.retval; + r0 = pxsim_pxtcore_mkClassInstance(controller_ButtonHandler__C20221_VT); + s.tmp_0 = r0; + s.tmp_1 = controller_ButtonHandler_constructor__P20222_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg1; + s.tmp_1.arg2 = undefined; + s.callLocIdx = 218; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.newHandler___30763 = (s.tmp_0); + r0 = s.handlerState___30738.fields["user"]; + s.tmp_0 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.newHandler___30763); + r0 = s.newHandler___30763; + case 9: return leave(s, r0) default: oops() } } } -particles_SprayFactory_setDirection__P3196.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"]} +controller_Button_getOrCreateHandlerForEvent__P22771.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 particles_SprayFactory_setDirection__P3196_mk(s) { +function controller_Button_getOrCreateHandlerForEvent__P22771_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setDirection__P3196, depth: s.depth + 1, + parent: s, fn: controller_Button_getOrCreateHandlerForEvent__P22771, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -25319,16 +25419,21 @@ function particles_SprayFactory_setDirection__P3196_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, + tmp_7: undefined, + handlerState___30738: undefined, + eventHandler___30747: undefined, + unnamed160___U2: undefined, + unnamed161___U3: undefined, + newHandler___30763: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function particles_toRadians__P5314(s) { +function controller_Button_getOrCreateHandlerForEvent_inline__P30760(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25338,52 +25443,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 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_3 = Math_abs__P128_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 1206; s.pc = 3; return s.tmp_3; - 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; } + s.tmp_0 = controller_Button_runButtonEvents__P22770_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.caps[1]; + s.callLocIdx = 216; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.arg0 % 360); - s.arg0 = (r0); - case 2: - r0 = (s.arg0 * 0.017453292519943295); + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_toRadians__P5314.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} +controller_Button_getOrCreateHandlerForEvent_inline__P30760.info = {"start":9186,"length":33,"line":265,"column":44,"endLine":265,"endColumn":77,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} -function particles_toRadians__P5314_mk(s) { +function controller_Button_getOrCreateHandlerForEvent_inline__P30760_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_toRadians__P5314, depth: s.depth + 1, + parent: s, fn: controller_Button_getOrCreateHandlerForEvent_inline__P30760, 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_ParticleFactory_constructor__P3188(s) { +function controller_Button_runButtonEvents__P22770(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25393,63 +25477,135 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.handlerState___30777 = undefined; + s.userHandler___30781 = undefined; + s.eventHandler___30792 = 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, particles_ParticleFactory__C3187_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -particles_ParticleFactory_constructor__P3188.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__P3188_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: particles_ParticleFactory_constructor__P3188, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, -} } - - - - - -function particles_ParticleSource_setFactory__P3170(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, particles_ParticleSource__C3151_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + s.tmp_0 = controller_Button_handlerState__P22766_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 208; s.pc = 14; return s.tmp_0; + case 14: + r0 = s.retval; + s.handlerState___30777 = (r0); + r0 = pxsim_numops_toBoolDecr(s.handlerState___30777); + 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["_factory"] = (s.arg1); + { step = 13; continue; } case 1: case 2: + s.tmp_2 = controller_Button_getOrCreateHandlerForEvent__P22771_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 209; s.pc = 15; return s.tmp_2; + case 15: + r0 = s.retval; + s.userHandler___30781 = (r0); + r0 = s.userHandler___30781.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___30781; + if (!s.tmp_1.arg0.vtable.iface) { + setupLambda(s.tmp_1, pxsim_pxtrt.mapGetByString(s.tmp_1.arg0, "callback"), 1); + s.callLocIdx = 210; 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 = 210; s.pc = 16; return s.tmp_1; } + else if (s.tmp_1.fn.isGetter) { s.tmp_1.stage2Call = true; s.callLocIdx = 210; s.pc = 16; return s.tmp_1;; } + else { s.callLocIdx = 210; s.pc = 16; return s.tmp_1; } + } + case 16: + r0 = s.retval; + case 3: + case 4: + r0 = s.handlerState___30777.fields["system"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 11; continue; } + s.eventHandler___30792 = (undefined); + r0 = s.handlerState___30777.fields["system"]; + s.unnamed158___U3 = (r0); + s.unnamed159___U4 = (0); + case 5: + s.tmp_0 = r0 = s.unnamed159___U4; + r0 = pxsim_Array__length(s.unnamed158___U3); + s.tmp_1 = r0; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 10; continue; } + r0 = pxsim_Array__getAt(s.unnamed158___U3, s.unnamed159___U4); + s.eventHandler___30792 = (r0); + r0 = s.eventHandler___30792.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___30792.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___30792; + if (!s.tmp_5.arg0.vtable.iface) { + setupLambda(s.tmp_5, pxsim_pxtrt.mapGetByString(s.tmp_5.arg0, "callback"), 1); + s.callLocIdx = 211; 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 = 211; s.pc = 17; return s.tmp_5; } + else if (s.tmp_5.fn.isGetter) { s.tmp_5.stage2Call = true; s.callLocIdx = 211; s.pc = 17; return s.tmp_5;; } + else { s.callLocIdx = 211; 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() } } } -particles_ParticleSource_setFactory__P3170.info = {"start":8124,"length":114,"line":272,"column":8,"endLine":275,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setFactory","argumentNames":["this","factory"]} +controller_Button_runButtonEvents__P22770.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 particles_ParticleSource_setFactory__P3170_mk(s) { +function controller_Button_runButtonEvents__P22770_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setFactory__P3170, depth: s.depth + 1, + parent: s, fn: controller_Button_runButtonEvents__P22770, 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___30777: undefined, + userHandler___30781: undefined, + eventHandler___30792: undefined, + unnamed158___U3: undefined, + unnamed159___U4: undefined, arg0: undefined, arg1: undefined, } } @@ -25458,7 +25614,7 @@ function particles_ParticleSource_setFactory__P3170_mk(s) { -function particles_ParticleSource_setRate__P3168(s) { +function controller_Button_handlerState__P22766(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25468,43 +25624,77 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.state___30808 = 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__C3151_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, controller_Button__C20227_VT)) failedCast(r0); + s.state___30808 = (undefined); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 198; 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.unnamed157___U2; + r0 = pxsim_Array__length(s.unnamed156___U1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["period"] = (s.tmp_1); - r0 = (s.arg0).fields["timer"] = (0); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 4; continue; } + r0 = pxsim_Array__getAt(s.unnamed156___U1, s.unnamed157___U2); + s.state___30808 = (r0); + r0 = s.state___30808.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___30808; + { 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_setRate__P3168.info = {"start":7802,"length":139,"line":259,"column":8,"endLine":262,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setRate","argumentNames":["this","particlesPerSecond"]} +controller_Button_handlerState__P22766.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__P22766.isGetter = true; -function particles_ParticleSource_setRate__P3168_mk(s) { +function controller_Button_handlerState__P22766_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setRate__P3168, depth: s.depth + 1, + parent: s, fn: controller_Button_handlerState__P22766, 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___30808: undefined, + unnamed156___U1: undefined, + unnamed157___U2: undefined, arg0: undefined, - arg1: undefined, } } -function particles_ParticleSource_setAnchor__P3167(s) { +function controller_ButtonEventHandlerState_constructor__P20224(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25520,18 +25710,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ParticleSource__C3151_VT)) failedCast(r0); - r0 = (s.arg0).fields["anchor"] = (s.arg1); + if (!checkSubtype(r0, controller_ButtonEventHandlerState__C20223_VT)) failedCast(r0); + r0 = (s.arg0).fields["id"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAnchor__P3167.info = {"start":7594,"length":79,"line":251,"column":8,"endLine":253,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"setAnchor","argumentNames":["this","anchor"]} +controller_ButtonEventHandlerState_constructor__P20224.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 particles_ParticleSource_setAnchor__P3167_mk(s) { +function controller_ButtonEventHandlerState_constructor__P20224_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAnchor__P3167, depth: s.depth + 1, + parent: s, fn: controller_ButtonEventHandlerState_constructor__P20224, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -25541,7 +25731,7 @@ function particles_ParticleSource_setAnchor__P3167_mk(s) { -function particles_ParticleSource_destroy__P3165(s) { +function controller_ButtonHandler_constructor__P20222(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25553,49 +25743,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, particles_ParticleSource__C3151_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleSource_enabled__P3164_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = false; - s.callLocIdx = 1163; 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__P3159_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 1164; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; + if (!checkSubtype(r0, controller_ButtonHandler__C20221_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() } } } -particles_ParticleSource_destroy__P3165.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} +controller_ButtonHandler_constructor__P20222.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 particles_ParticleSource_destroy__P3165_mk(s) { +function controller_ButtonHandler_constructor__P20222_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_destroy__P3165, depth: s.depth + 1, + parent: s, fn: controller_ButtonHandler_constructor__P20222, 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 particles_ParticleSource_setAcceleration__P3160(s) { +function scene_systemMenu_initScreen__P23250(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25605,50 +25781,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, particles_ParticleSource__C3151_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); - s.tmp_2 = r0; - r0 = (s.tmp_2 | 0); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["ay"] = (s.tmp_1); + s.brightness___30820 = undefined; + s.tmp_0 = settings_readNumber__P20106_mk(s); + s.tmp_0.arg0 = "#brightness"; + s.callLocIdx = 1118; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.brightness___30820 = (r0); + r0 = (s.brightness___30820 !== undefined); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = helpers_setScreenBrightness__P20003_mk(s); + s.tmp_1.arg0 = globals.screen___20070; + s.tmp_1.arg1 = s.brightness___30820; + s.callLocIdx = 1119; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleSource_setAcceleration__P3160.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"]} +scene_systemMenu_initScreen__P23250.info = {"start":13388,"length":175,"line":405,"column":4,"endLine":409,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initScreen","argumentNames":[]} -function particles_ParticleSource_setAcceleration__P3160_mk(s) { +function scene_systemMenu_initScreen__P23250_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_setAcceleration__P3160, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initScreen__P23250, 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, + brightness___30820: undefined, } } -function helpers_arrayShift__P102(s) { +function settings_readNumber__P20106(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25658,21 +25830,69 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.buf___30831 = undefined; + s.nums___30838 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim_Array_.removeAt(s.arg0, 0); + r0 = pxsim.settings._get(s.arg0); + s.buf___30831 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___30831); + 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__P18221_mk(s); + s.tmp_2.arg0 = s.buf___30831; + s.tmp_2.arg1 = 0; + s.callLocIdx = 128; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + s.nums___30838 = (r0); + s.tmp_0 = r0 = s.nums___30838; + 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___30838); + 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___30838, 0); + { step = 7; continue; } + case 4: + case 5: + r0 = undefined; + { step = 7; continue; } + case 6: + r0 = undefined; + case 7: return leave(s, r0) default: oops() } } } -helpers_arrayShift__P102.info = {"start":4045,"length":82,"line":153,"column":4,"endLine":155,"endColumn":5,"fileName":"pxt_modules/base/pxt-helpers.ts","functionName":"arrayShift","argumentNames":["arr"]} +settings_readNumber__P20106.info = {"start":3283,"length":313,"line":131,"column":4,"endLine":141,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readNumber","argumentNames":["key"]} -function helpers_arrayShift__P102_mk(s) { +function settings_readNumber__P20106_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayShift__P102, depth: s.depth + 1, + parent: s, fn: settings_readNumber__P20106, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + buf___30831: undefined, + nums___30838: undefined, arg0: undefined, } } @@ -25680,7 +25900,7 @@ function helpers_arrayShift__P102_mk(s) { -function particles_SprayFactory_setSpeed__P3195(s) { +function settings_readBuffer__P20103(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25692,40 +25912,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, particles_SprayFactory__C3191_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); - r0 = undefined; + r0 = pxsim.settings._get(s.arg0); return leave(s, r0) default: oops() } } } -particles_SprayFactory_setSpeed__P3195.info = {"start":3322,"length":92,"line":119,"column":8,"endLine":121,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"setSpeed","argumentNames":["this","pixelsPerSecond"]} +settings_readBuffer__P20103.info = {"start":2694,"length":72,"line":103,"column":4,"endLine":105,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readBuffer","argumentNames":["key"]} -function particles_SprayFactory_setSpeed__P3195_mk(s) { +function settings_readBuffer__P20103_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_setSpeed__P3195, depth: s.depth + 1, + parent: s, fn: settings_readBuffer__P20103, 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 particles_ConfettiFactory_constructor__P3219(s) { +function msgpack_unpackNumberArray__P18221(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25735,99 +25942,120 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.confetti___13531 = undefined; - s.i___13547 = undefined; + s.res___30851 = undefined; + s.fmt___30858 = undefined; + s.v___30867 = 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__C3218_VT)) failedCast(r0); r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim.image.ofBuffer(_hex13534); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - r0 = pxsim.image.ofBuffer(_hex13536); - s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); - r0 = pxsim.image.ofBuffer(_hex13538); - s.tmp_3 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); - r0 = pxsim.image.ofBuffer(_hex13540); - s.tmp_4 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); - r0 = pxsim.image.ofBuffer(_hex13542); - s.tmp_5 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); - s.confetti___13531 = (s.tmp_0); - s.tmp_0 = particles_ShapeFactory_constructor__P3214_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___13531, 0); - s.tmp_0.arg3 = r0; - s.callLocIdx = 1248; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - s.i___13547 = (1); + s.res___30851 = (r0); case 1: - s.tmp_1 = r0 = s.i___13547; - r0 = pxsim_Array__length(s.confetti___13531); + 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 = 2; continue; } - s.tmp_3 = particles_ShapeFactory_addShape__P3215_mk(s); - s.tmp_3.arg0 = s.arg0; - r0 = pxsim_Array__getAt(s.confetti___13531, s.i___13547); - s.tmp_3.arg1 = r0; - s.callLocIdx = 1249; s.pc = 4; return s.tmp_3; + if (!r0) { step = 10; continue; } + s.tmp_3 = r0 = s.arg1; + r0 = (s.tmp_3 + 1); + s.arg1 = (r0); + s.tmp_4 = msgpack_tagFormat__P22418_mk(s); + r0 = pxsim.BufferMethods.getByte(s.arg0, s.tmp_3); + s.tmp_4.arg0 = r0; + s.callLocIdx = 19; s.pc = 12; return s.tmp_4; + case 12: + r0 = s.retval; + s.fmt___30858 = (r0); + r0 = (s.fmt___30858 === 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___30867 = (r0); + r0 = (-31 <= s.v___30867); + 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___30867 <= 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___30851, s.v___30867); + { step = 5; continue; } case 4: + r0 = null; + { step = 11; continue; } + case 5: + { step = 7; continue; } + case 6: + s.tmp_0 = r0 = s.res___30851; + r0 = pxsim.BufferMethods.getNumber(s.arg0, s.fmt___30858, 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__P18213_mk(s); + s.tmp_2.arg0 = s.fmt___30858; + s.callLocIdx = 20; s.pc = 13; return s.tmp_2; + case 13: r0 = s.retval; - r0 = (s.i___13547 + 1); - s.i___13547 = (r0); + 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 2: - r0 = (s.arg0).fields["minLifespan"] = (1000); - r0 = (s.arg0).fields["maxLifespan"] = (4500); - r0 = undefined; + case 10: + r0 = s.res___30851; + case 11: return leave(s, r0) default: oops() } } } -particles_ConfettiFactory_constructor__P3219.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"]} +msgpack_unpackNumberArray__P18221.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 particles_ConfettiFactory_constructor__P3219_mk(s) { +function msgpack_unpackNumberArray__P18221_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ConfettiFactory_constructor__P3219, depth: s.depth + 1, + parent: s, fn: msgpack_unpackNumberArray__P18221, 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___13531: undefined, - i___13547: undefined, + res___30851: undefined, + fmt___30858: undefined, + v___30867: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -const _hex13534 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") -const _hex13536 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") -const _hex13538 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") -const _hex13540 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") -const _hex13542 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function particles_ShapeFactory_addShape__P3215(s) { +function scene_systemMenu_initVolume__P23249(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25837,41 +26065,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, particles_ShapeFactory__C3213_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(s.arg1); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["sources"]; + s.vol___30912 = undefined; + s.tmp_0 = settings_readNumber__P20106_mk(s); + s.tmp_0.arg0 = "#volume"; + s.callLocIdx = 1116; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.vol___30912 = (r0); + r0 = (s.vol___30912 !== undefined); s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_1 = music_setVolume__P19658_mk(s); + s.tmp_1.arg0 = s.vol___30912; + s.callLocIdx = 1117; s.pc = 4; return s.tmp_1; + case 4: + r0 = s.retval; case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_addShape__P3215.info = {"start":7079,"length":83,"line":225,"column":8,"endLine":227,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"addShape","argumentNames":["this","shape"]} +scene_systemMenu_initVolume__P23249.info = {"start":13238,"length":144,"line":399,"column":4,"endLine":403,"endColumn":5,"fileName":"pxt_modules/game/systemmenu.ts","functionName":"initVolume","argumentNames":[]} -function particles_ShapeFactory_addShape__P3215_mk(s) { +function scene_systemMenu_initVolume__P23249_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_addShape__P3215, depth: s.depth + 1, + parent: s, fn: scene_systemMenu_initVolume__P23249, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, - arg0: undefined, - arg1: undefined, + tmp_1: undefined, + vol___30912: undefined, } } -function particles_ShapeFactory_constructor__P3214(s) { +function game_GameOverConfig_constructor__P21026(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25883,73 +26115,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_ShapeFactory__C3213_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_constructor__P3202_mk(s); + if (!checkSubtype(r0, game_GameOverConfig__C21011_VT)) failedCast(r0); + s.tmp_0 = game_GameOverConfig_init__P21027_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 = 1238; s.pc = 1; return s.tmp_0; + s.callLocIdx = 939; s.pc = 1; return s.tmp_0; case 1: 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 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_constructor__P3214.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"]} +game_GameOverConfig_constructor__P21026.info = {"start":893,"length":50,"line":35,"column":8,"endLine":37,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"inline","argumentNames":["this"]} -function particles_ShapeFactory_constructor__P3214_mk(s) { +function game_GameOverConfig_constructor__P21026_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_constructor__P3214, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_constructor__P21026, 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__P3202(s) { +function game_GameOverConfig_init__P21027(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -25961,78 +26155,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_AreaFactory__C3197_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_constructor__P3192_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 = 1226; 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; } + if (!checkSubtype(r0, game_GameOverConfig__C21011_VT)) failedCast(r0); + r0 = (s.arg0).fields["scoringType"] = (0); + r0 = (s.arg0).fields["winEffect"] = (globals.confetti___21312); + r0 = (s.arg0).fields["loseEffect"] = (globals.melt___21334); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = music_melodyPlayable__P19961_mk(s); + s.tmp_2.arg0 = globals.powerUp___19688; + s.callLocIdx = 940; s.pc = 1; return s.tmp_2; case 1: - r0 = 150; + 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__P19961_mk(s); + s.tmp_2.arg0 = globals.wawawawaa___19685; + s.callLocIdx = 941; s.pc = 2; return s.tmp_2; 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__C3059_VT); - s.tmp_0 = r0; - s.tmp_1 = Math_FastRandom_constructor__P3061_mk(s); - s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = undefined; - s.callLocIdx = 1227; s.pc = 6; return s.tmp_1; - case 6: r0 = s.retval; - r0 = (s.arg0).fields["galois"] = (s.tmp_0); + 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() } } } -particles_AreaFactory_constructor__P3202.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"]} +game_GameOverConfig_init__P21027.info = {"start":953,"length":701,"line":39,"column":8,"endLine":54,"endColumn":9,"fileName":"pxt_modules/game/game.ts","functionName":"init","argumentNames":["this"]} -function particles_AreaFactory_constructor__P3202_mk(s) { +function game_GameOverConfig_init__P21027_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_constructor__P3202, depth: s.depth + 1, + parent: s, fn: game_GameOverConfig_init__P21027, 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, } } -function effects_ScreenEffect_constructor__P3267(s) { +function melt_inline__P30975(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26042,49 +26218,96 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.rounds___30978 = undefined; + s.j___30986 = undefined; + s.x___30991 = undefined; + s.y___30997 = undefined; + s.c___31003 = 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_ScreenEffect__C3266_VT)) failedCast(r0); - s.tmp_0 = effects_ParticleEffect_constructor__P3263_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 = 1255; s.pc = 1; return s.tmp_0; + 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___30978 = (r0); + s.j___30986 = (0); case 1: + r0 = (s.j___30986 < s.rounds___30978); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = Math_FastRandom_randomRange__P21101_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; - r0 = (s.arg0).fields["sceneDefaultRate"] = (s.arg2); + s.x___30991 = (r0); + s.tmp_0 = Math_FastRandom_randomRange__P21101_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___30997 = (r0); + r0 = pxsim_ImageMethods.getPixel(s.arg0, s.x___30991, s.y___30997); + s.c___31003 = (r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___30991; + r0 = (s.y___30997 + 1); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___31003); + s.tmp_0 = r0 = s.arg0; + s.tmp_1 = r0 = s.x___30991; + r0 = (s.y___30997 + 2); + s.tmp_2 = r0; + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_2, s.c___31003); + r0 = (s.j___30986 + 1); + s.j___30986 = (r0); + { step = 1; continue; } + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -effects_ScreenEffect_constructor__P3267.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"]} +melt_inline__P30975.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 effects_ScreenEffect_constructor__P3267_mk(s) { +function melt_inline__P30975_mk(s) { checkStack(s.depth); return { - parent: s, fn: effects_ScreenEffect_constructor__P3267, depth: s.depth + 1, + parent: s, fn: melt_inline__P30975, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + rounds___30978: undefined, + j___30986: undefined, + x___30991: undefined, + y___30997: undefined, + c___31003: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, - arg4: undefined, } } -function effects_ParticleEffect_constructor__P3263(s) { +function confetti_inline__P31029(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26094,82 +26317,98 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.factory___31032 = 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, effects_ParticleEffect__C3262_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() -} } } -effects_ParticleEffect_constructor__P3263.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 effects_ParticleEffect_constructor__P3263_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: effects_ParticleEffect_constructor__P3263, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function music_melodyPlayable__P1923(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_mkClassInstance(particles_ConfettiFactory__C21256_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; } } - r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayable__C1916_VT); + 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__P21257_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___31032 = (s.tmp_0); + s.tmp_0 = particles_SprayFactory_setSpeed__P21233_mk(s); + s.tmp_0.arg0 = s.factory___31032; + 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__C21189_VT); s.tmp_0 = r0; - s.tmp_1 = music_MelodyPlayable_constructor__P1917_mk(s); + s.tmp_1 = particles_ParticleSource_constructor__P21194_mk(s); s.tmp_1.arg0 = s.tmp_0; s.tmp_1.arg1 = s.arg0; - s.callLocIdx = 73; s.pc = 1; return s.tmp_1; - case 1: + s.tmp_1.arg2 = s.arg1; + s.tmp_1.arg3 = s.factory___31032; + s.callLocIdx = 50; s.pc = 7; return s.tmp_1; + case 7: r0 = s.retval; r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -music_melodyPlayable__P1923.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} +confetti_inline__P31029.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_melodyPlayable__P1923_mk(s) { +function confetti_inline__P31029_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_melodyPlayable__P1923, depth: s.depth + 1, + parent: s, fn: confetti_inline__P31029, 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___31032: undefined, arg0: undefined, + arg1: undefined, } } -function music_MelodyPlayable_constructor__P1917(s) { +function particles_ParticleSource_constructor__P21194(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26179,35 +26418,130 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.sources___31053 = undefined; + s.removedSource___31062 = 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_MelodyPlayable__C1916_VT)) failedCast(r0); - r0 = (s.arg0).fields["melody"] = (s.arg1); - r0 = undefined; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + s.tmp_0 = sprites_BaseSprite_constructor__P20134_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.callLocIdx = 1138; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = particles_init__P23326_mk(s); + s.callLocIdx = 1139; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1140; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.sources___31053 = (r0); + r0 = pxsim_Array__length(s.sources___31053); + s.tmp_1 = r0; + r0 = (s.tmp_1 >= globals.MAX_SOURCES___23318); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = particles_sortSources__P23329_mk(s); + s.tmp_2.arg0 = s.sources___31053; + s.callLocIdx = 1141; s.pc = 8; return s.tmp_2; + case 8: + r0 = s.retval; + r0 = pxsim_Array_.removeAt(s.sources___31053, 0); + s.removedSource___31062 = (r0); + s.tmp_0 = particles_ParticleSource_clear__P21204_mk(s); + s.tmp_0.arg0 = s.removedSource___31062; + s.callLocIdx = 1143; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_destroy__P21203_mk(s); + s.tmp_0.arg0 = s.removedSource___31062; + s.callLocIdx = 1144; 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__P21206_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.callLocIdx = 1145; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAcceleration__P21198_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = 0; + s.tmp_0.arg2 = 0; + s.callLocIdx = 1146; s.pc = 12; return s.tmp_0; + case 12: + r0 = s.retval; + s.tmp_0 = particles_ParticleSource_setAnchor__P21205_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1147; 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___21209; + case 4: + // jmp value (already in r0) + s.tmp_1 = r0; + s.tmp_2 = particles_ParticleSource_setFactory__P21208_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.tmp_1; + s.callLocIdx = 1148; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + r0 = pxsim_Array__push(s.sources___31053, s.arg0); + s.tmp_0 = particles_ParticleSource_enabled__P21202_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = true; + s.callLocIdx = 1149; s.pc = 15; return s.tmp_0; + case 15: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -music_MelodyPlayable_constructor__P1917.info = {"start":1531,"length":67,"line":68,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this","melody"]} +particles_ParticleSource_constructor__P21194.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_MelodyPlayable_constructor__P1917_mk(s) { +function particles_ParticleSource_constructor__P21194_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_MelodyPlayable_constructor__P1917, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_constructor__P21194, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + sources___31053: undefined, + removedSource___31062: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function music_Playable_constructor__P1913(s) { +function particles_sortSources__P23329(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26221,19 +26555,24 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, music_Playable__C1911_VT)) failedCast(r0); + s.tmp_0 = helpers_arraySort__P18143_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = particles_sortSources_inline__P31260; + s.callLocIdx = 1187; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -music_Playable_constructor__P1913.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} +particles_sortSources__P23329.info = {"start":10026,"length":129,"line":332,"column":4,"endLine":334,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"sortSources","argumentNames":["sources"]} -function music_Playable_constructor__P1913_mk(s) { +function particles_sortSources__P23329_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Playable_constructor__P1913, depth: s.depth + 1, + parent: s, fn: particles_sortSources__P23329, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -26241,7 +26580,7 @@ function music_Playable_constructor__P1913_mk(s) { -function music_Melody_constructor__P1629(s) { +function particles_sortSources_inline__P31260(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26256,20 +26595,42 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, music_Melody__C1626_VT)) failedCast(r0); - r0 = (s.arg0).fields["_text"] = (s.arg1); - r0 = undefined; + r0 = s.arg0.fields["priority"]; + s.tmp_1 = r0; + 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: + 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); + case 2: + // jmp value (already in r0) + s.tmp_5 = r0; + r0 = s.tmp_5; return leave(s, r0) default: oops() } } } -music_Melody_constructor__P1629.info = {"start":6430,"length":67,"line":203,"column":8,"endLine":205,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"inline","argumentNames":["this","text"]} +particles_sortSources_inline__P31260.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 music_Melody_constructor__P1629_mk(s) { +function particles_sortSources_inline__P31260_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_constructor__P1629, depth: s.depth + 1, + parent: s, fn: particles_sortSources_inline__P31260, 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, } } @@ -26278,7 +26639,7 @@ function music_Melody_constructor__P1629_mk(s) { -function Fx8__P149(s) { +function particles_init__P23326(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26288,32 +26649,59 @@ 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 * 256); + s.scene___31299 = undefined; + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 1177; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.scene___31299 = (r0); + r0 = s.scene___31299.fields["particleSources"]; s.tmp_0 = r0; - r0 = (s.tmp_0 | 0); + 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___31299; + r0 = pxsim_Array__mk(); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["particleSources"] = (s.tmp_2); + r0 = pxsim.control.millis(); + globals.lastUpdate___23321 = (r0); + s.tmp_0 = game_onUpdate__P21061_mk(s); + s.tmp_0.arg0 = particles_updateParticles__P23327; + s.callLocIdx = 1178; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.tmp_0 = game_onUpdateInterval__P21062_mk(s); + s.tmp_0.arg0 = 250; + s.tmp_0.arg1 = particles_pruneParticles__P23328; + s.callLocIdx = 1179; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + case 3: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx8__P149.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} +particles_init__P23326.info = {"start":9236,"length":276,"line":304,"column":4,"endLine":311,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"init","argumentNames":[]} -function Fx8__P149_mk(s) { +function particles_init__P23326_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx8__P149, depth: s.depth + 1, + parent: s, fn: particles_init__P23326, 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, + scene___31299: undefined, } } -function SpriteKind_create__P2479(s) { +function particles_updateParticles__P23327(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26323,35 +26711,81 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = (globals.nextKind___4763 === undefined); + s.sources___31341 = undefined; + s.time___31348 = undefined; + s.dt___31351 = undefined; + s.i___31357 = undefined; + s.tmp_0 = particles_particleSources__P23332_mk(s); + s.callLocIdx = 1180; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sources___31341 = (r0); + r0 = pxsim_numops_toBoolDecr(s.sources___31341); + 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___4763 = (1000); + { step = 5; continue; } case 1: case 2: - s.tmp_0 = r0 = globals.nextKind___4763; - r0 = (s.tmp_0 + 1); - globals.nextKind___4763 = (r0); - r0 = s.tmp_0; + s.tmp_2 = particles_sortSources__P23329_mk(s); + s.tmp_2.arg0 = s.sources___31341; + s.callLocIdx = 1181; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + r0 = pxsim.control.millis(); + s.time___31348 = (r0); + r0 = (s.time___31348 - globals.lastUpdate___23321); + s.dt___31351 = (r0); + globals.lastUpdate___23321 = (s.time___31348); + s.i___31357 = (0); + case 3: + s.tmp_1 = r0 = s.i___31357; + r0 = pxsim_Array__length(s.sources___31341); + 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__P21196_mk(s); + r0 = pxsim_Array__getAt(s.sources___31341, s.i___31357); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.dt___31351; + s.callLocIdx = 1182; s.pc = 8; return s.tmp_3; + case 8: + r0 = s.retval; + r0 = (s.i___31357 + 1); + s.i___31357 = (r0); + { step = 3; continue; } + case 4: + case 5: + r0 = undefined; return leave(s, r0) default: oops() } } } -SpriteKind_create__P2479.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} +particles_updateParticles__P23327.info = {"start":9518,"length":340,"line":313,"column":4,"endLine":325,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"updateParticles","argumentNames":[]} -function SpriteKind_create__P2479_mk(s) { +function particles_updateParticles__P23327_mk(s) { checkStack(s.depth); return { - parent: s, fn: SpriteKind_create__P2479, depth: s.depth + 1, + parent: s, fn: particles_updateParticles__P23327, 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___31341: undefined, + time___31348: undefined, + dt___31351: undefined, + i___31357: undefined, } } -function controller_Button_constructor__P2195(s) { +function particles_ParticleSource__update__P21196(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26361,68 +26795,266 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___31420 = undefined; + s.current___31439 = undefined; + s.fixedDt___31447 = 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__C2189_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); + if (!checkSubtype(r0, particles_ParticleSource__C21189_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"]; + 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; } - r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P13684); - 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__P13691); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = s.arg0.fields["id"]; + s.tmp_2 = r0 = s.arg0; + 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); + r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; - r0 = pxsim.control.internalOnEvent(2051, s.tmp_1, s.tmp_0, 16); - r0 = (s.arg2 > 0); + r0 = (s.tmp_1 <= 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = undefined; + r0 = (s.arg0).fields["lifespan"] = (undefined); + s.tmp_0 = particles_ParticleSource_destroy__P21203_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1153; s.pc = 28; return s.tmp_0; + case 28: + r0 = s.retval; 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 = 1154; 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 = 1155; 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__P21201_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 1156; 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__C21225_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__C21225_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___31420 = (r0); + r0 = pxsim_numops_toBoolDecr(s.p___31420); + 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___31420).fields["next"] = (s.tmp_2); + r0 = (s.arg0).fields["head"] = (s.p___31420); + { 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___31439 = (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___31447 = (r0); + r0 = pxsim_numops_toBoolDecr(s.fixedDt___31447); + if (!r0) { step = 23; continue; } + case 19: + r0 = s.current___31439.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___31439; + 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__C21189_v4_3_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.current___31439; + s.tmp_0.arg2 = s.fixedDt___31447; + if (!checkSubtype(s.tmp_0.arg0, particles_ParticleSource__C21189_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___31439.fields["next"]; + s.tmp_0 = r0; + s.current___31439 = (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___31439; + 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___31439.fields["next"]; + s.tmp_0 = r0; + s.current___31439 = (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() } } } -controller_Button_constructor__P2195.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"]} +particles_ParticleSource__update__P21196.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 controller_Button_constructor__P2195_mk(s) { +function particles_ParticleSource__update__P21196_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_constructor__P2195, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource__update__P21196, 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___31420: undefined, + current___31439: undefined, + fixedDt___31447: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function controller_Button_inline__P13684(s) { +function particles_ParticleSource_updateParticle__P23323(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26432,31 +27064,91 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P2202_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = false; - s.callLocIdx = 199; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + 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__C21189_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); + 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.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); + 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() } } } -controller_Button_inline__P13684.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +particles_ParticleSource_updateParticle__P23323.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 controller_Button_inline__P13684_mk(s) { +function particles_ParticleSource_updateParticle__P23323_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P13684, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_updateParticle__P23323, 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 controller_Button_inline__P13691(s) { +function Fx_rightShift__P18209(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26466,31 +27158,31 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = controller_Button_setPressed__P2202_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = true; - s.callLocIdx = 200; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; + 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() } } } -controller_Button_inline__P13691.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} +Fx_rightShift__P18209.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 controller_Button_inline__P13691_mk(s) { +function Fx_rightShift__P18209_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_inline__P13691, depth: s.depth + 1, + parent: s, fn: Fx_rightShift__P18209, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function controller_setupButton__P4746(s) { +function particles_ParticleFactory_createParticle__P21227(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26500,22 +27192,74 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.p___31530 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = undefined; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleFactory__C21225_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(particles_Particle__C21170_VT); + s.p___31530 = (r0); + s.tmp_0 = r0 = s.p___31530; + 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 = 1207; s.pc = 1; return s.tmp_3; } + } + case 1: + 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["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.p___31530; + 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 = 1209; s.pc = 2; return s.tmp_3; } + } + 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["_y"] = (s.tmp_1); + r0 = (s.p___31530).fields["vx"] = (0); + r0 = (s.p___31530).fields["vy"] = (0); + r0 = (s.p___31530).fields["lifespan"] = (500); + r0 = s.p___31530; return leave(s, r0) default: oops() } } } -controller_setupButton__P4746.info = {"start":861,"length":93,"line":39,"column":4,"endLine":41,"endColumn":6,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"setupButton","argumentNames":["buttonId","key"]} +particles_ParticleFactory_createParticle__P21227.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 controller_setupButton__P4746_mk(s) { +function particles_ParticleFactory_createParticle__P21227_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_setupButton__P4746, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_createParticle__P21227, 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___31530: undefined, arg0: undefined, arg1: undefined, } } @@ -26524,7 +27268,7 @@ function controller_setupButton__P4746_mk(s) { -function controller_Button_setPressed__P2202(s) { +function game_onUpdateInterval__P21062(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26534,72 +27278,65 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.timer___31321 = 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__C2189_VT)) failedCast(r0); - r0 = s.arg0.fields["_pressed"]; + r0 = pxsim_numops_toBoolDecr(s.arg1); 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__P1929_mk(s); - s.callLocIdx = 203; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - r0 = s.arg0.fields["_owner"]; + 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; } - s.tmp_1 = controller_Controller_connected__P2156_mk(s); - r0 = s.arg0.fields["_owner"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = true; - s.callLocIdx = 204; s.pc = 8; return s.tmp_1; - case 8: - r0 = s.retval; + r0 = s.tmp_0; + { step = 2; continue; } case 1: + r0 = (s.arg0 < 0); 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); + // 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["_pressedElasped"] = (0); - s.tmp_0 = controller_Button_raiseButtonDown__P4730_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 205; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - { step = 4; continue; } + { step = 5; continue; } case 3: - r0 = (s.arg0).fields["_repeatCount"] = (0); - s.tmp_0 = controller_Button_raiseButtonUp__P4729_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 206; s.pc = 10; return s.tmp_0; - case 10: - r0 = s.retval; case 4: - case 5: + r0 = pxsim_pxtrt.mklocRef(); + s.timer___31321 = (r0); + r0 = pxsim_pxtrt_stlocRef(s.timer___31321, 0); + r0 = pxsim_pxtcore_mkAction(3, game_onUpdateInterval_inline__P31325); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.timer___31321); + 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__P18441_mk(s); + s.tmp_2 = game_eventContext__P21040_mk(s); + s.callLocIdx = 964; 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 = 968; s.pc = 6; return s.tmp_1; case 6: + r0 = s.retval; + case 5: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_setPressed__P2202.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_onUpdateInterval__P21062.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 controller_Button_setPressed__P2202_mk(s) { +function game_onUpdateInterval__P21062_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_setPressed__P2202, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval__P21062, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, + timer___31321: undefined, arg0: undefined, arg1: undefined, } } @@ -26608,7 +27345,7 @@ function controller_Button_setPressed__P2202_mk(s) { -function controller_Button_raiseButtonDown__P4730(s) { +function game_onUpdateInterval_inline__P31325(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26618,43 +27355,55 @@ 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__C2189_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___4740); - if (!r0) { step = 1; continue; } - r0 = s.arg0.fields["id"]; + s.time___31326 = undefined; + s.tmp_1 = game_currentScene__P21037_mk(s); + s.callLocIdx = 965; s.pc = 3; return s.tmp_1; + case 3: + r0 = s.retval; s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2049, s.tmp_0); - { step = 2; continue; } - case 1: - r0 = s.arg0.fields["id"]; + r0 = s.tmp_0.fields["_millis"]; + s.time___31326 = (r0); + r0 = pxsim_pxtrt_ldlocRef(s.caps[0]); + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.time___31326); s.tmp_0 = r0; - r0 = pxsim.control.raiseEvent(2053, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = r0 = s.caps[0]; + r0 = (s.time___31326 + 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 = 967; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + case 1: case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -controller_Button_raiseButtonDown__P4730.info = {"start":3088,"length":205,"line":103,"column":8,"endLine":108,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonDown","argumentNames":["this"]} +game_onUpdateInterval_inline__P31325.info = {"start":1027,"length":179,"line":29,"column":81,"endLine":35,"endColumn":9,"fileName":"pxt_modules/game/gameutil.ts","functionName":"inline","argumentNames":[]} -function controller_Button_raiseButtonDown__P4730_mk(s) { +function game_onUpdateInterval_inline__P31325_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonDown__P4730, depth: s.depth + 1, + parent: s, fn: game_onUpdateInterval_inline__P31325, 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, + tmp_3: undefined, + time___31326: undefined, } } -function controller_Button_raiseButtonUp__P4729(s) { +function scene_Scene_millis__P20907(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26669,30 +27418,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C2189_VT)) failedCast(r0); - r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___4740); - 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; + if (!checkSubtype(r0, scene_Scene__C20881_VT)) failedCast(r0); + r0 = s.arg0.fields["_millis"]; return leave(s, r0) default: oops() } } } -controller_Button_raiseButtonUp__P4729.info = {"start":2878,"length":200,"line":96,"column":8,"endLine":101,"endColumn":9,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"raiseButtonUp","argumentNames":["this"]} +scene_Scene_millis__P20907.info = {"start":7147,"length":61,"line":196,"column":8,"endLine":198,"endColumn":9,"fileName":"pxt_modules/game/scene.ts","functionName":"millis","argumentNames":["this"]} -function controller_Button_raiseButtonUp__P4729_mk(s) { +function scene_Scene_millis__P20907_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_raiseButtonUp__P4729, depth: s.depth + 1, + parent: s, fn: scene_Scene_millis__P20907, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -26700,7 +27437,7 @@ function controller_Button_raiseButtonUp__P4729_mk(s) { -function game_addScenePushHandler__P3018(s) { +function MAX_SOURCES_inline__P31275(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26710,85 +27447,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 = pxsim_numops_toBoolDecr(globals._scenePushHandlers___4946); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + s.sz___31276 = undefined; + s.tmp_0 = control_ramSize__P18384_mk(s); + s.callLocIdx = 42; s.pc = 6; return s.tmp_0; + case 6: + r0 = s.retval; + s.sz___31276 = (r0); + r0 = (s.sz___31276 <= 102400); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = pxsim_Array__mk(); - globals._scenePushHandlers___4946 = (r0); + r0 = 8; + { step = 5; continue; } + { step = 4; continue; } case 1: - case 2: - r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___4946, s.arg0, undefined); + r0 = (s.sz___31276 <= 204800); 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___4946, s.arg0); + 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() } } } -game_addScenePushHandler__P3018.info = {"start":16044,"length":242,"line":479,"column":4,"endLine":483,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePushHandler","argumentNames":["handler"]} +MAX_SOURCES_inline__P31275.info = {"start":240,"length":217,"line":9,"column":25,"endLine":18,"endColumn":5,"fileName":"pxt_modules/game/particles.ts","functionName":"inline","argumentNames":[]} -function game_addScenePushHandler__P3018_mk(s) { +function MAX_SOURCES_inline__P31275_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_addScenePushHandler__P3018, depth: s.depth + 1, + parent: s, fn: MAX_SOURCES_inline__P31275, 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__P2141(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__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["_id"]; - return leaveAccessor(s, r0) - default: oops() -} } } -controller_Controller_id__P2141.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__P2141.isGetter = true; - -function controller_Controller_id__P2141_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: controller_Controller_id__P2141, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + sz___31276: undefined, } } -function controller_Controller_connected__P2155(s) { +function control_ramSize__P18384(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26798,32 +27504,37 @@ 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__C2134_VT)) failedCast(r0); - r0 = s.arg0.fields["_connected"]; - return leaveAccessor(s, r0) + 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; } + case 1: + r0 = 33554432; + case 2: + // jmp value (already in r0) + s.tmp_1 = r0; + r0 = s.tmp_1; + return leave(s, r0) default: oops() } } } -controller_Controller_connected__P2155.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__P2155.isGetter = true; +control_ramSize__P18384.info = {"start":4847,"length":100,"line":165,"column":4,"endLine":167,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"ramSize","argumentNames":[]} -function controller_Controller_connected__P2155_mk(s) { +function control_ramSize__P18384_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Controller_connected__P2155, depth: s.depth + 1, + parent: s, fn: control_ramSize__P18384, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, + tmp_0: undefined, + tmp_1: undefined, } } -function game_currentScene__P2999(s) { +function control__ramSize__P22445(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26833,30 +27544,24 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_0 = game_init__P4952_mk(s); - s.tmp_0.arg0 = undefined; - s.callLocIdx = 943; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = globals._scene___4944; + r0 = 33554432; return leave(s, r0) default: oops() } } } -game_currentScene__P2999.info = {"start":4025,"length":90,"line":118,"column":4,"endLine":121,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"currentScene","argumentNames":[]} +control__ramSize__P22445.info = {"start":4727,"length":60,"line":160,"column":4,"endLine":162,"endColumn":5,"fileName":"pxt_modules/base/control.ts","functionName":"_ramSize","argumentNames":[]} -function game_currentScene__P2999_mk(s) { +function control__ramSize__P22445_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_currentScene__P2999, depth: s.depth + 1, + parent: s, fn: control__ramSize__P22445, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, } } -function game_addScenePopHandler__P3020(s) { +function particles_SprayFactory_constructor__P21230(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26868,48 +27573,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 = pxsim_numops_toBoolDecr(globals._scenePopHandlers___4947); - 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___4947 = (r0); + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C21229_VT)) failedCast(r0); + r0 = undefined; + s.tmp_0 = particles_initTrig__P23347_mk(s); + s.callLocIdx = 1214; s.pc = 1; return s.tmp_0; case 1: + r0 = s.retval; + s.tmp_0 = particles_SprayFactory_setSpeed__P21233_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1215; s.pc = 2; return s.tmp_0; case 2: - r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___4947, 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___4947, s.arg0); + r0 = s.retval; + s.tmp_0 = particles_SprayFactory_setDirection__P21234_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg2; + s.tmp_0.arg2 = s.arg3; + s.callLocIdx = 1216; s.pc = 3; return s.tmp_0; case 3: - case 4: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -game_addScenePopHandler__P3020.info = {"start":17045,"length":237,"line":503,"column":4,"endLine":507,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePopHandler","argumentNames":["handler"]} +particles_SprayFactory_constructor__P21230.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 game_addScenePopHandler__P3020_mk(s) { +function particles_SprayFactory_constructor__P21230_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_addScenePopHandler__P3020, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_constructor__P21230, 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 settings_initScopes__P4634(s) { +function particles_initTrig__P23347(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26919,53 +27630,47 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.rn___13786 = undefined; - s.tmp_1 = settings_runNumber__P2058_mk(s); - s.callLocIdx = 119; s.pc = 1; return s.tmp_1; - case 1: - r0 = s.retval; - s.tmp_0 = r0; - r0 = (s.tmp_0 + 1); - s.rn___13786 = (r0); - s.tmp_0 = settings_writeNumber__P2063_mk(s); - s.tmp_0.arg0 = globals.RUN_KEY___4622; - s.tmp_0.arg1 = s.rn___13786; - s.callLocIdx = 120; s.pc = 2; return s.tmp_0; - case 2: - r0 = s.retval; - r0 = pxsim.control.deviceSerialNumber(); + r0 = pxsim_numops_toBoolDecr(globals.cachedSin___23333); s.tmp_1 = r0; - r0 = (s.tmp_1 & 2147483647); + r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; - r0 = pxsim_pxtcore.seedAddRandom(s.tmp_0); - r0 = pxsim_pxtcore.seedAddRandom(s.rn___13786); - s.tmp_0 = settings_setScope__P4633_mk(s); - r0 = pxsim_pxtcore.programName(); - s.tmp_0.arg0 = r0; - s.callLocIdx = 121; s.pc = 3; return s.tmp_0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = particles_cacheSin__P21223_mk(s); + s.tmp_2.arg0 = 100; + s.callLocIdx = 1202; s.pc = 3; return s.tmp_2; case 3: r0 = s.retval; + globals.cachedSin___23333 = (r0); + s.tmp_0 = particles_cacheCos__P21224_mk(s); + s.tmp_0.arg0 = 100; + s.callLocIdx = 1203; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + globals.cachedCos___23334 = (r0); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -settings_initScopes__P4634.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} +particles_initTrig__P23347.info = {"start":291,"length":155,"line":11,"column":4,"endLine":16,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"initTrig","argumentNames":[]} -function settings_initScopes__P4634_mk(s) { +function particles_initTrig__P23347_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_initScopes__P4634, depth: s.depth + 1, + parent: s, fn: particles_initTrig__P23347, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - rn___13786: undefined, + tmp_2: undefined, } } -function settings_setScope__P4633(s) { +function particles_cacheCos__P21224(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -26975,66 +27680,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.currScope___13815 = undefined; + s.cos___31156 = undefined; + s.anglePerSlice___31158 = undefined; + s.i___31164 = undefined; 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; - 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___31156 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___31158 = (r0); + s.i___31164 = (0); 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__P2066_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___4623; - s.callLocIdx = 117; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.currScope___13815 = (r0); - r0 = (s.currScope___13815 != s.arg0); + r0 = (s.i___31164 < 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__P2061_mk(s); - s.tmp_0.arg0 = globals.SCOPE_KEY___4623; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 118; s.pc = 8; return s.tmp_0; - case 8: - r0 = s.retval; - case 5: - case 6: - r0 = undefined; + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.cos___31156; + r0 = (s.i___31164 * s.anglePerSlice___31158); + 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); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___31164 + 1); + s.i___31164 = (r0); + { step = 1; continue; } + case 2: + r0 = s.cos___31156; return leave(s, r0) default: oops() } } } -settings_setScope__P4633.info = {"start":826,"length":272,"line":31,"column":4,"endLine":39,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"setScope","argumentNames":["scope"]} +particles_cacheCos__P21224.info = {"start":1005,"length":263,"line":35,"column":4,"endLine":42,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheCos","argumentNames":["slices"]} -function settings_setScope__P4633_mk(s) { +function particles_cacheCos__P21224_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_setScope__P4633, depth: s.depth + 1, + parent: s, fn: particles_cacheCos__P21224, 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___13815: undefined, + tmp_4: undefined, + tmp_5: undefined, + cos___31156: undefined, + anglePerSlice___31158: undefined, + i___31164: undefined, arg0: undefined, } } @@ -27042,7 +27738,7 @@ function settings_setScope__P4633_mk(s) { -function settings_readString__P2066(s) { +function particles_cacheSin__P21223(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27052,41 +27748,57 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.buf___13836 = undefined; + s.sin___31182 = undefined; + s.anglePerSlice___31184 = undefined; + s.i___31190 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = pxsim.settings._get(s.arg0); - s.buf___13836 = (r0); - r0 = pxsim_numops_toBoolDecr(s.buf___13836); - s.tmp_1 = r0; - r0 = pxsim_Boolean__bang(s.tmp_1); + r0 = pxsim_Array__mk(); + s.sin___31182 = (r0); + r0 = (6.283185307179586 / s.arg0); + s.anglePerSlice___31184 = (r0); + s.i___31190 = (0); + case 1: + r0 = (s.i___31190 < s.arg0); 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___13836); - { step = 3; continue; } + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.sin___31182; + r0 = (s.i___31190 * s.anglePerSlice___31184); + 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 = (s.tmp_5 | 0); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); + r0 = (s.i___31190 + 1); + s.i___31190 = (r0); + { step = 1; continue; } case 2: - r0 = undefined; - case 3: + r0 = s.sin___31182; return leave(s, r0) default: oops() } } } -settings_readString__P2066.info = {"start":2827,"length":177,"line":110,"column":4,"endLine":116,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"readString","argumentNames":["key"]} +particles_cacheSin__P21223.info = {"start":594,"length":263,"line":22,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"cacheSin","argumentNames":["slices"]} -function settings_readString__P2066_mk(s) { +function particles_cacheSin__P21223_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_readString__P2066, depth: s.depth + 1, + parent: s, fn: particles_cacheSin__P21223, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - buf___13836: undefined, + tmp_2: undefined, + tmp_3: undefined, + tmp_4: undefined, + tmp_5: undefined, + sin___31182: undefined, + anglePerSlice___31184: undefined, + i___31190: undefined, arg0: undefined, } } @@ -27094,7 +27806,7 @@ function settings_readString__P2066_mk(s) { -function settings_writeString__P2061(s) { +function particles_SprayFactory_setDirection__P21234(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27107,36 +27819,67 @@ 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 = settings_writeBuffer__P2060_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = pxsim.control.createBufferFromUTF8(s.arg1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 123; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, particles_SprayFactory__C21229_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_4 = particles_toRadians__P23352_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 = 1224; s.pc = 1; return s.tmp_4; case 1: r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / globals.angleSlice___23346); + 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__P23352_mk(s); + s.tmp_4.arg0 = s.arg2; + s.callLocIdx = 1225; s.pc = 2; return s.tmp_4; + case 2: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 / globals.angleSlice___23346); + s.tmp_2 = r0; + 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() } } } -settings_writeString__P2061.info = {"start":1895,"length":125,"line":75,"column":4,"endLine":77,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"writeString","argumentNames":["key","value"]} +particles_SprayFactory_setDirection__P21234.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 settings_writeString__P2061_mk(s) { +function particles_SprayFactory_setDirection__P21234_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_writeString__P2061, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setDirection__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, + tmp_4: undefined, + tmp_5: undefined, + tmp_6: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function settings_runNumber__P2058(s) { +function particles_toRadians__P23352(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27146,42 +27889,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tmp_1 = settings_readNumber__P2068_mk(s); - s.tmp_1.arg0 = globals.RUN_KEY___4622; - s.callLocIdx = 116; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = (s.arg0 < 0); 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 = Math_abs__P18166_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 1206; s.pc = 3; return s.tmp_3; + 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 = 0; + r0 = (s.arg0 % 360); + s.arg0 = (r0); case 2: - // jmp value (already in r0) - s.tmp_2 = r0; - r0 = s.tmp_2; + r0 = (s.arg0 * 0.017453292519943295); return leave(s, r0) default: oops() } } } -settings_runNumber__P2058.info = {"start":745,"length":75,"line":27,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"runNumber","argumentNames":[]} +particles_toRadians__P23352.info = {"start":1307,"length":206,"line":45,"column":4,"endLine":52,"endColumn":5,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"toRadians","argumentNames":["degrees"]} -function settings_runNumber__P2058_mk(s) { +function particles_toRadians__P23352_mk(s) { checkStack(s.depth); return { - parent: s, fn: settings_runNumber__P2058, depth: s.depth + 1, + parent: s, fn: particles_toRadians__P23352, 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___screen_setupUpdate__P1994(s) { +function particles_ParticleFactory_constructor__P21226(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27195,26 +27948,19 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - globals.__updated___4589 = (true); - globals.__update___4587 = (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 = 110; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleFactory__C21225_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -control___screen_setupUpdate__P1994.info = {"start":198,"length":125,"line":10,"column":4,"endLine":14,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"setupUpdate","argumentNames":["update"]} +particles_ParticleFactory_constructor__P21226.info = {"start":1617,"length":78,"line":59,"column":8,"endLine":61,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"inline","argumentNames":["this"]} -function control___screen_setupUpdate__P1994_mk(s) { +function particles_ParticleFactory_constructor__P21226_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_setupUpdate__P1994, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_constructor__P21226, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, arg0: undefined, } } @@ -27222,7 +27968,7 @@ function control___screen_setupUpdate__P1994_mk(s) { -function _screen_internal_getScreenHeight__P2037(s) { +function particles_ParticleSource_setFactory__P21208(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27234,27 +27980,36 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore.getConfig(2103, s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_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() } } } -_screen_internal_getScreenHeight__P2037.info = {"start":960,"length":127,"line":28,"column":4,"endLine":30,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenHeight","argumentNames":["defl"]} +particles_ParticleSource_setFactory__P21208.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 _screen_internal_getScreenHeight__P2037_mk(s) { +function particles_ParticleSource_setFactory__P21208_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_getScreenHeight__P2037, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setFactory__P21208, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, + arg1: undefined, } } -function _screen_internal_getScreenWidth__P2036(s) { +function particles_ParticleSource_setRate__P21206(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27266,27 +28021,41 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_pxtcore.getConfig(2102, s.arg0); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + r0 = (1000 / s.arg1); + s.tmp_2 = r0; + r0 = pxsim.Math_.ceil(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["period"] = (s.tmp_1); + r0 = (s.arg0).fields["timer"] = (0); + r0 = undefined; return leave(s, r0) default: oops() } } } -_screen_internal_getScreenWidth__P2036.info = {"start":810,"length":125,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/screen/targetoverrides.ts","functionName":"getScreenWidth","argumentNames":["defl"]} +particles_ParticleSource_setRate__P21206.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 _screen_internal_getScreenWidth__P2036_mk(s) { +function particles_ParticleSource_setRate__P21206_mk(s) { checkStack(s.depth); return { - parent: s, fn: _screen_internal_getScreenWidth__P2036, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setRate__P21206, 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 control___screen_update__P1993(s) { +function particles_ParticleSource_setAnchor__P21205(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27296,36 +28065,34 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - r0 = pxsim_numops_toBoolDecr(globals.__update___4587); - if (!r0) { step = 1; continue; } - s.tmp_0 = lambda_1_mk(s); - s.tmp_0.argL = globals.__update___4587; - setupLambda(s.tmp_0, s.tmp_0.argL); - s.callLocIdx = 109; s.pc = 3; return s.tmp_0; - case 3: - r0 = s.retval; - case 1: - case 2: - globals.__updated___4589 = (true); + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + r0 = (s.arg0).fields["anchor"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -control___screen_update__P1993.info = {"start":90,"length":102,"line":4,"column":4,"endLine":8,"endColumn":5,"fileName":"pxt_modules/screen/frame.ts","functionName":"update","argumentNames":[]} +particles_ParticleSource_setAnchor__P21205.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 control___screen_update__P1993_mk(s) { +function particles_ParticleSource_setAnchor__P21205_mk(s) { checkStack(s.depth); return { - parent: s, fn: control___screen_update__P1993, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_setAnchor__P21205, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, + arg0: undefined, + arg1: undefined, } } -function pause__P413(s) { +function particles_ParticleSource_destroy__P21203(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27339,23 +28106,39 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - setupResume(s, 1); - pxsim.loops.pause(s.arg0); - checkResumeConsumed(); - return; + r0 = s.arg0; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleSource_enabled__P21202_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = false; + s.callLocIdx = 1163; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; + 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__P21197_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 1164; s.pc = 2; return s.tmp_0; + case 2: + r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -pause__P413.info = {"start":246,"length":57,"line":7,"column":0,"endLine":9,"endColumn":1,"fileName":"pxt_modules/base/pause.ts","functionName":"pause","argumentNames":["ms"]} +particles_ParticleSource_destroy__P21203.info = {"start":7094,"length":240,"line":233,"column":8,"endLine":238,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"destroy","argumentNames":["this"]} -function pause__P413_mk(s) { +function particles_ParticleSource_destroy__P21203_mk(s) { checkStack(s.depth); return { - parent: s, fn: pause__P413, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_destroy__P21203, 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, } } @@ -27363,7 +28146,7 @@ function pause__P413_mk(s) { -function music_Melody_toString__P1635(s) { +function particles_ParticleSource_setAcceleration__P21198(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27375,20 +28158,71 @@ 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, music_Melody__C1626_VT)) failedCast(r0); - r0 = s.arg0.fields["_text"]; + if (!checkSubtype(r0, particles_ParticleSource__C21189_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); + 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() +} } } +particles_ParticleSource_setAcceleration__P21198.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 particles_ParticleSource_setAcceleration__P21198_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ParticleSource_setAcceleration__P21198, 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 helpers_arrayShift__P18140(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_Array_.removeAt(s.arg0, 0); return leave(s, r0) default: oops() } } } -music_Melody_toString__P1635.info = {"start":10223,"length":53,"line":318,"column":8,"endLine":320,"endColumn":9,"fileName":"pxt_modules/mixer/melody.ts","functionName":"toString","argumentNames":["this"]} +helpers_arrayShift__P18140.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 music_Melody_toString__P1635_mk(s) { +function helpers_arrayShift__P18140_mk(s) { checkStack(s.depth); return { - parent: s, fn: music_Melody_toString__P1635, depth: s.depth + 1, + parent: s, fn: helpers_arrayShift__P18140, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -27397,7 +28231,7 @@ function music_Melody_toString__P1635_mk(s) { -function particles_ShapeFactory_createParticle__P3217(s) { +function particles_SprayFactory_setSpeed__P21233(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27407,47 +28241,33 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___13874 = 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__C3213_VT)) failedCast(r0); - s.tmp_0 = particles_AreaFactory_createParticle__P3203_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1246; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.p___13874 = (r0); - s.tmp_0 = r0 = s.p___13874; - s.tmp_2 = Math_FastRandom_randomRange__P3063_mk(s); - r0 = s.arg0.fields["galois"]; - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = 1; - s.tmp_2.arg2 = 14; - s.callLocIdx = 1247; s.pc = 2; return s.tmp_2; - case 2: - r0 = s.retval; + if (!checkSubtype(r0, particles_SprayFactory__C21229_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["color"] = (s.tmp_1); - r0 = s.p___13874; + r0 = (s.tmp_0).fields["speed"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ShapeFactory_createParticle__P3217.info = {"start":7505,"length":178,"line":239,"column":8,"endLine":243,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +particles_SprayFactory_setSpeed__P21233.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 particles_ShapeFactory_createParticle__P3217_mk(s) { +function particles_SprayFactory_setSpeed__P21233_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_createParticle__P3217, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_setSpeed__P21233, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - p___13874: undefined, arg0: undefined, arg1: undefined, } } @@ -27456,7 +28276,7 @@ function particles_ShapeFactory_createParticle__P3217_mk(s) { -function particles_AreaFactory_createParticle__P3203(s) { +function particles_ConfettiFactory_constructor__P21257(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27466,123 +28286,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___13886 = undefined; + s.confetti___31569 = undefined; + s.i___31585 = 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_AreaFactory__C3197_VT)) failedCast(r0); - s.tmp_0 = particles_SprayFactory_createParticle__P3193_mk(s); + if (!checkSubtype(r0, particles_ConfettiFactory__C21256_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.tmp_0 = r0; + r0 = pxsim.image.ofBuffer(_hex31572); + s.tmp_1 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + r0 = pxsim.image.ofBuffer(_hex31574); + s.tmp_2 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_2); + r0 = pxsim.image.ofBuffer(_hex31576); + s.tmp_3 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_3); + r0 = pxsim.image.ofBuffer(_hex31578); + s.tmp_4 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_4); + r0 = pxsim.image.ofBuffer(_hex31580); + s.tmp_5 = r0; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_5); + s.confetti___31569 = (s.tmp_0); + s.tmp_0 = particles_ShapeFactory_constructor__P21252_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1228; s.pc = 3; return s.tmp_0; + s.tmp_0.arg2 = s.arg2; + r0 = pxsim_Array__getAt(s.confetti___31569, 0); + s.tmp_0.arg3 = r0; + s.callLocIdx = 1248; s.pc = 3; return s.tmp_0; case 3: r0 = s.retval; - s.p___13886 = (r0); - s.tmp_0 = r0 = s.p___13886; - s.tmp_2 = Math_FastRandom_randomRange__P3063_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 = 1229; 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___13886; - s.tmp_4 = Math_FastRandom_randomRange__P3063_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 = 1230; 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.i___31585 = (1); + case 1: + s.tmp_1 = r0 = s.i___31585; + r0 = pxsim_Array__length(s.confetti___31569); s.tmp_2 = r0; - r0 = s.p___13886.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 = 1233; s.pc = 6; return s.tmp_1; } - } - case 6: - r0 = s.retval; + r0 = (s.tmp_1 < s.tmp_2); 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 = 1234; s.pc = 7; return s.tmp_3; } - } - case 7: + if (!r0) { step = 2; continue; } + s.tmp_3 = particles_ShapeFactory_addShape__P21253_mk(s); + s.tmp_3.arg0 = s.arg0; + r0 = pxsim_Array__getAt(s.confetti___31569, s.i___31585); + s.tmp_3.arg1 = r0; + s.callLocIdx = 1249; s.pc = 4; return s.tmp_3; + case 4: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - { step = 2; continue; } - case 1: - r0 = 0; + r0 = (s.i___31585 + 1); + s.i___31585 = (r0); + { step = 1; continue; } case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.tmp_5 = r0 = s.p___13886; - s.tmp_9 = Math_FastRandom_randomRange__P3063_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 = 1232; 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___13886.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___13886; + r0 = (s.arg0).fields["minLifespan"] = (1000); + r0 = (s.arg0).fields["maxLifespan"] = (4500); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_AreaFactory_createParticle__P3203.info = {"start":4334,"length":426,"line":148,"column":8,"endLine":156,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +particles_ConfettiFactory_constructor__P21257.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 particles_AreaFactory_createParticle__P3203_mk(s) { +function particles_ConfettiFactory_constructor__P21257_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_createParticle__P3203, depth: s.depth + 1, + parent: s, fn: particles_ConfettiFactory_constructor__P21257, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -27590,22 +28362,23 @@ function particles_AreaFactory_createParticle__P3203_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___13886: undefined, + confetti___31569: undefined, + i___31585: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } +const _hex31572 = pxsim.BufferMethods.createBufferFromHex("87040100010000000f000000") +const _hex31574 = pxsim.BufferMethods.createBufferFromHex("8704010002000000ff000000") +const _hex31576 = pxsim.BufferMethods.createBufferFromHex("87040200010000000f0000000f000000") +const _hex31578 = pxsim.BufferMethods.createBufferFromHex("8704020002000000ff0000000f000000") +const _hex31580 = pxsim.BufferMethods.createBufferFromHex("87040200020000000f000000ff000000") -function Fx_iadd__P158(s) { +function particles_ShapeFactory_addShape__P21253(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27620,18 +28393,25 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 << 8); + r0 = s.arg0; + if (!checkSubtype(r0, particles_ShapeFactory__C21251_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 + s.arg1); + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + case 1: + case 2: + r0 = undefined; return leave(s, r0) default: oops() } } } -Fx_iadd__P158.info = {"start":634,"length":110,"line":23,"column":4,"endLine":25,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"iadd","argumentNames":["a","b"]} +particles_ShapeFactory_addShape__P21253.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 Fx_iadd__P158_mk(s) { +function particles_ShapeFactory_addShape__P21253_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_iadd__P158, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_addShape__P21253, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -27642,7 +28422,7 @@ function Fx_iadd__P158_mk(s) { -function particles_SprayFactory_createParticle__P3193(s) { +function particles_ShapeFactory_constructor__P21252(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27652,84 +28432,75 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.p___13942 = undefined; - s.angle___13946 = 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_SprayFactory__C3191_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory_createParticle__P3189_mk(s); + if (!checkSubtype(r0, particles_ShapeFactory__C21251_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_constructor__P21240_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 1217; s.pc = 1; return s.tmp_0; + s.tmp_0.arg2 = s.arg2; + s.tmp_0.arg3 = undefined; + s.tmp_0.arg4 = undefined; + s.callLocIdx = 1238; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.p___13942 = (r0); - r0 = s.arg0.fields["minAngle"]; - s.tmp_1 = r0; - s.tmp_3 = Math_FastRandom_randomRange__P3063_mk(s); - s.tmp_3.arg0 = globals.galois___5300; - s.tmp_3.arg1 = 0; - r0 = s.arg0.fields["spread"]; - s.tmp_3.arg2 = r0; - s.callLocIdx = 1218; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1 + s.tmp_2); + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = (s.tmp_0 % 100); - s.angle___13946 = (r0); - s.tmp_0 = r0 = s.p___13942; - r0 = pxsim_Array__getAt(globals.cachedSin___5295, s.angle___13946); - s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; + 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 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vx"] = (s.tmp_1); - s.tmp_0 = r0 = s.p___13942; - r0 = pxsim_Array__getAt(globals.cachedCos___5296, s.angle___13946); - s.tmp_2 = r0; - r0 = s.arg0.fields["speed"]; + 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 = pxsim.Math_.imul(s.tmp_2, s.tmp_3); + r0 = (s.tmp_3 >> 1); + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); s.tmp_4 = r0; - r0 = (s.tmp_4 >> 8); + r0 = (s.tmp_4 | 0); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["vy"] = (s.tmp_1); - r0 = s.p___13942; + r0 = (s.tmp_0).fields["oy"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -particles_SprayFactory_createParticle__P3193.info = {"start":2851,"length":333,"line":105,"column":8,"endLine":113,"endColumn":9,"fileName":"pxt_modules/game/particlefactories.ts","functionName":"createParticle","argumentNames":["this","anchor"]} +particles_ShapeFactory_constructor__P21252.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 particles_SprayFactory_createParticle__P3193_mk(s) { +function particles_ShapeFactory_constructor__P21252_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_createParticle__P3193, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_constructor__P21252, 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___13942: undefined, - angle___13946: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function sprites_SpriteSet_toString__P2474(s) { +function particles_AreaFactory_constructor__P21240(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27741,51 +28512,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, sprites_SpriteSet__C2463_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: + if (!checkSubtype(r0, particles_AreaFactory__C21235_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_constructor__P21230_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 = 1226; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); + 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 = pxsim_String__concat(s.tmp_0, " sprites"); + 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__C21097_VT); + s.tmp_0 = r0; + s.tmp_1 = Math_FastRandom_constructor__P21099_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = undefined; + s.callLocIdx = 1227; 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() } } } -sprites_SpriteSet_toString__P2474.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} +particles_AreaFactory_constructor__P21240.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 sprites_SpriteSet_toString__P2474_mk(s) { +function particles_AreaFactory_constructor__P21240_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_toString__P2474, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_constructor__P21240, 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, } } -function sprites_SpriteSet_length__P2466(s) { +function effects_ScreenEffect_constructor__P21305(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27797,33 +28595,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteSet__C2463_VT)) failedCast(r0); - r0 = s.arg0.fields["_sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__length(s.tmp_0); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, effects_ScreenEffect__C21304_VT)) failedCast(r0); + s.tmp_0 = effects_ParticleEffect_constructor__P21301_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 = 1255; 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() } } } -sprites_SpriteSet_length__P2466.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__P2466.isGetter = true; +effects_ScreenEffect_constructor__P21305.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 sprites_SpriteSet_length__P2466_mk(s) { +function effects_ScreenEffect_constructor__P21305_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteSet_length__P2466, depth: s.depth + 1, + parent: s, fn: effects_ScreenEffect_constructor__P21305, 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___draw__P3157(s) { +function effects_ParticleEffect_constructor__P21301(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27833,105 +28645,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.current___13989 = undefined; - s.left___13992 = undefined; - s.top___14002 = 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__C3151_VT)) failedCast(r0); - r0 = s.arg0.fields["head"]; - s.current___13989 = (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; } - case 1: - r0 = s.arg1.fields["drawOffsetX"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 * 256); - s.tmp_3 = r0; - r0 = (s.tmp_3 | 0); - case 2: - // jmp value (already in r0) - s.tmp_4 = r0; - s.left___13992 = (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___14002 = (s.tmp_4); - case 5: - r0 = pxsim_numops_toBoolDecr(s.current___13989); - if (!r0) { step = 8; continue; } - r0 = s.current___13989.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 = 6; continue; } - s.tmp_2 = particles_ParticleSource_drawParticle__P5286_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.current___13989; - s.tmp_2.arg2 = s.left___13992; - s.tmp_2.arg3 = s.top___14002; - s.callLocIdx = 1152; s.pc = 9; return s.tmp_2; - case 9: - r0 = s.retval; - case 6: - case 7: - r0 = s.current___13989.fields["next"]; - s.current___13989 = (r0); - { step = 5; continue; } - case 8: + if (!checkSubtype(r0, effects_ParticleEffect__C21300_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() } } } -particles_ParticleSource___draw__P3157.info = {"start":3216,"length":468,"line":112,"column":8,"endLine":122,"endColumn":9,"fileName":"pxt_modules/game/particles.ts","functionName":"__draw","argumentNames":["this","camera"]} +effects_ParticleEffect_constructor__P21301.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 particles_ParticleSource___draw__P3157_mk(s) { +function effects_ParticleEffect_constructor__P21301_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource___draw__P3157, depth: s.depth + 1, + parent: s, fn: effects_ParticleEffect_constructor__P21301, 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___13989: undefined, - left___13992: undefined, - top___14002: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function particles_ParticleSource_drawParticle__P5286(s) { +function music_melodyPlayable__P19961(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -27943,55 +28690,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, particles_ParticleSource__C3151_VT)) failedCast(r0); - s.tmp_0 = particles_ParticleFactory__C3187_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__C3187_VT)) failedCast(s.tmp_0.arg0); - s.tmp_0.fn = s.tmp_0.arg0.vtable.methods.drawParticle; - s.pc = 1; return s.tmp_0; + r0 = pxsim_pxtcore_mkClassInstance(music_MelodyPlayable__C19954_VT); + s.tmp_0 = r0; + s.tmp_1 = music_MelodyPlayable_constructor__P19955_mk(s); + s.tmp_1.arg0 = s.tmp_0; + s.tmp_1.arg1 = s.arg0; + s.callLocIdx = 73; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; - r0 = undefined; + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -particles_ParticleSource_drawParticle__P5286.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"]} +music_melodyPlayable__P19961.info = {"start":3172,"length":107,"line":121,"column":4,"endLine":123,"endColumn":5,"fileName":"pxt_modules/mixer/playable.ts","functionName":"melodyPlayable","argumentNames":["melody"]} -function particles_ParticleSource_drawParticle__P5286_mk(s) { +function music_melodyPlayable__P19961_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleSource_drawParticle__P5286, depth: s.depth + 1, + parent: s, fn: music_melodyPlayable__P19961, 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__P3190(s) { +function music_MelodyPlayable_constructor__P19955(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28004,49 +28733,32 @@ 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__C3187_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___2032; - 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); + if (!checkSubtype(r0, music_MelodyPlayable__C19954_VT)) failedCast(r0); + r0 = (s.arg0).fields["melody"] = (s.arg1); + r0 = undefined; r0 = undefined; return leave(s, r0) default: oops() } } } -particles_ParticleFactory_drawParticle__P3190.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"]} +music_MelodyPlayable_constructor__P19955.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 particles_ParticleFactory_drawParticle__P3190_mk(s) { +function music_MelodyPlayable_constructor__P19955_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ParticleFactory_drawParticle__P3190, depth: s.depth + 1, + parent: s, fn: music_MelodyPlayable_constructor__P19955, 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_SpriteMap_toString__P2454(s) { +function music_Playable_constructor__P19951(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28061,69 +28773,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_SpriteMap__C2446_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__P110_mk(s); - r0 = s.arg0.fields["buckets"]; - s.tmp_10.arg0 = r0; - s.tmp_10.arg1 = length_inline__P14065; - s.callLocIdx = 514; 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"); + if (!checkSubtype(r0, music_Playable__C19949_VT)) failedCast(r0); + r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_toString__P2454.info = {"start":4109,"length":123,"line":112,"column":8,"endLine":114,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"toString","argumentNames":["this"]} +music_Playable_constructor__P19951.info = {"start":1086,"length":26,"line":47,"column":8,"endLine":49,"endColumn":9,"fileName":"pxt_modules/mixer/playable.ts","functionName":"inline","argumentNames":["this"]} -function sprites_SpriteMap_toString__P2454_mk(s) { +function music_Playable_constructor__P19951_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_toString__P2454, depth: s.depth + 1, + parent: s, fn: music_Playable_constructor__P19951, 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, } } @@ -28131,7 +28792,7 @@ function sprites_SpriteMap_toString__P2454_mk(s) { -function length_inline__P14065(s) { +function music_Melody_constructor__P19667(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28143,36 +28804,32 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); 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); + r0 = s.arg0; + if (!checkSubtype(r0, music_Melody__C19664_VT)) failedCast(r0); + r0 = (s.arg0).fields["_text"] = (s.arg1); + r0 = undefined; return leave(s, r0) default: oops() } } } -length_inline__P14065.info = {"start":4196,"length":8,"line":113,"column":74,"endLine":113,"endColumn":82,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["b"]} +music_Melody_constructor__P19667.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 length_inline__P14065_mk(s) { +function music_Melody_constructor__P19667_mk(s) { checkStack(s.depth); return { - parent: s, fn: length_inline__P14065, depth: s.depth + 1, + parent: s, fn: music_Melody_constructor__P19667, 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 ArcadePhysicsEngine_moveSprite__P2541(s) { +function Fx8__P18187(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28182,206 +28839,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___14097 = undefined; - s.maxDist___14105 = undefined; - s.ms___14125 = 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__C2527_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__P2999_mk(s); - s.callLocIdx = 751; s.pc = 13; return s.tmp_0; - case 13: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___14097 = (r0); - s.tmp_0 = r0 = s.tm___14097; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - r0 = s.tm___14097.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___14105 = (r0); - s.tmp_2 = Math_abs__P128_mk(s); - r0 = (s.arg2 + 128); - s.tmp_3 = r0; - r0 = (s.tmp_3 >> 8); - s.tmp_2.arg0 = r0; - s.callLocIdx = 755; s.pc = 14; return s.tmp_2; - case 14: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.maxDist___14105); - 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__P128_mk(s); - r0 = (s.arg3 + 128); - s.tmp_6 = r0; - r0 = (s.tmp_6 >> 8); - s.tmp_5.arg0 = r0; - s.callLocIdx = 757; s.pc = 15; return s.tmp_5; - case 15: - r0 = s.retval; - s.tmp_4 = r0; - r0 = (s.tmp_4 <= s.maxDist___14105); - 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__C2525_VT); - s.tmp_8 = r0; - s.tmp_9 = MovingSprite_constructor__P2526_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 = 758; s.pc = 16; return s.tmp_9; - case 16: - r0 = s.retval; - s.ms___14125 = (s.tmp_8); - s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P4800_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.ms___14125; - s.tmp_0.arg2 = s.tm___14097; - s.callLocIdx = 759; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } - case 5: - s.tmp_1 = tiles_TileMap_isOnWall__P2758_mk(s); - s.tmp_1.arg0 = s.tm___14097; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 760; s.pc = 18; return s.tmp_1; - case 18: - r0 = s.retval; + r0 = (s.arg0 * 256); 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__P4802_mk(s); - s.tmp_4.arg0 = s.arg0; - s.tmp_4.arg1 = s.arg1; - s.tmp_4.arg2 = s.tm___14097; - s.callLocIdx = 761; 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; + r0 = (s.tmp_0 | 0); return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_moveSprite__P2541.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"]} +Fx8__P18187.info = {"start":42,"length":68,"line":4,"column":0,"endLine":6,"endColumn":1,"fileName":"pxt_modules/base/fixed.ts","functionName":"Fx8","argumentNames":["v"]} -function ArcadePhysicsEngine_moveSprite__P2541_mk(s) { +function Fx8__P18187_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_moveSprite__P2541, depth: s.depth + 1, + parent: s, fn: Fx8__P18187, 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___14097: undefined, - maxDist___14105: undefined, - ms___14125: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_canResolveClipping__P4802(s) { +function SpriteKind_create__P20517(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28391,311 +28874,35 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.hbox___14170 = undefined; - s.sz___14173 = undefined; - s.maxMove___14178 = undefined; - s.origY___14180 = undefined; - s.origX___14183 = undefined; - s.l___14186 = undefined; - s.r___14191 = undefined; - s.t___14196 = undefined; - s.b___14201 = undefined; - s.offset___14206 = undefined; - s.offset___14231 = undefined; - s.offset___14262 = undefined; - s.offset___14287 = 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__C2527_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); + r0 = (globals.nextKind___22801 === undefined); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_4 = Sprite__C2341_v4_1_mk(s); - s.tmp_4.arg0 = s.arg1; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C2341_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; + globals.nextKind___22801 = (1000); case 1: case 2: - r0 = s.arg1.fields["_hitbox"]; - s.hbox___14170 = (r0); - r0 = s.arg2.fields["_scale"]; - s.tmp_0 = r0; - r0 = (1 << s.tmp_0); - s.sz___14173 = (r0); - s.tmp_0 = ArcadePhysicsEngine_maxStep__P2533_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 764; s.pc = 21; return s.tmp_0; - case 21: - r0 = s.retval; - s.maxMove___14178 = (r0); - r0 = s.arg1.fields["_y"]; - s.origY___14180 = (r0); - r0 = s.arg1.fields["_x"]; - s.origX___14183 = (r0); - s.tmp_1 = game_Hitbox_left__P2216_mk(s); - s.tmp_1.arg0 = s.hbox___14170; - s.callLocIdx = 765; 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___14186 = (r0); - s.tmp_1 = game_Hitbox_right__P2218_mk(s); - s.tmp_1.arg0 = s.hbox___14170; - s.callLocIdx = 767; 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___14191 = (r0); - s.tmp_1 = game_Hitbox_top__P2217_mk(s); - s.tmp_1.arg0 = s.hbox___14170; - s.callLocIdx = 769; 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___14196 = (r0); - s.tmp_1 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_1.arg0 = s.hbox___14170; - s.callLocIdx = 771; 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___14201 = (r0); - r0 = (s.b___14201 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___14173); - s.offset___14206 = (r0); - r0 = (s.offset___14206 <= s.maxMove___14178); - 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___14206 * 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__P2758_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 775; 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___14180); - case 4: - case 5: - case 6: - r0 = (s.t___14196 / s.sz___14173); - 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___14173); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.t___14196); - s.offset___14231 = (r0); - r0 = (s.offset___14231 <= s.maxMove___14178); - 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___14231 * 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__P2758_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 778; 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___14180); - case 8: - case 9: - case 10: - r0 = (s.r___14191 + 1); - s.tmp_0 = r0; - r0 = (s.tmp_0 % s.sz___14173); - s.offset___14262 = (r0); - r0 = (s.offset___14262 <= s.maxMove___14178); - 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___14262 * 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__P2758_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 781; 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___14183); - case 12: - case 13: - case 14: - r0 = (s.l___14186 / s.sz___14173); - 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___14173); - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.l___14186); - s.offset___14287 = (r0); - r0 = (s.offset___14287 <= s.maxMove___14178); - 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___14287 * 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__P2758_mk(s); - s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.arg1; - s.callLocIdx = 784; 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___14183); - case 16: - case 17: - case 18: - r0 = false; - case 19: + s.tmp_0 = r0 = globals.nextKind___22801; + r0 = (s.tmp_0 + 1); + globals.nextKind___22801 = (r0); + r0 = s.tmp_0; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_canResolveClipping__P4802.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"]} +SpriteKind_create__P20517.info = {"start":783,"length":112,"line":26,"column":4,"endLine":29,"endColumn":5,"fileName":"pxt_modules/game/spritekind.ts","functionName":"create","argumentNames":[]} -function ArcadePhysicsEngine_canResolveClipping__P4802_mk(s) { +function SpriteKind_create__P20517_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P4802, depth: s.depth + 1, + parent: s, fn: SpriteKind_create__P20517, 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___14170: undefined, - sz___14173: undefined, - maxMove___14178: undefined, - origY___14180: undefined, - origX___14183: undefined, - l___14186: undefined, - r___14191: undefined, - t___14196: undefined, - b___14201: undefined, - offset___14206: undefined, - offset___14231: undefined, - offset___14262: undefined, - offset___14287: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function Sprite_isStatic__P2395(s) { +function controller_Button_constructor__P20233(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28707,32 +28914,66 @@ 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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_image"]; + if (!checkSubtype(r0, controller_Button__C20227_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_ImageMethods.isStatic(s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + r0 = pxsim_pxtcore_mkAction(1, controller_Button_inline__P31722); + 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__P31729); + 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 = undefined; + case 1: + case 2: + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_isStatic__P2395.info = {"start":9841,"length":57,"line":355,"column":4,"endLine":357,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isStatic","argumentNames":["this"]} +controller_Button_constructor__P20233.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 Sprite_isStatic__P2395_mk(s) { +function controller_Button_constructor__P20233_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isStatic__P2395, depth: s.depth + 1, + parent: s, fn: controller_Button_constructor__P20233, 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 game_Hitbox_bottom__P2219(s) { +function controller_Button_inline__P31722(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28742,46 +28983,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, game_Hitbox__C2208_VT)) failedCast(r0); - r0 = s.arg0.fields["height"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_top__P2217_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 225; s.pc = 1; return s.tmp_3; + s.tmp_0 = controller_Button_setPressed__P20240_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = false; + s.callLocIdx = 199; s.pc = 1; return s.tmp_0; 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) + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_Hitbox_bottom__P2219.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__P2219.isGetter = true; +controller_Button_inline__P31722.info = {"start":2627,"length":28,"line":88,"column":66,"endLine":88,"endColumn":94,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} -function game_Hitbox_bottom__P2219_mk(s) { +function controller_Button_inline__P31722_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_bottom__P2219, depth: s.depth + 1, + parent: s, fn: controller_Button_inline__P31722, 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__P2218(s) { +function controller_Button_inline__P31729(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28791,46 +29017,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, game_Hitbox__C2208_VT)) failedCast(r0); - r0 = s.arg0.fields["width"]; - s.tmp_1 = r0; - s.tmp_3 = game_Hitbox_left__P2216_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 222; s.pc = 1; return s.tmp_3; + s.tmp_0 = controller_Button_setPressed__P20240_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = true; + s.callLocIdx = 200; s.pc = 1; return s.tmp_0; 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) + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_Hitbox_right__P2218.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__P2218.isGetter = true; +controller_Button_inline__P31729.info = {"start":2729,"length":27,"line":89,"column":68,"endLine":89,"endColumn":95,"fileName":"pxt_modules/game/controllerbutton.ts","functionName":"inline","argumentNames":[]} -function game_Hitbox_right__P2218_mk(s) { +function controller_Button_inline__P31729_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_right__P2218, depth: s.depth + 1, + parent: s, fn: controller_Button_inline__P31729, 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__P2217(s) { +function controller_setupButton__P22784(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28842,37 +29053,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, game_Hitbox__C2208_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) + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_Hitbox_top__P2217.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__P2217.isGetter = true; +controller_setupButton__P22784.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 game_Hitbox_top__P2217_mk(s) { +function controller_setupButton__P22784_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_top__P2217, depth: s.depth + 1, + parent: s, fn: controller_setupButton__P22784, 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 game_Hitbox_left__P2216(s) { +function controller_Button_setPressed__P20240(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28884,37 +29087,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, game_Hitbox__C2208_VT)) failedCast(r0); - r0 = s.arg0.fields["ox"]; - s.tmp_0 = r0; - r0 = s.arg0.fields["parent"]; - r0 = r0.fields["_x"]; + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + r0 = s.arg0.fields["_pressed"]; s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, 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__P19967_mk(s); + s.callLocIdx = 203; 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__P20194_mk(s); + r0 = s.arg0.fields["_owner"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = true; + s.callLocIdx = 204; 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__P22768_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 205; 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__P22767_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 206; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + case 4: + case 5: + case 6: + r0 = undefined; + return leave(s, r0) default: oops() } } } -game_Hitbox_left__P2216.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__P2216.isGetter = true; +controller_Button_setPressed__P20240.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 game_Hitbox_left__P2216_mk(s) { +function controller_Button_setPressed__P20240_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_left__P2216, depth: s.depth + 1, + parent: s, fn: controller_Button_setPressed__P20240, 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 ArcadePhysicsEngine_tilemapCollisions__P4800(s) { +function controller_Button_raiseButtonDown__P22768(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -28924,56 +29169,2045 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___14447 = undefined; - s.hbox___14472 = undefined; - s.tileScale___14475 = undefined; - s.tileSize___14478 = undefined; - s.xDiff___14482 = undefined; - s.yDiff___14489 = undefined; - s.right___14505 = undefined; - s.x0___14509 = undefined; - s.collidedTiles___14524 = undefined; - s.y___14526 = undefined; - s.y0___14540 = undefined; - s.obstacle___14556 = undefined; - s.collisionDirection___14583 = undefined; - s.tile___14609 = undefined; - s.unnamed80___U14 = undefined; - s.unnamed81___U15 = undefined; - s.down___14700 = undefined; - s.y0___14704 = undefined; - s.collidedTiles___14719 = undefined; - s.x___14721 = undefined; - s.x0___14731 = undefined; - s.obstacle___14745 = undefined; - s.collisionDirection___14772 = undefined; - s.tile___14798 = undefined; - s.unnamed82___U24 = undefined; - s.unnamed83___U25 = undefined; - s.overlappedTiles___14892 = undefined; - s.x___14894 = undefined; - s.x0___14904 = undefined; - s.y___14914 = undefined; - s.y0___14924 = 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__C2527_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___14447 = (r0); - r0 = s.s___14447.fields["flags"]; - s.tmp_1 = r0; - r0 = (s.tmp_1 & 256); + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___22778); + 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__P22768.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__P22768_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_raiseButtonDown__P22768, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function controller_Button_raiseButtonUp__P22767(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__C20227_VT)) failedCast(r0); + r0 = pxsim_numops_toBoolDecr(globals._userEventsEnabled___22778); + 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__P22767.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__P22767_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Button_raiseButtonUp__P22767, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function game_addScenePushHandler__P21056(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___22984); + 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___22984 = (r0); + case 1: + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePushHandlers___22984, 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___22984, s.arg0); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_addScenePushHandler__P21056.info = {"start":16044,"length":242,"line":479,"column":4,"endLine":483,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePushHandler","argumentNames":["handler"]} + +function game_addScenePushHandler__P21056_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_addScenePushHandler__P21056, 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__P20179(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__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["_id"]; + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_id__P20179.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__P20179.isGetter = true; + +function controller_Controller_id__P20179_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_id__P20179, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function controller_Controller_connected__P20193(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__C20172_VT)) failedCast(r0); + r0 = s.arg0.fields["_connected"]; + return leaveAccessor(s, r0) + default: oops() +} } } +controller_Controller_connected__P20193.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__P20193.isGetter = true; + +function controller_Controller_connected__P20193_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: controller_Controller_connected__P20193, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function game_currentScene__P21037(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__P22990_mk(s); + s.tmp_0.arg0 = undefined; + s.callLocIdx = 943; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = globals._scene___22982; + return leave(s, r0) + default: oops() +} } } +game_currentScene__P21037.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__P21037_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_currentScene__P21037, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function game_addScenePopHandler__P21058(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___22985); + 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___22985 = (r0); + case 1: + case 2: + r0 = pxsim_Array_.indexOf(globals._scenePopHandlers___22985, 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___22985, s.arg0); + case 3: + case 4: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +game_addScenePopHandler__P21058.info = {"start":17045,"length":237,"line":503,"column":4,"endLine":507,"endColumn":5,"fileName":"pxt_modules/game/game.ts","functionName":"addScenePopHandler","argumentNames":["handler"]} + +function game_addScenePopHandler__P21058_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_addScenePopHandler__P21058, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function settings_initScopes__P22672(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.rn___31824 = undefined; + s.tmp_1 = settings_runNumber__P20096_mk(s); + s.callLocIdx = 119; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + s.tmp_0 = r0; + r0 = (s.tmp_0 + 1); + s.rn___31824 = (r0); + s.tmp_0 = settings_writeNumber__P20101_mk(s); + s.tmp_0.arg0 = globals.RUN_KEY___22660; + s.tmp_0.arg1 = s.rn___31824; + s.callLocIdx = 120; 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___31824); + s.tmp_0 = settings_setScope__P22671_mk(s); + r0 = pxsim_pxtcore.programName(); + s.tmp_0.arg0 = r0; + s.callLocIdx = 121; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +settings_initScopes__P22672.info = {"start":1104,"length":230,"line":41,"column":4,"endLine":49,"endColumn":5,"fileName":"pxt_modules/settings/settings.ts","functionName":"initScopes","argumentNames":[]} + +function settings_initScopes__P22672_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_initScopes__P22672, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + rn___31824: undefined, +} } + + + + + +function settings_setScope__P22671(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.currScope___31853 = undefined; + 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; + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + 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__P20104_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___22661; + s.callLocIdx = 117; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.currScope___31853 = (r0); + r0 = (s.currScope___31853 != 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__P20099_mk(s); + s.tmp_0.arg0 = globals.SCOPE_KEY___22661; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 118; s.pc = 8; return s.tmp_0; + case 8: + r0 = s.retval; + case 5: + case 6: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +settings_setScope__P22671.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__P22671_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_setScope__P22671, 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___31853: undefined, + arg0: undefined, +} } + + + + + +function settings_readString__P20104(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___31874 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = pxsim.settings._get(s.arg0); + s.buf___31874 = (r0); + r0 = pxsim_numops_toBoolDecr(s.buf___31874); + 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___31874); + { step = 3; continue; } + case 2: + r0 = undefined; + case 3: + return leave(s, r0) + default: oops() +} } } +settings_readString__P20104.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__P20104_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_readString__P20104, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + buf___31874: undefined, + arg0: undefined, +} } + + + + + +function settings_writeString__P20099(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__P20098_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = pxsim.control.createBufferFromUTF8(s.arg1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 123; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +settings_writeString__P20099.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__P20099_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_writeString__P20099, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function settings_runNumber__P20096(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__P20106_mk(s); + s.tmp_1.arg0 = globals.RUN_KEY___22660; + s.callLocIdx = 116; 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__P20096.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__P20096_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: settings_runNumber__P20096, 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__P20032(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___22627 = (true); + globals.__update___22625 = (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 = 110; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control___screen_setupUpdate__P20032.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__P20032_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control___screen_setupUpdate__P20032, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function _screen_internal_getScreenHeight__P20075(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__P20075.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__P20075_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: _screen_internal_getScreenHeight__P20075, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function _screen_internal_getScreenWidth__P20074(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__P20074.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__P20074_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: _screen_internal_getScreenWidth__P20074, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function control___screen_update__P20031(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___22625); + if (!r0) { step = 1; continue; } + s.tmp_0 = lambda_1_mk(s); + s.tmp_0.argL = globals.__update___22625; + setupLambda(s.tmp_0, s.tmp_0.argL); + s.callLocIdx = 109; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + case 1: + case 2: + globals.__updated___22627 = (true); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +control___screen_update__P20031.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__P20031_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: control___screen_update__P20031, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, +} } + + + + + +function pause__P18451(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__P18451.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__P18451_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: pause__P18451, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function music_Melody_toString__P19673(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__C19664_VT)) failedCast(r0); + r0 = s.arg0.fields["_text"]; + return leave(s, r0) + default: oops() +} } } +music_Melody_toString__P19673.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__P19673_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: music_Melody_toString__P19673, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function particles_ShapeFactory_createParticle__P21255(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___31912 = 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__C21251_VT)) failedCast(r0); + s.tmp_0 = particles_AreaFactory_createParticle__P21241_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1246; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.p___31912 = (r0); + s.tmp_0 = r0 = s.p___31912; + s.tmp_2 = Math_FastRandom_randomRange__P21101_mk(s); + r0 = s.arg0.fields["galois"]; + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = 1; + s.tmp_2.arg2 = 14; + s.callLocIdx = 1247; 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___31912; + return leave(s, r0) + default: oops() +} } } +particles_ShapeFactory_createParticle__P21255.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__P21255_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_ShapeFactory_createParticle__P21255, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + p___31912: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function particles_AreaFactory_createParticle__P21241(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___31924 = 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__C21235_VT)) failedCast(r0); + s.tmp_0 = particles_SprayFactory_createParticle__P21231_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1228; s.pc = 3; return s.tmp_0; + case 3: + r0 = s.retval; + s.p___31924 = (r0); + s.tmp_0 = r0 = s.p___31924; + s.tmp_2 = Math_FastRandom_randomRange__P21101_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 = 1229; 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___31924; + s.tmp_4 = Math_FastRandom_randomRange__P21101_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 = 1230; 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___31924.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 = 1233; 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 = 1234; 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___31924; + s.tmp_9 = Math_FastRandom_randomRange__P21101_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 = 1232; 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___31924.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___31924; + return leave(s, r0) + default: oops() +} } } +particles_AreaFactory_createParticle__P21241.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__P21241_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_AreaFactory_createParticle__P21241, 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___31924: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function Fx_iadd__P18196(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__P18196.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__P18196_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_iadd__P18196, 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__P21231(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___31980 = undefined; + s.angle___31984 = 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__C21229_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory_createParticle__P21227_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 1217; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; + s.p___31980 = (r0); + r0 = s.arg0.fields["minAngle"]; + s.tmp_1 = r0; + s.tmp_3 = Math_FastRandom_randomRange__P21101_mk(s); + s.tmp_3.arg0 = globals.galois___23338; + s.tmp_3.arg1 = 0; + r0 = s.arg0.fields["spread"]; + s.tmp_3.arg2 = r0; + s.callLocIdx = 1218; 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___31984 = (r0); + s.tmp_0 = r0 = s.p___31980; + r0 = pxsim_Array__getAt(globals.cachedSin___23333, s.angle___31984); + 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___31980; + r0 = pxsim_Array__getAt(globals.cachedCos___23334, s.angle___31984); + 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___31980; + return leave(s, r0) + default: oops() +} } } +particles_SprayFactory_createParticle__P21231.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__P21231_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: particles_SprayFactory_createParticle__P21231, 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___31980: undefined, + angle___31984: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function sprites_SpriteMap_toString__P20492(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__C20484_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__P18148_mk(s); + r0 = s.arg0.fields["buckets"]; + s.tmp_10.arg0 = r0; + s.tmp_10.arg1 = length_inline__P32103; + s.callLocIdx = 514; 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__P20492.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__P20492_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_SpriteMap_toString__P20492, 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__P32103(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__P32103.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__P32103_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: length_inline__P32103, 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__P20579(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___32135 = undefined; + s.maxDist___32143 = undefined; + s.ms___32163 = 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__C20565_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__P21037_mk(s); + s.callLocIdx = 751; s.pc = 13; return s.tmp_0; + case 13: + r0 = s.retval; + r0 = r0.fields["tileMap"]; + s.tm___32135 = (r0); + s.tmp_0 = r0 = s.tm___32135; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 2; continue; } + case 1: + r0 = s.tm___32135.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___32143 = (r0); + s.tmp_2 = Math_abs__P18166_mk(s); + r0 = (s.arg2 + 128); + s.tmp_3 = r0; + r0 = (s.tmp_3 >> 8); + s.tmp_2.arg0 = r0; + s.callLocIdx = 755; s.pc = 14; return s.tmp_2; + case 14: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 <= s.maxDist___32143); + 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__P18166_mk(s); + r0 = (s.arg3 + 128); + s.tmp_6 = r0; + r0 = (s.tmp_6 >> 8); + s.tmp_5.arg0 = r0; + s.callLocIdx = 757; s.pc = 15; return s.tmp_5; + case 15: + r0 = s.retval; + s.tmp_4 = r0; + r0 = (s.tmp_4 <= s.maxDist___32143); + 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__C20563_VT); + s.tmp_8 = r0; + s.tmp_9 = MovingSprite_constructor__P20564_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 = 758; s.pc = 16; return s.tmp_9; + case 16: + r0 = s.retval; + s.ms___32163 = (s.tmp_8); + s.tmp_0 = ArcadePhysicsEngine_tilemapCollisions__P22838_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.ms___32163; + s.tmp_0.arg2 = s.tm___32135; + s.callLocIdx = 759; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } + case 5: + s.tmp_1 = tiles_TileMap_isOnWall__P20796_mk(s); + s.tmp_1.arg0 = s.tm___32135; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 760; 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__P22840_mk(s); + s.tmp_4.arg0 = s.arg0; + s.tmp_4.arg1 = s.arg1; + s.tmp_4.arg2 = s.tm___32135; + s.callLocIdx = 761; 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__P20579.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__P20579_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_moveSprite__P20579, 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___32135: undefined, + maxDist___32143: undefined, + ms___32163: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function ArcadePhysicsEngine_canResolveClipping__P22840(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___32208 = undefined; + s.sz___32211 = undefined; + s.maxMove___32216 = undefined; + s.origY___32218 = undefined; + s.origX___32221 = undefined; + s.l___32224 = undefined; + s.r___32229 = undefined; + s.t___32234 = undefined; + s.b___32239 = undefined; + s.offset___32244 = undefined; + s.offset___32269 = undefined; + s.offset___32300 = undefined; + s.offset___32325 = 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__C20565_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__C20379_v4_1_mk(s); + s.tmp_4.arg0 = s.arg1; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C20379_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___32208 = (r0); + r0 = s.arg2.fields["_scale"]; + s.tmp_0 = r0; + r0 = (1 << s.tmp_0); + s.sz___32211 = (r0); + s.tmp_0 = ArcadePhysicsEngine_maxStep__P20571_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 764; s.pc = 21; return s.tmp_0; + case 21: + r0 = s.retval; + s.maxMove___32216 = (r0); + r0 = s.arg1.fields["_y"]; + s.origY___32218 = (r0); + r0 = s.arg1.fields["_x"]; + s.origX___32221 = (r0); + s.tmp_1 = game_Hitbox_left__P20254_mk(s); + s.tmp_1.arg0 = s.hbox___32208; + s.callLocIdx = 765; 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___32224 = (r0); + s.tmp_1 = game_Hitbox_right__P20256_mk(s); + s.tmp_1.arg0 = s.hbox___32208; + s.callLocIdx = 767; 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___32229 = (r0); + s.tmp_1 = game_Hitbox_top__P20255_mk(s); + s.tmp_1.arg0 = s.hbox___32208; + s.callLocIdx = 769; 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___32234 = (r0); + s.tmp_1 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_1.arg0 = s.hbox___32208; + s.callLocIdx = 771; 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___32239 = (r0); + r0 = (s.b___32239 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___32211); + s.offset___32244 = (r0); + r0 = (s.offset___32244 <= s.maxMove___32216); + 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___32244 * 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__P20796_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 775; 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___32218); + case 4: + case 5: + case 6: + r0 = (s.t___32234 / s.sz___32211); + 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___32211); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.t___32234); + s.offset___32269 = (r0); + r0 = (s.offset___32269 <= s.maxMove___32216); + 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___32269 * 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__P20796_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 778; 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___32218); + case 8: + case 9: + case 10: + r0 = (s.r___32229 + 1); + s.tmp_0 = r0; + r0 = (s.tmp_0 % s.sz___32211); + s.offset___32300 = (r0); + r0 = (s.offset___32300 <= s.maxMove___32216); + 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___32300 * 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__P20796_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 781; 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___32221); + case 12: + case 13: + case 14: + r0 = (s.l___32224 / s.sz___32211); + 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___32211); + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.l___32224); + s.offset___32325 = (r0); + r0 = (s.offset___32325 <= s.maxMove___32216); + 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___32325 * 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__P20796_mk(s); + s.tmp_3.arg0 = s.arg2; + s.tmp_3.arg1 = s.arg1; + s.callLocIdx = 784; 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___32221); + case 16: + case 17: + case 18: + r0 = false; + case 19: + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_canResolveClipping__P22840.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__P22840_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_canResolveClipping__P22840, 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___32208: undefined, + sz___32211: undefined, + maxMove___32216: undefined, + origY___32218: undefined, + origX___32221: undefined, + l___32224: undefined, + r___32229: undefined, + t___32234: undefined, + b___32239: undefined, + offset___32244: undefined, + offset___32269: undefined, + offset___32300: undefined, + offset___32325: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, +} } + + + + + +function Sprite_isStatic__P20433(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__C20379_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__P20433.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__P20433_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_isStatic__P20433, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function game_Hitbox_bottom__P20257(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__C20246_VT)) failedCast(r0); + r0 = s.arg0.fields["height"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_top__P20255_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 225; 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__P20257.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__P20257.isGetter = true; + +function game_Hitbox_bottom__P20257_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_Hitbox_bottom__P20257, 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__P20256(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__C20246_VT)) failedCast(r0); + r0 = s.arg0.fields["width"]; + s.tmp_1 = r0; + s.tmp_3 = game_Hitbox_left__P20254_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 222; 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__P20256.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__P20256.isGetter = true; + +function game_Hitbox_right__P20256_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_Hitbox_right__P20256, 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__P20255(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__C20246_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__P20255.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__P20255.isGetter = true; + +function game_Hitbox_top__P20255_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_Hitbox_top__P20255, 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__P20254(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__C20246_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__P20254.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__P20254.isGetter = true; + +function game_Hitbox_left__P20254_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: game_Hitbox_left__P20254, 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__P22838(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___32485 = undefined; + s.hbox___32510 = undefined; + s.tileScale___32513 = undefined; + s.tileSize___32516 = undefined; + s.xDiff___32520 = undefined; + s.yDiff___32527 = undefined; + s.right___32543 = undefined; + s.x0___32547 = undefined; + s.collidedTiles___32562 = undefined; + s.y___32564 = undefined; + s.y0___32578 = undefined; + s.obstacle___32594 = undefined; + s.collisionDirection___32621 = undefined; + s.tile___32647 = undefined; + s.unnamed172___U14 = undefined; + s.unnamed173___U15 = undefined; + s.down___32738 = undefined; + s.y0___32742 = undefined; + s.collidedTiles___32757 = undefined; + s.x___32759 = undefined; + s.x0___32769 = undefined; + s.obstacle___32783 = undefined; + s.collisionDirection___32810 = undefined; + s.tile___32836 = undefined; + s.unnamed174___U24 = undefined; + s.unnamed175___U25 = undefined; + s.overlappedTiles___32930 = undefined; + s.x___32932 = undefined; + s.x0___32942 = undefined; + s.y___32952 = undefined; + s.y0___32962 = 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__C20565_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___32485 = (r0); + r0 = s.s___32485.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__P2758_mk(s); + s.tmp_5 = tiles_TileMap_isOnWall__P20796_mk(s); s.tmp_5.arg0 = s.arg2; - s.tmp_5.arg1 = s.s___14447; + s.tmp_5.arg1 = s.s___32485; s.callLocIdx = 647; s.pc = 97; return s.tmp_5; case 97: r0 = s.retval; @@ -28984,7 +31218,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 1; continue; } - s.tmp_6 = r0 = s.s___14447; + s.tmp_6 = r0 = s.s___32485; r0 = s.tmp_6.fields["flags"]; s.tmp_8 = r0; r0 = (s.tmp_8 & -257); @@ -28994,7 +31228,7 @@ switch (step) { case 2: case 3: case 4: - r0 = s.s___14447.fields["_image"]; + r0 = s.s___32485.fields["_image"]; s.tmp_3 = r0; r0 = pxsim_ImageMethods.isStatic(s.tmp_3); s.tmp_2 = r0; @@ -29004,34 +31238,34 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 5; continue; } - s.tmp_4 = Sprite__C2341_v4_1_mk(s); - s.tmp_4.arg0 = s.s___14447; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C2341_VT)) failedCast(s.tmp_4.arg0); + s.tmp_4 = Sprite__C20379_v4_1_mk(s); + s.tmp_4.arg0 = s.s___32485; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C20379_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___14447.fields["_hitbox"]; - s.hbox___14472 = (r0); + r0 = s.s___32485.fields["_hitbox"]; + s.hbox___32510 = (r0); r0 = s.arg2.fields["_scale"]; - s.tileScale___14475 = (r0); - r0 = (1 << s.tileScale___14475); - s.tileSize___14478 = (r0); - r0 = s.s___14447.fields["_x"]; + s.tileScale___32513 = (r0); + r0 = (1 << s.tileScale___32513); + s.tileSize___32516 = (r0); + r0 = s.s___32485.fields["_x"]; s.tmp_0 = r0; - r0 = s.s___14447.fields["_lastX"]; + r0 = s.s___32485.fields["_lastX"]; s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.xDiff___14482 = (r0); - r0 = s.s___14447.fields["_y"]; + s.xDiff___32520 = (r0); + r0 = s.s___32485.fields["_y"]; s.tmp_0 = r0; - r0 = s.s___14447.fields["_lastY"]; + r0 = s.s___32485.fields["_lastY"]; s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.yDiff___14489 = (r0); - r0 = s.s___14447.fields["flags"]; + s.yDiff___32527 = (r0); + r0 = s.s___32485.fields["flags"]; s.tmp_3 = r0; r0 = (s.tmp_3 & 2818); s.tmp_2 = r0; @@ -29041,16 +31275,16 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 83; continue; } - r0 = (s.xDiff___14482 !== 0); + r0 = (s.xDiff___32520 !== 0); s.tmp_4 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 43; continue; } - r0 = (s.xDiff___14482 > 0); - s.right___14505 = (r0); - r0 = pxsim_numops_toBoolDecr(s.right___14505); + r0 = (s.xDiff___32520 > 0); + s.right___32543 = (r0); + r0 = pxsim_numops_toBoolDecr(s.right___32543); if (!r0) { step = 7; continue; } - s.tmp_1 = game_Hitbox_right__P2218_mk(s); - s.tmp_1.arg0 = s.hbox___14472; + s.tmp_1 = game_Hitbox_right__P20256_mk(s); + s.tmp_1.arg0 = s.hbox___32510; s.callLocIdx = 652; s.pc = 99; return s.tmp_1; case 99: r0 = s.retval; @@ -29058,8 +31292,8 @@ switch (step) { r0 = (s.tmp_0 + 256); { step = 8; continue; } case 7: - s.tmp_3 = game_Hitbox_left__P2216_mk(s); - s.tmp_3.arg0 = s.hbox___14472; + s.tmp_3 = game_Hitbox_left__P20254_mk(s); + s.tmp_3.arg0 = s.hbox___32510; s.callLocIdx = 654; s.pc = 100; return s.tmp_3; case 100: r0 = s.retval; @@ -29070,30 +31304,30 @@ switch (step) { s.tmp_4 = r0; r0 = (s.tmp_4 + 128); s.tmp_5 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_6 = r0; r0 = (s.tmp_5 >> s.tmp_6); - s.x0___14509 = (r0); + s.x0___32547 = (r0); r0 = pxsim_Array__mk(); - s.collidedTiles___14524 = (r0); - s.tmp_1 = game_Hitbox_top__P2217_mk(s); - s.tmp_1.arg0 = s.hbox___14472; + s.collidedTiles___32562 = (r0); + s.tmp_1 = game_Hitbox_top__P20255_mk(s); + s.tmp_1.arg0 = s.hbox___32510; s.callLocIdx = 658; s.pc = 101; return s.tmp_1; case 101: r0 = s.retval; s.tmp_0 = r0; - r0 = (s.tmp_0 - s.yDiff___14489); - s.y___14526 = (r0); + r0 = (s.tmp_0 - s.yDiff___32527); + s.y___32564 = (r0); case 9: - s.tmp_1 = r0 = s.y___14526; - s.tmp_3 = r0 = s.tileSize___14478; - s.tmp_6 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_6.arg0 = s.hbox___14472; + s.tmp_1 = r0 = s.y___32564; + s.tmp_3 = r0 = s.tileSize___32516; + s.tmp_6 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_6.arg0 = s.hbox___32510; s.callLocIdx = 660; s.pc = 102; return s.tmp_6; case 102: r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_5 - s.yDiff___14489); + r0 = (s.tmp_5 - s.yDiff___32527); s.tmp_4 = r0; r0 = (s.tmp_3 << 8); s.tmp_7 = r0; @@ -29103,15 +31337,15 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 14; continue; } - s.tmp_10 = Fx_min__P166_mk(s); - s.tmp_10.arg0 = s.y___14526; - s.tmp_12 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_12.arg0 = s.hbox___14472; + s.tmp_10 = Fx_min__P18204_mk(s); + s.tmp_10.arg0 = s.y___32564; + s.tmp_12 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_12.arg0 = s.hbox___32510; s.callLocIdx = 663; s.pc = 104; return s.tmp_12; case 104: r0 = s.retval; s.tmp_11 = r0; - r0 = (s.tmp_11 - s.yDiff___14489); + r0 = (s.tmp_11 - s.yDiff___32527); s.tmp_10.arg1 = r0; s.callLocIdx = 665; s.pc = 103; return s.tmp_10; case 103: @@ -29119,33 +31353,33 @@ switch (step) { s.tmp_9 = r0; r0 = (s.tmp_9 + 128); s.tmp_8 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_13 = r0; r0 = (s.tmp_8 >> s.tmp_13); - s.y0___14540 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P2756_mk(s); + s.y0___32578 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P20794_mk(s); s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___14509; - s.tmp_1.arg2 = s.y0___14540; + s.tmp_1.arg1 = s.x0___32547; + s.tmp_1.arg2 = s.y0___32578; s.callLocIdx = 668; 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__P2757_mk(s); + s.tmp_2 = tiles_TileMap_getObstacle__P20795_mk(s); s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___14509; - s.tmp_2.arg2 = s.y0___14540; + s.tmp_2.arg1 = s.x0___32547; + s.tmp_2.arg2 = s.y0___32578; s.callLocIdx = 669; s.pc = 106; return s.tmp_2; case 106: r0 = s.retval; - s.obstacle___14556 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P14564); + s.obstacle___32594 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P32602); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___14556); - s.tmp_4 = helpers_arraySome__P107_mk(s); - s.tmp_4.arg0 = s.collidedTiles___14524; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___32594); + s.tmp_4 = helpers_arraySome__P18145_mk(s); + s.tmp_4.arg0 = s.collidedTiles___32562; s.tmp_4.arg1 = s.tmp_0; s.callLocIdx = 670; s.pc = 107; return s.tmp_4; case 107: @@ -29157,22 +31391,22 @@ switch (step) { s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 10; continue; } - r0 = pxsim_Array__push(s.collidedTiles___14524, s.obstacle___14556); + r0 = pxsim_Array__push(s.collidedTiles___32562, s.obstacle___32594); case 10: case 11: case 12: case 13: - r0 = (s.tileSize___14478 << 8); + r0 = (s.tileSize___32516 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___14526); - s.y___14526 = (r0); + r0 = (s.tmp_0 + s.y___32564); + s.y___32564 = (r0); { step = 9; continue; } case 14: - r0 = pxsim_Array__length(s.collidedTiles___14524); + r0 = pxsim_Array__length(s.collidedTiles___32562); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 41; continue; } - r0 = pxsim_numops_toBoolDecr(s.right___14505); + r0 = pxsim_numops_toBoolDecr(s.right___32543); if (!r0) { step = 15; continue; } r0 = 2; { step = 16; continue; } @@ -29181,23 +31415,23 @@ switch (step) { case 16: // jmp value (already in r0) s.tmp_1 = r0; - s.collisionDirection___14583 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.right___14505); + s.collisionDirection___32621 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.right___32543); if (!r0) { step = 17; continue; } - r0 = (s.x0___14509 << s.tileScale___14475); + r0 = (s.x0___32547 << s.tileScale___32513); 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___14472.fields["width"]; + r0 = s.hbox___32510.fields["width"]; s.tmp_3 = r0; r0 = (s.tmp_0 - s.tmp_3); { step = 18; continue; } case 17: - r0 = (s.x0___14509 + 1); + r0 = (s.x0___32547 + 1); s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___14475); + r0 = (s.tmp_5 << s.tileScale___32513); s.tmp_4 = r0; r0 = (s.tmp_4 * 256); s.tmp_6 = r0; @@ -29205,24 +31439,24 @@ switch (step) { case 18: // jmp value (already in r0) s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___14447; - r0 = s.hbox___14472.fields["ox"]; + s.tmp_8 = r0 = s.s___32485; + r0 = s.hbox___32510.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___14609 = (undefined); - s.unnamed80___U14 = (s.collidedTiles___14524); - s.unnamed81___U15 = (0); + s.tile___32647 = (undefined); + s.unnamed172___U14 = (s.collidedTiles___32562); + s.unnamed173___U15 = (0); case 19: - s.tmp_0 = r0 = s.unnamed81___U15; - r0 = pxsim_Array__length(s.unnamed80___U14); + 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.unnamed80___U14, s.unnamed81___U15); - s.tile___14609 = (r0); - r0 = s.s___14447.fields["flags"]; + r0 = pxsim_Array__getAt(s.unnamed172___U14, s.unnamed173___U15); + s.tile___32647 = (r0); + r0 = s.s___32485.fields["flags"]; s.tmp_5 = r0; r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; @@ -29232,29 +31466,29 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 20; continue; } - s.tmp_6 = Sprite_registerObstacle__P2426_mk(s); - s.tmp_6.arg0 = s.s___14447; - s.tmp_6.arg1 = s.collisionDirection___14583; - s.tmp_6.arg2 = s.tile___14609; + s.tmp_6 = Sprite_registerObstacle__P20464_mk(s); + s.tmp_6.arg0 = s.s___32485; + s.tmp_6.arg1 = s.collisionDirection___32621; + s.tmp_6.arg2 = s.tile___32647; s.tmp_6.arg3 = s.arg2; s.callLocIdx = 676; s.pc = 108; return s.tmp_6; case 108: r0 = s.retval; case 20: case 21: - r0 = (s.unnamed81___U15 + 1); - s.unnamed81___U15 = (r0); + r0 = (s.unnamed173___U15 + 1); + s.unnamed173___U15 = (r0); { step = 19; continue; } case 22: - s.unnamed80___U14 = (undefined); - r0 = s.s___14447.fields["flags"]; + s.unnamed172___U14 = (undefined); + r0 = s.s___32485.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__P2428_mk(s); - s.tmp_2.arg0 = s.s___14447; + s.tmp_2 = Sprite_destroy__P20466_mk(s); + s.tmp_2.arg0 = s.s___32485; s.tmp_2.arg1 = undefined; s.tmp_2.arg2 = undefined; s.callLocIdx = 677; s.pc = 109; return s.tmp_2; @@ -29262,7 +31496,7 @@ switch (step) { r0 = s.retval; { step = 40; continue; } case 23: - r0 = s.s___14447.fields["_vx"]; + r0 = s.s___32485.fields["_vx"]; s.tmp_1 = r0; r0 = s.arg1.fields["cachedVx"]; s.tmp_2 = r0; @@ -29273,7 +31507,7 @@ switch (step) { r0 = s.tmp_0; { step = 25; continue; } case 24: - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.fields["flags"]; s.tmp_5 = r0; r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; @@ -29285,13 +31519,13 @@ switch (step) { s.tmp_6 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_6); if (!r0) { step = 36; continue; } - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.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___14505); + r0 = pxsim_numops_toBoolDecr(s.right___32543); s.tmp_10 = r0; r0 = pxsim_Boolean__bang(s.tmp_10); s.tmp_9 = r0; @@ -29300,8 +31534,8 @@ switch (step) { r0 = s.tmp_9; { step = 27; continue; } case 26: - s.tmp_12 = Sprite_vx__P2358_mk(s); - s.tmp_12.arg0 = s.s___14447; + s.tmp_12 = Sprite_vx__P20396_mk(s); + s.tmp_12.arg0 = s.s___32485; s.callLocIdx = 678; s.pc = 110; return s.tmp_12; case 110: r0 = s.retval; @@ -29315,14 +31549,14 @@ switch (step) { r0 = s.tmp_13; { step = 31; continue; } case 28: - s.tmp_14 = r0 = s.right___14505; + s.tmp_14 = r0 = s.right___32543; 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__P2358_mk(s); - s.tmp_16.arg0 = s.s___14447; + s.tmp_16 = Sprite_vx__P20396_mk(s); + s.tmp_16.arg0 = s.s___32485; s.callLocIdx = 679; s.pc = 111; return s.tmp_16; case 111: r0 = s.retval; @@ -29337,8 +31571,8 @@ switch (step) { s.tmp_18 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_18); if (!r0) { step = 32; continue; } - s.tmp_19 = r0 = s.s___14447; - r0 = s.s___14447.fields["_vx"]; + s.tmp_19 = r0 = s.s___32485; + r0 = s.s___32485.fields["_vx"]; s.tmp_21 = r0; r0 = (0 - s.tmp_21); s.tmp_20 = r0; @@ -29360,12 +31594,12 @@ switch (step) { { step = 35; continue; } case 34: r0 = (s.arg1).fields["dx"] = (0); - r0 = (s.s___14447).fields["_vx"] = (0); + r0 = (s.s___32485).fields["_vx"] = (0); case 35: { step = 39; continue; } case 36: - s.tmp_2 = Math_sign__P129_mk(s); - r0 = s.s___14447.fields["_vx"]; + s.tmp_2 = Math_sign__P18167_mk(s); + r0 = s.s___32485.fields["_vx"]; s.tmp_3 = r0; r0 = (s.tmp_3 + 128); s.tmp_4 = r0; @@ -29375,7 +31609,7 @@ switch (step) { case 112: r0 = s.retval; s.tmp_1 = r0; - s.tmp_6 = Math_sign__P129_mk(s); + s.tmp_6 = Math_sign__P18167_mk(s); r0 = s.arg1.fields["cachedVx"]; s.tmp_7 = r0; r0 = (s.tmp_7 + 128); @@ -29399,16 +31633,16 @@ switch (step) { case 42: case 43: case 44: - r0 = (s.yDiff___14489 !== 0); + r0 = (s.yDiff___32527 !== 0); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 81; continue; } - r0 = (s.yDiff___14489 > 0); - s.down___14700 = (r0); - r0 = pxsim_numops_toBoolDecr(s.down___14700); + r0 = (s.yDiff___32527 > 0); + s.down___32738 = (r0); + r0 = pxsim_numops_toBoolDecr(s.down___32738); if (!r0) { step = 45; continue; } - s.tmp_1 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_1.arg0 = s.hbox___14472; + s.tmp_1 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_1.arg0 = s.hbox___32510; s.callLocIdx = 687; s.pc = 114; return s.tmp_1; case 114: r0 = s.retval; @@ -29416,8 +31650,8 @@ switch (step) { r0 = (s.tmp_0 + 256); { step = 46; continue; } case 45: - s.tmp_3 = game_Hitbox_top__P2217_mk(s); - s.tmp_3.arg0 = s.hbox___14472; + s.tmp_3 = game_Hitbox_top__P20255_mk(s); + s.tmp_3.arg0 = s.hbox___32510; s.callLocIdx = 689; s.pc = 115; return s.tmp_3; case 115: r0 = s.retval; @@ -29428,23 +31662,23 @@ switch (step) { s.tmp_4 = r0; r0 = (s.tmp_4 + 128); s.tmp_5 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_6 = r0; r0 = (s.tmp_5 >> s.tmp_6); - s.y0___14704 = (r0); + s.y0___32742 = (r0); r0 = pxsim_Array__mk(); - s.collidedTiles___14719 = (r0); - s.tmp_0 = game_Hitbox_left__P2216_mk(s); - s.tmp_0.arg0 = s.hbox___14472; + s.collidedTiles___32757 = (r0); + s.tmp_0 = game_Hitbox_left__P20254_mk(s); + s.tmp_0.arg0 = s.hbox___32510; s.callLocIdx = 693; s.pc = 116; return s.tmp_0; case 116: r0 = s.retval; - s.x___14721 = (r0); + s.x___32759 = (r0); case 47: - s.tmp_1 = r0 = s.x___14721; - s.tmp_3 = r0 = s.tileSize___14478; - s.tmp_5 = game_Hitbox_right__P2218_mk(s); - s.tmp_5.arg0 = s.hbox___14472; + s.tmp_1 = r0 = s.x___32759; + s.tmp_3 = r0 = s.tileSize___32516; + s.tmp_5 = game_Hitbox_right__P20256_mk(s); + s.tmp_5.arg0 = s.hbox___32510; s.callLocIdx = 694; s.pc = 117; return s.tmp_5; case 117: r0 = s.retval; @@ -29457,10 +31691,10 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 52; continue; } - s.tmp_9 = Fx_min__P166_mk(s); - s.tmp_9.arg0 = s.x___14721; - s.tmp_10 = game_Hitbox_right__P2218_mk(s); - s.tmp_10.arg0 = s.hbox___14472; + s.tmp_9 = Fx_min__P18204_mk(s); + s.tmp_9.arg0 = s.x___32759; + s.tmp_10 = game_Hitbox_right__P20256_mk(s); + s.tmp_10.arg0 = s.hbox___32510; s.callLocIdx = 696; s.pc = 119; return s.tmp_10; case 119: r0 = s.retval; @@ -29471,33 +31705,33 @@ switch (step) { s.tmp_8 = r0; r0 = (s.tmp_8 + 128); s.tmp_7 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_11 = r0; r0 = (s.tmp_7 >> s.tmp_11); - s.x0___14731 = (r0); - s.tmp_1 = tiles_TileMap_isObstacle__P2756_mk(s); + s.x0___32769 = (r0); + s.tmp_1 = tiles_TileMap_isObstacle__P20794_mk(s); s.tmp_1.arg0 = s.arg2; - s.tmp_1.arg1 = s.x0___14731; - s.tmp_1.arg2 = s.y0___14704; + s.tmp_1.arg1 = s.x0___32769; + s.tmp_1.arg2 = s.y0___32742; s.callLocIdx = 700; 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__P2757_mk(s); + s.tmp_2 = tiles_TileMap_getObstacle__P20795_mk(s); s.tmp_2.arg0 = s.arg2; - s.tmp_2.arg1 = s.x0___14731; - s.tmp_2.arg2 = s.y0___14704; + s.tmp_2.arg1 = s.x0___32769; + s.tmp_2.arg2 = s.y0___32742; s.callLocIdx = 701; s.pc = 121; return s.tmp_2; case 121: r0 = s.retval; - s.obstacle___14745 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P14753); + s.obstacle___32783 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapCollisions_inline__P32791); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___14745); - s.tmp_4 = helpers_arraySome__P107_mk(s); - s.tmp_4.arg0 = s.collidedTiles___14719; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.obstacle___32783); + s.tmp_4 = helpers_arraySome__P18145_mk(s); + s.tmp_4.arg0 = s.collidedTiles___32757; s.tmp_4.arg1 = s.tmp_0; s.callLocIdx = 702; s.pc = 122; return s.tmp_4; case 122: @@ -29509,22 +31743,22 @@ switch (step) { s.tmp_1 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 48; continue; } - r0 = pxsim_Array__push(s.collidedTiles___14719, s.obstacle___14745); + r0 = pxsim_Array__push(s.collidedTiles___32757, s.obstacle___32783); case 48: case 49: case 50: case 51: - r0 = (s.tileSize___14478 << 8); + r0 = (s.tileSize___32516 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___14721); - s.x___14721 = (r0); + r0 = (s.tmp_0 + s.x___32759); + s.x___32759 = (r0); { step = 47; continue; } case 52: - r0 = pxsim_Array__length(s.collidedTiles___14719); + r0 = pxsim_Array__length(s.collidedTiles___32757); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 79; continue; } - r0 = pxsim_numops_toBoolDecr(s.down___14700); + r0 = pxsim_numops_toBoolDecr(s.down___32738); if (!r0) { step = 53; continue; } r0 = 3; { step = 54; continue; } @@ -29533,23 +31767,23 @@ switch (step) { case 54: // jmp value (already in r0) s.tmp_1 = r0; - s.collisionDirection___14772 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.down___14700); + s.collisionDirection___32810 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.down___32738); if (!r0) { step = 55; continue; } - r0 = (s.y0___14704 << s.tileScale___14475); + r0 = (s.y0___32742 << s.tileScale___32513); 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___14472.fields["height"]; + r0 = s.hbox___32510.fields["height"]; s.tmp_3 = r0; r0 = (s.tmp_0 - s.tmp_3); { step = 56; continue; } case 55: - r0 = (s.y0___14704 + 1); + r0 = (s.y0___32742 + 1); s.tmp_5 = r0; - r0 = (s.tmp_5 << s.tileScale___14475); + r0 = (s.tmp_5 << s.tileScale___32513); s.tmp_4 = r0; r0 = (s.tmp_4 * 256); s.tmp_6 = r0; @@ -29557,24 +31791,24 @@ switch (step) { case 56: // jmp value (already in r0) s.tmp_7 = r0; - s.tmp_8 = r0 = s.s___14447; - r0 = s.hbox___14472.fields["oy"]; + s.tmp_8 = r0 = s.s___32485; + r0 = s.hbox___32510.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___14798 = (undefined); - s.unnamed82___U24 = (s.collidedTiles___14719); - s.unnamed83___U25 = (0); + s.tile___32836 = (undefined); + s.unnamed174___U24 = (s.collidedTiles___32757); + s.unnamed175___U25 = (0); case 57: - s.tmp_0 = r0 = s.unnamed83___U25; - r0 = pxsim_Array__length(s.unnamed82___U24); + 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.unnamed82___U24, s.unnamed83___U25); - s.tile___14798 = (r0); - r0 = s.s___14447.fields["flags"]; + r0 = pxsim_Array__getAt(s.unnamed174___U24, s.unnamed175___U25); + s.tile___32836 = (r0); + r0 = s.s___32485.fields["flags"]; s.tmp_5 = r0; r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; @@ -29584,29 +31818,29 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 58; continue; } - s.tmp_6 = Sprite_registerObstacle__P2426_mk(s); - s.tmp_6.arg0 = s.s___14447; - s.tmp_6.arg1 = s.collisionDirection___14772; - s.tmp_6.arg2 = s.tile___14798; + s.tmp_6 = Sprite_registerObstacle__P20464_mk(s); + s.tmp_6.arg0 = s.s___32485; + s.tmp_6.arg1 = s.collisionDirection___32810; + s.tmp_6.arg2 = s.tile___32836; s.tmp_6.arg3 = s.arg2; s.callLocIdx = 708; s.pc = 123; return s.tmp_6; case 123: r0 = s.retval; case 58: case 59: - r0 = (s.unnamed83___U25 + 1); - s.unnamed83___U25 = (r0); + r0 = (s.unnamed175___U25 + 1); + s.unnamed175___U25 = (r0); { step = 57; continue; } case 60: - s.unnamed82___U24 = (undefined); - r0 = s.s___14447.fields["flags"]; + s.unnamed174___U24 = (undefined); + r0 = s.s___32485.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__P2428_mk(s); - s.tmp_2.arg0 = s.s___14447; + s.tmp_2 = Sprite_destroy__P20466_mk(s); + s.tmp_2.arg0 = s.s___32485; s.tmp_2.arg1 = undefined; s.tmp_2.arg2 = undefined; s.callLocIdx = 709; s.pc = 124; return s.tmp_2; @@ -29614,7 +31848,7 @@ switch (step) { r0 = s.retval; { step = 78; continue; } case 61: - r0 = s.s___14447.fields["_vy"]; + r0 = s.s___32485.fields["_vy"]; s.tmp_1 = r0; r0 = s.arg1.fields["cachedVy"]; s.tmp_2 = r0; @@ -29625,7 +31859,7 @@ switch (step) { r0 = s.tmp_0; { step = 63; continue; } case 62: - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.fields["flags"]; s.tmp_5 = r0; r0 = (s.tmp_5 & 2818); s.tmp_4 = r0; @@ -29637,13 +31871,13 @@ switch (step) { s.tmp_6 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_6); if (!r0) { step = 74; continue; } - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.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___14700); + r0 = pxsim_numops_toBoolDecr(s.down___32738); s.tmp_10 = r0; r0 = pxsim_Boolean__bang(s.tmp_10); s.tmp_9 = r0; @@ -29652,8 +31886,8 @@ switch (step) { r0 = s.tmp_9; { step = 65; continue; } case 64: - s.tmp_12 = Sprite_vy__P2360_mk(s); - s.tmp_12.arg0 = s.s___14447; + s.tmp_12 = Sprite_vy__P20398_mk(s); + s.tmp_12.arg0 = s.s___32485; s.callLocIdx = 710; s.pc = 125; return s.tmp_12; case 125: r0 = s.retval; @@ -29667,14 +31901,14 @@ switch (step) { r0 = s.tmp_13; { step = 69; continue; } case 66: - s.tmp_14 = r0 = s.down___14700; + s.tmp_14 = r0 = s.down___32738; 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__P2360_mk(s); - s.tmp_16.arg0 = s.s___14447; + s.tmp_16 = Sprite_vy__P20398_mk(s); + s.tmp_16.arg0 = s.s___32485; s.callLocIdx = 711; s.pc = 126; return s.tmp_16; case 126: r0 = s.retval; @@ -29689,8 +31923,8 @@ switch (step) { s.tmp_18 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_18); if (!r0) { step = 70; continue; } - s.tmp_19 = r0 = s.s___14447; - r0 = s.s___14447.fields["_vy"]; + s.tmp_19 = r0 = s.s___32485; + r0 = s.s___32485.fields["_vy"]; s.tmp_21 = r0; r0 = (0 - s.tmp_21); s.tmp_20 = r0; @@ -29712,12 +31946,12 @@ switch (step) { { step = 73; continue; } case 72: r0 = (s.arg1).fields["dy"] = (0); - r0 = (s.s___14447).fields["_vy"] = (0); + r0 = (s.s___32485).fields["_vy"] = (0); case 73: { step = 77; continue; } case 74: - s.tmp_2 = Math_sign__P129_mk(s); - r0 = s.s___14447.fields["_vy"]; + s.tmp_2 = Math_sign__P18167_mk(s); + r0 = s.s___32485.fields["_vy"]; s.tmp_3 = r0; r0 = (s.tmp_3 + 128); s.tmp_4 = r0; @@ -29727,7 +31961,7 @@ switch (step) { case 127: r0 = s.retval; s.tmp_1 = r0; - s.tmp_6 = Math_sign__P129_mk(s); + s.tmp_6 = Math_sign__P18167_mk(s); r0 = s.arg1.fields["cachedVy"]; s.tmp_7 = r0; r0 = (s.tmp_7 + 128); @@ -29753,7 +31987,7 @@ switch (step) { case 82: case 83: case 84: - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.fields["flags"]; s.tmp_3 = r0; r0 = (s.tmp_3 & 1538); s.tmp_2 = r0; @@ -29764,18 +31998,18 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 95; continue; } r0 = pxsim_Array__mk(); - s.overlappedTiles___14892 = (r0); - s.tmp_0 = game_Hitbox_left__P2216_mk(s); - s.tmp_0.arg0 = s.hbox___14472; + s.overlappedTiles___32930 = (r0); + s.tmp_0 = game_Hitbox_left__P20254_mk(s); + s.tmp_0.arg0 = s.hbox___32510; s.callLocIdx = 719; s.pc = 129; return s.tmp_0; case 129: r0 = s.retval; - s.x___14894 = (r0); + s.x___32932 = (r0); case 85: - s.tmp_1 = r0 = s.x___14894; - s.tmp_3 = r0 = s.tileSize___14478; - s.tmp_5 = game_Hitbox_right__P2218_mk(s); - s.tmp_5.arg0 = s.hbox___14472; + s.tmp_1 = r0 = s.x___32932; + s.tmp_3 = r0 = s.tileSize___32516; + s.tmp_5 = game_Hitbox_right__P20256_mk(s); + s.tmp_5.arg0 = s.hbox___32510; s.callLocIdx = 720; s.pc = 130; return s.tmp_5; case 130: r0 = s.retval; @@ -29788,10 +32022,10 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 92; continue; } - s.tmp_9 = Fx_min__P166_mk(s); - s.tmp_9.arg0 = s.x___14894; - s.tmp_10 = game_Hitbox_right__P2218_mk(s); - s.tmp_10.arg0 = s.hbox___14472; + s.tmp_9 = Fx_min__P18204_mk(s); + s.tmp_9.arg0 = s.x___32932; + s.tmp_10 = game_Hitbox_right__P20256_mk(s); + s.tmp_10.arg0 = s.hbox___32510; s.callLocIdx = 722; s.pc = 132; return s.tmp_10; case 132: r0 = s.retval; @@ -29802,21 +32036,21 @@ switch (step) { s.tmp_8 = r0; r0 = (s.tmp_8 + 128); s.tmp_7 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_11 = r0; r0 = (s.tmp_7 >> s.tmp_11); - s.x0___14904 = (r0); - s.tmp_0 = game_Hitbox_top__P2217_mk(s); - s.tmp_0.arg0 = s.hbox___14472; + s.x0___32942 = (r0); + s.tmp_0 = game_Hitbox_top__P20255_mk(s); + s.tmp_0.arg0 = s.hbox___32510; s.callLocIdx = 726; s.pc = 133; return s.tmp_0; case 133: r0 = s.retval; - s.y___14914 = (r0); + s.y___32952 = (r0); case 86: - s.tmp_1 = r0 = s.y___14914; - s.tmp_3 = r0 = s.tileSize___14478; - s.tmp_5 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_5.arg0 = s.hbox___14472; + s.tmp_1 = r0 = s.y___32952; + s.tmp_3 = r0 = s.tileSize___32516; + s.tmp_5 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_5.arg0 = s.hbox___32510; s.callLocIdx = 727; s.pc = 134; return s.tmp_5; case 134: r0 = s.retval; @@ -29829,10 +32063,10 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 91; continue; } - s.tmp_9 = Fx_min__P166_mk(s); - s.tmp_9.arg0 = s.y___14914; - s.tmp_10 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_10.arg0 = s.hbox___14472; + s.tmp_9 = Fx_min__P18204_mk(s); + s.tmp_9.arg0 = s.y___32952; + s.tmp_10 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_10.arg0 = s.hbox___32510; s.callLocIdx = 729; s.pc = 136; return s.tmp_10; case 136: r0 = s.retval; @@ -29843,14 +32077,14 @@ switch (step) { s.tmp_8 = r0; r0 = (s.tmp_8 + 128); s.tmp_7 = r0; - r0 = (s.tileScale___14475 + 8); + r0 = (s.tileScale___32513 + 8); s.tmp_11 = r0; r0 = (s.tmp_7 >> s.tmp_11); - s.y0___14924 = (r0); - s.tmp_3 = tiles_TileMap_isObstacle__P2756_mk(s); + s.y0___32962 = (r0); + s.tmp_3 = tiles_TileMap_isObstacle__P20794_mk(s); s.tmp_3.arg0 = s.arg2; - s.tmp_3.arg1 = s.x0___14904; - s.tmp_3.arg2 = s.y0___14924; + s.tmp_3.arg1 = s.x0___32942; + s.tmp_3.arg2 = s.y0___32962; s.callLocIdx = 733; s.pc = 137; return s.tmp_3; case 137: r0 = s.retval; @@ -29864,7 +32098,7 @@ switch (step) { r0 = s.tmp_0; { step = 88; continue; } case 87: - r0 = s.s___14447.fields["flags"]; + r0 = s.s___32485.fields["flags"]; s.tmp_8 = r0; r0 = (s.tmp_8 & 2048); s.tmp_7 = r0; @@ -29880,11 +32114,11 @@ switch (step) { s.tmp_9 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_9); if (!r0) { step = 89; continue; } - s.tmp_10 = r0 = s.overlappedTiles___14892; - s.tmp_12 = tiles_TileMap_getTile__P2749_mk(s); + s.tmp_10 = r0 = s.overlappedTiles___32930; + s.tmp_12 = tiles_TileMap_getTile__P20787_mk(s); s.tmp_12.arg0 = s.arg2; - s.tmp_12.arg1 = s.x0___14904; - s.tmp_12.arg2 = s.y0___14924; + s.tmp_12.arg1 = s.x0___32942; + s.tmp_12.arg2 = s.y0___32962; s.callLocIdx = 734; s.pc = 138; return s.tmp_12; case 138: r0 = s.retval; @@ -29892,26 +32126,26 @@ switch (step) { r0 = pxsim_Array__push(s.tmp_10, s.tmp_11); case 89: case 90: - r0 = (s.tileSize___14478 << 8); + r0 = (s.tileSize___32516 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0 + s.y___14914); - s.y___14914 = (r0); + r0 = (s.tmp_0 + s.y___32952); + s.y___32952 = (r0); { step = 86; continue; } case 91: - r0 = (s.tileSize___14478 << 8); + r0 = (s.tileSize___32516 << 8); s.tmp_0 = r0; - r0 = (s.tmp_0 + s.x___14894); - s.x___14894 = (r0); + r0 = (s.tmp_0 + s.x___32932); + s.x___32932 = (r0); { step = 85; continue; } case 92: - r0 = pxsim_Array__length(s.overlappedTiles___14892); + r0 = pxsim_Array__length(s.overlappedTiles___32930); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 93; continue; } - s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P4801_mk(s); + s.tmp_1 = ArcadePhysicsEngine_tilemapOverlaps__P22839_mk(s); s.tmp_1.arg0 = s.arg0; - s.tmp_1.arg1 = s.s___14447; - s.tmp_1.arg2 = s.overlappedTiles___14892; + s.tmp_1.arg1 = s.s___32485; + s.tmp_1.arg2 = s.overlappedTiles___32930; s.callLocIdx = 737; s.pc = 139; return s.tmp_1; case 139: r0 = s.retval; @@ -29923,12 +32157,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions__P4800.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"]} +ArcadePhysicsEngine_tilemapCollisions__P22838.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__P4800_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions__P22838_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P4800, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions__P22838, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -29952,37 +32186,37 @@ function ArcadePhysicsEngine_tilemapCollisions__P4800_mk(s) { tmp_19: undefined, tmp_20: undefined, tmp_21: undefined, - s___14447: undefined, - hbox___14472: undefined, - tileScale___14475: undefined, - tileSize___14478: undefined, - xDiff___14482: undefined, - yDiff___14489: undefined, - right___14505: undefined, - x0___14509: undefined, - collidedTiles___14524: undefined, - y___14526: undefined, - y0___14540: undefined, - obstacle___14556: undefined, - collisionDirection___14583: undefined, - tile___14609: undefined, - unnamed80___U14: undefined, - unnamed81___U15: undefined, - down___14700: undefined, - y0___14704: undefined, - collidedTiles___14719: undefined, - x___14721: undefined, - x0___14731: undefined, - obstacle___14745: undefined, - collisionDirection___14772: undefined, - tile___14798: undefined, - unnamed82___U24: undefined, - unnamed83___U25: undefined, - overlappedTiles___14892: undefined, - x___14894: undefined, - x0___14904: undefined, - y___14914: undefined, - y0___14924: undefined, + s___32485: undefined, + hbox___32510: undefined, + tileScale___32513: undefined, + tileSize___32516: undefined, + xDiff___32520: undefined, + yDiff___32527: undefined, + right___32543: undefined, + x0___32547: undefined, + collidedTiles___32562: undefined, + y___32564: undefined, + y0___32578: undefined, + obstacle___32594: undefined, + collisionDirection___32621: undefined, + tile___32647: undefined, + unnamed172___U14: undefined, + unnamed173___U15: undefined, + down___32738: undefined, + y0___32742: undefined, + collidedTiles___32757: undefined, + x___32759: undefined, + x0___32769: undefined, + obstacle___32783: undefined, + collisionDirection___32810: undefined, + tile___32836: undefined, + unnamed174___U24: undefined, + unnamed175___U25: undefined, + overlappedTiles___32930: undefined, + x___32932: undefined, + x0___32942: undefined, + y___32952: undefined, + y0___32962: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -29992,7 +32226,7 @@ function ArcadePhysicsEngine_tilemapCollisions__P4800_mk(s) { -function ArcadePhysicsEngine_tilemapCollisions_inline__P14564(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P32602(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30014,12 +32248,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions_inline__P14564.info = {"start":15147,"length":39,"line":441,"column":48,"endLine":441,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P32602.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__P14564_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P32602_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P14564, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P32602, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30030,7 +32264,7 @@ function ArcadePhysicsEngine_tilemapCollisions_inline__P14564_mk(s) { -function ArcadePhysicsEngine_tilemapCollisions_inline__P14753(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P32791(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30052,12 +32286,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapCollisions_inline__P14753.info = {"start":18668,"length":39,"line":522,"column":48,"endLine":522,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["o"]} +ArcadePhysicsEngine_tilemapCollisions_inline__P32791.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__P14753_mk(s) { +function ArcadePhysicsEngine_tilemapCollisions_inline__P32791_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P14753, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapCollisions_inline__P32791, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30068,7 +32302,7 @@ function ArcadePhysicsEngine_tilemapCollisions_inline__P14753_mk(s) { -function ArcadePhysicsEngine_tilemapOverlaps__P4801(s) { +function ArcadePhysicsEngine_tilemapOverlaps__P22839(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30078,11 +32312,11 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.alreadyHandled___14971 = undefined; - s.tile___14974 = undefined; - s.unnamed84___U2 = undefined; - s.unnamed85___U3 = undefined; - s.tileOverlapHandlers___14995 = undefined; + s.alreadyHandled___33009 = undefined; + s.tile___33012 = undefined; + s.unnamed176___U2 = undefined; + s.unnamed177___U3 = undefined; + s.tileOverlapHandlers___33033 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -30090,25 +32324,25 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); r0 = pxsim_Array__mk(); - s.alreadyHandled___14971 = (r0); - s.tile___14974 = (undefined); - s.unnamed84___U2 = (s.arg2); - s.unnamed85___U3 = (0); + s.alreadyHandled___33009 = (r0); + s.tile___33012 = (undefined); + s.unnamed176___U2 = (s.arg2); + s.unnamed177___U3 = (0); case 1: - s.tmp_0 = r0 = s.unnamed85___U3; - r0 = pxsim_Array__length(s.unnamed84___U2); + s.tmp_0 = r0 = s.unnamed177___U3; + r0 = pxsim_Array__length(s.unnamed176___U2); s.tmp_1 = r0; r0 = (s.tmp_0 < s.tmp_1); if (!r0) { step = 7; continue; } - r0 = pxsim_Array__getAt(s.unnamed84___U2, s.unnamed85___U3); - s.tile___14974 = (r0); - r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P14978); + r0 = pxsim_Array__getAt(s.unnamed176___U2, s.unnamed177___U3); + s.tile___33012 = (r0); + r0 = pxsim_pxtcore_mkAction(1, ArcadePhysicsEngine_tilemapOverlaps_inline__P33016); s.tmp_2 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___14974); - s.tmp_4 = helpers_arraySome__P107_mk(s); - s.tmp_4.arg0 = s.alreadyHandled___14971; + r0 = pxsim_pxtrt_stclo(s.tmp_2, 0, s.tile___33012); + s.tmp_4 = helpers_arraySome__P18145_mk(s); + s.tmp_4.arg0 = s.alreadyHandled___33009; s.tmp_4.arg1 = s.tmp_2; s.callLocIdx = 742; s.pc = 8; return s.tmp_4; case 8: @@ -30119,26 +32353,26 @@ switch (step) { { step = 6; continue; } case 2: case 3: - r0 = pxsim_Array__push(s.alreadyHandled___14971, s.tile___14974); - s.tmp_0 = game_currentScene__P2999_mk(s); + r0 = pxsim_Array__push(s.alreadyHandled___33009, s.tile___33012); + s.tmp_0 = game_currentScene__P21037_mk(s); s.callLocIdx = 743; s.pc = 9; return s.tmp_0; case 9: r0 = s.retval; r0 = r0.fields["tileOverlapHandlers"]; - s.tileOverlapHandlers___14995 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___14995); + s.tileOverlapHandlers___33033 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tileOverlapHandlers___33033); if (!r0) { step = 4; continue; } - r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P15003); + r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P33041); s.tmp_0 = r0; r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___14974); - r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P15019); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.tile___33012); + r0 = pxsim_pxtcore_mkAction(2, ArcadePhysicsEngine_tilemapOverlaps_inline__P33057); s.tmp_1 = r0; r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg1); - r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___14974); - s.tmp_2 = helpers_arrayForEach__P109_mk(s); - s.tmp_3 = helpers_arrayFilter__P110_mk(s); - s.tmp_3.arg0 = s.tileOverlapHandlers___14995; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 1, s.tile___33012); + s.tmp_2 = helpers_arrayForEach__P18147_mk(s); + s.tmp_3 = helpers_arrayFilter__P18148_mk(s); + s.tmp_3.arg0 = s.tileOverlapHandlers___33033; s.tmp_3.arg1 = s.tmp_0; s.callLocIdx = 746; s.pc = 11; return s.tmp_3; case 11: @@ -30151,32 +32385,32 @@ switch (step) { case 4: case 5: case 6: - r0 = (s.unnamed85___U3 + 1); - s.unnamed85___U3 = (r0); + r0 = (s.unnamed177___U3 + 1); + s.unnamed177___U3 = (r0); { step = 1; continue; } case 7: - s.unnamed84___U2 = (undefined); + s.unnamed176___U2 = (undefined); r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapOverlaps__P4801.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"]} +ArcadePhysicsEngine_tilemapOverlaps__P22839.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__P4801_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps__P22839_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P4801, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps__P22839, 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___14971: undefined, - tile___14974: undefined, - unnamed84___U2: undefined, - unnamed85___U3: undefined, - tileOverlapHandlers___14995: undefined, + alreadyHandled___33009: undefined, + tile___33012: undefined, + unnamed176___U2: undefined, + unnamed177___U3: undefined, + tileOverlapHandlers___33033: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -30186,7 +32420,7 @@ function ArcadePhysicsEngine_tilemapOverlaps__P4801_mk(s) { -function ArcadePhysicsEngine_tilemapOverlaps_inline__P14978(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P33016(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30223,12 +32457,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapOverlaps_inline__P14978.info = {"start":23075,"length":51,"line":630,"column":36,"endLine":630,"endColumn":87,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["l"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P33016.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__P14978_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P33016_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P14978, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P33016, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30243,7 +32477,7 @@ function ArcadePhysicsEngine_tilemapOverlaps_inline__P14978_mk(s) { -function forEach_inline__P15003(s) { +function forEach_inline__P33041(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30270,7 +32504,7 @@ switch (step) { case 1: r0 = s.arg0.fields["tileKind"]; s.tmp_3 = r0; - s.tmp_5 = tiles_getTileImage__P2768_mk(s); + s.tmp_5 = tiles_getTileImage__P20806_mk(s); s.tmp_5.arg0 = s.caps[1]; s.callLocIdx = 745; s.pc = 3; return s.tmp_5; case 3: @@ -30284,12 +32518,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -forEach_inline__P15003.info = {"start":23395,"length":81,"line":638,"column":28,"endLine":638,"endColumn":109,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +forEach_inline__P33041.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__P15003_mk(s) { +function forEach_inline__P33041_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P15003, depth: s.depth + 1, + parent: s, fn: forEach_inline__P33041, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30305,7 +32539,7 @@ function forEach_inline__P15003_mk(s) { -function ArcadePhysicsEngine_tilemapOverlaps_inline__P15019(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P33057(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30338,12 +32572,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_tilemapOverlaps_inline__P15019.info = {"start":23507,"length":28,"line":639,"column":29,"endLine":639,"endColumn":57,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +ArcadePhysicsEngine_tilemapOverlaps_inline__P33057.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__P15019_mk(s) { +function ArcadePhysicsEngine_tilemapOverlaps_inline__P33057_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P15019, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_tilemapOverlaps_inline__P33057, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -30353,7 +32587,7 @@ function ArcadePhysicsEngine_tilemapOverlaps_inline__P15019_mk(s) { -function tiles_getTileImage__P2768(s) { +function tiles_getTileImage__P20806(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30363,16 +32597,16 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scene___15027 = undefined; + s.scene___33065 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_0 = game_currentScene__P2999_mk(s); + s.tmp_0 = game_currentScene__P21037_mk(s); s.callLocIdx = 876; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - s.scene___15027 = (r0); + s.scene___33065 = (r0); r0 = pxsim_numops_toBoolDecr(s.arg0); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); @@ -30382,7 +32616,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - r0 = s.scene___15027.fields["tileMap"]; + r0 = s.scene___33065.fields["tileMap"]; s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); s.tmp_2 = r0; @@ -30392,14 +32626,14 @@ switch (step) { s.tmp_4 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_4); if (!r0) { step = 3; continue; } - r0 = pxsim.image.ofBuffer(_hex15037); + r0 = pxsim.image.ofBuffer(_hex33075); { step = 5; continue; } case 3: case 4: - s.tmp_5 = tiles_TileMap_getTileImage__P2759_mk(s); - r0 = s.scene___15027.fields["tileMap"]; + s.tmp_5 = tiles_TileMap_getTileImage__P20797_mk(s); + r0 = s.scene___33065.fields["tileMap"]; s.tmp_5.arg0 = r0; - s.tmp_6 = tiles_Location_tileSet__P2704_mk(s); + s.tmp_6 = tiles_Location_tileSet__P20742_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 877; s.pc = 8; return s.tmp_6; case 8: @@ -30412,12 +32646,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_getTileImage__P2768.info = {"start":21871,"length":207,"line":673,"column":4,"endLine":677,"endColumn":5,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["loc"]} +tiles_getTileImage__P20806.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__P2768_mk(s) { +function tiles_getTileImage__P20806_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_getTileImage__P2768, depth: s.depth + 1, + parent: s, fn: tiles_getTileImage__P20806, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30426,16 +32660,16 @@ function tiles_getTileImage__P2768_mk(s) { tmp_4: undefined, tmp_5: undefined, tmp_6: undefined, - scene___15027: undefined, + scene___33065: undefined, arg0: undefined, } } -const _hex15037 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") +const _hex33075 = pxsim.BufferMethods.createBufferFromHex("8704000000000000") -function tiles_TileMap_getTileImage__P2759(s) { +function tiles_TileMap_getTileImage__P20797(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30451,8 +32685,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P2726_mk(s); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P20764_mk(s); r0 = s.arg0.fields["_map"]; s.tmp_0.arg0 = r0; s.tmp_0.arg1 = s.arg1; @@ -30462,12 +32696,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_TileMap_getTileImage__P2759.info = {"start":17510,"length":96,"line":553,"column":8,"endLine":555,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} +tiles_TileMap_getTileImage__P20797.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__P2759_mk(s) { +function tiles_TileMap_getTileImage__P20797_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTileImage__P2759, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileImage__P20797, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -30478,7 +32712,7 @@ function tiles_TileMap_getTileImage__P2759_mk(s) { -function tiles_TileMapData_getTileImage__P2726(s) { +function tiles_TileMapData_getTileImage__P20764(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30488,25 +32722,25 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.size___15092 = undefined; - s.cachedImage___15096 = undefined; - s.originalImage___15103 = undefined; + s.size___33130 = undefined; + s.cachedImage___33134 = undefined; + s.originalImage___33141 = 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__C2717_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); r0 = s.arg0.fields["_scale"]; s.tmp_0 = r0; r0 = (1 << s.tmp_0); - s.size___15092 = (r0); + s.size___33130 = (r0); r0 = s.arg0.fields["cachedTileView"]; s.tmp_0 = r0; r0 = pxsim_Array__getAt(s.tmp_0, s.arg1); - s.cachedImage___15096 = (r0); - r0 = pxsim_numops_toBoolDecr(s.cachedImage___15096); + s.cachedImage___33134 = (r0); + r0 = pxsim_numops_toBoolDecr(s.cachedImage___33134); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); s.tmp_0 = r0; @@ -30515,58 +32749,58 @@ switch (step) { r0 = s.arg0.fields["tileset"]; s.tmp_2 = r0; r0 = pxsim_Array__getAt(s.tmp_2, s.arg1); - s.originalImage___15103 = (r0); - r0 = pxsim_numops_toBoolDecr(s.originalImage___15103); + s.originalImage___33141 = (r0); + r0 = pxsim_numops_toBoolDecr(s.originalImage___33141); if (!r0) { step = 5; continue; } - r0 = pxsim_ImageMethods.width(s.originalImage___15103); + r0 = pxsim_ImageMethods.width(s.originalImage___33141); s.tmp_1 = r0; - r0 = (s.tmp_1 <= s.size___15092); + r0 = (s.tmp_1 <= s.size___33130); 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___15103); + r0 = pxsim_ImageMethods.height(s.originalImage___33141); s.tmp_2 = r0; - r0 = (s.tmp_2 <= s.size___15092); + r0 = (s.tmp_2 <= s.size___33130); 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___15096 = (s.originalImage___15103); + s.cachedImage___33134 = (s.originalImage___33141); { step = 4; continue; } case 3: - r0 = pxsim.image.create(s.size___15092, s.size___15092); - s.cachedImage___15096 = (r0); - r0 = pxsim_ImageMethods.drawImage(s.cachedImage___15096, s.originalImage___15103, 0, 0); + r0 = pxsim.image.create(s.size___33130, s.size___33130); + s.cachedImage___33134 = (r0); + r0 = pxsim_ImageMethods.drawImage(s.cachedImage___33134, s.originalImage___33141, 0, 0); case 4: r0 = s.arg0.fields["cachedTileView"]; s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___15096); + r0 = pxsim_Array_.setAt(s.tmp_0, s.arg1, s.cachedImage___33134); case 5: case 6: case 7: case 8: - r0 = s.cachedImage___15096; + r0 = s.cachedImage___33134; return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTileImage__P2726.info = {"start":7354,"length":717,"line":251,"column":8,"endLine":268,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"getTileImage","argumentNames":["this","index"]} +tiles_TileMapData_getTileImage__P20764.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__P2726_mk(s) { +function tiles_TileMapData_getTileImage__P20764_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTileImage__P2726, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTileImage__P20764, 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___15092: undefined, - cachedImage___15096: undefined, - originalImage___15103: undefined, + size___33130: undefined, + cachedImage___33134: undefined, + originalImage___33141: undefined, arg0: undefined, arg1: undefined, } } @@ -30575,7 +32809,7 @@ function tiles_TileMapData_getTileImage__P2726_mk(s) { -function tiles_TileMapData_scale__P2721(s) { +function tiles_TileMapData_scale__P20759(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30590,18 +32824,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C2717_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); r0 = s.arg0.fields["_scale"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMapData_scale__P2721.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__P2721.isGetter = true; +tiles_TileMapData_scale__P20759.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__P20759.isGetter = true; -function tiles_TileMapData_scale__P2721_mk(s) { +function tiles_TileMapData_scale__P20759_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_scale__P2721, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P20759, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -30610,7 +32844,7 @@ function tiles_TileMapData_scale__P2721_mk(s) { -function tiles_Location_tileSet__P2704(s) { +function tiles_Location_tileSet__P20742(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30625,9 +32859,9 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMap_getTileIndex__P2750_mk(s); - s.tmp_1 = tiles_Location_tileMap__P2695_mk(s); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMap_getTileIndex__P20788_mk(s); + s.tmp_1 = tiles_Location_tileMap__P20733_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 806; s.pc = 2; return s.tmp_1; case 2: @@ -30643,13 +32877,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_tileSet__P2704.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__P2704.isGetter = true; +tiles_Location_tileSet__P20742.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__P20742.isGetter = true; -function tiles_Location_tileSet__P2704_mk(s) { +function tiles_Location_tileSet__P20742_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_tileSet__P2704, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileSet__P20742, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30660,7 +32894,7 @@ function tiles_Location_tileSet__P2704_mk(s) { -function tiles_TileMap_getTileIndex__P2750(s) { +function tiles_TileMap_getTileIndex__P20788(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30677,8 +32911,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - s.tmp_0 = tiles_TileMapData_getTile__P2723_mk(s); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + s.tmp_0 = tiles_TileMapData_getTile__P20761_mk(s); r0 = s.arg0.fields["_map"]; s.tmp_0.arg0 = r0; s.tmp_0.arg1 = s.arg1; @@ -30689,12 +32923,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_TileMap_getTileIndex__P2750.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"]} +tiles_TileMap_getTileIndex__P20788.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__P2750_mk(s) { +function tiles_TileMap_getTileIndex__P20788_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTileIndex__P2750, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getTileIndex__P20788, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -30706,7 +32940,7 @@ function tiles_TileMap_getTileIndex__P2750_mk(s) { -function tiles_TileMapData_getTile__P2723(s) { +function tiles_TileMapData_getTile__P20761(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30723,8 +32957,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C2717_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P2729_mk(s); + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P20767_mk(s); s.tmp_1.arg0 = s.arg0; s.tmp_1.arg1 = s.arg1; s.tmp_1.arg2 = s.arg2; @@ -30757,12 +32991,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_TileMapData_getTile__P2723.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"]} +tiles_TileMapData_getTile__P20761.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__P2723_mk(s) { +function tiles_TileMapData_getTile__P20761_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_getTile__P2723, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_getTile__P20761, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30782,7 +33016,7 @@ function tiles_TileMapData_getTile__P2723_mk(s) { -function tiles_TileMapData_isOutsideMap__P2729(s) { +function tiles_TileMapData_isOutsideMap__P20767(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30799,7 +33033,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C2717_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_TileMapData__C20755_VT)) failedCast(r0); r0 = (s.arg1 < 0); s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); @@ -30839,12 +33073,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_TileMapData_isOutsideMap__P2729.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"]} +tiles_TileMapData_isOutsideMap__P20767.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__P2729_mk(s) { +function tiles_TileMapData_isOutsideMap__P20767_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_isOutsideMap__P2729, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_isOutsideMap__P20767, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -30863,7 +33097,7 @@ function tiles_TileMapData_isOutsideMap__P2729_mk(s) { -function tiles_Location_tileMap__P2695(s) { +function tiles_Location_tileMap__P20733(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30878,8 +33112,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); - s.tmp_0 = game_currentScene__P2999_mk(s); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); + s.tmp_0 = game_currentScene__P21037_mk(s); s.callLocIdx = 797; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; @@ -30887,13 +33121,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_tileMap__P2695.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__P2695.isGetter = true; +tiles_Location_tileMap__P20733.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__P20733.isGetter = true; -function tiles_Location_tileMap__P2695_mk(s) { +function tiles_Location_tileMap__P20733_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_tileMap__P2695, depth: s.depth + 1, + parent: s, fn: tiles_Location_tileMap__P20733, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -30903,7 +33137,7 @@ function tiles_Location_tileMap__P2695_mk(s) { -function tiles_Location_row__P2697(s) { +function tiles_Location_row__P20735(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30918,18 +33152,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); r0 = s.arg0.fields["_row"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_row__P2697.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__P2697.isGetter = true; +tiles_Location_row__P20735.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__P20735.isGetter = true; -function tiles_Location_row__P2697_mk(s) { +function tiles_Location_row__P20735_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_row__P2697, depth: s.depth + 1, + parent: s, fn: tiles_Location_row__P20735, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -30938,7 +33172,7 @@ function tiles_Location_row__P2697_mk(s) { -function tiles_Location_column__P2696(s) { +function tiles_Location_column__P20734(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30953,18 +33187,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); r0 = s.arg0.fields["_col"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_column__P2696.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__P2696.isGetter = true; +tiles_Location_column__P20734.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__P20734.isGetter = true; -function tiles_Location_column__P2696_mk(s) { +function tiles_Location_column__P20734_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_column__P2696, depth: s.depth + 1, + parent: s, fn: tiles_Location_column__P20734, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -30973,7 +33207,7 @@ function tiles_Location_column__P2696_mk(s) { -function tiles_TileMap_getObstacle__P2757(s) { +function tiles_TileMap_getObstacle__P20795(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -30983,8 +33217,8 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.index___15266 = undefined; - s.tile___15278 = undefined; + s.index___33304 = undefined; + s.tile___33316 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -30992,8 +33226,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - s.tmp_1 = tiles_TileMapData_isOutsideMap__P2729_mk(s); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + s.tmp_1 = tiles_TileMapData_isOutsideMap__P20767_mk(s); r0 = s.arg0.fields["_map"]; s.tmp_1.arg0 = r0; s.tmp_1.arg1 = s.arg1; @@ -31007,7 +33241,7 @@ switch (step) { r0 = 0; { step = 2; continue; } case 1: - s.tmp_2 = tiles_TileMapData_getTile__P2723_mk(s); + s.tmp_2 = tiles_TileMapData_getTile__P20761_mk(s); r0 = s.arg0.fields["_map"]; s.tmp_2.arg0 = r0; s.tmp_2.arg1 = s.arg1; @@ -31018,20 +33252,20 @@ switch (step) { case 2: // jmp value (already in r0) s.tmp_3 = r0; - s.index___15266 = (s.tmp_3); - s.tmp_0 = tiles_TileMapData_getTileImage__P2726_mk(s); + s.index___33304 = (s.tmp_3); + s.tmp_0 = tiles_TileMapData_getTileImage__P20764_mk(s); r0 = s.arg0.fields["_map"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___15266; + s.tmp_0.arg1 = s.index___33304; s.callLocIdx = 856; s.pc = 5; return s.tmp_0; case 5: r0 = s.retval; - s.tile___15278 = (r0); - r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C2498_VT); + s.tile___33316 = (r0); + r0 = pxsim_pxtcore_mkClassInstance(sprites_StaticObstacle__C20536_VT); s.tmp_0 = r0; - s.tmp_1 = sprites_StaticObstacle_constructor__P2504_mk(s); + s.tmp_1 = sprites_StaticObstacle_constructor__P20542_mk(s); s.tmp_1.arg0 = s.tmp_0; - s.tmp_1.arg1 = s.tile___15278; + s.tmp_1.arg1 = s.tile___33316; s.tmp_2 = r0 = s.arg2; r0 = s.arg0.fields["_scale"]; s.tmp_3 = r0; @@ -31044,7 +33278,7 @@ switch (step) { s.tmp_1.arg3 = r0; r0 = s.arg0.fields["_layer"]; s.tmp_1.arg4 = r0; - s.tmp_1.arg5 = s.index___15266; + s.tmp_1.arg5 = s.index___33304; s.callLocIdx = 860; s.pc = 6; return s.tmp_1; case 6: r0 = s.retval; @@ -31052,12 +33286,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -tiles_TileMap_getObstacle__P2757.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"]} +tiles_TileMap_getObstacle__P20795.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__P2757_mk(s) { +function tiles_TileMap_getObstacle__P20795_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getObstacle__P2757, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_getObstacle__P20795, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -31065,8 +33299,8 @@ function tiles_TileMap_getObstacle__P2757_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - index___15266: undefined, - tile___15278: undefined, + index___33304: undefined, + tile___33316: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -31076,7 +33310,7 @@ function tiles_TileMap_getObstacle__P2757_mk(s) { -function tiles_TileMap_layer__P2745(s) { +function tiles_TileMap_layer__P20783(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31091,18 +33325,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); r0 = s.arg0.fields["_layer"]; return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_layer__P2745.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__P2745.isGetter = true; +tiles_TileMap_layer__P20783.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__P20783.isGetter = true; -function tiles_TileMap_layer__P2745_mk(s) { +function tiles_TileMap_layer__P20783_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_layer__P2745, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_layer__P20783, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -31111,7 +33345,7 @@ function tiles_TileMap_layer__P2745_mk(s) { -function sprites_StaticObstacle_constructor__P2504(s) { +function sprites_StaticObstacle_constructor__P20542(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31131,7 +33365,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C2498_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_StaticObstacle__C20536_VT)) failedCast(r0); r0 = (s.arg0).fields["image"] = (s.arg1); r0 = (s.arg0).fields["layer"] = (s.arg4); r0 = (s.arg0).fields["top"] = (s.arg2); @@ -31141,12 +33375,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -sprites_StaticObstacle_constructor__P2504.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"]} +sprites_StaticObstacle_constructor__P20542.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__P2504_mk(s) { +function sprites_StaticObstacle_constructor__P20542_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_constructor__P2504, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_constructor__P20542, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -31160,7 +33394,7 @@ function sprites_StaticObstacle_constructor__P2504_mk(s) { -function tiles_TileMap_isObstacle__P2756(s) { +function tiles_TileMap_isObstacle__P20794(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31177,7 +33411,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); r0 = s.arg0.fields["_map"]; s.tmp_6 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_6); @@ -31194,65 +33428,616 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - r0 = false; + r0 = false; + { step = 5; continue; } + case 1: + case 2: + s.tmp_8 = tiles_TileMapData_isOutsideMap__P20767_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 = 852; 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() +} } } +tiles_TileMap_isObstacle__P20794.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__P20794_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_isObstacle__P20794, 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__P20766(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__C20755_VT)) failedCast(r0); + r0 = s.arg0.fields["layers"]; + 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__P20766.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__P20766_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMapData_isWall__P20766, 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__P20787(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__C20773_VT)) failedCast(r0); + r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C20731_VT); + s.tmp_0 = r0; + s.tmp_1 = tiles_Location_constructor__P20732_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 = 828; s.pc = 1; return s.tmp_1; + case 1: + r0 = s.retval; + r0 = s.tmp_0; + return leave(s, r0) + default: oops() +} } } +tiles_TileMap_getTile__P20787.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__P20787_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_TileMap_getTile__P20787, 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__P20732(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__C20731_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__P20732.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__P20732_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: tiles_Location_constructor__P20732, 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__P20464(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___33217 = undefined; + s.wallCollisionHandlers___33224 = undefined; + s.wallHandlersToRun___33249 = undefined; + s.asTileLocation___33262 = 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__C20379_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__P21037_mk(s); + s.callLocIdx = 414; 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 = 415; 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___33217 = (r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 416; s.pc = 11; return s.tmp_0; + case 11: + r0 = s.retval; + r0 = r0.fields["wallCollisionHandlers"]; + s.wallCollisionHandlers___33224 = (r0); + r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___33217); + if (!r0) { step = 1; continue; } + r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P33232); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P33238); + s.tmp_1 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); + s.tmp_2 = helpers_arrayForEach__P18147_mk(s); + s.tmp_3 = helpers_arrayFilter__P18148_mk(s); + s.tmp_3.arg0 = s.collisionHandlers___33217; + s.tmp_3.arg1 = s.tmp_0; + s.callLocIdx = 418; 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 = 420; s.pc = 12; return s.tmp_2; + case 12: + r0 = s.retval; + case 1: + case 2: + r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___33224); + 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__P21037_mk(s); + s.callLocIdx = 421; s.pc = 14; return s.tmp_1; + case 14: + r0 = s.retval; + 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__P33251); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = helpers_arrayFilter__P18148_mk(s); + s.tmp_1.arg0 = s.wallCollisionHandlers___33224; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 423; s.pc = 15; return s.tmp_1; + case 15: + r0 = s.retval; + s.wallHandlersToRun___33249 = (r0); + r0 = pxsim_Array__length(s.wallHandlersToRun___33249); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_1 = tiles_TileMap_getTile__P20787_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 = 424; 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 = 426; 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 = 428; s.pc = 16; return s.tmp_1; + case 16: + r0 = s.retval; + s.asTileLocation___33262 = (r0); + r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P33278); + s.tmp_0 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___33262); + s.tmp_1 = helpers_arrayForEach__P18147_mk(s); + s.tmp_1.arg0 = s.wallHandlersToRun___33249; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 430; s.pc = 19; return s.tmp_1; + case 19: + r0 = s.retval; + case 5: + case 6: + case 7: + case 8: + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Sprite_registerObstacle__P20464.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 Sprite_registerObstacle__P20464_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_registerObstacle__P20464, 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, + collisionHandlers___33217: undefined, + wallCollisionHandlers___33224: undefined, + wallHandlersToRun___33249: undefined, + asTileLocation___33262: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function forEach_inline__P33232(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__P33232.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__P33232_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: forEach_inline__P33232, 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__P33238(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 = 419; 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 = 419; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 419; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 419; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Sprite_registerObstacle_inline__P33238.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__P33238_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_registerObstacle_inline__P33238, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function wallHandlersToRun_inline__P33251(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__P33251.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__P33251_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: wallHandlersToRun_inline__P33251, 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__P33278(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 = 429; 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 = 429; s.pc = 1; return s.tmp_0; } + else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 429; s.pc = 1; return s.tmp_0;; } + else { s.callLocIdx = 429; s.pc = 1; return s.tmp_0; } + } + case 1: + r0 = s.retval; + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +Sprite_registerObstacle_inline__P33278.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__P33278_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Sprite_registerObstacle_inline__P33278, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function Math_sign__P18167(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: - s.tmp_8 = tiles_TileMapData_isOutsideMap__P2729_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 = 852; s.pc = 6; return s.tmp_8; - case 6: - r0 = s.retval; - s.tmp_7 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_7); + r0 = (s.arg0 > 0); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = true; + r0 = 1; { 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); + r0 = -1; case 5: return leave(s, r0) default: oops() } } } -tiles_TileMap_isObstacle__P2756.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"]} +Math_sign__P18167.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 tiles_TileMap_isObstacle__P2756_mk(s) { +function Math_sign__P18167_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isObstacle__P2756, depth: s.depth + 1, + parent: s, fn: Math_sign__P18167, 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__P2728(s) { +function helpers_arraySome__P18145(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31262,41 +34047,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.len___33286 = undefined; + s.i___33289 = 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_TileMapData__C2717_VT)) failedCast(r0); - r0 = s.arg0.fields["layers"]; - s.tmp_1 = r0; - r0 = pxsim_ImageMethods.getPixel(s.tmp_1, s.arg1, s.arg2); + r0 = pxsim_Array__length(s.arg0); + s.len___33286 = (r0); + s.i___33289 = (0); + case 1: + r0 = (s.i___33289 < s.len___33286); s.tmp_0 = r0; - r0 = (s.tmp_0 === 2); + 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___33289); + s.tmp_2.arg0 = r0; + s.tmp_2.arg1 = s.i___33289; + setupLambda(s.tmp_2, s.tmp_2.argL); + s.callLocIdx = 4; 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___33289 + 1); + s.i___33289 = (r0); + { step = 1; continue; } + case 4: + r0 = false; + case 5: return leave(s, r0) default: oops() } } } -tiles_TileMapData_isWall__P2728.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"]} +helpers_arraySome__P18145.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 tiles_TileMapData_isWall__P2728_mk(s) { +function helpers_arraySome__P18145_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_isWall__P2728, depth: s.depth + 1, + parent: s, fn: helpers_arraySome__P18145, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, + tmp_2: undefined, + len___33286: undefined, + i___33289: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_TileMap_getTile__P2749(s) { +function tiles_TileMap_isOnWall__P20796(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31306,47 +34117,136 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.hbox___32391 = undefined; + s.left___32394 = undefined; + s.right___32400 = undefined; + s.top___32406 = undefined; + s.bottom___32412 = undefined; + s.col___32418 = undefined; + s.row___32424 = 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__C2735_VT)) failedCast(r0); - r0 = pxsim_pxtcore_mkClassInstance(tiles_Location__C2693_VT); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = s.arg1.fields["_hitbox"]; + s.hbox___32391 = (r0); + s.tmp_1 = game_Hitbox_left__P20254_mk(s); + s.tmp_1.arg0 = s.hbox___32391; + s.callLocIdx = 861; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; s.tmp_0 = r0; - s.tmp_1 = tiles_Location_constructor__P2694_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 = 828; s.pc = 1; return s.tmp_1; + 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___32394 = (r0); + s.tmp_1 = game_Hitbox_right__P20256_mk(s); + s.tmp_1.arg0 = s.hbox___32391; + s.callLocIdx = 864; 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___32400 = (r0); + s.tmp_1 = game_Hitbox_top__P20255_mk(s); + s.tmp_1.arg0 = s.hbox___32391; + s.callLocIdx = 867; 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___32406 = (r0); + s.tmp_1 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_1.arg0 = s.hbox___32391; + s.callLocIdx = 870; 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___32412 = (r0); + s.col___32418 = (s.left___32394); case 1: + r0 = (s.col___32418 <= s.right___32400); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + s.row___32424 = (s.top___32406); + case 2: + r0 = (s.row___32424 <= s.bottom___32412); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 5; continue; } + s.tmp_2 = tiles_TileMap_isObstacle__P20794_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.col___32418; + s.tmp_2.arg2 = s.row___32424; + s.callLocIdx = 873; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; - r0 = s.tmp_0; + 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___32424 + 1); + s.row___32424 = (r0); + { step = 2; continue; } + case 5: + r0 = (s.col___32418 + 1); + s.col___32418 = (r0); + { step = 1; continue; } + case 6: + r0 = false; + case 7: return leave(s, r0) default: oops() } } } -tiles_TileMap_getTile__P2749.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"]} +tiles_TileMap_isOnWall__P20796.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 tiles_TileMap_getTile__P2749_mk(s) { +function tiles_TileMap_isOnWall__P20796_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_getTile__P2749, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_isOnWall__P20796, 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___32391: undefined, + left___32394: undefined, + right___32400: undefined, + top___32406: undefined, + bottom___32412: undefined, + col___32418: undefined, + row___32424: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function tiles_Location_constructor__P2694(s) { +function MovingSprite_constructor__P20564(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31361,34 +34261,47 @@ switch (step) { 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, tiles_Location__C2693_VT)) failedCast(r0); - r0 = (s.arg0).fields["_col"] = (s.arg1); - r0 = (s.arg0).fields["_row"] = (s.arg2); + if (!checkSubtype(r0, MovingSprite__C20563_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() } } } -tiles_Location_constructor__P2694.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"]} +MovingSprite_constructor__P20564.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 tiles_Location_constructor__P2694_mk(s) { +function MovingSprite_constructor__P20564_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_constructor__P2694, depth: s.depth + 1, + parent: s, fn: MovingSprite_constructor__P20564, 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, + arg7: undefined, } } -function Sprite_registerObstacle__P2426(s) { +function ArcadePhysicsEngine_move__P20577(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31398,166 +34311,546 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.collisionHandlers___15179 = undefined; - s.wallCollisionHandlers___15186 = undefined; - s.wallHandlersToRun___15211 = undefined; - s.asTileLocation___15224 = undefined; + s.dtMs___33361 = undefined; + s.dt2___33367 = undefined; + s.scene___33371 = undefined; + s.tileMap___33374 = undefined; + s.movingSprites___33377 = undefined; + s.MAX_STEP_COUNT___33408 = undefined; + s.overlapHandlers___33420 = undefined; + s.selected___33427 = undefined; + s.buffers___33428 = undefined; + s.count___33432 = undefined; + s.currMovers___33442 = undefined; + s.remainingMovers___33449 = undefined; + s.ms___33454 = undefined; + s.unnamed166___U13 = undefined; + s.unnamed167___U14 = undefined; + s.s___33456 = undefined; + s.stepX___33549 = undefined; + s.stepY___33563 = undefined; + s.bounce___33626 = 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__C2341_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__P2999_mk(s); - s.callLocIdx = 414; s.pc = 9; return s.tmp_1; - case 9: + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + s.tmp_0 = Math_min__P18169_mk(s); + s.tmp_0.arg0 = 100; + r0 = (s.arg1 * 1000); + s.tmp_0.arg1 = r0; + s.callLocIdx = 539; s.pc = 53; return s.tmp_0; + case 53: r0 = s.retval; - r0 = r0.fields["collisionHandlers"]; + s.dtMs___33361 = (r0); + r0 = pxsim.Math_.idiv(s.dtMs___33361, 2); + s.dt2___33367 = (r0); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 540; s.pc = 54; return s.tmp_0; + case 54: + r0 = s.retval; + s.scene___33371 = (r0); + r0 = s.scene___33371.fields["tileMap"]; + s.tileMap___33374 = (r0); + r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P33379); 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 = 415; s.pc = 10; return s.tmp_3; } - } - case 10: + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___33361); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___33367); + s.tmp_1 = helpers_arrayMap__P18144_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 542; s.pc = 55; return s.tmp_1; + case 55: + r0 = s.retval; + s.movingSprites___33377 = (r0); + s.tmp_0 = helpers_arrayForEach__P18147_mk(s); + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P33391; + s.callLocIdx = 546; s.pc = 56; return s.tmp_0; + case 56: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_clear__P20490_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 547; s.pc = 57; return s.tmp_0; + case 57: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_resizeBuckets__P20489_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["sprites"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 548; 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_Array__getAt(s.tmp_0, s.tmp_2); - s.collisionHandlers___15179 = (r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 416; s.pc = 11; return s.tmp_0; - case 11: + r0 = pxsim.Math_.imul(s.tmp_2, s.dtMs___33361); + 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___33408 = (r0); + s.tmp_0 = helpers_arraySlice__P18153_mk(s); + r0 = s.scene___33371.fields["overlapHandlers"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = undefined; + s.tmp_0.arg2 = undefined; + s.callLocIdx = 553; s.pc = 59; return s.tmp_0; + case 59: r0 = s.retval; - r0 = r0.fields["wallCollisionHandlers"]; - s.wallCollisionHandlers___15186 = (r0); - r0 = pxsim_numops_toBoolDecr(s.collisionHandlers___15179); - if (!r0) { step = 1; continue; } - r0 = pxsim_pxtcore_mkAction(1, forEach_inline__P15194); + s.overlapHandlers___33420 = (r0); + s.selected___33427 = (0); + r0 = pxsim_Array__mk(); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtcore_mkAction(1, Sprite_registerObstacle_inline__P15200); + r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___33377); + r0 = pxsim_Array__mk(); s.tmp_1 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_1, 0, s.arg0); - s.tmp_2 = helpers_arrayForEach__P109_mk(s); - s.tmp_3 = helpers_arrayFilter__P110_mk(s); - s.tmp_3.arg0 = s.collisionHandlers___15179; - s.tmp_3.arg1 = s.tmp_0; - s.callLocIdx = 418; 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 = 420; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; + r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); + s.buffers___33428 = (s.tmp_0); + s.count___33432 = (0); case 1: - case 2: - r0 = pxsim_numops_toBoolDecr(s.wallCollisionHandlers___15186); - if (!r0) { step = 7; continue; } - s.tmp_0 = r0 = s.arg3; + r0 = (s.count___33432 < s.MAX_STEP_COUNT___33408); + s.tmp_0 = r0; r0 = pxsim_numops_toBool(s.tmp_0); - if (!r0) { step = 3; continue; } + if (r0) { step = 2; continue; } r0 = s.tmp_0; - { step = 4; continue; } + { step = 3; continue; } + case 2: + r0 = pxsim_Array__getAt(s.buffers___33428, s.selected___33427); + s.tmp_2 = r0; + r0 = pxsim_Array__length(s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 0); case 3: - s.tmp_1 = game_currentScene__P2999_mk(s); - s.callLocIdx = 421; s.pc = 14; return s.tmp_1; - case 14: - r0 = s.retval; - r0 = r0.fields["tileMap"]; + // 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___33428, s.selected___33427); + s.currMovers___33442 = (r0); + r0 = (s.selected___33427 ^ 1); + s.selected___33427 = (r0); + r0 = pxsim_Array__getAt(s.buffers___33428, s.selected___33427); + s.remainingMovers___33449 = (r0); + s.ms___33454 = (undefined); + s.unnamed166___U13 = (s.currMovers___33442); + s.unnamed167___U14 = (0); case 4: + 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___33454 = (r0); + r0 = s.ms___33454.fields["sprite"]; + s.s___33456 = (r0); + r0 = s.ms___33454.fields["cachedVx"]; + s.tmp_1 = r0; + r0 = s.s___33456.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___33456.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___33454).fields["dx"] = (0); + { step = 14; continue; } + case 5: + r0 = s.s___33456.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___33454.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___33456.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___33454.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___33454; + r0 = s.ms___33454.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___33454; + r0 = s.ms___33454.fields["xStep"]; s.tmp_2 = r0; - s.arg3 = (s.tmp_2); - r0 = pxsim_pxtcore_mkAction(1, wallHandlersToRun_inline__P15213); + 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___33456.fields["_vx"]; s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - s.tmp_1 = helpers_arrayFilter__P110_mk(s); - s.tmp_1.arg0 = s.wallCollisionHandlers___15186; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 423; s.pc = 15; return s.tmp_1; + r0 = (s.ms___33454).fields["cachedVx"] = (s.tmp_0); case 15: + case 16: + r0 = s.ms___33454.fields["cachedVy"]; + s.tmp_1 = r0; + r0 = s.s___33456.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___33456.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___33454).fields["dy"] = (0); + { step = 26; continue; } + case 17: + r0 = s.s___33456.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___33454.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___33456.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___33454.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___33454; + r0 = s.ms___33454.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___33454; + r0 = s.ms___33454.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___33456.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.ms___33454).fields["cachedVy"] = (s.tmp_0); + case 27: + case 28: + s.tmp_2 = Fx_abs__P18203_mk(s); + r0 = s.ms___33454.fields["xStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 558; s.pc = 60; return s.tmp_2; + case 60: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P18203_mk(s); + r0 = s.ms___33454.fields["dx"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 559; 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___33454.fields["dx"]; + { step = 30; continue; } + case 29: + r0 = s.ms___33454.fields["xStep"]; + case 30: + // jmp value (already in r0) + s.tmp_5 = r0; + s.stepX___33549 = (s.tmp_5); + s.tmp_2 = Fx_abs__P18203_mk(s); + r0 = s.ms___33454.fields["yStep"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 560; s.pc = 62; return s.tmp_2; + case 62: + r0 = s.retval; + s.tmp_1 = r0; + s.tmp_4 = Fx_abs__P18203_mk(s); + r0 = s.ms___33454.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 561; s.pc = 63; return s.tmp_4; + case 63: + 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___33454.fields["dy"]; + { step = 32; continue; } + case 31: + r0 = s.ms___33454.fields["yStep"]; + case 32: + // jmp value (already in r0) + s.tmp_5 = r0; + s.stepY___33563 = (s.tmp_5); + s.tmp_0 = r0 = s.ms___33454; + r0 = s.ms___33454.fields["dx"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.stepX___33549); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); + s.tmp_0 = r0 = s.ms___33454; + r0 = s.ms___33454.fields["dy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 - s.stepY___33563); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); + r0 = s.s___33456.fields["_x"]; + s.tmp_0 = r0; + r0 = (s.s___33456).fields["_lastX"] = (s.tmp_0); + r0 = s.s___33456.fields["_y"]; + s.tmp_0 = r0; + r0 = (s.s___33456).fields["_lastY"] = (s.tmp_0); + s.tmp_0 = r0 = s.s___33456; + r0 = s.s___33456.fields["_x"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepX___33549); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); + s.tmp_0 = r0 = s.s___33456; + r0 = s.s___33456.fields["_y"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + s.stepY___33563); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); + r0 = s.s___33456.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__P20491_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_4.arg0 = r0; + s.tmp_4.arg1 = s.s___33456; + s.callLocIdx = 566; s.pc = 64; return s.tmp_4; + case 64: + r0 = s.retval; + case 33: + case 34: + s.tmp_0 = r0 = s.tileMap___33374; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 35; continue; } + r0 = s.tmp_0; + { step = 36; continue; } + case 35: + r0 = s.tileMap___33374.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__P22838_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___33454; + s.tmp_6.arg2 = s.tileMap___33374; + s.callLocIdx = 568; s.pc = 65; return s.tmp_6; + case 65: + r0 = s.retval; + case 37: + case 38: + r0 = s.s___33456.fields["flags"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & 32); + s.bounce___33626 = (r0); + r0 = s.s___33456.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: + s.tmp_2 = r0 = s.bounce___33626; + 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___33374); + 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__P22837_mk(s); + s.tmp_6.arg0 = s.arg0; + s.tmp_6.arg1 = s.ms___33454; + s.tmp_6.arg2 = s.bounce___33626; + r0 = s.scene___33371.fields["camera"]; + s.tmp_6.arg3 = r0; + s.callLocIdx = 569; s.pc = 66; return s.tmp_6; + case 66: r0 = s.retval; - s.wallHandlersToRun___15211 = (r0); - r0 = pxsim_Array__length(s.wallHandlersToRun___15211); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_1 = tiles_TileMap_getTile__P2749_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 = 424; s.pc = 17; return s.tmp_3; } - } - case 17: + case 43: + case 44: + s.tmp_2 = Fx_abs__P18203_mk(s); + r0 = s.ms___33454.fields["dx"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 570; s.pc = 67; return s.tmp_2; + case 67: 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 = 426; s.pc = 18; return s.tmp_6; } - } - case 18: + s.tmp_1 = r0; + r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___20559); + 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__P18203_mk(s); + r0 = s.ms___33454.fields["dy"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 571; s.pc = 68; return s.tmp_4; + case 68: r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___20559); + case 46: + // jmp value (already in r0) 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 = 428; s.pc = 16; return s.tmp_1; - case 16: + r0 = pxsim_numops_toBoolDecr(s.tmp_5); + if (!r0) { step = 47; continue; } + r0 = pxsim_Array__push(s.remainingMovers___33449, s.ms___33454); + 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__P22836_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.currMovers___33442; + s.tmp_0.arg2 = s.overlapHandlers___33420; + s.callLocIdx = 572; s.pc = 69; return s.tmp_0; + case 69: r0 = s.retval; - s.asTileLocation___15224 = (r0); - r0 = pxsim_pxtcore_mkAction(2, Sprite_registerObstacle_inline__P15240); + case 50: + r0 = pxsim_Array__length(s.currMovers___33442); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.asTileLocation___15224); - s.tmp_1 = helpers_arrayForEach__P109_mk(s); - s.tmp_1.arg0 = s.wallHandlersToRun___15211; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 430; s.pc = 19; return s.tmp_1; - case 19: - r0 = s.retval; - case 5: - case 6: - case 7: - case 8: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 51; continue; } + r0 = pxsim_Array_.pop(s.currMovers___33442); + { step = 50; continue; } + case 51: + r0 = (s.count___33432 + 1); + s.count___33432 = (r0); + { step = 1; continue; } + case 52: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_registerObstacle__P2426.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_move__P20577.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 Sprite_registerObstacle__P2426_mk(s) { +function ArcadePhysicsEngine_move__P20577_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_registerObstacle__P2426, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_move__P20577, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -31567,59 +34860,38 @@ function Sprite_registerObstacle__P2426_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - collisionHandlers___15179: undefined, - wallCollisionHandlers___15186: undefined, - wallHandlersToRun___15211: undefined, - asTileLocation___15224: undefined, + tmp_8: undefined, + tmp_9: undefined, + tmp_10: undefined, + tmp_11: undefined, + dtMs___33361: undefined, + dt2___33367: undefined, + scene___33371: undefined, + tileMap___33374: undefined, + movingSprites___33377: undefined, + MAX_STEP_COUNT___33408: undefined, + overlapHandlers___33420: undefined, + selected___33427: undefined, + buffers___33428: undefined, + count___33432: undefined, + currMovers___33442: undefined, + remainingMovers___33449: undefined, + ms___33454: undefined, + unnamed166___U13: undefined, + unnamed167___U14: undefined, + s___33456: undefined, + stepX___33549: undefined, + stepY___33563: undefined, + bounce___33626: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, -} } - - - - - -function forEach_inline__P15194(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__P15194.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__P15194_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: forEach_inline__P15194, 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__P15200(s) { +function movingSprites_inline__P33379(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31633,30 +34905,23 @@ switch (step) { 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 = 419; 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 = 419; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 419; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 419; s.pc = 1; return s.tmp_0; } - } + s.tmp_0 = ArcadePhysicsEngine_createMovingSprite__P22835_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 = 541; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_registerObstacle_inline__P15200.info = {"start":25443,"length":20,"line":825,"column":25,"endLine":825,"endColumn":45,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +movingSprites_inline__P33379.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} -function Sprite_registerObstacle_inline__P15200_mk(s) { +function movingSprites_inline__P33379_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_registerObstacle_inline__P15200, depth: s.depth + 1, + parent: s, fn: movingSprites_inline__P33379, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -31666,7 +34931,7 @@ function Sprite_registerObstacle_inline__P15200_mk(s) { -function wallHandlersToRun_inline__P15213(s) { +function ArcadePhysicsEngine_move_inline__P33391(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31680,71 +34945,50 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0.fields["spriteKind"]; + s.tmp_1 = Sprite_vx__P20396_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 543; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; 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__P15213.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__P15213_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: wallHandlersToRun_inline__P15213, 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__P15240(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 = 429; 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 = 429; s.pc = 1; return s.tmp_0; } - else if (s.tmp_0.fn.isGetter) { s.tmp_0.stage2Call = true; s.callLocIdx = 429; s.pc = 1; return s.tmp_0;; } - else { s.callLocIdx = 429; s.pc = 1; return s.tmp_0; } - } + 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__P20398_mk(s); + s.tmp_2.arg0 = s.arg0; + s.callLocIdx = 544; 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__P20463_mk(s); + s.tmp_4.arg0 = s.arg0; + s.callLocIdx = 545; s.pc = 7; return s.tmp_4; + case 7: r0 = s.retval; + case 3: + case 4: r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_registerObstacle_inline__P15240.info = {"start":25889,"length":36,"line":834,"column":29,"endLine":834,"endColumn":65,"fileName":"pxt_modules/game/sprite.ts","functionName":"inline","argumentNames":["h"]} +ArcadePhysicsEngine_move_inline__P33391.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} -function Sprite_registerObstacle_inline__P15240_mk(s) { +function ArcadePhysicsEngine_move_inline__P33391_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_registerObstacle_inline__P15240, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_move_inline__P33391, 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, } } @@ -31752,7 +34996,7 @@ function Sprite_registerObstacle_inline__P15240_mk(s) { -function Math_sign__P129(s) { +function ArcadePhysicsEngine_screenEdgeCollisions__P22837(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31762,118 +35006,306 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.s___34209 = undefined; + s.offset___34224 = 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 == 0); + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = s.arg1.fields["sprite"]; + s.s___34209 = (r0); + r0 = s.s___34209.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 = 0; - { step = 5; continue; } + s.tmp_4 = Sprite__C20379_v4_1_mk(s); + s.tmp_4.arg0 = s.s___34209; + if (!checkSubtype(s.tmp_4.arg0, Sprite__C20379_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; case 1: case 2: - r0 = (s.arg0 > 0); + s.tmp_3 = scene_Camera_isUpdated__P20835_mk(s); + s.tmp_3.arg0 = s.arg3; + s.callLocIdx = 617; 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_numops_toBoolDecr(s.tmp_1); + r0 = pxsim_Boolean__bang(s.tmp_1); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = 1; - { step = 5; continue; } + s.tmp_4 = scene_Camera_update__P20836_mk(s); + s.tmp_4.arg0 = s.arg3; + s.callLocIdx = 618; s.pc = 23; return s.tmp_4; + case 23: + r0 = s.retval; case 3: case 4: - r0 = -1; - case 5: - return leave(s, r0) - default: oops() -} } } -Math_sign__P129.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__P129_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Math_sign__P129, 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__P107(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___15248 = undefined; - s.i___15251 = 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___15248 = (r0); - s.i___15251 = (0); - case 1: - r0 = (s.i___15251 < s.len___15248); + s.tmp_2 = game_Hitbox_left__P20254_mk(s); + r0 = s.s___34209.fields["_hitbox"]; + s.tmp_2.arg0 = r0; + s.callLocIdx = 619; 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 = s.arg3.fields["_offsetX"]; + s.tmp_3 = r0; + r0 = (s.tmp_0 - s.tmp_3); + s.offset___34224 = (r0); + r0 = (s.offset___34224 < 0); 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___15251); - s.tmp_2.arg0 = r0; - s.tmp_2.arg1 = s.i___15251; - setupLambda(s.tmp_2, s.tmp_2.argL); - s.callLocIdx = 4; s.pc = 6; return s.tmp_2; - case 6: + if (!r0) { step = 7; continue; } + s.tmp_1 = Sprite_left__P20438_mk(s); + s.tmp_2 = r0 = s.s___34209; + s.tmp_1.arg0 = r0; + s.tmp_4 = Sprite_left__P20437_mk(s); + s.tmp_4.arg0 = s.tmp_2; + s.callLocIdx = 622; s.pc = 26; return s.tmp_4; + case 26: + r0 = s.retval; + s.tmp_3 = r0; + r0 = (s.tmp_3 - s.offset___34224); + s.tmp_1.arg1 = r0; + s.callLocIdx = 623; 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__P20397_mk(s); + s.tmp_0.arg0 = s.s___34209; + s.tmp_2 = Sprite_vx__P20396_mk(s); + s.tmp_2.arg0 = s.s___34209; + s.callLocIdx = 624; s.pc = 28; return s.tmp_2; + case 28: 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___15251 + 1); - s.i___15251 = (r0); - { step = 1; continue; } - case 4: - r0 = false; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 625; 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__P20256_mk(s); + r0 = s.s___34209.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 626; 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___20070); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.offset___34224 = (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__P20440_mk(s); + s.tmp_9 = r0 = s.s___34209; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_right__P20439_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 629; s.pc = 31; return s.tmp_11; + case 31: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 - s.offset___34224); + s.tmp_8.arg1 = r0; + s.callLocIdx = 630; 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__P20397_mk(s); + s.tmp_0.arg0 = s.s___34209; + s.tmp_2 = Sprite_vx__P20396_mk(s); + s.tmp_2.arg0 = s.s___34209; + s.callLocIdx = 631; s.pc = 33; return s.tmp_2; + case 33: + r0 = s.retval; + s.tmp_1 = r0; + r0 = (0 - s.tmp_1); + s.tmp_0.arg1 = r0; + s.callLocIdx = 632; 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__P20255_mk(s); + r0 = s.s___34209.fields["_hitbox"]; + s.tmp_3.arg0 = r0; + s.callLocIdx = 633; 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.arg3.fields["_offsetY"]; + s.tmp_4 = r0; + r0 = (s.tmp_1 - s.tmp_4); + s.tmp_0 = r0; + s.offset___34224 = (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__P20442_mk(s); + s.tmp_7 = r0 = s.s___34209; + s.tmp_6.arg0 = r0; + s.tmp_9 = Sprite_top__P20441_mk(s); + s.tmp_9.arg0 = s.tmp_7; + s.callLocIdx = 636; s.pc = 36; return s.tmp_9; + case 36: + r0 = s.retval; + s.tmp_8 = r0; + r0 = (s.tmp_8 - s.offset___34224); + s.tmp_6.arg1 = r0; + s.callLocIdx = 637; 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__P20399_mk(s); + s.tmp_0.arg0 = s.s___34209; + s.tmp_2 = Sprite_vy__P20398_mk(s); + s.tmp_2.arg0 = s.s___34209; + s.callLocIdx = 638; 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 = 639; 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__P20257_mk(s); + r0 = s.s___34209.fields["_hitbox"]; + s.tmp_4.arg0 = r0; + s.callLocIdx = 640; 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.arg3.fields["_offsetY"]; + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.tmp_1 = r0; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + s.tmp_6 = r0; + r0 = (s.tmp_1 - s.tmp_6); + s.tmp_0 = r0; + s.offset___34224 = (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__P20444_mk(s); + s.tmp_9 = r0 = s.s___34209; + s.tmp_8.arg0 = r0; + s.tmp_11 = Sprite_bottom__P20443_mk(s); + s.tmp_11.arg0 = s.tmp_9; + s.callLocIdx = 643; s.pc = 41; return s.tmp_11; + case 41: + r0 = s.retval; + s.tmp_10 = r0; + r0 = (s.tmp_10 - s.offset___34224); + s.tmp_8.arg1 = r0; + s.callLocIdx = 644; 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__P20399_mk(s); + s.tmp_0.arg0 = s.s___34209; + s.tmp_2 = Sprite_vy__P20398_mk(s); + s.tmp_2.arg0 = s.s___34209; + s.callLocIdx = 645; 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 = 646; 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() } } } -helpers_arraySome__P107.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"]} +ArcadePhysicsEngine_screenEdgeCollisions__P22837.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 helpers_arraySome__P107_mk(s) { +function ArcadePhysicsEngine_screenEdgeCollisions__P22837_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arraySome__P107, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P22837, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - len___15248: undefined, - i___15251: 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___34209: undefined, + offset___34224: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function tiles_TileMap_isOnWall__P2758(s) { +function scene_Camera_isUpdated__P20835(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -31883,136 +35315,87 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.hbox___14353 = undefined; - s.left___14356 = undefined; - s.right___14362 = undefined; - s.top___14368 = undefined; - s.bottom___14374 = undefined; - s.col___14380 = undefined; - s.row___14386 = 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__C2735_VT)) failedCast(r0); - r0 = s.arg1.fields["_hitbox"]; - s.hbox___14353 = (r0); - s.tmp_1 = game_Hitbox_left__P2216_mk(s); - s.tmp_1.arg0 = s.hbox___14353; - s.callLocIdx = 861; 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___14356 = (r0); - s.tmp_1 = game_Hitbox_right__P2218_mk(s); - s.tmp_1.arg0 = s.hbox___14353; - s.callLocIdx = 864; s.pc = 9; return s.tmp_1; - case 9: - r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; + if (!checkSubtype(r0, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["sprite"]; s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); - s.tmp_3 = r0; - r0 = (s.tmp_0 >> s.tmp_3); - s.right___14362 = (r0); - s.tmp_1 = game_Hitbox_top__P2217_mk(s); - s.tmp_1.arg0 = s.hbox___14353; - s.callLocIdx = 867; s.pc = 10; return s.tmp_1; - case 10: - r0 = s.retval; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.tmp_1 = r0; + r0 = pxsim_Boolean__bang(s.tmp_1); 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___14368 = (r0); - s.tmp_1 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_1.arg0 = s.hbox___14353; - s.callLocIdx = 870; s.pc = 11; return s.tmp_1; - case 11: + r0 = pxsim_numops_toBool(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = s.tmp_0; + { step = 4; continue; } + case 1: + s.tmp_5 = Sprite_x__P20392_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_5.arg0 = r0; + s.callLocIdx = 889; s.pc = 5; return s.tmp_5; + case 5: r0 = s.retval; - s.tmp_0 = r0; - r0 = s.arg0.fields["_scale"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + 8); + 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 = (s.tmp_0 >> s.tmp_3); - s.bottom___14374 = (r0); - s.col___14380 = (s.left___14356); - case 1: - r0 = (s.col___14380 <= s.right___14362); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - s.row___14386 = (s.top___14368); + r0 = pxsim_numops_toBool(s.tmp_3); + if (r0) { step = 2; continue; } + r0 = s.tmp_3; + { step = 3; continue; } case 2: - r0 = (s.row___14386 <= s.bottom___14374); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 5; continue; } - s.tmp_2 = tiles_TileMap_isObstacle__P2756_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.col___14380; - s.tmp_2.arg2 = s.row___14386; - s.callLocIdx = 873; s.pc = 12; return s.tmp_2; - case 12: + s.tmp_8 = Sprite_y__P20394_mk(s); + r0 = s.arg0.fields["sprite"]; + s.tmp_8.arg0 = r0; + s.callLocIdx = 890; s.pc = 6; return s.tmp_8; + case 6: r0 = s.retval; - s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 7; continue; } + 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: - r0 = (s.row___14386 + 1); - s.row___14386 = (r0); - { step = 2; continue; } - case 5: - r0 = (s.col___14380 + 1); - s.col___14380 = (r0); - { step = 1; continue; } - case 6: - r0 = false; - case 7: + // jmp value (already in r0) + s.tmp_11 = r0; + r0 = s.tmp_11; return leave(s, r0) default: oops() } } } -tiles_TileMap_isOnWall__P2758.info = {"start":16873,"length":627,"line":534,"column":8,"endLine":551,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"isOnWall","argumentNames":["this","s"]} +scene_Camera_isUpdated__P20835.info = {"start":2403,"length":150,"line":79,"column":8,"endLine":81,"endColumn":9,"fileName":"pxt_modules/game/camera.ts","functionName":"isUpdated","argumentNames":["this"]} -function tiles_TileMap_isOnWall__P2758_mk(s) { +function scene_Camera_isUpdated__P20835_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_isOnWall__P2758, depth: s.depth + 1, + parent: s, fn: scene_Camera_isUpdated__P20835, 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___14353: undefined, - left___14356: undefined, - right___14362: undefined, - top___14368: undefined, - bottom___14374: undefined, - col___14380: undefined, - row___14386: 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, } } -function MovingSprite_constructor__P2526(s) { +function Sprite_bottom__P20444(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32025,49 +35408,48 @@ 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__C2525_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); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = Sprite_top__P20442_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_height__P20436_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 364; 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 = 365; s.pc = 1; return s.tmp_0; + case 1: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -MovingSprite_constructor__P2526.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"]} +Sprite_bottom__P20444.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 MovingSprite_constructor__P2526_mk(s) { +function Sprite_bottom__P20444_mk(s) { checkStack(s.depth); return { - parent: s, fn: MovingSprite_constructor__P2526, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P20444, 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 ArcadePhysicsEngine_move__P2539(s) { +function Sprite_bottom__P20443(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32077,587 +35459,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.dtMs___15323 = undefined; - s.dt2___15329 = undefined; - s.scene___15333 = undefined; - s.tileMap___15336 = undefined; - s.movingSprites___15339 = undefined; - s.MAX_STEP_COUNT___15370 = undefined; - s.overlapHandlers___15382 = undefined; - s.selected___15389 = undefined; - s.buffers___15390 = undefined; - s.count___15394 = undefined; - s.currMovers___15404 = undefined; - s.remainingMovers___15411 = undefined; - s.ms___15416 = undefined; - s.unnamed74___U13 = undefined; - s.unnamed75___U14 = undefined; - s.s___15418 = undefined; - s.stepX___15511 = undefined; - s.stepY___15525 = undefined; - s.bounce___15588 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - s.tmp_0 = Math_min__P131_mk(s); - s.tmp_0.arg0 = 100; - r0 = (s.arg1 * 1000); - s.tmp_0.arg1 = r0; - s.callLocIdx = 539; s.pc = 53; return s.tmp_0; - case 53: - r0 = s.retval; - s.dtMs___15323 = (r0); - r0 = pxsim.Math_.idiv(s.dtMs___15323, 2); - s.dt2___15329 = (r0); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 540; s.pc = 54; return s.tmp_0; - case 54: - r0 = s.retval; - s.scene___15333 = (r0); - r0 = s.scene___15333.fields["tileMap"]; - s.tileMap___15336 = (r0); - r0 = pxsim_pxtcore_mkAction(3, movingSprites_inline__P15341); - s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 1, s.dtMs___15323); - r0 = pxsim_pxtrt_stclo(s.tmp_0, 2, s.dt2___15329); - s.tmp_1 = helpers_arrayMap__P106_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 542; s.pc = 55; return s.tmp_1; - case 55: - r0 = s.retval; - s.movingSprites___15339 = (r0); - s.tmp_0 = helpers_arrayForEach__P109_mk(s); - r0 = s.arg0.fields["sprites"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = ArcadePhysicsEngine_move_inline__P15353; - s.callLocIdx = 546; s.pc = 56; return s.tmp_0; - case 56: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_clear__P2452_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 547; s.pc = 57; return s.tmp_0; - case 57: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_resizeBuckets__P2451_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - r0 = s.arg0.fields["sprites"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 548; 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___15323); - 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___15370 = (r0); - s.tmp_0 = helpers_arraySlice__P115_mk(s); - r0 = s.scene___15333.fields["overlapHandlers"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = undefined; - s.tmp_0.arg2 = undefined; - s.callLocIdx = 553; s.pc = 59; return s.tmp_0; - case 59: - r0 = s.retval; - s.overlapHandlers___15382 = (r0); - s.selected___15389 = (0); - r0 = pxsim_Array__mk(); - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.movingSprites___15339); - r0 = pxsim_Array__mk(); - s.tmp_1 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.tmp_1); - s.buffers___15390 = (s.tmp_0); - s.count___15394 = (0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_1 = Sprite_top__P20441_mk(s); + s.tmp_1.arg0 = s.arg0; + s.callLocIdx = 362; s.pc = 1; return s.tmp_1; case 1: - r0 = (s.count___15394 < s.MAX_STEP_COUNT___15370); - 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___15390, s.selected___15389); - 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___15390, s.selected___15389); - s.currMovers___15404 = (r0); - r0 = (s.selected___15389 ^ 1); - s.selected___15389 = (r0); - r0 = pxsim_Array__getAt(s.buffers___15390, s.selected___15389); - s.remainingMovers___15411 = (r0); - s.ms___15416 = (undefined); - s.unnamed74___U13 = (s.currMovers___15404); - s.unnamed75___U14 = (0); - case 4: - s.tmp_0 = r0 = s.unnamed75___U14; - r0 = pxsim_Array__length(s.unnamed74___U13); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 49; continue; } - r0 = pxsim_Array__getAt(s.unnamed74___U13, s.unnamed75___U14); - s.ms___15416 = (r0); - r0 = s.ms___15416.fields["sprite"]; - s.s___15418 = (r0); - r0 = s.ms___15416.fields["cachedVx"]; - s.tmp_1 = r0; - r0 = s.s___15418.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___15418.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___15416).fields["dx"] = (0); - { step = 14; continue; } - case 5: - r0 = s.s___15418.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___15416.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___15418.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___15416.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___15416; - r0 = s.ms___15416.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___15416; - r0 = s.ms___15416.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___15418.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.ms___15416).fields["cachedVx"] = (s.tmp_0); - case 15: - case 16: - r0 = s.ms___15416.fields["cachedVy"]; - s.tmp_1 = r0; - r0 = s.s___15418.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___15418.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___15416).fields["dy"] = (0); - { step = 26; continue; } - case 17: - r0 = s.s___15418.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___15416.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___15418.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___15416.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___15416; - r0 = s.ms___15416.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___15416; - r0 = s.ms___15416.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___15418.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.ms___15416).fields["cachedVy"] = (s.tmp_0); - case 27: - case 28: - s.tmp_2 = Fx_abs__P165_mk(s); - r0 = s.ms___15416.fields["xStep"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 558; s.pc = 60; return s.tmp_2; - case 60: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Fx_abs__P165_mk(s); - r0 = s.ms___15416.fields["dx"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 559; 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___15416.fields["dx"]; - { step = 30; continue; } - case 29: - r0 = s.ms___15416.fields["xStep"]; - case 30: - // jmp value (already in r0) - s.tmp_5 = r0; - s.stepX___15511 = (s.tmp_5); - s.tmp_2 = Fx_abs__P165_mk(s); - r0 = s.ms___15416.fields["yStep"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 560; s.pc = 62; return s.tmp_2; - case 62: - r0 = s.retval; - s.tmp_1 = r0; - s.tmp_4 = Fx_abs__P165_mk(s); - r0 = s.ms___15416.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 561; s.pc = 63; return s.tmp_4; - case 63: 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___15416.fields["dy"]; - { step = 32; continue; } - case 31: - r0 = s.ms___15416.fields["yStep"]; - case 32: - // jmp value (already in r0) - s.tmp_5 = r0; - s.stepY___15525 = (s.tmp_5); - s.tmp_0 = r0 = s.ms___15416; - r0 = s.ms___15416.fields["dx"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepX___15511); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dx"] = (s.tmp_1); - s.tmp_0 = r0 = s.ms___15416; - r0 = s.ms___15416.fields["dy"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 - s.stepY___15525); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["dy"] = (s.tmp_1); - r0 = s.s___15418.fields["_x"]; - s.tmp_0 = r0; - r0 = (s.s___15418).fields["_lastX"] = (s.tmp_0); - r0 = s.s___15418.fields["_y"]; - s.tmp_0 = r0; - r0 = (s.s___15418).fields["_lastY"] = (s.tmp_0); - s.tmp_0 = r0 = s.s___15418; - r0 = s.s___15418.fields["_x"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepX___15511); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_x"] = (s.tmp_1); - s.tmp_0 = r0 = s.s___15418; - r0 = s.s___15418.fields["_y"]; - s.tmp_2 = r0; - r0 = (s.tmp_2 + s.stepY___15525); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_y"] = (s.tmp_1); - r0 = s.s___15418.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__P2453_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_4.arg0 = r0; - s.tmp_4.arg1 = s.s___15418; - s.callLocIdx = 566; s.pc = 64; return s.tmp_4; - case 64: + s.tmp_3 = Sprite_height__P20436_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 363; s.pc = 2; return s.tmp_3; + case 2: r0 = s.retval; - case 33: - case 34: - s.tmp_0 = r0 = s.tileMap___15336; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 35; continue; } - r0 = s.tmp_0; - { step = 36; continue; } - case 35: - r0 = s.tileMap___15336.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__P4800_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___15416; - s.tmp_6.arg2 = s.tileMap___15336; - s.callLocIdx = 568; s.pc = 65; return s.tmp_6; - case 65: - r0 = s.retval; - case 37: - case 38: - r0 = s.s___15418.fields["flags"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & 32); - s.bounce___15588 = (r0); - r0 = s.s___15418.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: - s.tmp_2 = r0 = s.bounce___15588; - 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___15336); - 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__P4799_mk(s); - s.tmp_6.arg0 = s.arg0; - s.tmp_6.arg1 = s.ms___15416; - s.tmp_6.arg2 = s.bounce___15588; - r0 = s.scene___15333.fields["camera"]; - s.tmp_6.arg3 = r0; - s.callLocIdx = 569; s.pc = 66; return s.tmp_6; - case 66: - r0 = s.retval; - case 43: - case 44: - s.tmp_2 = Fx_abs__P165_mk(s); - r0 = s.ms___15416.fields["dx"]; - s.tmp_2.arg0 = r0; - s.callLocIdx = 570; s.pc = 67; return s.tmp_2; - case 67: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 > globals.MIN_MOVE_GAP___2521); - 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__P165_mk(s); - r0 = s.ms___15416.fields["dy"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 571; s.pc = 68; return s.tmp_4; - case 68: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 > globals.MIN_MOVE_GAP___2521); - 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___15411, s.ms___15416); - case 47: - case 48: - r0 = (s.unnamed75___U14 + 1); - s.unnamed75___U14 = (r0); - { step = 4; continue; } - case 49: - s.unnamed74___U13 = (undefined); - s.tmp_0 = ArcadePhysicsEngine_spriteCollisions__P4798_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.currMovers___15404; - s.tmp_0.arg2 = s.overlapHandlers___15382; - s.callLocIdx = 572; s.pc = 69; return s.tmp_0; - case 69: - r0 = s.retval; - case 50: - r0 = pxsim_Array__length(s.currMovers___15404); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 51; continue; } - r0 = pxsim_Array_.pop(s.currMovers___15404); - { step = 50; continue; } - case 51: - r0 = (s.count___15394 + 1); - s.count___15394 = (r0); - { step = 1; continue; } - case 52: - r0 = undefined; - return leave(s, r0) + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_move__P2539.info = {"start":2822,"length":4105,"line":112,"column":4,"endLine":215,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"move","argumentNames":["this","dt"]} +Sprite_bottom__P20443.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__P20443.isGetter = true; -function ArcadePhysicsEngine_move__P2539_mk(s) { +function Sprite_bottom__P20443_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move__P2539, depth: s.depth + 1, + parent: s, fn: Sprite_bottom__P20443, 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___15323: undefined, - dt2___15329: undefined, - scene___15333: undefined, - tileMap___15336: undefined, - movingSprites___15339: undefined, - MAX_STEP_COUNT___15370: undefined, - overlapHandlers___15382: undefined, - selected___15389: undefined, - buffers___15390: undefined, - count___15394: undefined, - currMovers___15404: undefined, - remainingMovers___15411: undefined, - ms___15416: undefined, - unnamed74___U13: undefined, - unnamed75___U14: undefined, - s___15418: undefined, - stepX___15511: undefined, - stepY___15525: undefined, - bounce___15588: undefined, arg0: undefined, - arg1: undefined, } } -function movingSprites_inline__P15341(s) { +function Sprite_right__P20440(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32669,35 +35512,49 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = ArcadePhysicsEngine_createMovingSprite__P4797_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 = 541; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P20438_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Sprite_width__P20435_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_1 - s.tmp_2); + s.tmp_0.arg1 = r0; + s.callLocIdx = 357; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + r0 = undefined; return leave(s, r0) default: oops() } } } -movingSprites_inline__P15341.info = {"start":3181,"length":52,"line":121,"column":17,"endLine":121,"endColumn":69,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["sprite"]} +Sprite_right__P20440.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 movingSprites_inline__P15341_mk(s) { +function Sprite_right__P20440_mk(s) { checkStack(s.depth); return { - parent: s, fn: movingSprites_inline__P15341, depth: s.depth + 1, + parent: s, fn: Sprite_right__P20440, 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_move_inline__P15353(s) { +function Sprite_right__P20439(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32711,50 +35568,36 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - s.tmp_1 = Sprite_vx__P2358_mk(s); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_1 = Sprite_left__P20437_mk(s); s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 543; 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; } + s.callLocIdx = 354; s.pc = 1; return s.tmp_1; case 1: - s.tmp_2 = Sprite_vy__P2360_mk(s); - s.tmp_2.arg0 = s.arg0; - s.callLocIdx = 544; s.pc = 6; return s.tmp_2; - case 6: r0 = s.retval; + s.tmp_0 = r0; + s.tmp_3 = Sprite_width__P20435_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 355; s.pc = 2; return s.tmp_3; 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__P2425_mk(s); - s.tmp_4.arg0 = s.arg0; - s.callLocIdx = 545; s.pc = 7; return s.tmp_4; - case 7: r0 = s.retval; - case 3: - case 4: - r0 = undefined; - return leave(s, r0) + s.tmp_2 = r0; + r0 = (s.tmp_0 + s.tmp_2); + return leaveAccessor(s, r0) default: oops() } } } -ArcadePhysicsEngine_move_inline__P15353.info = {"start":3316,"length":66,"line":124,"column":29,"endLine":126,"endColumn":9,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["s"]} +Sprite_right__P20439.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__P20439.isGetter = true; -function ArcadePhysicsEngine_move_inline__P15353_mk(s) { +function Sprite_right__P20439_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_move_inline__P15353, depth: s.depth + 1, + parent: s, fn: Sprite_right__P20439, 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, } } @@ -32762,7 +35605,7 @@ function ArcadePhysicsEngine_move_inline__P15353_mk(s) { -function ArcadePhysicsEngine_screenEdgeCollisions__P4799(s) { +function ArcadePhysicsEngine_spriteCollisions__P22836(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -32772,22 +35615,27 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.s___16171 = undefined; - s.offset___16186 = undefined; + s.ms___33683 = undefined; + s.unnamed168___U1 = undefined; + s.unnamed169___U2 = undefined; + s.sprite___33685 = undefined; + s.overSprites___33692 = undefined; + s.overlapper___33700 = undefined; + s.unnamed170___U6 = undefined; + s.unnamed171___U7 = undefined; + s.thisKind___33706 = undefined; + s.otherKind___33710 = undefined; + s.higher___33723 = undefined; + s.lower___33732 = 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__C2527_VT)) failedCast(r0); - r0 = s.arg1.fields["sprite"]; - s.s___16171 = (r0); - r0 = s.s___16171.fields["_image"]; - s.tmp_3 = r0; - r0 = pxsim_ImageMethods.isStatic(s.tmp_3); + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = pxsim_Array__length(s.arg2); s.tmp_2 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_2); s.tmp_1 = r0; @@ -32795,257 +35643,161 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } - s.tmp_4 = Sprite__C2341_v4_1_mk(s); - s.tmp_4.arg0 = s.s___16171; - if (!checkSubtype(s.tmp_4.arg0, Sprite__C2341_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; + { step = 21; continue; } case 1: case 2: - s.tmp_3 = scene_Camera_isUpdated__P2797_mk(s); - s.tmp_3.arg0 = s.arg3; - s.callLocIdx = 617; s.pc = 22; return s.tmp_3; - case 22: - r0 = s.retval; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + s.ms___33683 = (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 = pxsim_Boolean__bang(s.tmp_1); + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 20; continue; } + r0 = pxsim_Array__getAt(s.unnamed168___U1, s.unnamed169___U2); + s.ms___33683 = (r0); + r0 = s.ms___33683.fields["sprite"]; + s.sprite___33685 = (r0); + r0 = s.sprite___33685.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 = 3; continue; } - s.tmp_4 = scene_Camera_update__P2798_mk(s); - s.tmp_4.arg0 = s.arg3; - s.callLocIdx = 618; s.pc = 23; return s.tmp_4; - case 23: - r0 = s.retval; - case 3: + if (!r0) { step = 4; continue; } + { step = 19; continue; } case 4: - s.tmp_2 = game_Hitbox_left__P2216_mk(s); - r0 = s.s___16171.fields["_hitbox"]; + case 5: + s.tmp_2 = sprites_SpriteMap_overlaps__P20487_mk(s); + r0 = s.arg0.fields["map"]; s.tmp_2.arg0 = r0; - s.callLocIdx = 619; s.pc = 24; return s.tmp_2; - case 24: + r0 = s.ms___33683.fields["sprite"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 610; s.pc = 22; return s.tmp_2; + case 22: r0 = s.retval; + s.overSprites___33692 = (r0); + s.overlapper___33700 = (undefined); + s.unnamed170___U6 = (s.overSprites___33692); + s.unnamed171___U7 = (0); + case 6: + s.tmp_0 = r0 = s.unnamed171___U7; + r0 = pxsim_Array__length(s.unnamed170___U6); s.tmp_1 = r0; - r0 = (s.tmp_1 / 256); - s.tmp_0 = r0; - r0 = s.arg3.fields["_offsetX"]; + r0 = (s.tmp_0 < s.tmp_1); + if (!r0) { step = 18; continue; } + r0 = pxsim_Array__getAt(s.unnamed170___U6, s.unnamed171___U7); + s.overlapper___33700 = (r0); + r0 = s.overlapper___33700.fields["flags"]; s.tmp_3 = r0; - r0 = (s.tmp_0 - s.tmp_3); - s.offset___16186 = (r0); - r0 = (s.offset___16186 < 0); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); + r0 = (s.tmp_3 & 4610); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); if (!r0) { step = 7; continue; } - s.tmp_1 = Sprite_left__P2400_mk(s); - s.tmp_2 = r0 = s.s___16171; - s.tmp_1.arg0 = r0; - s.tmp_4 = Sprite_left__P2399_mk(s); - s.tmp_4.arg0 = s.tmp_2; - s.callLocIdx = 622; s.pc = 26; return s.tmp_4; - case 26: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 - s.offset___16186); - s.tmp_1.arg1 = r0; - s.callLocIdx = 623; 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__P2359_mk(s); - s.tmp_0.arg0 = s.s___16171; - s.tmp_2 = Sprite_vx__P2358_mk(s); - s.tmp_2.arg0 = s.s___16171; - s.callLocIdx = 624; s.pc = 28; return s.tmp_2; - case 28: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 625; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - case 5: - case 6: - { step = 12; continue; } + { step = 17; continue; } case 7: - s.tmp_4 = game_Hitbox_right__P2218_mk(s); - r0 = s.s___16171.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 626; s.pc = 29; return s.tmp_4; - case 29: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / 256); + case 8: + r0 = s.sprite___33685.fields["_kind"]; + s.thisKind___33706 = (r0); + r0 = s.overlapper___33700.fields["_kind"]; + s.otherKind___33710 = (r0); + r0 = s.sprite___33685.fields["_kindsOverlappedWith"]; s.tmp_2 = r0; - r0 = s.arg3.fields["_offsetX"]; - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); + r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___33710, undefined); s.tmp_1 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); + r0 = (s.tmp_1 === -1); s.tmp_0 = r0; - s.offset___16186 = (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__P2402_mk(s); - s.tmp_9 = r0 = s.s___16171; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_right__P2401_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 629; s.pc = 31; return s.tmp_11; - case 31: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___16186); - s.tmp_8.arg1 = r0; - s.callLocIdx = 630; 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__P2359_mk(s); - s.tmp_0.arg0 = s.s___16171; - s.tmp_2 = Sprite_vx__P2358_mk(s); - s.tmp_2.arg0 = s.s___16171; - s.callLocIdx = 631; s.pc = 33; return s.tmp_2; - case 33: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 632; s.pc = 32; return s.tmp_0; - case 32: - r0 = s.retval; - case 8: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 9; continue; } + { step = 17; continue; } case 9: case 10: + r0 = s.sprite___33685.fields["id"]; + s.tmp_4 = r0; + r0 = s.overlapper___33700.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___33685; + { step = 12; continue; } case 11: + r0 = s.overlapper___33700; case 12: - s.tmp_3 = game_Hitbox_top__P2217_mk(s); - r0 = s.s___16171.fields["_hitbox"]; - s.tmp_3.arg0 = r0; - s.callLocIdx = 633; 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.arg3.fields["_offsetY"]; - s.tmp_4 = r0; - r0 = (s.tmp_1 - s.tmp_4); + // jmp value (already in r0) + s.tmp_6 = r0; + s.higher___33723 = (s.tmp_6); + r0 = (s.higher___33723 === s.sprite___33685); s.tmp_0 = r0; - s.offset___16186 = (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__P2404_mk(s); - s.tmp_7 = r0 = s.s___16171; - s.tmp_6.arg0 = r0; - s.tmp_9 = Sprite_top__P2403_mk(s); - s.tmp_9.arg0 = s.tmp_7; - s.callLocIdx = 636; s.pc = 36; return s.tmp_9; - case 36: - r0 = s.retval; - s.tmp_8 = r0; - r0 = (s.tmp_8 - s.offset___16186); - s.tmp_6.arg1 = r0; - s.callLocIdx = 637; s.pc = 35; return s.tmp_6; - case 35: - r0 = s.retval; - r0 = pxsim_numops_toBoolDecr(s.arg2); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 13; continue; } - s.tmp_0 = Sprite_vy__P2361_mk(s); - s.tmp_0.arg0 = s.s___16171; - s.tmp_2 = Sprite_vy__P2360_mk(s); - s.tmp_2.arg0 = s.s___16171; - s.callLocIdx = 638; 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 = 639; s.pc = 37; return s.tmp_0; - case 37: - r0 = s.retval; + r0 = s.overlapper___33700; + { step = 14; continue; } case 13: + r0 = s.sprite___33685; case 14: - { step = 20; continue; } - case 15: - s.tmp_4 = game_Hitbox_bottom__P2219_mk(s); - r0 = s.s___16171.fields["_hitbox"]; - s.tmp_4.arg0 = r0; - s.callLocIdx = 640; s.pc = 39; return s.tmp_4; - case 39: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 / 256); + // jmp value (already in r0) + s.tmp_1 = r0; + s.lower___33732 = (s.tmp_1); + r0 = s.higher___33723.fields["_overlappers"]; s.tmp_2 = r0; - r0 = s.arg3.fields["_offsetY"]; - s.tmp_5 = r0; - r0 = (s.tmp_2 - s.tmp_5); + r0 = s.lower___33732.fields["id"]; + s.tmp_3 = r0; + r0 = pxsim_Array_.indexOf(s.tmp_2, s.tmp_3, undefined); s.tmp_1 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___2032); - s.tmp_6 = r0; - r0 = (s.tmp_1 - s.tmp_6); + r0 = (s.tmp_1 === -1); s.tmp_0 = r0; - s.offset___16186 = (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__P2406_mk(s); - s.tmp_9 = r0 = s.s___16171; - s.tmp_8.arg0 = r0; - s.tmp_11 = Sprite_bottom__P2405_mk(s); - s.tmp_11.arg0 = s.tmp_9; - s.callLocIdx = 643; s.pc = 41; return s.tmp_11; - case 41: - r0 = s.retval; - s.tmp_10 = r0; - r0 = (s.tmp_10 - s.offset___16186); - s.tmp_8.arg1 = r0; - s.callLocIdx = 644; 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__P2361_mk(s); - s.tmp_0.arg0 = s.s___16171; - s.tmp_2 = Sprite_vy__P2360_mk(s); - s.tmp_2.arg0 = s.s___16171; - s.callLocIdx = 645; s.pc = 43; return s.tmp_2; - case 43: + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 15; continue; } + r0 = pxsim_pxtcore_mkAction(2, forEach_inline__P33752); + s.tmp_4 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___33706); + r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___33710); + r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P33776); + s.tmp_5 = r0; + r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___33723); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___33732); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___33685); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___33700); + r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___33706); + s.tmp_6 = helpers_arrayForEach__P18147_mk(s); + s.tmp_7 = helpers_arrayFilter__P18148_mk(s); + s.tmp_7.arg0 = s.arg2; + s.tmp_7.arg1 = s.tmp_4; + s.callLocIdx = 613; s.pc = 24; return s.tmp_7; + case 24: r0 = s.retval; - s.tmp_1 = r0; - r0 = (0 - s.tmp_1); - s.tmp_0.arg1 = r0; - s.callLocIdx = 646; s.pc = 42; return s.tmp_0; - case 42: + s.tmp_6.arg0 = r0; + s.tmp_6.arg1 = s.tmp_5; + s.callLocIdx = 615; s.pc = 23; return s.tmp_6; + case 23: r0 = s.retval; + 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() } } } -ArcadePhysicsEngine_screenEdgeCollisions__P4799.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_spriteCollisions__P22836.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 ArcadePhysicsEngine_screenEdgeCollisions__P4799_mk(s) { +function ArcadePhysicsEngine_spriteCollisions__P22836_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_screenEdgeCollisions__P4799, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P22836, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -33055,23 +35807,28 @@ function ArcadePhysicsEngine_screenEdgeCollisions__P4799_mk(s) { tmp_5: undefined, tmp_6: undefined, tmp_7: undefined, - tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, - s___16171: undefined, - offset___16186: undefined, + ms___33683: undefined, + unnamed168___U1: undefined, + unnamed169___U2: undefined, + sprite___33685: undefined, + overSprites___33692: undefined, + overlapper___33700: undefined, + unnamed170___U6: undefined, + unnamed171___U7: undefined, + thisKind___33706: undefined, + otherKind___33710: undefined, + higher___33723: undefined, + lower___33732: undefined, arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function scene_Camera_isUpdated__P2797(s) { +function forEach_inline__P33752(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33085,62 +35842,55 @@ switch (step) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } - r0 = s.arg0; - if (!checkSubtype(r0, scene_Camera__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["sprite"]; - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); + 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_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__P2354_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_5.arg0 = r0; - s.callLocIdx = 889; s.pc = 5; return s.tmp_5; - case 5: - r0 = s.retval; - s.tmp_4 = r0; - r0 = s.arg0.fields["_lastUpdatedSpriteX"]; - s.tmp_6 = r0; - r0 = (s.tmp_4 === s.tmp_6); + 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 = 2; continue; } + if (!r0) { step = 3; continue; } r0 = s.tmp_3; - { step = 3; continue; } - case 2: - s.tmp_8 = Sprite_y__P2356_mk(s); - r0 = s.arg0.fields["sprite"]; - s.tmp_8.arg0 = r0; - s.callLocIdx = 890; 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); + { step = 6; continue; } case 3: - // jmp value (already in r0) - s.tmp_10 = r0; - r0 = s.tmp_10; + 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_11 = r0; - r0 = s.tmp_11; + 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() } } } -scene_Camera_isUpdated__P2797.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__P33752.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} -function scene_Camera_isUpdated__P2797_mk(s) { +function forEach_inline__P33752_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_isUpdated__P2797, depth: s.depth + 1, + parent: s, fn: forEach_inline__P33752, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -33151,9 +35901,6 @@ function scene_Camera_isUpdated__P2797_mk(s) { tmp_6: undefined, tmp_7: undefined, tmp_8: undefined, - tmp_9: undefined, - tmp_10: undefined, - tmp_11: undefined, arg0: undefined, } } @@ -33161,7 +35908,7 @@ function scene_Camera_isUpdated__P2797_mk(s) { -function Sprite_bottom__P2406(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P33776(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33173,49 +35920,145 @@ 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__C2341_VT)) failedCast(r0); - s.tmp_0 = Sprite_top__P2404_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_height__P2398_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 364; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; + 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__P33786); + 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() +} } } +ArcadePhysicsEngine_spriteCollisions_inline__P33776.info = {"start":11310,"length":652,"line":338,"column":33,"endLine":349,"endColumn":25,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} + +function ArcadePhysicsEngine_spriteCollisions_inline__P33776_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P33776, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + arg0: undefined, +} } + + + + + +function ArcadePhysicsEngine_spriteCollisions_inline__P33786(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 = 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 = (s.tmp_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 365; s.pc = 1; return s.tmp_0; + 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 = 614; 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 = 614; s.pc = 7; return s.tmp_12; } + else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 614; s.pc = 7; return s.tmp_12;; } + else { s.callLocIdx = 614; 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; + r0 = pxsim_Array_.removeElement(s.tmp_0, s.tmp_1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_bottom__P2406.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_spriteCollisions_inline__P33786.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} -function Sprite_bottom__P2406_mk(s) { +function ArcadePhysicsEngine_spriteCollisions_inline__P33786_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P2406, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P33786, 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, + 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, } } -function Sprite_bottom__P2405(s) { +function sprites_SpriteMap_overlaps__P20487(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33225,48 +36068,56 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.n___33820 = undefined; + s.o___33824 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_1 = Sprite_top__P2403_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 362; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_neighbors__P20486_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 487; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; + s.n___33820 = (r0); + r0 = pxsim_pxtcore_mkAction(1, o_inline__P33826); s.tmp_0 = r0; - s.tmp_3 = Sprite_height__P2398_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 363; s.pc = 2; return s.tmp_3; + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); + s.tmp_1 = helpers_arrayFilter__P18148_mk(s); + s.tmp_1.arg0 = s.n___33820; + s.tmp_1.arg1 = s.tmp_0; + s.callLocIdx = 489; s.pc = 2; return s.tmp_1; case 2: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + s.o___33824 = (r0); + r0 = s.o___33824; + return leave(s, r0) default: oops() } } } -Sprite_bottom__P2405.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__P2405.isGetter = true; +sprites_SpriteMap_overlaps__P20487.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_bottom__P2405_mk(s) { +function sprites_SpriteMap_overlaps__P20487_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_bottom__P2405, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_overlaps__P20487, 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, + n___33820: undefined, + o___33824: undefined, arg0: undefined, + arg1: undefined, } } -function Sprite_right__P2402(s) { +function o_inline__P33826(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33278,49 +36129,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, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P2400_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = Sprite_width__P2397_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_1 - s.tmp_2); - s.tmp_0.arg1 = r0; - s.callLocIdx = 357; s.pc = 1; return s.tmp_0; + s.tmp_0 = Sprite_overlapsWith__P20458_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.callLocIdx = 488; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_right__P2402.info = {"start":11367,"length":71,"line":410,"column":4,"endLine":412,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"right","argumentNames":["this","value"]} +o_inline__P33826.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} -function Sprite_right__P2402_mk(s) { +function o_inline__P33826_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P2402, depth: s.depth + 1, + parent: s, fn: o_inline__P33826, 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_right__P2401(s) { +function sprites_SpriteMap_neighbors__P20486(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33330,48 +36165,121 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.n___34091 = undefined; + s.layer___34093 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_1 = Sprite_left__P2399_mk(s); - s.tmp_1.arg0 = s.arg0; - s.callLocIdx = 354; s.pc = 1; return s.tmp_1; + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + r0 = pxsim_Array__mk(); + s.n___34091 = (r0); + r0 = s.arg1.fields["layer"]; + s.layer___34093 = (r0); + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P22800_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P20437_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 475; s.pc = 2; return s.tmp_1; + case 2: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P20441_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 476; s.pc = 3; return s.tmp_2; + case 3: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___34093; + s.tmp_0.arg4 = s.n___34091; + s.callLocIdx = 477; s.pc = 1; return s.tmp_0; case 1: r0 = s.retval; - s.tmp_0 = r0; - s.tmp_3 = Sprite_width__P2397_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 355; s.pc = 2; return s.tmp_3; - case 2: + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P22800_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_left__P20437_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 478; s.pc = 5; return s.tmp_1; + case 5: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P20443_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 479; s.pc = 6; return s.tmp_2; + case 6: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___34093; + s.tmp_0.arg4 = s.n___34091; + s.callLocIdx = 480; s.pc = 4; return s.tmp_0; + case 4: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P22800_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P20439_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 481; s.pc = 8; return s.tmp_1; + case 8: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_top__P20441_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 482; s.pc = 9; return s.tmp_2; + case 9: + r0 = s.retval; + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___34093; + s.tmp_0.arg4 = s.n___34091; + s.callLocIdx = 483; s.pc = 7; return s.tmp_0; + case 7: + r0 = s.retval; + s.tmp_0 = sprites_SpriteMap_mergeAtKey__P22800_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_1 = Sprite_right__P20439_mk(s); + s.tmp_1.arg0 = s.arg1; + s.callLocIdx = 484; s.pc = 11; return s.tmp_1; + case 11: + r0 = s.retval; + s.tmp_0.arg1 = r0; + s.tmp_2 = Sprite_bottom__P20443_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 485; s.pc = 12; return s.tmp_2; + case 12: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_0 + s.tmp_2); - return leaveAccessor(s, r0) + s.tmp_0.arg2 = r0; + s.tmp_0.arg3 = s.layer___34093; + s.tmp_0.arg4 = s.n___34091; + s.callLocIdx = 486; s.pc = 10; return s.tmp_0; + case 10: + r0 = s.retval; + r0 = pxsim_Array_.removeElement(s.n___34091, s.arg1); + r0 = s.n___34091; + return leave(s, r0) default: oops() } } } -Sprite_right__P2401.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__P2401.isGetter = true; +sprites_SpriteMap_neighbors__P20486.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 Sprite_right__P2401_mk(s) { +function sprites_SpriteMap_neighbors__P20486_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_right__P2401, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_neighbors__P20486, 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, + n___34091: undefined, + layer___34093: undefined, arg0: undefined, + arg1: undefined, } } -function ArcadePhysicsEngine_spriteCollisions__P4798(s) { +function sprites_SpriteMap_mergeAtKey__P22800(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33381,189 +36289,83 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ms___15645 = undefined; - s.unnamed76___U1 = undefined; - s.unnamed77___U2 = undefined; - s.sprite___15647 = undefined; - s.overSprites___15654 = undefined; - s.overlapper___15662 = undefined; - s.unnamed78___U6 = undefined; - s.unnamed79___U7 = undefined; - s.thisKind___15668 = undefined; - s.otherKind___15672 = undefined; - s.higher___15685 = undefined; - s.lower___15694 = undefined; + s.k___34142 = undefined; + s.bucket___34147 = undefined; + s.sprite___34154 = 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__C2527_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); + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P22798_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 513; s.pc = 9; return s.tmp_0; + case 9: + r0 = s.retval; + s.k___34142 = (r0); + r0 = s.arg0.fields["buckets"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - { step = 21; continue; } + r0 = pxsim_Array__getAt(s.tmp_0, s.k___34142); + s.bucket___34147 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___34147); + if (!r0) { step = 7; continue; } + s.sprite___34154 = (undefined); + s.unnamed164___U3 = (s.bucket___34147); + s.unnamed165___U4 = (0); case 1: - case 2: - s.ms___15645 = (undefined); - s.unnamed76___U1 = (s.arg1); - s.unnamed77___U2 = (0); - case 3: - s.tmp_0 = r0 = s.unnamed77___U2; - r0 = pxsim_Array__length(s.unnamed76___U1); + 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 = 20; continue; } - r0 = pxsim_Array__getAt(s.unnamed76___U1, s.unnamed77___U2); - s.ms___15645 = (r0); - r0 = s.ms___15645.fields["sprite"]; - s.sprite___15647 = (r0); - r0 = s.sprite___15647.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 = 6; continue; } + r0 = pxsim_Array__getAt(s.unnamed164___U3, s.unnamed165___U4); + s.sprite___34154 = (r0); + r0 = s.sprite___34154.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___34154, 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; } - { step = 19; continue; } + r0 = pxsim_Array__push(s.arg4, s.sprite___34154); case 4: case 5: - s.tmp_2 = sprites_SpriteMap_overlaps__P2449_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_2.arg0 = r0; - r0 = s.ms___15645.fields["sprite"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 610; s.pc = 22; return s.tmp_2; - case 22: - r0 = s.retval; - s.overSprites___15654 = (r0); - s.overlapper___15662 = (undefined); - s.unnamed78___U6 = (s.overSprites___15654); - s.unnamed79___U7 = (0); + r0 = (s.unnamed165___U4 + 1); + s.unnamed165___U4 = (r0); + { step = 1; continue; } case 6: - s.tmp_0 = r0 = s.unnamed79___U7; - r0 = pxsim_Array__length(s.unnamed78___U6); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 18; continue; } - r0 = pxsim_Array__getAt(s.unnamed78___U6, s.unnamed79___U7); - s.overlapper___15662 = (r0); - r0 = s.overlapper___15662.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; } + s.unnamed164___U3 = (undefined); case 7: case 8: - r0 = s.sprite___15647.fields["_kind"]; - s.thisKind___15668 = (r0); - r0 = s.overlapper___15662.fields["_kind"]; - s.otherKind___15672 = (r0); - r0 = s.sprite___15647.fields["_kindsOverlappedWith"]; - s.tmp_2 = r0; - r0 = pxsim_Array_.indexOf(s.tmp_2, s.otherKind___15672, 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___15647.fields["id"]; - s.tmp_4 = r0; - r0 = s.overlapper___15662.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___15647; - { step = 12; continue; } - case 11: - r0 = s.overlapper___15662; - case 12: - // jmp value (already in r0) - s.tmp_6 = r0; - s.higher___15685 = (s.tmp_6); - r0 = (s.higher___15685 === s.sprite___15647); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 13; continue; } - r0 = s.overlapper___15662; - { step = 14; continue; } - case 13: - r0 = s.sprite___15647; - case 14: - // jmp value (already in r0) - s.tmp_1 = r0; - s.lower___15694 = (s.tmp_1); - r0 = s.higher___15685.fields["_overlappers"]; - s.tmp_2 = r0; - r0 = s.lower___15694.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__P15714); - s.tmp_4 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_4, 0, s.thisKind___15668); - r0 = pxsim_pxtrt_stclo(s.tmp_4, 1, s.otherKind___15672); - r0 = pxsim_pxtcore_mkAction(5, ArcadePhysicsEngine_spriteCollisions_inline__P15738); - s.tmp_5 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_5, 0, s.higher___15685); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 1, s.lower___15694); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 2, s.sprite___15647); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 3, s.overlapper___15662); - r0 = pxsim_pxtrt_stclo(s.tmp_5, 4, s.thisKind___15668); - s.tmp_6 = helpers_arrayForEach__P109_mk(s); - s.tmp_7 = helpers_arrayFilter__P110_mk(s); - s.tmp_7.arg0 = s.arg2; - s.tmp_7.arg1 = s.tmp_4; - s.callLocIdx = 613; 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 = 615; s.pc = 23; return s.tmp_6; - case 23: - r0 = s.retval; - case 15: - case 16: - case 17: - r0 = (s.unnamed79___U7 + 1); - s.unnamed79___U7 = (r0); - { step = 6; continue; } - case 18: - s.unnamed78___U6 = (undefined); - case 19: - r0 = (s.unnamed77___U2 + 1); - s.unnamed77___U2 = (r0); - { step = 3; continue; } - case 20: - s.unnamed76___U1 = (undefined); - case 21: r0 = undefined; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions__P4798.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"]} +sprites_SpriteMap_mergeAtKey__P22800.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_spriteCollisions__P4798_mk(s) { +function sprites_SpriteMap_mergeAtKey__P22800_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions__P4798, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_mergeAtKey__P22800, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -33571,30 +36373,23 @@ function ArcadePhysicsEngine_spriteCollisions__P4798_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - tmp_6: undefined, - tmp_7: undefined, - ms___15645: undefined, - unnamed76___U1: undefined, - unnamed77___U2: undefined, - sprite___15647: undefined, - overSprites___15654: undefined, - overlapper___15662: undefined, - unnamed78___U6: undefined, - unnamed79___U7: undefined, - thisKind___15668: undefined, - otherKind___15672: undefined, - higher___15685: undefined, - lower___15694: undefined, + k___34142: undefined, + bucket___34147: undefined, + sprite___34154: undefined, + unnamed164___U3: undefined, + unnamed165___U4: undefined, arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, + arg4: undefined, } } -function forEach_inline__P15714(s) { +function sprites_SpriteMap_key__P22798(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33604,77 +36399,71 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.xi___34175 = undefined; + s.yi___34187 = 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.fields["kind"]; + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.tmp_0 = Math_clamp__P18165_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 = (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 = pxsim.Math_.idiv(s.arg1, s.tmp_1); + s.tmp_0.arg2 = r0; + s.callLocIdx = 501; 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]); + r0 = s.retval; + s.xi___34175 = (r0); + s.tmp_0 = Math_clamp__P18165_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 = 502; s.pc = 2; return s.tmp_0; 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; + r0 = s.retval; + s.yi___34187 = (r0); + s.tmp_0 = r0 = s.xi___34175; + r0 = s.arg0.fields["columnCount"]; + s.tmp_2 = r0; + r0 = (s.yi___34187 * s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); return leave(s, r0) default: oops() } } } -forEach_inline__P15714.info = {"start":11113,"length":137,"line":335,"column":32,"endLine":336,"endColumn":81,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} +sprites_SpriteMap_key__P22798.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 forEach_inline__P15714_mk(s) { +function sprites_SpriteMap_key__P22798_mk(s) { checkStack(s.depth); return { - parent: s, fn: forEach_inline__P15714, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_key__P22798, 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, + xi___34175: undefined, + yi___34187: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function ArcadePhysicsEngine_spriteCollisions_inline__P15738(s) { +function Sprite_overlapsWith__P20458(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33684,126 +36473,358 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.A___33904 = undefined; + s.B___33905 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); 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__P15748); - 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() -} } } -ArcadePhysicsEngine_spriteCollisions_inline__P15738.info = {"start":11310,"length":652,"line":338,"column":33,"endLine":349,"endColumn":25,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":["h"]} - -function ArcadePhysicsEngine_spriteCollisions_inline__P15738_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P15738, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - arg0: undefined, -} } - - - - - -function ArcadePhysicsEngine_spriteCollisions_inline__P15748(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 = 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); + r0 = s.arg0; + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = (s.arg1 == s.arg0); 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; } + r0 = false; + { step = 27; 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); + r0 = s.arg0.fields["flags"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 & 4610); + s.tmp_1 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_1); if (!r0) { step = 3; continue; } - r0 = s.caps[1]; - { step = 4; continue; } + r0 = false; + { step = 27; continue; } case 3: - r0 = s.caps[0]; 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.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__P20261_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_9.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_9.arg1 = r0; + s.callLocIdx = 383; 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__P20261_mk(s); + r0 = s.arg1.fields["_hitbox"]; + s.tmp_13.arg0 = r0; + r0 = s.arg0.fields["_hitbox"]; + s.tmp_13.arg1 = r0; + s.callLocIdx = 384; 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; - 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 = 614; 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 = 614; s.pc = 7; return s.tmp_12; } - else if (s.tmp_12.fn.isGetter) { s.tmp_12.stage2Call = true; s.callLocIdx = 614; s.pc = 7; return s.tmp_12;; } - else { s.callLocIdx = 614; s.pc = 7; return s.tmp_12; } - } - case 7: + 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__P22791_mk(s); + s.tmp_17.arg0 = s.arg0; + s.callLocIdx = 385; s.pc = 30; return s.tmp_17; + case 30: 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_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__P22791_mk(s); + s.tmp_20.arg0 = s.arg1; + s.callLocIdx = 386; 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__P20437_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 387; s.pc = 32; return s.tmp_26; + case 32: + r0 = s.retval; + s.tmp_25 = r0; + s.tmp_28 = Sprite_left__P20437_mk(s); + s.tmp_28.arg0 = s.arg1; + s.callLocIdx = 388; 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__P20441_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 389; s.pc = 34; return s.tmp_31; + case 34: + r0 = s.retval; + s.tmp_30 = r0; + s.tmp_33 = Sprite_top__P20441_mk(s); + s.tmp_33.arg0 = s.arg1; + s.callLocIdx = 390; 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__P20408_mk(s); + s.tmp_36.arg0 = s.arg0; + s.callLocIdx = 391; 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__P20410_mk(s); + s.tmp_38.arg0 = s.arg0; + s.callLocIdx = 392; 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__P20408_mk(s); + s.tmp_41.arg0 = s.arg1; + s.callLocIdx = 393; 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__P20410_mk(s); + s.tmp_44.arg0 = s.arg1; + s.callLocIdx = 394; 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__P20408_mk(s); + s.tmp_49.arg0 = s.arg0; + s.callLocIdx = 395; s.pc = 40; return s.tmp_49; + case 40: + r0 = s.retval; + s.tmp_48 = r0; + s.tmp_51 = Sprite_sy__P20410_mk(s); + s.tmp_51.arg0 = s.arg0; + s.callLocIdx = 396; 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__P20408_mk(s); + s.tmp_54.arg0 = s.arg1; + s.callLocIdx = 397; s.pc = 42; return s.tmp_54; + case 42: + r0 = s.retval; + s.tmp_53 = r0; + s.tmp_56 = Sprite_sy__P20410_mk(s); + s.tmp_56.arg0 = s.arg1; + s.callLocIdx = 398; 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___33904 = (s.arg0); + s.B___33905 = (s.arg1); + { step = 25; continue; } + case 24: + s.A___33904 = (s.arg1); + s.B___33905 = (s.arg0); + case 25: + s.tmp_0 = helpers_imageBlit__P19991_mk(s); + r0 = s.A___33904.fields["_image"]; + s.tmp_0.arg0 = r0; + s.tmp_3 = Sprite_left__P20437_mk(s); + s.tmp_3.arg0 = s.B___33905; + s.callLocIdx = 400; s.pc = 45; return s.tmp_3; + case 45: + r0 = s.retval; + s.tmp_2 = r0; + s.tmp_5 = Sprite_left__P20437_mk(s); + s.tmp_5.arg0 = s.A___33904; + s.callLocIdx = 401; 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_Array_.removeElement(s.tmp_0, s.tmp_1); + s.tmp_7 = Sprite_sx__P20408_mk(s); + s.tmp_7.arg0 = s.A___33904; + s.callLocIdx = 402; 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__P20441_mk(s); + s.tmp_10.arg0 = s.B___33905; + s.callLocIdx = 403; s.pc = 48; return s.tmp_10; + case 48: + r0 = s.retval; + s.tmp_9 = r0; + s.tmp_12 = Sprite_top__P20441_mk(s); + s.tmp_12.arg0 = s.A___33904; + s.callLocIdx = 404; 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__P20410_mk(s); + s.tmp_14.arg0 = s.A___33904; + s.callLocIdx = 405; 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__P20435_mk(s); + s.tmp_16.arg0 = s.B___33905; + s.callLocIdx = 406; s.pc = 51; return s.tmp_16; + case 51: + r0 = s.retval; + s.tmp_15 = r0; + s.tmp_18 = Sprite_sx__P20408_mk(s); + s.tmp_18.arg0 = s.A___33904; + s.callLocIdx = 407; 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__P20436_mk(s); + s.tmp_20.arg0 = s.B___33905; + s.callLocIdx = 408; s.pc = 53; return s.tmp_20; + case 53: + r0 = s.retval; + s.tmp_19 = r0; + s.tmp_22 = Sprite_sy__P20410_mk(s); + s.tmp_22.arg0 = s.A___33904; + s.callLocIdx = 409; 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___33905.fields["_image"]; + s.tmp_0.arg5 = r0; + s.tmp_0.arg6 = 0; + s.tmp_0.arg7 = 0; + r0 = s.B___33905.fields["_image"]; + s.tmp_23 = r0; + r0 = pxsim_ImageMethods.width(s.tmp_23); + s.tmp_0.arg8 = r0; + r0 = s.B___33905.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 = 413; s.pc = 44; return s.tmp_0; + case 44: + r0 = s.retval; + { step = 27; continue; } + case 26: r0 = undefined; + case 27: return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_spriteCollisions_inline__P15748.info = {"start":11431,"length":503,"line":340,"column":50,"endLine":348,"endColumn":29,"fileName":"pxt_modules/game/physics.ts","functionName":"inline","argumentNames":[]} +Sprite_overlapsWith__P20458.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 ArcadePhysicsEngine_spriteCollisions_inline__P15748_mk(s) { +function Sprite_overlapsWith__P20458_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_spriteCollisions_inline__P15748, depth: s.depth + 1, + parent: s, fn: Sprite_overlapsWith__P20458, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -33818,13 +36839,61 @@ function ArcadePhysicsEngine_spriteCollisions_inline__P15748_mk(s) { 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___33904: undefined, + B___33905: undefined, + arg0: undefined, + arg1: undefined, } } -function sprites_SpriteMap_overlaps__P2449(s) { +function Sprite_isScaled__P22791(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33834,56 +36903,50 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___15782 = undefined; - s.o___15786 = 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__C2446_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_neighbors__P2448_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 487; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - s.n___15782 = (r0); - r0 = pxsim_pxtcore_mkAction(1, o_inline__P15788); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_sx"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 !== 256); s.tmp_0 = r0; - r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg1); - s.tmp_1 = helpers_arrayFilter__P110_mk(s); - s.tmp_1.arg0 = s.n___15782; - s.tmp_1.arg1 = s.tmp_0; - s.callLocIdx = 489; s.pc = 2; 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.arg0.fields["_sy"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 !== 256); case 2: - r0 = s.retval; - s.o___15786 = (r0); - r0 = s.o___15786; + // jmp value (already in r0) + s.tmp_3 = r0; + r0 = s.tmp_3; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_overlaps__P2449.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_isScaled__P22791.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} -function sprites_SpriteMap_overlaps__P2449_mk(s) { +function Sprite_isScaled__P22791_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_overlaps__P2449, depth: s.depth + 1, + parent: s, fn: Sprite_isScaled__P22791, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, - n___15782: undefined, - o___15786: undefined, + tmp_2: undefined, + tmp_3: undefined, arg0: undefined, - arg1: undefined, } } -function o_inline__P15788(s) { +function game_Hitbox_overlapsWith__P20261(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33895,33 +36958,266 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = Sprite_overlapsWith__P2420_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.callLocIdx = 488; s.pc = 1; return s.tmp_0; + r0 = s.arg0; + if (!checkSubtype(r0, game_Hitbox__C20246_VT)) failedCast(r0); + s.tmp_0 = game_Hitbox_updateIfInvalid__P20260_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 249; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + s.tmp_0 = game_Hitbox_updateIfInvalid__P20260_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 250; s.pc = 19; return s.tmp_0; + case 19: + r0 = s.retval; + s.tmp_1 = game_Hitbox_contains__P20259_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = game_Hitbox_left__P20254_mk(s); + s.tmp_2.arg0 = s.arg1; + s.callLocIdx = 251; s.pc = 21; return s.tmp_2; + case 21: + r0 = s.retval; + s.tmp_1.arg1 = r0; + s.tmp_3 = game_Hitbox_top__P20255_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 252; s.pc = 22; return s.tmp_3; + case 22: + r0 = s.retval; + s.tmp_1.arg2 = r0; + s.callLocIdx = 253; s.pc = 20; return s.tmp_1; + case 20: + r0 = s.retval; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + r0 = true; + { step = 17; continue; } case 1: + case 2: + s.tmp_5 = game_Hitbox_contains__P20259_mk(s); + s.tmp_5.arg0 = s.arg0; + s.tmp_6 = game_Hitbox_left__P20254_mk(s); + s.tmp_6.arg0 = s.arg1; + s.callLocIdx = 254; s.pc = 24; return s.tmp_6; + case 24: + r0 = s.retval; + s.tmp_5.arg1 = r0; + s.tmp_7 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_7.arg0 = s.arg1; + s.callLocIdx = 255; s.pc = 25; return s.tmp_7; + case 25: + r0 = s.retval; + s.tmp_5.arg2 = r0; + s.callLocIdx = 256; 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; } + case 3: + case 4: + s.tmp_9 = game_Hitbox_contains__P20259_mk(s); + s.tmp_9.arg0 = s.arg0; + s.tmp_10 = game_Hitbox_right__P20256_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 257; s.pc = 27; return s.tmp_10; + case 27: + r0 = s.retval; + s.tmp_9.arg1 = r0; + s.tmp_11 = game_Hitbox_top__P20255_mk(s); + s.tmp_11.arg0 = s.arg1; + s.callLocIdx = 258; s.pc = 28; return s.tmp_11; + case 28: + r0 = s.retval; + s.tmp_9.arg2 = r0; + s.callLocIdx = 259; s.pc = 26; return s.tmp_9; + case 26: + r0 = s.retval; + s.tmp_8 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_8); + if (!r0) { step = 5; continue; } + r0 = true; + { step = 17; continue; } + case 5: + case 6: + s.tmp_13 = game_Hitbox_contains__P20259_mk(s); + s.tmp_13.arg0 = s.arg0; + s.tmp_14 = game_Hitbox_right__P20256_mk(s); + s.tmp_14.arg0 = s.arg1; + s.callLocIdx = 260; s.pc = 30; return s.tmp_14; + case 30: + r0 = s.retval; + s.tmp_13.arg1 = r0; + s.tmp_15 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_15.arg0 = s.arg1; + s.callLocIdx = 261; s.pc = 31; return s.tmp_15; + case 31: + r0 = s.retval; + s.tmp_13.arg2 = r0; + s.callLocIdx = 262; 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: + case 8: + s.tmp_17 = game_Hitbox_contains__P20259_mk(s); + s.tmp_17.arg0 = s.arg1; + s.tmp_18 = game_Hitbox_left__P20254_mk(s); + s.tmp_18.arg0 = s.arg0; + s.callLocIdx = 263; s.pc = 33; return s.tmp_18; + case 33: + r0 = s.retval; + s.tmp_17.arg1 = r0; + s.tmp_19 = game_Hitbox_top__P20255_mk(s); + s.tmp_19.arg0 = s.arg0; + s.callLocIdx = 264; s.pc = 34; return s.tmp_19; + case 34: + r0 = s.retval; + s.tmp_17.arg2 = r0; + s.callLocIdx = 265; 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: + case 10: + s.tmp_21 = game_Hitbox_contains__P20259_mk(s); + s.tmp_21.arg0 = s.arg1; + s.tmp_22 = game_Hitbox_left__P20254_mk(s); + s.tmp_22.arg0 = s.arg0; + s.callLocIdx = 266; s.pc = 36; return s.tmp_22; + case 36: + r0 = s.retval; + s.tmp_21.arg1 = r0; + s.tmp_23 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_23.arg0 = s.arg0; + s.callLocIdx = 267; s.pc = 37; return s.tmp_23; + case 37: + r0 = s.retval; + s.tmp_21.arg2 = r0; + s.callLocIdx = 268; 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__P20259_mk(s); + s.tmp_25.arg0 = s.arg1; + s.tmp_26 = game_Hitbox_right__P20256_mk(s); + s.tmp_26.arg0 = s.arg0; + s.callLocIdx = 269; s.pc = 39; return s.tmp_26; + case 39: + r0 = s.retval; + s.tmp_25.arg1 = r0; + s.tmp_27 = game_Hitbox_top__P20255_mk(s); + s.tmp_27.arg0 = s.arg0; + s.callLocIdx = 270; s.pc = 40; return s.tmp_27; + case 40: + r0 = s.retval; + s.tmp_25.arg2 = r0; + s.callLocIdx = 271; 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__P20259_mk(s); + s.tmp_29.arg0 = s.arg1; + s.tmp_30 = game_Hitbox_right__P20256_mk(s); + s.tmp_30.arg0 = s.arg0; + s.callLocIdx = 272; s.pc = 42; return s.tmp_30; + case 42: + r0 = s.retval; + s.tmp_29.arg1 = r0; + s.tmp_31 = game_Hitbox_bottom__P20257_mk(s); + s.tmp_31.arg0 = s.arg0; + s.callLocIdx = 273; s.pc = 43; return s.tmp_31; + case 43: + r0 = s.retval; + s.tmp_29.arg2 = r0; + s.callLocIdx = 274; 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: + r0 = false; + case 17: return leave(s, r0) default: oops() } } } -o_inline__P15788.info = {"start":1037,"length":41,"line":32,"column":31,"endLine":32,"endColumn":72,"fileName":"pxt_modules/game/spritemap.ts","functionName":"inline","argumentNames":["neighbor"]} +game_Hitbox_overlapsWith__P20261.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 o_inline__P15788_mk(s) { +function game_Hitbox_overlapsWith__P20261_mk(s) { checkStack(s.depth); return { - parent: s, fn: o_inline__P15788, depth: s.depth + 1, + parent: s, fn: game_Hitbox_overlapsWith__P20261, 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, arg0: undefined, + arg1: undefined, } } -function sprites_SpriteMap_neighbors__P2448(s) { +function game_Hitbox_contains__P20259(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -33931,121 +37227,108 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.n___16053 = undefined; - s.layer___16055 = 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__C2446_VT)) failedCast(r0); - r0 = pxsim_Array__mk(); - s.n___16053 = (r0); - r0 = s.arg1.fields["layer"]; - s.layer___16055 = (r0); - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P4762_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P2399_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 475; s.pc = 2; return s.tmp_1; - case 2: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P2403_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 476; s.pc = 3; return s.tmp_2; - case 3: + if (!checkSubtype(r0, game_Hitbox__C20246_VT)) failedCast(r0); + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = game_Hitbox_left__P20254_mk(s); + s.tmp_3.arg0 = s.arg0; + s.callLocIdx = 229; s.pc = 7; return s.tmp_3; + case 7: r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___16055; - s.tmp_0.arg4 = s.n___16053; - s.callLocIdx = 477; s.pc = 1; return s.tmp_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_0 = sprites_SpriteMap_mergeAtKey__P4762_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_left__P2399_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 478; s.pc = 5; return s.tmp_1; - case 5: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P2405_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 479; s.pc = 6; return s.tmp_2; - case 6: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___16055; - s.tmp_0.arg4 = s.n___16053; - s.callLocIdx = 480; s.pc = 4; return s.tmp_0; - case 4: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P4762_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P2401_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 481; s.pc = 8; return s.tmp_1; + s.tmp_4 = r0 = s.arg1; + s.tmp_6 = game_Hitbox_right__P20256_mk(s); + s.tmp_6.arg0 = s.arg0; + s.callLocIdx = 230; s.pc = 8; return s.tmp_6; case 8: r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_top__P2403_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 482; s.pc = 9; return s.tmp_2; + 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__P20255_mk(s); + s.tmp_10.arg0 = s.arg0; + s.callLocIdx = 231; s.pc = 9; return s.tmp_10; case 9: r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___16055; - s.tmp_0.arg4 = s.n___16053; - s.callLocIdx = 483; s.pc = 7; return s.tmp_0; - case 7: - r0 = s.retval; - s.tmp_0 = sprites_SpriteMap_mergeAtKey__P4762_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_1 = Sprite_right__P2401_mk(s); - s.tmp_1.arg0 = s.arg1; - s.callLocIdx = 484; s.pc = 11; return s.tmp_1; - case 11: - r0 = s.retval; - s.tmp_0.arg1 = r0; - s.tmp_2 = Sprite_bottom__P2405_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 485; s.pc = 12; return s.tmp_2; - case 12: - r0 = s.retval; - s.tmp_0.arg2 = r0; - s.tmp_0.arg3 = s.layer___16055; - s.tmp_0.arg4 = s.n___16053; - s.callLocIdx = 486; s.pc = 10; return s.tmp_0; + 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__P20257_mk(s); + s.tmp_14.arg0 = s.arg0; + s.callLocIdx = 232; s.pc = 10; return s.tmp_14; case 10: r0 = s.retval; - r0 = pxsim_Array_.removeElement(s.n___16053, s.arg1); - r0 = s.n___16053; + 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() } } } -sprites_SpriteMap_neighbors__P2448.info = {"start":376,"length":442,"line":15,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"neighbors","argumentNames":["this","sprite"]} +game_Hitbox_contains__P20259.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 sprites_SpriteMap_neighbors__P2448_mk(s) { +function game_Hitbox_contains__P20259_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_neighbors__P2448, depth: s.depth + 1, + parent: s, fn: game_Hitbox_contains__P20259, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - n___16053: undefined, - layer___16055: 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 sprites_SpriteMap_mergeAtKey__P4762(s) { +function helpers_imageBlit__P19991(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34055,107 +37338,116 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___16104 = undefined; - s.bucket___16109 = undefined; - s.sprite___16116 = undefined; - s.unnamed72___U3 = undefined; - s.unnamed73___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.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, sprites_SpriteMap__C2446_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P4760_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 513; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.k___16104 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___16104); - s.bucket___16109 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___16109); - if (!r0) { step = 7; continue; } - s.sprite___16116 = (undefined); - s.unnamed72___U3 = (s.bucket___16109); - s.unnamed73___U4 = (0); + s.tmp_0 = r0 = globals._blitArgs___22620; + 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.unnamed73___U4; - r0 = pxsim_Array__length(s.unnamed72___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed72___U3, s.unnamed73___U4); - s.sprite___16116 = (r0); - r0 = s.sprite___16116.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; } + r0 = pxsim_Array__mk(); case 2: - r0 = pxsim_Array_.indexOf(s.arg4, s.sprite___16116, undefined); - s.tmp_4 = r0; - r0 = (s.tmp_4 < 0); + // jmp value (already in r0) + s.tmp_1 = r0; + globals._blitArgs___22620 = (s.tmp_1); + s.tmp_0 = r0 = globals._blitArgs___22620; + 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___22620; + 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___22620; + 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___22620; + 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___22620; + 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___22620; + 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___22620; + 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___22620; + 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: - // 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___16116); + r0 = 0; case 4: + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(globals._blitArgs___22620, 8, s.tmp_0); + r0 = pxsim_numops_toBoolDecr(s.arg11); + if (!r0) { step = 5; continue; } + r0 = 1; + { step = 6; continue; } case 5: - r0 = (s.unnamed73___U4 + 1); - s.unnamed73___U4 = (r0); - { step = 1; continue; } + r0 = 0; case 6: - s.unnamed72___U3 = (undefined); - case 7: - case 8: - r0 = undefined; + // jmp value (already in r0) + s.tmp_0 = r0; + r0 = pxsim_Array_.setAt(globals._blitArgs___22620, 9, s.tmp_0); + r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___22620); return leave(s, r0) default: oops() } } } -sprites_SpriteMap_mergeAtKey__P4762.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"]} +helpers_imageBlit__P19991.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 sprites_SpriteMap_mergeAtKey__P4762_mk(s) { +function helpers_imageBlit__P19991_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_mergeAtKey__P4762, depth: s.depth + 1, + parent: s, fn: helpers_imageBlit__P19991, 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___16104: undefined, - bucket___16109: undefined, - sprite___16116: undefined, - unnamed72___U3: undefined, - unnamed73___U4: 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 sprites_SpriteMap_key__P4760(s) { +function ArcadePhysicsEngine_createMovingSprite__P22835(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34165,432 +37457,592 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.xi___16137 = undefined; - s.yi___16149 = undefined; + s.ovx___34530 = undefined; + s.ovy___34535 = undefined; + s.fx___34562 = undefined; + s.c___34569 = undefined; + s.fy___34612 = undefined; + s.c___34619 = undefined; + s.dx___34658 = undefined; + s.dy___34671 = undefined; + s.xStep___34684 = undefined; + s.yStep___34686 = 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__C2446_VT)) failedCast(r0); - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg0.fields["columnCount"]; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + s.tmp_0 = ArcadePhysicsEngine_constrain__P22841_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; 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 = 501; s.pc = 1; return s.tmp_0; - case 1: + s.callLocIdx = 573; s.pc = 25; return s.tmp_0; + case 25: r0 = s.retval; - s.xi___16137 = (r0); - s.tmp_0 = Math_clamp__P127_mk(s); - s.tmp_0.arg0 = 0; - r0 = s.arg0.fields["rowCount"]; + s.ovx___34530 = (r0); + s.tmp_0 = ArcadePhysicsEngine_constrain__P22841_mk(s); + s.tmp_0.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; 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 = 502; s.pc = 2; return s.tmp_0; - case 2: + s.callLocIdx = 574; s.pc = 26; return s.tmp_0; + case 26: r0 = s.retval; - s.yi___16149 = (r0); - s.tmp_0 = r0 = s.xi___16137; - r0 = s.arg0.fields["columnCount"]; - s.tmp_2 = r0; - r0 = (s.yi___16149 * s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leave(s, r0) - default: oops() -} } } -sprites_SpriteMap_key__P4760.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__P4760_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_SpriteMap_key__P4760, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, - tmp_2: undefined, - xi___16137: undefined, - yi___16149: undefined, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function Sprite_overlapsWith__P2420(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___15866 = undefined; - s.B___15867 = undefined; - if (s.lambdaArgs) { - s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); - s.lambdaArgs = null; - } - r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - r0 = (s.arg1 == s.arg0); + s.ovy___34535 = (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; } - r0 = false; - { step = 27; 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: - case 2: - r0 = s.arg0.fields["flags"]; + 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"]; s.tmp_2 = r0; - r0 = (s.tmp_2 & 4610); + r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); + r0 = pxsim.Math_.idiv(s.tmp_1, 1000); + s.fx___34562 = (r0); + r0 = s.arg1.fields["_vx"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fx___34562); + s.c___34569 = (r0); + r0 = (s.c___34569 < 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__P18204_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.fx___34562); + s.tmp_3.arg1 = r0; + s.callLocIdx = 582; 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___34569 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 3; continue; } - r0 = false; - { step = 27; continue; } + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P18205_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vx"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fx___34562); + s.tmp_3.arg1 = r0; + s.callLocIdx = 584; 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["_vx"] = (0); 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.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); + r0 = s.arg1.fields["_ay"]; + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - s.tmp_9 = game_Hitbox_overlapsWith__P2223_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_9.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_9.arg1 = r0; - s.callLocIdx = 383; s.pc = 28; return s.tmp_9; - case 28: - r0 = s.retval; - { step = 27; 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; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 16; continue; } case 9: - case 10: - s.tmp_13 = game_Hitbox_overlapsWith__P2223_mk(s); - r0 = s.arg1.fields["_hitbox"]; - s.tmp_13.arg0 = r0; - r0 = s.arg0.fields["_hitbox"]; - s.tmp_13.arg1 = r0; - s.callLocIdx = 384; s.pc = 29; return s.tmp_13; + 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___34612 = (r0); + r0 = s.arg1.fields["_vy"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 - s.fy___34612); + s.c___34619 = (r0); + r0 = (s.c___34619 < 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__P18204_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.fy___34612); + s.tmp_3.arg1 = r0; + s.callLocIdx = 592; s.pc = 29; return s.tmp_3; 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); + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["_vy"] = (s.tmp_2); + { step = 13; continue; } + case 10: + r0 = (s.c___34619 > 0); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 11; continue; } - r0 = false; - { step = 27; continue; } - case 11: - case 12: - s.tmp_17 = Sprite_isScaled__P4753_mk(s); - s.tmp_17.arg0 = s.arg0; - s.callLocIdx = 385; s.pc = 30; return s.tmp_17; + s.tmp_1 = r0 = s.arg1; + s.tmp_3 = Fx_max__P18205_mk(s); + s.tmp_3.arg0 = 0; + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 - s.fy___34612); + s.tmp_3.arg1 = r0; + s.callLocIdx = 594; s.pc = 30; return s.tmp_3; 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; } + 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: - s.tmp_20 = Sprite_isScaled__P4753_mk(s); - s.tmp_20.arg0 = s.arg1; - s.callLocIdx = 386; s.pc = 31; return s.tmp_20; + case 14: + case 15: + case 16: + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = ArcadePhysicsEngine_constrain__P22841_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vx"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 595; s.pc = 31; return s.tmp_2; 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__P2399_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 387; s.pc = 32; return s.tmp_26; + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["_vx"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg1; + s.tmp_2 = ArcadePhysicsEngine_constrain__P22841_mk(s); + s.tmp_2.arg0 = s.arg0; + r0 = s.arg1.fields["_vy"]; + s.tmp_2.arg1 = r0; + s.callLocIdx = 596; s.pc = 32; return s.tmp_2; case 32: r0 = s.retval; - s.tmp_25 = r0; - s.tmp_28 = Sprite_left__P2399_mk(s); - s.tmp_28.arg0 = s.arg1; - s.callLocIdx = 388; s.pc = 33; return s.tmp_28; + 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___34530); + 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.dx___34658 = (r0); + r0 = s.arg1.fields["_vy"]; + s.tmp_4 = r0; + r0 = (s.tmp_4 + s.ovy___34535); + 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___34671 = (r0); + s.xStep___34684 = (s.dx___34658); + s.yStep___34686 = (s.dy___34671); + case 17: + s.tmp_2 = Fx_abs__P18203_mk(s); + s.tmp_2.arg0 = s.xStep___34684; + s.callLocIdx = 603; s.pc = 33; return s.tmp_2; 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__P2403_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 389; s.pc = 34; return s.tmp_31; - case 34: - r0 = s.retval; - s.tmp_30 = r0; - s.tmp_33 = Sprite_top__P2403_mk(s); - s.tmp_33.arg0 = s.arg1; - s.callLocIdx = 390; 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__P2370_mk(s); - s.tmp_36.arg0 = s.arg0; - s.callLocIdx = 391; 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__P2372_mk(s); - s.tmp_38.arg0 = s.arg0; - s.callLocIdx = 392; 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); + 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 = 18; continue; } - r0 = s.tmp_39; + r0 = s.tmp_0; { step = 19; continue; } case 18: - s.tmp_41 = Sprite_sx__P2370_mk(s); - s.tmp_41.arg0 = s.arg1; - s.callLocIdx = 393; s.pc = 38; return s.tmp_41; - case 38: + s.tmp_5 = Fx_abs__P18203_mk(s); + s.tmp_5.arg0 = s.yStep___34686; + s.callLocIdx = 604; s.pc = 34; return s.tmp_5; + case 34: r0 = s.retval; - s.tmp_40 = r0; - r0 = (s.tmp_40 == 0); + s.tmp_4 = r0; + 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_42 = r0; - r0 = pxsim_numops_toBool(s.tmp_42); + s.tmp_7 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_7); + if (!r0) { step = 24; continue; } + s.tmp_10 = Fx_abs__P18203_mk(s); + s.tmp_10.arg0 = s.xStep___34684; + s.callLocIdx = 605; s.pc = 35; return s.tmp_10; + case 35: + r0 = s.retval; + s.tmp_9 = r0; + r0 = s.arg0.fields["minSingleStep"]; + 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 = s.tmp_42; - { step = 21; continue; } + r0 = pxsim.Math_.idiv(s.xStep___34684, 2); + s.xStep___34684 = (r0); case 20: - s.tmp_44 = Sprite_sy__P2372_mk(s); - s.tmp_44.arg0 = s.arg1; - s.callLocIdx = 394; 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); + s.tmp_2 = Fx_abs__P18203_mk(s); + s.tmp_2.arg0 = s.yStep___34686; + s.callLocIdx = 607; 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 = false; - { step = 27; continue; } + r0 = pxsim.Math_.idiv(s.yStep___34686, 2); + s.yStep___34686 = (r0); case 22: case 23: - s.tmp_49 = Sprite_sx__P2370_mk(s); - s.tmp_49.arg0 = s.arg0; - s.callLocIdx = 395; s.pc = 40; return s.tmp_49; - case 40: + { step = 17; continue; } + case 24: + r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C20563_VT); + s.tmp_0 = r0; + s.tmp_1 = MovingSprite_constructor__P20564_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___34658; + s.tmp_1.arg5 = s.dy___34671; + s.tmp_1.arg6 = s.xStep___34684; + s.tmp_1.arg7 = s.yStep___34686; + s.callLocIdx = 609; s.pc = 37; return s.tmp_1; + case 37: r0 = s.retval; - s.tmp_48 = r0; - s.tmp_51 = Sprite_sy__P2372_mk(s); - s.tmp_51.arg0 = s.arg0; - s.callLocIdx = 396; s.pc = 41; return s.tmp_51; - case 41: + r0 = s.tmp_0; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_createMovingSprite__P22835.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 ArcadePhysicsEngine_createMovingSprite__P22835_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P22835, 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, + ovx___34530: undefined, + ovy___34535: undefined, + fx___34562: undefined, + c___34569: undefined, + fy___34612: undefined, + c___34619: undefined, + dx___34658: undefined, + dy___34671: undefined, + xStep___34684: undefined, + yStep___34686: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function ArcadePhysicsEngine_constrain__P22841(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__C20565_VT)) failedCast(r0); + s.tmp_0 = Fx_max__P18205_mk(s); + s.tmp_1 = Fx_min__P18204_mk(s); + r0 = s.arg0.fields["maxVelocity"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 785; 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 = 786; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.tmp_50 = r0; - r0 = (s.tmp_48 * s.tmp_50); - s.tmp_47 = r0; - s.tmp_54 = Sprite_sx__P2370_mk(s); - s.tmp_54.arg0 = s.arg1; - s.callLocIdx = 397; s.pc = 42; return s.tmp_54; - case 42: + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_constrain__P22841.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 ArcadePhysicsEngine_constrain__P22841_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_constrain__P22841, 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_compare__P18202(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_compare__P18202.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 Fx_compare__P18202_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_compare__P18202, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, + arg1: undefined, +} } + + + + + +function sprites_SpriteMap_insertAABB__P20491(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.left___34350 = undefined; + s.top___34353 = undefined; + s.xn___34356 = undefined; + s.yn___34367 = undefined; + s.x___34378 = undefined; + s.y___34383 = 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__C20484_VT)) failedCast(r0); + s.tmp_0 = Sprite_left__P20437_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 504; s.pc = 5; return s.tmp_0; + case 5: r0 = s.retval; - s.tmp_53 = r0; - s.tmp_56 = Sprite_sy__P2372_mk(s); - s.tmp_56.arg0 = s.arg1; - s.callLocIdx = 398; s.pc = 43; return s.tmp_56; - case 43: + s.left___34350 = (r0); + s.tmp_0 = Sprite_top__P20441_mk(s); + s.tmp_0.arg0 = s.arg1; + s.callLocIdx = 505; s.pc = 6; return s.tmp_0; + case 6: 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___15866 = (s.arg0); - s.B___15867 = (s.arg1); - { step = 25; continue; } - case 24: - s.A___15866 = (s.arg1); - s.B___15867 = (s.arg0); - case 25: - s.tmp_0 = helpers_imageBlit__P1953_mk(s); - r0 = s.A___15866.fields["_image"]; - s.tmp_0.arg0 = r0; - s.tmp_3 = Sprite_left__P2399_mk(s); - s.tmp_3.arg0 = s.B___15867; - s.callLocIdx = 400; s.pc = 45; return s.tmp_3; - case 45: + s.top___34353 = (r0); + s.tmp_3 = Sprite_width__P20435_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 506; s.pc = 7; return s.tmp_3; + case 7: r0 = s.retval; s.tmp_2 = r0; - s.tmp_5 = Sprite_left__P2399_mk(s); - s.tmp_5.arg0 = s.A___15866; - s.callLocIdx = 401; s.pc = 46; return s.tmp_5; - case 46: + r0 = s.arg0.fields["cellWidth"]; + s.tmp_4 = r0; + r0 = (s.tmp_2 + s.tmp_4); + 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___34356 = (r0); + s.tmp_3 = Sprite_height__P20436_mk(s); + s.tmp_3.arg0 = s.arg1; + s.callLocIdx = 507; 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_2 - s.tmp_4); + r0 = (s.tmp_2 + s.tmp_4); s.tmp_1 = r0; - s.tmp_7 = Sprite_sx__P2370_mk(s); - s.tmp_7.arg0 = s.A___15866; - s.callLocIdx = 402; s.pc = 47; return s.tmp_7; - case 47: + 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___34367 = (r0); + s.x___34378 = (0); + case 1: + r0 = (s.x___34378 <= s.xn___34356); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 4; continue; } + s.y___34383 = (0); + case 2: + r0 = (s.y___34383 <= s.yn___34367); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 3; continue; } + s.tmp_1 = sprites_SpriteMap_insertAtKey__P22799_mk(s); + s.tmp_1.arg0 = s.arg0; + s.tmp_2 = r0 = s.left___34350; + s.tmp_4 = Math_min__P18169_mk(s); + s.tmp_5 = Sprite_width__P20435_mk(s); + s.tmp_5.arg0 = s.arg1; + s.callLocIdx = 508; 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.tmp_1 / s.tmp_6); - s.tmp_0.arg1 = r0; - s.tmp_10 = Sprite_top__P2403_mk(s); - s.tmp_10.arg0 = s.B___15867; - s.callLocIdx = 403; s.pc = 48; return s.tmp_10; - case 48: + r0 = (s.x___34378 * s.tmp_6); + s.tmp_4.arg1 = r0; + s.callLocIdx = 509; s.pc = 10; return s.tmp_4; + case 10: r0 = s.retval; - s.tmp_9 = r0; - s.tmp_12 = Sprite_top__P2403_mk(s); - s.tmp_12.arg0 = s.A___15866; - s.callLocIdx = 404; s.pc = 49; return s.tmp_12; - case 49: + s.tmp_3 = r0; + r0 = (s.tmp_2 + s.tmp_3); + s.tmp_1.arg1 = r0; + s.tmp_7 = r0 = s.top___34353; + s.tmp_9 = Math_min__P18169_mk(s); + s.tmp_10 = Sprite_height__P20436_mk(s); + s.tmp_10.arg0 = s.arg1; + s.callLocIdx = 510; 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.tmp_9 - s.tmp_11); - s.tmp_8 = r0; - s.tmp_14 = Sprite_sy__P2372_mk(s); - s.tmp_14.arg0 = s.A___15866; - s.callLocIdx = 405; 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__P2397_mk(s); - s.tmp_16.arg0 = s.B___15867; - s.callLocIdx = 406; s.pc = 51; return s.tmp_16; - case 51: - r0 = s.retval; - s.tmp_15 = r0; - s.tmp_18 = Sprite_sx__P2370_mk(s); - s.tmp_18.arg0 = s.A___15866; - s.callLocIdx = 407; 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__P2398_mk(s); - s.tmp_20.arg0 = s.B___15867; - s.callLocIdx = 408; s.pc = 53; return s.tmp_20; - case 53: - r0 = s.retval; - s.tmp_19 = r0; - s.tmp_22 = Sprite_sy__P2372_mk(s); - s.tmp_22.arg0 = s.A___15866; - s.callLocIdx = 409; s.pc = 54; return s.tmp_22; - case 54: + r0 = (s.y___34383 * s.tmp_11); + s.tmp_9.arg1 = r0; + s.callLocIdx = 511; s.pc = 12; return s.tmp_9; + case 12: r0 = s.retval; - s.tmp_21 = r0; - r0 = (s.tmp_19 / s.tmp_21); - s.tmp_0.arg4 = r0; - r0 = s.B___15867.fields["_image"]; - s.tmp_0.arg5 = r0; - s.tmp_0.arg6 = 0; - s.tmp_0.arg7 = 0; - r0 = s.B___15867.fields["_image"]; - s.tmp_23 = r0; - r0 = pxsim_ImageMethods.width(s.tmp_23); - s.tmp_0.arg8 = r0; - r0 = s.B___15867.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 = 413; s.pc = 44; return s.tmp_0; - case 44: + s.tmp_8 = r0; + r0 = (s.tmp_7 + s.tmp_8); + s.tmp_1.arg2 = r0; + s.tmp_1.arg3 = s.arg1; + s.callLocIdx = 512; s.pc = 9; return s.tmp_1; + case 9: r0 = s.retval; - { step = 27; continue; } - case 26: + r0 = (s.y___34383 + 1); + s.y___34383 = (r0); + { step = 2; continue; } + case 3: + r0 = (s.x___34378 + 1); + s.x___34378 = (r0); + { step = 1; continue; } + case 4: r0 = undefined; - case 27: return leave(s, r0) default: oops() } } } -Sprite_overlapsWith__P2420.info = {"start":20623,"length":1735,"line":689,"column":4,"endLine":738,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +sprites_SpriteMap_insertAABB__P20491.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_overlapsWith__P2420_mk(s) { +function sprites_SpriteMap_insertAABB__P20491_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_overlapsWith__P2420, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAABB__P20491, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -34604,53 +38056,12 @@ function Sprite_overlapsWith__P2420_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, - 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___15866: undefined, - B___15867: undefined, + left___34350: undefined, + top___34353: undefined, + xn___34356: undefined, + yn___34367: undefined, + x___34378: undefined, + y___34383: undefined, arg0: undefined, arg1: undefined, } } @@ -34659,7 +38070,7 @@ function Sprite_overlapsWith__P2420_mk(s) { -function Sprite_isScaled__P4753(s) { +function sprites_SpriteMap_insertAtKey__P22799(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34669,42 +38080,114 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.k___34418 = undefined; + s.bucket___34423 = 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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_sx"]; + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_key__P22798_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.tmp_0.arg2 = s.arg2; + s.callLocIdx = 503; s.pc = 5; return s.tmp_0; + case 5: + r0 = s.retval; + s.k___34418 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___34418); + s.bucket___34423 = (r0); + r0 = pxsim_numops_toBoolDecr(s.bucket___34423); s.tmp_1 = r0; - r0 = (s.tmp_1 !== 256); + 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; } - case 1: - r0 = s.arg0.fields["_sy"]; + r0 = s.arg0.fields["buckets"]; s.tmp_2 = r0; - r0 = (s.tmp_2 !== 256); + s.tmp_3 = r0 = s.k___34418; + r0 = pxsim_Array__mk(); + s.tmp_4 = r0; + r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); + s.bucket___34423 = (s.tmp_4); + case 1: case 2: - // jmp value (already in r0) - s.tmp_3 = r0; - r0 = s.tmp_3; + r0 = pxsim_Array_.indexOf(s.bucket___34423, 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___34423, s.arg3); + case 3: + case 4: + r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_isScaled__P4753.info = {"start":10166,"length":100,"line":369,"column":4,"endLine":371,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isScaled","argumentNames":["this"]} +sprites_SpriteMap_insertAtKey__P22799.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 Sprite_isScaled__P4753_mk(s) { +function sprites_SpriteMap_insertAtKey__P22799_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isScaled__P4753, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_insertAtKey__P22799, 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___34418: undefined, + bucket___34423: undefined, + arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, +} } + + + + + +function sprites_SpriteMap_clear__P20490(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__C20484_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() +} } } +sprites_SpriteMap_clear__P20490.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} + +function sprites_SpriteMap_clear__P20490_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_SpriteMap_clear__P20490, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, } } @@ -34712,7 +38195,7 @@ function Sprite_isScaled__P4753_mk(s) { -function game_Hitbox_overlapsWith__P2223(s) { +function sprites_SpriteMap_resizeBuckets__P20489(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34722,226 +38205,155 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.maxWidth___34453 = undefined; + s.maxHeight___34454 = undefined; + s.sprite___34456 = undefined; + s.unnamed162___U3 = undefined; + s.unnamed163___U4 = undefined; + s.tMap___34472 = undefined; + s.areaWidth___34476 = undefined; + s.areaHeight___34483 = 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__C2208_VT)) failedCast(r0); - s.tmp_0 = game_Hitbox_updateIfInvalid__P2222_mk(s); - s.tmp_0.arg0 = s.arg0; - s.callLocIdx = 249; s.pc = 18; return s.tmp_0; - case 18: - r0 = s.retval; - s.tmp_0 = game_Hitbox_updateIfInvalid__P2222_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 250; s.pc = 19; return s.tmp_0; - case 19: - r0 = s.retval; - s.tmp_1 = game_Hitbox_contains__P2221_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = game_Hitbox_left__P2216_mk(s); - s.tmp_2.arg0 = s.arg1; - s.callLocIdx = 251; s.pc = 21; return s.tmp_2; - case 21: + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.maxWidth___34453 = (0); + s.maxHeight___34454 = (0); + s.sprite___34456 = (undefined); + s.unnamed162___U3 = (s.arg1); + s.unnamed163___U4 = (0); + case 1: + 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___34456 = (r0); + s.tmp_4 = Sprite_width__P20435_mk(s); + s.tmp_4.arg0 = s.sprite___34456; + s.callLocIdx = 492; s.pc = 11; return s.tmp_4; + case 11: r0 = s.retval; - s.tmp_1.arg1 = r0; - s.tmp_3 = game_Hitbox_top__P2217_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 252; s.pc = 22; return s.tmp_3; - case 22: + s.tmp_3 = r0; + r0 = (s.tmp_3 > s.maxWidth___34453); + s.tmp_2 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_2); + if (!r0) { step = 2; continue; } + s.tmp_5 = Sprite_width__P20435_mk(s); + s.tmp_5.arg0 = s.sprite___34456; + s.callLocIdx = 493; s.pc = 12; return s.tmp_5; + case 12: r0 = s.retval; - s.tmp_1.arg2 = r0; - s.callLocIdx = 253; s.pc = 20; return s.tmp_1; - case 20: + s.maxWidth___34453 = (r0); + case 2: + case 3: + s.tmp_2 = Sprite_height__P20436_mk(s); + s.tmp_2.arg0 = s.sprite___34456; + s.callLocIdx = 494; s.pc = 13; return s.tmp_2; + case 13: r0 = s.retval; + s.tmp_1 = r0; + r0 = (s.tmp_1 > s.maxHeight___34454); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - r0 = true; - { step = 17; continue; } - case 1: - case 2: - s.tmp_5 = game_Hitbox_contains__P2221_mk(s); - s.tmp_5.arg0 = s.arg0; - s.tmp_6 = game_Hitbox_left__P2216_mk(s); - s.tmp_6.arg0 = s.arg1; - s.callLocIdx = 254; s.pc = 24; return s.tmp_6; - case 24: - r0 = s.retval; - s.tmp_5.arg1 = r0; - s.tmp_7 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_7.arg0 = s.arg1; - s.callLocIdx = 255; s.pc = 25; return s.tmp_7; - case 25: - r0 = s.retval; - s.tmp_5.arg2 = r0; - s.callLocIdx = 256; s.pc = 23; return s.tmp_5; - case 23: + if (!r0) { step = 4; continue; } + s.tmp_3 = Sprite_height__P20436_mk(s); + s.tmp_3.arg0 = s.sprite___34456; + s.callLocIdx = 495; s.pc = 14; return s.tmp_3; + case 14: r0 = s.retval; - s.tmp_4 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_4); - if (!r0) { step = 3; continue; } - r0 = true; - { step = 17; continue; } - case 3: + s.maxHeight___34454 = (r0); case 4: - s.tmp_9 = game_Hitbox_contains__P2221_mk(s); - s.tmp_9.arg0 = s.arg0; - s.tmp_10 = game_Hitbox_right__P2218_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 257; s.pc = 27; return s.tmp_10; - case 27: - r0 = s.retval; - s.tmp_9.arg1 = r0; - s.tmp_11 = game_Hitbox_top__P2217_mk(s); - s.tmp_11.arg0 = s.arg1; - s.callLocIdx = 258; s.pc = 28; return s.tmp_11; - case 28: - r0 = s.retval; - s.tmp_9.arg2 = r0; - s.callLocIdx = 259; s.pc = 26; return s.tmp_9; - case 26: - r0 = s.retval; - s.tmp_8 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_8); - if (!r0) { step = 5; continue; } - r0 = true; - { step = 17; continue; } case 5: + r0 = (s.unnamed163___U4 + 1); + s.unnamed163___U4 = (r0); + { step = 1; continue; } case 6: - s.tmp_13 = game_Hitbox_contains__P2221_mk(s); - s.tmp_13.arg0 = s.arg0; - s.tmp_14 = game_Hitbox_right__P2218_mk(s); - s.tmp_14.arg0 = s.arg1; - s.callLocIdx = 260; s.pc = 30; return s.tmp_14; - case 30: - r0 = s.retval; - s.tmp_13.arg1 = r0; - s.tmp_15 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_15.arg0 = s.arg1; - s.callLocIdx = 261; s.pc = 31; return s.tmp_15; - case 31: - r0 = s.retval; - s.tmp_13.arg2 = r0; - s.callLocIdx = 262; s.pc = 29; return s.tmp_13; - case 29: + s.unnamed162___U3 = (undefined); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 496; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - s.tmp_12 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_12); + r0 = r0.fields["tileMap"]; + s.tMap___34472 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tMap___34472); if (!r0) { step = 7; continue; } - r0 = true; - { step = 17; continue; } + s.tmp_0 = tiles_TileMap_areaWidth__P20781_mk(s); + s.tmp_0.arg0 = s.tMap___34472; + s.callLocIdx = 497; s.pc = 16; return s.tmp_0; + case 16: + r0 = s.retval; + { step = 8; continue; } case 7: + r0 = pxsim_ImageMethods.width(globals.screen___20070); case 8: - s.tmp_17 = game_Hitbox_contains__P2221_mk(s); - s.tmp_17.arg0 = s.arg1; - s.tmp_18 = game_Hitbox_left__P2216_mk(s); - s.tmp_18.arg0 = s.arg0; - s.callLocIdx = 263; s.pc = 33; return s.tmp_18; - case 33: - r0 = s.retval; - s.tmp_17.arg1 = r0; - s.tmp_19 = game_Hitbox_top__P2217_mk(s); - s.tmp_19.arg0 = s.arg0; - s.callLocIdx = 264; s.pc = 34; return s.tmp_19; - case 34: - r0 = s.retval; - s.tmp_17.arg2 = r0; - s.callLocIdx = 265; s.pc = 32; return s.tmp_17; - case 32: - r0 = s.retval; - s.tmp_16 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_16); + // jmp value (already in r0) + s.tmp_1 = r0; + s.areaWidth___34476 = (s.tmp_1); + r0 = pxsim_numops_toBoolDecr(s.tMap___34472); if (!r0) { step = 9; continue; } - r0 = true; - { step = 17; continue; } + s.tmp_0 = tiles_TileMap_areaHeight__P20782_mk(s); + s.tmp_0.arg0 = s.tMap___34472; + s.callLocIdx = 498; s.pc = 17; return s.tmp_0; + case 17: + r0 = s.retval; + { step = 10; continue; } case 9: + r0 = pxsim_ImageMethods.height(globals.screen___20070); case 10: - s.tmp_21 = game_Hitbox_contains__P2221_mk(s); - s.tmp_21.arg0 = s.arg1; - s.tmp_22 = game_Hitbox_left__P2216_mk(s); - s.tmp_22.arg0 = s.arg0; - s.callLocIdx = 266; s.pc = 36; return s.tmp_22; - case 36: - r0 = s.retval; - s.tmp_21.arg1 = r0; - s.tmp_23 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_23.arg0 = s.arg0; - s.callLocIdx = 267; s.pc = 37; return s.tmp_23; - case 37: - r0 = s.retval; - s.tmp_21.arg2 = r0; - s.callLocIdx = 268; 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__P2221_mk(s); - s.tmp_25.arg0 = s.arg1; - s.tmp_26 = game_Hitbox_right__P2218_mk(s); - s.tmp_26.arg0 = s.arg0; - s.callLocIdx = 269; s.pc = 39; return s.tmp_26; - case 39: - r0 = s.retval; - s.tmp_25.arg1 = r0; - s.tmp_27 = game_Hitbox_top__P2217_mk(s); - s.tmp_27.arg0 = s.arg0; - s.callLocIdx = 270; s.pc = 40; return s.tmp_27; - case 40: - r0 = s.retval; - s.tmp_25.arg2 = r0; - s.callLocIdx = 271; 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__P2221_mk(s); - s.tmp_29.arg0 = s.arg1; - s.tmp_30 = game_Hitbox_right__P2218_mk(s); - s.tmp_30.arg0 = s.arg0; - s.callLocIdx = 272; s.pc = 42; return s.tmp_30; - case 42: - r0 = s.retval; - s.tmp_29.arg1 = r0; - s.tmp_31 = game_Hitbox_bottom__P2219_mk(s); - s.tmp_31.arg0 = s.arg0; - s.callLocIdx = 273; s.pc = 43; return s.tmp_31; - case 43: + // jmp value (already in r0) + s.tmp_1 = r0; + s.areaHeight___34483 = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_clamp__P18165_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaWidth___34476 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxWidth___34453 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 499; s.pc = 18; return s.tmp_2; + case 18: r0 = s.retval; - s.tmp_29.arg2 = r0; - s.callLocIdx = 274; s.pc = 41; return s.tmp_29; - case 41: + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["cellWidth"] = (s.tmp_1); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_clamp__P18165_mk(s); + s.tmp_2.arg0 = 8; + r0 = (s.areaHeight___34483 >> 2); + s.tmp_2.arg1 = r0; + r0 = (s.maxHeight___34454 * 2); + s.tmp_2.arg2 = r0; + s.callLocIdx = 500; s.pc = 19; return s.tmp_2; + case 19: 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_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___34483, 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___34476, s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); + r0 = undefined; return leave(s, r0) default: oops() } } } -game_Hitbox_overlapsWith__P2223.info = {"start":2515,"length":695,"line":87,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/hitbox.ts","functionName":"overlapsWith","argumentNames":["this","other"]} +sprites_SpriteMap_resizeBuckets__P20489.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 game_Hitbox_overlapsWith__P2223_mk(s) { +function sprites_SpriteMap_resizeBuckets__P20489_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_overlapsWith__P2223, depth: s.depth + 1, + parent: s, fn: sprites_SpriteMap_resizeBuckets__P20489, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -34949,32 +38361,14 @@ function game_Hitbox_overlapsWith__P2223_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, - 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, + maxWidth___34453: undefined, + maxHeight___34454: undefined, + sprite___34456: undefined, + unnamed162___U3: undefined, + unnamed163___U4: undefined, + tMap___34472: undefined, + areaWidth___34476: undefined, + areaHeight___34483: undefined, arg0: undefined, arg1: undefined, } } @@ -34983,7 +38377,7 @@ function game_Hitbox_overlapsWith__P2223_mk(s) { -function game_Hitbox_contains__P2221(s) { +function Sprite_clearObstacles__P20463(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -34995,106 +38389,69 @@ 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__C2208_VT)) failedCast(r0); - s.tmp_1 = r0 = s.arg1; - s.tmp_3 = game_Hitbox_left__P2216_mk(s); - s.tmp_3.arg0 = s.arg0; - s.callLocIdx = 229; 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: - s.tmp_4 = r0 = s.arg1; - s.tmp_6 = game_Hitbox_right__P2218_mk(s); - s.tmp_6.arg0 = s.arg0; - s.callLocIdx = 230; 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__P2217_mk(s); - s.tmp_10.arg0 = s.arg0; - s.callLocIdx = 231; 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__P2219_mk(s); - s.tmp_14.arg0 = s.arg0; - s.callLocIdx = 232; 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; + if (!checkSubtype(r0, Sprite__C20379_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; return leave(s, r0) default: oops() } } } -game_Hitbox_contains__P2221.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"]} +Sprite_clearObstacles__P20463.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} -function game_Hitbox_contains__P2221_mk(s) { +function Sprite_clearObstacles__P20463_mk(s) { checkStack(s.depth); return { - parent: s, fn: game_Hitbox_contains__P2221, depth: s.depth + 1, + parent: s, fn: Sprite_clearObstacles__P20463, 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, +} } + + + + + +function Fx_idiv__P18201(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_.idiv(s.arg0, s.arg1); + return leave(s, r0) + default: oops() +} } } +Fx_idiv__P18201.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 Fx_idiv__P18201_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: Fx_idiv__P18201, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function helpers_imageBlit__P1953(s) { +function helpers_arrayMap__P18144(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35104,116 +38461,67 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.res___34748 = undefined; + s.len___34750 = undefined; + s.i___34753 = 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.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___4582; - 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(); - case 2: - // jmp value (already in r0) - s.tmp_1 = r0; - globals._blitArgs___4582 = (s.tmp_1); - s.tmp_0 = r0 = globals._blitArgs___4582; - 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___4582; - 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___4582; - 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___4582; - 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___4582; - 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___4582; - 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___4582; - 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___4582; - 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: - // jmp value (already in r0) - s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___4582, 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.res___34748 = (r0); + r0 = pxsim_Array__length(s.arg0); + s.len___34750 = (r0); + s.i___34753 = (0); + case 1: + r0 = (s.i___34753 < s.len___34750); s.tmp_0 = r0; - r0 = pxsim_Array_.setAt(globals._blitArgs___4582, 9, s.tmp_0); - r0 = pxsim_ImageMethods._blit(s.arg0, s.arg5, globals._blitArgs___4582); + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 2; continue; } + s.tmp_1 = r0 = s.res___34748; + s.tmp_3 = lambda_3_mk(s); + s.tmp_3.argL = s.arg1; + r0 = pxsim_Array__getAt(s.arg0, s.i___34753); + s.tmp_3.arg0 = r0; + s.tmp_3.arg1 = s.i___34753; + setupLambda(s.tmp_3, s.tmp_3.argL); + s.callLocIdx = 3; 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___34753 + 1); + s.i___34753 = (r0); + { step = 1; continue; } + case 2: + r0 = s.res___34748; return leave(s, r0) default: oops() } } } -helpers_imageBlit__P1953.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"]} +helpers_arrayMap__P18144.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 helpers_imageBlit__P1953_mk(s) { +function helpers_arrayMap__P18144_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_imageBlit__P1953, depth: s.depth + 1, + parent: s, fn: helpers_arrayMap__P18144, 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___34748: undefined, + len___34750: undefined, + i___34753: 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__P4797(s) { +function ArcadePhysicsEngine_draw__P20576(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35223,335 +38531,258 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ovx___16492 = undefined; - s.ovy___16497 = undefined; - s.fx___16524 = undefined; - s.c___16531 = undefined; - s.fy___16574 = undefined; - s.c___16581 = undefined; - s.dx___16620 = undefined; - s.dy___16633 = undefined; - s.xStep___16646 = undefined; - s.yStep___16648 = 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__C2527_VT)) failedCast(r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P4803_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 573; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.ovx___16492 = (r0); - s.tmp_0 = ArcadePhysicsEngine_constrain__P4803_mk(s); - s.tmp_0.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_0.arg1 = r0; - s.callLocIdx = 574; s.pc = 26; return s.tmp_0; - case 26: + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + s.tmp_0 = sprites_SpriteMap_draw__P20488_mk(s); + r0 = s.arg0.fields["map"]; + s.tmp_0.arg0 = r0; + s.callLocIdx = 538; s.pc = 1; return s.tmp_0; + case 1: r0 = s.retval; - s.ovy___16497 = (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; } + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_draw__P20576.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} + +function ArcadePhysicsEngine_draw__P20576_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_draw__P20576, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, +} } + + + + + +function sprites_SpriteMap_draw__P20488(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.x___34774 = undefined; + s.y___34780 = undefined; + s.left___34786 = undefined; + s.top___34791 = undefined; + s.k___34796 = undefined; + s.b___34801 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, sprites_SpriteMap__C20484_VT)) failedCast(r0); + s.x___34774 = (0); case 1: - r0 = s.arg1.fields["_fx"]; + r0 = s.arg0.fields["columnCount"]; + s.tmp_1 = r0; + r0 = (s.x___34774 < s.tmp_1); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 6; continue; } - r0 = s.arg1.fields["_fx"]; - s.tmp_2 = r0; - r0 = pxsim.Math_.imul(s.tmp_2, s.arg2); + if (!r0) { step = 8; continue; } + s.y___34780 = (0); + case 2: + r0 = s.arg0.fields["rowCount"]; s.tmp_1 = r0; - r0 = pxsim.Math_.idiv(s.tmp_1, 1000); - s.fx___16524 = (r0); - r0 = s.arg1.fields["_vx"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fx___16524); - s.c___16531 = (r0); - r0 = (s.c___16531 < 0); + r0 = (s.y___34780 < 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__P166_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fx___16524); - s.tmp_3.arg1 = r0; - s.callLocIdx = 582; s.pc = 27; return s.tmp_3; - case 27: - r0 = s.retval; + if (!r0) { step = 7; continue; } + r0 = s.arg0.fields["cellWidth"]; s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); - { step = 5; continue; } - case 2: - r0 = (s.c___16531 > 0); + r0 = (s.x___34774 * s.tmp_2); + s.left___34786 = (r0); + r0 = s.arg0.fields["cellHeight"]; 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__P167_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vx"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fx___16524); - s.tmp_3.arg1 = r0; - s.callLocIdx = 584; s.pc = 28; return s.tmp_3; - case 28: + r0 = (s.y___34780 * s.tmp_0); + s.top___34791 = (r0); + s.tmp_0 = sprites_SpriteMap_key__P22798_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.left___34786; + s.tmp_0.arg2 = s.top___34791; + s.callLocIdx = 490; s.pc = 9; return s.tmp_0; + case 9: r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["_vx"] = (s.tmp_2); + s.k___34796 = (r0); + r0 = s.arg0.fields["buckets"]; + s.tmp_0 = r0; + r0 = pxsim_Array__getAt(s.tmp_0, s.k___34796); + s.b___34801 = (r0); + s.tmp_0 = r0 = s.b___34801; + r0 = pxsim_numops_toBool(s.tmp_0); + if (r0) { step = 3; continue; } + r0 = s.tmp_0; { step = 4; continue; } case 3: - r0 = (s.arg1).fields["_vx"] = (0); + r0 = pxsim_Array__length(s.b___34801); 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__P19997_mk(s); + s.tmp_2.arg0 = globals.screen___20070; + s.tmp_2.arg1 = s.left___34786; + s.tmp_2.arg2 = s.top___34791; + 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 = 491; s.pc = 10; return s.tmp_2; + case 10: + r0 = s.retval; case 5: case 6: + r0 = (s.y___34780 + 1); + s.y___34780 = (r0); + { step = 2; continue; } case 7: + r0 = (s.x___34774 + 1); + s.x___34774 = (r0); + { step = 1; continue; } 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; - 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___16574 = (r0); - r0 = s.arg1.fields["_vy"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 - s.fy___16574); - s.c___16581 = (r0); - r0 = (s.c___16581 < 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__P166_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.fy___16574); - s.tmp_3.arg1 = r0; - s.callLocIdx = 592; 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___16581 > 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__P167_mk(s); - s.tmp_3.arg0 = 0; - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 - s.fy___16574); - s.tmp_3.arg1 = r0; - s.callLocIdx = 594; 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__P4803_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vx"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 595; 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__P4803_mk(s); - s.tmp_2.arg0 = s.arg0; - r0 = s.arg1.fields["_vy"]; - s.tmp_2.arg1 = r0; - s.callLocIdx = 596; 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___16492); - 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); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +sprites_SpriteMap_draw__P20488.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_SpriteMap_draw__P20488_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: sprites_SpriteMap_draw__P20488, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, + tmp_2: undefined, + x___34774: undefined, + y___34780: undefined, + left___34786: undefined, + top___34791: undefined, + k___34796: undefined, + b___34801: undefined, + arg0: undefined, +} } + + + + + +function ArcadePhysicsEngine_removeSprite__P20575(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__C20565_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.dx___16620 = (r0); - r0 = s.arg1.fields["_vy"]; - s.tmp_4 = r0; - r0 = (s.tmp_4 + s.ovy___16497); - 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); + r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); + r0 = undefined; + return leave(s, r0) + default: oops() +} } } +ArcadePhysicsEngine_removeSprite__P20575.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__P20575_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: ArcadePhysicsEngine_removeSprite__P20575, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + arg0: undefined, + arg1: undefined, +} } + + + + + +function ArcadePhysicsEngine_addSprite__P20574(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___34838 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.arg1 = (s.lambdaArgs[1]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, ArcadePhysicsEngine__C20565_VT)) failedCast(r0); + r0 = s.arg0.fields["sprites"]; s.tmp_0 = r0; - r0 = (s.tmp_0 * 256); - s.tmp_5 = r0; - r0 = (s.tmp_5 | 0); - s.dy___16633 = (r0); - s.xStep___16646 = (s.dx___16620); - s.yStep___16648 = (s.dy___16633); - case 17: - s.tmp_2 = Fx_abs__P165_mk(s); - s.tmp_2.arg0 = s.xStep___16646; - s.callLocIdx = 603; s.pc = 33; return s.tmp_2; - case 33: + r0 = pxsim_Array__push(s.tmp_0, s.arg1); + s.tmp_0 = game_currentScene__P21037_mk(s); + s.callLocIdx = 536; s.pc = 5; return s.tmp_0; + case 5: 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 = r0.fields["tileMap"]; + s.tm___34838 = (r0); + s.tmp_0 = r0 = s.tm___34838; 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__P165_mk(s); - s.tmp_5.arg0 = s.yStep___16648; - s.callLocIdx = 604; s.pc = 34; return s.tmp_5; - case 34: - r0 = s.retval; - s.tmp_4 = r0; - 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_toBoolDecr(s.tmp_7); - if (!r0) { step = 24; continue; } - s.tmp_10 = Fx_abs__P165_mk(s); - s.tmp_10.arg0 = s.xStep___16646; - s.callLocIdx = 605; s.pc = 35; return s.tmp_10; - case 35: - r0 = s.retval; - s.tmp_9 = r0; - r0 = s.arg0.fields["minSingleStep"]; - 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___16646, 2); - s.xStep___16646 = (r0); - case 20: - case 21: - s.tmp_2 = Fx_abs__P165_mk(s); - s.tmp_2.arg0 = s.yStep___16648; - s.callLocIdx = 607; 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___16648, 2); - s.yStep___16648 = (r0); - case 22: - case 23: - { step = 17; continue; } - case 24: - r0 = pxsim_pxtcore_mkClassInstance(MovingSprite__C2525_VT); - s.tmp_0 = r0; - s.tmp_1 = MovingSprite_constructor__P2526_mk(s); - s.tmp_1.arg0 = s.tmp_0; + { step = 2; continue; } + case 1: + s.tmp_1 = tiles_TileMap_isOnWall__P20796_mk(s); + s.tmp_1.arg0 = s.tm___34838; 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___16620; - s.tmp_1.arg5 = s.dy___16633; - s.tmp_1.arg6 = s.xStep___16646; - s.tmp_1.arg7 = s.yStep___16648; - s.callLocIdx = 609; s.pc = 37; return s.tmp_1; - case 37: + s.callLocIdx = 537; s.pc = 6; return s.tmp_1; + case 6: r0 = s.retval; - r0 = s.tmp_0; + 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; return leave(s, r0) default: oops() } } } -ArcadePhysicsEngine_createMovingSprite__P4797.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"]} +ArcadePhysicsEngine_addSprite__P20574.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 ArcadePhysicsEngine_createMovingSprite__P4797_mk(s) { +function ArcadePhysicsEngine_addSprite__P20574_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_createMovingSprite__P4797, depth: s.depth + 1, + parent: s, fn: ArcadePhysicsEngine_addSprite__P20574, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -35559,33 +38790,16 @@ function ArcadePhysicsEngine_createMovingSprite__P4797_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, - ovx___16492: undefined, - ovy___16497: undefined, - fx___16524: undefined, - c___16531: undefined, - fy___16574: undefined, - c___16581: undefined, - dx___16620: undefined, - dy___16633: undefined, - xStep___16646: undefined, - yStep___16648: undefined, + tm___34838: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function ArcadePhysicsEngine_constrain__P4803(s) { +function tiles_TileMapData_constructor__P20756(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35598,45 +38812,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.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - s.tmp_0 = Fx_max__P167_mk(s); - s.tmp_1 = Fx_min__P166_mk(s); - r0 = s.arg0.fields["maxVelocity"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 785; 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 = 786; s.pc = 1; return s.tmp_0; + if (!checkSubtype(r0, tiles_TileMapData__C20755_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__P20760_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg4; + s.callLocIdx = 808; s.pc = 1; return s.tmp_0; case 1: 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() } } } -ArcadePhysicsEngine_constrain__P4803.info = {"start":27343,"length":193,"line":761,"column":4,"endLine":769,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"constrain","argumentNames":["this","v"]} +tiles_TileMapData_constructor__P20756.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 ArcadePhysicsEngine_constrain__P4803_mk(s) { +function tiles_TileMapData_constructor__P20756_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_constrain__P4803, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_constructor__P20756, 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 Fx_compare__P164(s) { +function tiles_TileMapData_scale__P20760(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35651,17 +38875,26 @@ switch (step) { s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = (s.arg0 - s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, tiles_TileMapData__C20755_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() } } } -Fx_compare__P164.info = {"start":1395,"length":106,"line":41,"column":4,"endLine":43,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"compare","argumentNames":["a","b"]} +tiles_TileMapData_scale__P20760.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 Fx_compare__P164_mk(s) { +function tiles_TileMapData_scale__P20760_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_compare__P164, depth: s.depth + 1, + parent: s, fn: tiles_TileMapData_scale__P20760, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, + tmp_1: undefined, arg0: undefined, arg1: undefined, } } @@ -35670,7 +38903,7 @@ function Fx_compare__P164_mk(s) { -function sprites_SpriteMap_insertAABB__P2453(s) { +function tiles_TileMap_constructor__P20775(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35680,154 +38913,48 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.left___16312 = undefined; - s.top___16315 = undefined; - s.xn___16318 = undefined; - s.yn___16329 = undefined; - s.x___16340 = undefined; - s.y___16345 = 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__C2446_VT)) failedCast(r0); - s.tmp_0 = Sprite_left__P2399_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 504; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.left___16312 = (r0); - s.tmp_0 = Sprite_top__P2403_mk(s); - s.tmp_0.arg0 = s.arg1; - s.callLocIdx = 505; s.pc = 6; return s.tmp_0; - case 6: - r0 = s.retval; - s.top___16315 = (r0); - s.tmp_3 = Sprite_width__P2397_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 506; 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_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___16318 = (r0); - s.tmp_3 = Sprite_height__P2398_mk(s); - s.tmp_3.arg0 = s.arg1; - s.callLocIdx = 507; 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_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___16329 = (r0); - s.x___16340 = (0); + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = (s.arg0).fields["_layer"] = (1); + s.tmp_0 = tiles_TileMap_scale__P20777_mk(s); + s.tmp_0.arg0 = s.arg0; + s.tmp_0.arg1 = s.arg1; + s.callLocIdx = 814; s.pc = 1; return s.tmp_0; case 1: - r0 = (s.x___16340 <= s.xn___16318); + r0 = s.retval; + r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P34899); s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 4; continue; } - s.y___16345 = (0); + r0 = pxsim_pxtrt_stclo(s.tmp_0, 0, s.arg0); + s.tmp_1 = r0 = s.arg0; + s.tmp_3 = scene_createRenderable__P20843_mk(s); + s.tmp_3.arg0 = -1; + s.tmp_3.arg1 = s.tmp_0; + s.tmp_3.arg2 = undefined; + s.callLocIdx = 816; s.pc = 2; return s.tmp_3; case 2: - r0 = (s.y___16345 <= s.yn___16329); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 3; continue; } - s.tmp_1 = sprites_SpriteMap_insertAtKey__P4761_mk(s); - s.tmp_1.arg0 = s.arg0; - s.tmp_2 = r0 = s.left___16312; - s.tmp_4 = Math_min__P131_mk(s); - s.tmp_5 = Sprite_width__P2397_mk(s); - s.tmp_5.arg0 = s.arg1; - s.callLocIdx = 508; 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___16340 * s.tmp_6); - s.tmp_4.arg1 = r0; - s.callLocIdx = 509; 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___16315; - s.tmp_9 = Math_min__P131_mk(s); - s.tmp_10 = Sprite_height__P2398_mk(s); - s.tmp_10.arg0 = s.arg1; - s.callLocIdx = 510; 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___16345 * s.tmp_11); - s.tmp_9.arg1 = r0; - s.callLocIdx = 511; 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 = 512; s.pc = 9; return s.tmp_1; - case 9: r0 = s.retval; - r0 = (s.y___16345 + 1); - s.y___16345 = (r0); - { step = 2; continue; } - case 3: - r0 = (s.x___16340 + 1); - s.x___16340 = (r0); - { step = 1; continue; } - case 4: + s.tmp_2 = r0; + r0 = (s.tmp_1).fields["renderable"] = (s.tmp_2); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAABB__P2453.info = {"start":3184,"length":521,"line":91,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"insertAABB","argumentNames":["this","sprite"]} +tiles_TileMap_constructor__P20775.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 sprites_SpriteMap_insertAABB__P2453_mk(s) { +function tiles_TileMap_constructor__P20775_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAABB__P2453, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_constructor__P20775, 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___16312: undefined, - top___16315: undefined, - xn___16318: undefined, - yn___16329: undefined, - x___16340: undefined, - y___16345: undefined, arg0: undefined, arg1: undefined, } } @@ -35836,7 +38963,7 @@ function sprites_SpriteMap_insertAABB__P2453_mk(s) { -function sprites_SpriteMap_insertAtKey__P4761(s) { +function tiles_TileMap_inline__P34899(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35846,82 +38973,39 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.k___16380 = undefined; - s.bucket___16385 = 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__C2446_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_key__P4760_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.tmp_0.arg2 = s.arg2; - s.callLocIdx = 503; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - s.k___16380 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___16380); - s.bucket___16385 = (r0); - r0 = pxsim_numops_toBoolDecr(s.bucket___16385); - 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["buckets"]; - s.tmp_2 = r0; - s.tmp_3 = r0 = s.k___16380; - r0 = pxsim_Array__mk(); - s.tmp_4 = r0; - r0 = pxsim_Array_.setAt(s.tmp_2, s.tmp_3, s.tmp_4); - s.bucket___16385 = (s.tmp_4); + s.tmp_0 = tiles_TileMap_draw__P22911_mk(s); + s.tmp_0.arg0 = s.caps[0]; + s.tmp_0.arg1 = s.arg0; + s.tmp_0.arg2 = s.arg1; + s.callLocIdx = 815; s.pc = 1; return s.tmp_0; case 1: - case 2: - r0 = pxsim_Array_.indexOf(s.bucket___16385, 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___16385, s.arg3); - case 3: - case 4: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_insertAtKey__P4761.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"]} +tiles_TileMap_inline__P34899.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 sprites_SpriteMap_insertAtKey__P4761_mk(s) { +function tiles_TileMap_inline__P34899_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_insertAtKey__P4761, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_inline__P34899, 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___16380: undefined, - bucket___16385: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function sprites_SpriteMap_clear__P2452(s) { +function tiles_TileMap_draw__P22911(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35931,37 +39015,333 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.bitmask___34910 = undefined; + s.offsetX___34916 = undefined; + s.offsetY___34921 = undefined; + s.x0___34926 = undefined; + s.xn___34933 = undefined; + s.y0___34950 = undefined; + s.yn___34957 = undefined; + s.x___34974 = undefined; + s.y___34980 = undefined; + s.index___34986 = undefined; + s.tile___34993 = undefined; + s.x___35029 = undefined; + s.xLine___35035 = undefined; + s.y___35061 = undefined; + s.yLine___35067 = 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__C2446_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + if (!checkSubtype(r0, tiles_TileMap__C20773_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 = (s.tmp_0).fields["buckets"] = (s.tmp_1); + 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; } + 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___34910 = (r0); + r0 = s.arg2.fields["drawOffsetX"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___34910); + s.offsetX___34916 = (r0); + r0 = s.arg2.fields["drawOffsetY"]; + s.tmp_0 = r0; + r0 = (s.tmp_0 & s.bitmask___34910); + s.offsetY___34921 = (r0); + s.tmp_0 = Math_max__P18168_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 = 834; s.pc = 24; return s.tmp_0; + case 24: + r0 = s.retval; + s.x0___34926 = (r0); + s.tmp_0 = Math_min__P18169_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 = 837; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; + s.xn___34933 = (r0); + s.tmp_0 = Math_max__P18168_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 = 839; s.pc = 26; return s.tmp_0; + case 26: + r0 = s.retval; + s.y0___34950 = (r0); + s.tmp_0 = Math_min__P18169_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 = 842; s.pc = 27; return s.tmp_0; + case 27: + r0 = s.retval; + s.yn___34957 = (r0); + s.x___34974 = (s.x0___34926); + case 3: + r0 = (s.x___34974 <= s.xn___34933); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 8; continue; } + s.y___34980 = (s.y0___34950); + case 4: + r0 = (s.y___34980 <= s.yn___34957); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 7; continue; } + s.tmp_1 = tiles_TileMapData_getTile__P20761_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.x___34974; + s.tmp_1.arg2 = s.y___34980; + s.callLocIdx = 843; s.pc = 28; return s.tmp_1; + case 28: + r0 = s.retval; + s.index___34986 = (r0); + s.tmp_0 = tiles_TileMapData_getTileImage__P20764_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_0.arg0 = r0; + s.tmp_0.arg1 = s.index___34986; + s.callLocIdx = 844; s.pc = 29; return s.tmp_0; + case 29: + r0 = s.retval; + s.tile___34993 = (r0); + r0 = pxsim_numops_toBoolDecr(s.tile___34993); + if (!r0) { step = 5; continue; } + s.tmp_0 = r0 = s.arg1; + s.tmp_1 = r0 = s.tile___34993; + r0 = (s.x___34974 - s.x0___34926); + 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___34916); + s.tmp_2 = r0; + r0 = (s.y___34980 - s.y0___34950); + 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___34921); + 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___34980 + 1); + s.y___34980 = (r0); + { step = 4; continue; } + case 7: + r0 = (s.x___34974 + 1); + s.x___34974 = (r0); + { step = 3; continue; } + case 8: + r0 = pxsim_numops_toBoolDecr(globals.debug___21005); + if (!r0) { step = 21; continue; } + s.x___35029 = (s.x0___34926); + case 9: + r0 = (s.x___35029 <= s.xn___34933); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 14; continue; } + r0 = (s.x___35029 - s.x0___34926); + 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___34916); + s.xLine___35035 = (r0); + r0 = (s.xLine___35035 >= 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___35035; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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__P19996_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = s.xLine___35035; + s.tmp_4.arg2 = 0; + s.tmp_4.arg3 = s.xLine___35035; + r0 = pxsim_ImageMethods.height(s.arg1); + s.tmp_4.arg4 = r0; + s.tmp_4.arg5 = 1; + s.callLocIdx = 848; s.pc = 30; return s.tmp_4; + case 30: + r0 = s.retval; + case 12: + case 13: + r0 = (s.x___35029 + 1); + s.x___35029 = (r0); + { step = 9; continue; } + case 14: + s.y___35061 = (s.y0___34950); + case 15: + r0 = (s.y___35061 <= s.yn___34957); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 20; continue; } + r0 = (s.y___35061 - s.y0___34950); + 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___34921); + s.yLine___35067 = (r0); + r0 = (s.yLine___35067 >= 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___35067; + r0 = pxsim_ImageMethods.height(globals.screen___20070); + 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__P19996_mk(s); + s.tmp_4.arg0 = s.arg1; + s.tmp_4.arg1 = 0; + s.tmp_4.arg2 = s.yLine___35067; + r0 = pxsim_ImageMethods.width(s.arg1); + s.tmp_4.arg3 = r0; + s.tmp_4.arg4 = s.yLine___35067; + s.tmp_4.arg5 = 1; + s.callLocIdx = 850; s.pc = 31; return s.tmp_4; + case 31: + r0 = s.retval; + case 18: + case 19: + r0 = (s.y___35061 + 1); + s.y___35061 = (r0); + { step = 15; continue; } + case 20: + case 21: + case 22: + case 23: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_clear__P2452.info = {"start":2532,"length":50,"line":72,"column":8,"endLine":74,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"clear","argumentNames":["this"]} +tiles_TileMap_draw__P22911.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 sprites_SpriteMap_clear__P2452_mk(s) { +function tiles_TileMap_draw__P22911_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_clear__P2452, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_draw__P22911, 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___34910: undefined, + offsetX___34916: undefined, + offsetY___34921: undefined, + x0___34926: undefined, + xn___34933: undefined, + y0___34950: undefined, + yn___34957: undefined, + x___34974: undefined, + y___34980: undefined, + index___34986: undefined, + tile___34993: undefined, + x___35029: undefined, + xLine___35035: undefined, + y___35061: undefined, + yLine___35067: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function sprites_SpriteMap_resizeBuckets__P2451(s) { +function tiles_TileMap_scale__P20777(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -35971,170 +39351,40 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.maxWidth___16415 = undefined; - s.maxHeight___16416 = undefined; - s.sprite___16418 = undefined; - s.unnamed70___U3 = undefined; - s.unnamed71___U4 = undefined; - s.tMap___16434 = undefined; - s.areaWidth___16438 = undefined; - s.areaHeight___16445 = 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__C2446_VT)) failedCast(r0); - s.maxWidth___16415 = (0); - s.maxHeight___16416 = (0); - s.sprite___16418 = (undefined); - s.unnamed70___U3 = (s.arg1); - s.unnamed71___U4 = (0); - case 1: - s.tmp_0 = r0 = s.unnamed71___U4; - r0 = pxsim_Array__length(s.unnamed70___U3); - s.tmp_1 = r0; - r0 = (s.tmp_0 < s.tmp_1); - if (!r0) { step = 6; continue; } - r0 = pxsim_Array__getAt(s.unnamed70___U3, s.unnamed71___U4); - s.sprite___16418 = (r0); - s.tmp_4 = Sprite_width__P2397_mk(s); - s.tmp_4.arg0 = s.sprite___16418; - s.callLocIdx = 492; s.pc = 11; return s.tmp_4; - case 11: - r0 = s.retval; - s.tmp_3 = r0; - r0 = (s.tmp_3 > s.maxWidth___16415); - s.tmp_2 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_2); - if (!r0) { step = 2; continue; } - s.tmp_5 = Sprite_width__P2397_mk(s); - s.tmp_5.arg0 = s.sprite___16418; - s.callLocIdx = 493; s.pc = 12; return s.tmp_5; - case 12: - r0 = s.retval; - s.maxWidth___16415 = (r0); - case 2: - case 3: - s.tmp_2 = Sprite_height__P2398_mk(s); - s.tmp_2.arg0 = s.sprite___16418; - s.callLocIdx = 494; s.pc = 13; return s.tmp_2; - case 13: - r0 = s.retval; - s.tmp_1 = r0; - r0 = (s.tmp_1 > s.maxHeight___16416); + if (!checkSubtype(r0, tiles_TileMap__C20773_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 = 4; continue; } - s.tmp_3 = Sprite_height__P2398_mk(s); - s.tmp_3.arg0 = s.sprite___16418; - s.callLocIdx = 495; s.pc = 14; return s.tmp_3; - case 14: - r0 = s.retval; - s.maxHeight___16416 = (r0); - case 4: - case 5: - r0 = (s.unnamed71___U4 + 1); - s.unnamed71___U4 = (r0); - { step = 1; continue; } - case 6: - s.unnamed70___U3 = (undefined); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 496; s.pc = 15; return s.tmp_0; - case 15: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tMap___16434 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tMap___16434); - if (!r0) { step = 7; continue; } - s.tmp_0 = tiles_TileMap_areaWidth__P2743_mk(s); - s.tmp_0.arg0 = s.tMap___16434; - s.callLocIdx = 497; s.pc = 16; return s.tmp_0; - case 16: - r0 = s.retval; - { step = 8; continue; } - case 7: - r0 = pxsim_ImageMethods.width(globals.screen___2032); - case 8: - // jmp value (already in r0) - s.tmp_1 = r0; - s.areaWidth___16438 = (s.tmp_1); - r0 = pxsim_numops_toBoolDecr(s.tMap___16434); - if (!r0) { step = 9; continue; } - s.tmp_0 = tiles_TileMap_areaHeight__P2744_mk(s); - s.tmp_0.arg0 = s.tMap___16434; - s.callLocIdx = 498; s.pc = 17; return s.tmp_0; - case 17: - r0 = s.retval; - { step = 10; continue; } - case 9: - r0 = pxsim_ImageMethods.height(globals.screen___2032); - case 10: - // jmp value (already in r0) - s.tmp_1 = r0; - s.areaHeight___16445 = (s.tmp_1); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_clamp__P127_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaWidth___16438 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxWidth___16415 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 499; 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__P127_mk(s); - s.tmp_2.arg0 = 8; - r0 = (s.areaHeight___16445 >> 2); - s.tmp_2.arg1 = r0; - r0 = (s.maxHeight___16416 * 2); - s.tmp_2.arg2 = r0; - s.callLocIdx = 500; s.pc = 19; return s.tmp_2; - case 19: + if (!r0) { step = 1; continue; } + s.tmp_1 = tiles_TileMapData_scale__P20760_mk(s); + r0 = s.arg0.fields["_map"]; + s.tmp_1.arg0 = r0; + s.tmp_1.arg1 = s.arg1; + s.callLocIdx = 817; s.pc = 3; return s.tmp_1; + case 3: 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___16445, 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___16438, s.tmp_2); - s.tmp_1 = r0; - r0 = (s.tmp_0).fields["columnCount"] = (s.tmp_1); + case 1: + case 2: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_resizeBuckets__P2451.info = {"start":1696,"length":826,"line":52,"column":8,"endLine":70,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"resizeBuckets","argumentNames":["this","sprites"]} +tiles_TileMap_scale__P20777.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 sprites_SpriteMap_resizeBuckets__P2451_mk(s) { +function tiles_TileMap_scale__P20777_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_resizeBuckets__P2451, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_scale__P20777, 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, - maxWidth___16415: undefined, - maxHeight___16416: undefined, - sprite___16418: undefined, - unnamed70___U3: undefined, - unnamed71___U4: undefined, - tMap___16434: undefined, - areaWidth___16438: undefined, - areaHeight___16445: undefined, arg0: undefined, arg1: undefined, } } @@ -36143,7 +39393,7 @@ function sprites_SpriteMap_resizeBuckets__P2451_mk(s) { -function Sprite_clearObstacles__P2425(s) { +function tiles_TileMap_data__P20778(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36158,24 +39408,19 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_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; - return leave(s, r0) + if (!checkSubtype(r0, tiles_TileMap__C20773_VT)) failedCast(r0); + r0 = s.arg0.fields["_map"]; + return leaveAccessor(s, r0) default: oops() } } } -Sprite_clearObstacles__P2425.info = {"start":24932,"length":54,"line":813,"column":4,"endLine":815,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"clearObstacles","argumentNames":["this"]} +tiles_TileMap_data__P20778.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__P20778.isGetter = true; -function Sprite_clearObstacles__P2425_mk(s) { +function tiles_TileMap_data__P20778_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_clearObstacles__P2425, depth: s.depth + 1, + parent: s, fn: tiles_TileMap_data__P20778, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - tmp_0: undefined, - tmp_1: undefined, arg0: undefined, } } @@ -36183,7 +39428,7 @@ function Sprite_clearObstacles__P2425_mk(s) { -function Fx_idiv__P163(s) { +function scene_BackgroundLayer_constructor__P20724(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36196,28 +39441,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 = pxsim.Math_.idiv(s.arg0, s.arg1); + r0 = s.arg0; + if (!checkSubtype(r0, scene_BackgroundLayer__C20717_VT)) failedCast(r0); + s.tmp_0 = r0 = s.arg0; + s.tmp_2 = Math_max__P18168_mk(s); + s.tmp_2.arg0 = 1; + s.tmp_2.arg1 = s.arg1; + s.callLocIdx = 794; s.pc = 7; return s.tmp_2; + case 7: + r0 = s.retval; + 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; } + 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: + 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() } } } -Fx_idiv__P163.info = {"start":1279,"length":111,"line":38,"column":4,"endLine":40,"endColumn":5,"fileName":"pxt_modules/base/fixed.ts","functionName":"idiv","argumentNames":["a","b"]} +scene_BackgroundLayer_constructor__P20724.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 Fx_idiv__P163_mk(s) { +function scene_BackgroundLayer_constructor__P20724_mk(s) { checkStack(s.depth); return { - parent: s, fn: Fx_idiv__P163, depth: s.depth + 1, + parent: s, fn: scene_BackgroundLayer_constructor__P20724, 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_arrayMap__P106(s) { +function scene_Camera_y__P20829(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36227,67 +39524,41 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.res___16710 = undefined; - s.len___16712 = undefined; - s.i___16715 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - r0 = pxsim_Array__mk(); - s.res___16710 = (r0); - r0 = pxsim_Array__length(s.arg0); - s.len___16712 = (r0); - s.i___16715 = (0); - case 1: - r0 = (s.i___16715 < s.len___16712); + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 2; continue; } - s.tmp_1 = r0 = s.res___16710; - s.tmp_3 = lambda_3_mk(s); - s.tmp_3.argL = s.arg1; - r0 = pxsim_Array__getAt(s.arg0, s.i___16715); - s.tmp_3.arg0 = r0; - s.tmp_3.arg1 = s.i___16715; - setupLambda(s.tmp_3, s.tmp_3.argL); - s.callLocIdx = 3; s.pc = 3; return s.tmp_3; - case 3: - r0 = s.retval; + r0 = pxsim_ImageMethods.height(globals.screen___20070); s.tmp_2 = r0; - r0 = pxsim_Array__push(s.tmp_1, s.tmp_2); - r0 = (s.i___16715 + 1); - s.i___16715 = (r0); - { step = 1; continue; } - case 2: - r0 = s.res___16710; - return leave(s, r0) + r0 = (s.tmp_2 >> 1); + s.tmp_1 = r0; + r0 = (s.tmp_0 + s.tmp_1); + return leaveAccessor(s, r0) default: oops() } } } -helpers_arrayMap__P106.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"]} +scene_Camera_y__P20829.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__P20829.isGetter = true; -function helpers_arrayMap__P106_mk(s) { +function scene_Camera_y__P20829_mk(s) { checkStack(s.depth); return { - parent: s, fn: helpers_arrayMap__P106, depth: s.depth + 1, + parent: s, fn: scene_Camera_y__P20829, 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___16710: undefined, - len___16712: undefined, - i___16715: undefined, arg0: undefined, - arg1: undefined, } } -function ArcadePhysicsEngine_draw__P2538(s) { +function scene_Camera_x__P20828(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36302,25 +39573,28 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - s.tmp_0 = sprites_SpriteMap_draw__P2450_mk(s); - r0 = s.arg0.fields["map"]; - s.tmp_0.arg0 = r0; - s.callLocIdx = 538; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + if (!checkSubtype(r0, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + s.tmp_0 = r0; + r0 = pxsim_ImageMethods.width(globals.screen___20070); + 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() } } } -ArcadePhysicsEngine_draw__P2538.info = {"start":2777,"length":39,"line":108,"column":4,"endLine":110,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"draw","argumentNames":["this"]} +scene_Camera_x__P20828.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__P20828.isGetter = true; -function ArcadePhysicsEngine_draw__P2538_mk(s) { +function scene_Camera_x__P20828_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_draw__P2538, depth: s.depth + 1, + parent: s, fn: scene_Camera_x__P20828, 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, } } @@ -36328,7 +39602,7 @@ function ArcadePhysicsEngine_draw__P2538_mk(s) { -function sprites_SpriteMap_draw__P2450(s) { +function particles_ParticleSource___draw__P21195(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36338,116 +39612,105 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.x___16736 = undefined; - s.y___16742 = undefined; - s.left___16748 = undefined; - s.top___16753 = undefined; - s.k___16758 = undefined; - s.b___16763 = undefined; + s.current___32027 = undefined; + s.left___32030 = undefined; + s.top___32040 = 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__C2446_VT)) failedCast(r0); - s.x___16736 = (0); - case 1: - r0 = s.arg0.fields["columnCount"]; + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + r0 = s.arg0.fields["head"]; + s.current___32027 = (r0); + r0 = s.arg0.fields["pFlags"]; s.tmp_1 = r0; - r0 = (s.x___16736 < s.tmp_1); + r0 = (s.tmp_1 & 4); s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___16742 = (0); + if (!r0) { step = 1; continue; } + r0 = 0; + { step = 2; continue; } + case 1: + r0 = s.arg1.fields["drawOffsetX"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 * 256); + s.tmp_3 = r0; + r0 = (s.tmp_3 | 0); case 2: - r0 = s.arg0.fields["rowCount"]; + // jmp value (already in r0) + s.tmp_4 = r0; + s.left___32030 = (s.tmp_4); + r0 = s.arg0.fields["pFlags"]; s.tmp_1 = r0; - r0 = (s.y___16742 < s.tmp_1); + r0 = (s.tmp_1 & 4); 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___16736 * s.tmp_2); - s.left___16748 = (r0); - r0 = s.arg0.fields["cellHeight"]; - s.tmp_0 = r0; - r0 = (s.y___16742 * s.tmp_0); - s.top___16753 = (r0); - s.tmp_0 = sprites_SpriteMap_key__P4760_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.left___16748; - s.tmp_0.arg2 = s.top___16753; - s.callLocIdx = 490; s.pc = 9; return s.tmp_0; - case 9: - r0 = s.retval; - s.k___16758 = (r0); - r0 = s.arg0.fields["buckets"]; - s.tmp_0 = r0; - r0 = pxsim_Array__getAt(s.tmp_0, s.k___16758); - s.b___16763 = (r0); - s.tmp_0 = r0 = s.b___16763; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 3; continue; } - r0 = s.tmp_0; + if (!r0) { step = 3; continue; } + r0 = 0; { step = 4; continue; } case 3: - r0 = pxsim_Array__length(s.b___16763); + 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___32040 = (s.tmp_4); + case 5: + r0 = pxsim_numops_toBoolDecr(s.current___32027); + if (!r0) { step = 8; continue; } + r0 = s.current___32027.fields["lifespan"]; s.tmp_1 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_1); - if (!r0) { step = 5; continue; } - s.tmp_2 = helpers_imageDrawRect__P1959_mk(s); - s.tmp_2.arg0 = globals.screen___2032; - s.tmp_2.arg1 = s.left___16748; - s.tmp_2.arg2 = s.top___16753; - 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 = 491; s.pc = 10; return s.tmp_2; - case 10: + 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__P23324_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.current___32027; + s.tmp_2.arg2 = s.left___32030; + s.tmp_2.arg3 = s.top___32040; + s.callLocIdx = 1152; s.pc = 9; return s.tmp_2; + case 9: r0 = s.retval; - case 5: case 6: - r0 = (s.y___16742 + 1); - s.y___16742 = (r0); - { step = 2; continue; } case 7: - r0 = (s.x___16736 + 1); - s.x___16736 = (r0); - { step = 1; continue; } + r0 = s.current___32027.fields["next"]; + s.current___32027 = (r0); + { step = 5; continue; } case 8: r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_SpriteMap_draw__P2450.info = {"start":1122,"length":496,"line":36,"column":8,"endLine":47,"endColumn":9,"fileName":"pxt_modules/game/spritemap.ts","functionName":"draw","argumentNames":["this"]} +particles_ParticleSource___draw__P21195.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 sprites_SpriteMap_draw__P2450_mk(s) { +function particles_ParticleSource___draw__P21195_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_SpriteMap_draw__P2450, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource___draw__P21195, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, tmp_2: undefined, - x___16736: undefined, - y___16742: undefined, - left___16748: undefined, - top___16753: undefined, - k___16758: undefined, - b___16763: undefined, + tmp_3: undefined, + tmp_4: undefined, + current___32027: undefined, + left___32030: undefined, + top___32040: undefined, arg0: undefined, + arg1: undefined, } } -function ArcadePhysicsEngine_removeSprite__P2537(s) { +function particles_ParticleSource_drawParticle__P23324(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36460,34 +39723,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; - if (!checkSubtype(r0, ArcadePhysicsEngine__C2527_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array_.removeElement(s.tmp_0, s.arg1); + if (!checkSubtype(r0, particles_ParticleSource__C21189_VT)) failedCast(r0); + s.tmp_0 = particles_ParticleFactory__C21225_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__C21225_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() } } } -ArcadePhysicsEngine_removeSprite__P2537.info = {"start":2691,"length":80,"line":104,"column":4,"endLine":106,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"removeSprite","argumentNames":["this","sprite"]} +particles_ParticleSource_drawParticle__P23324.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 ArcadePhysicsEngine_removeSprite__P2537_mk(s) { +function particles_ParticleSource_drawParticle__P23324_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_removeSprite__P2537, depth: s.depth + 1, + parent: s, fn: particles_ParticleSource_drawParticle__P23324, 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 ArcadePhysicsEngine_addSprite__P2536(s) { +function particles_ParticleFactory_drawParticle__P21228(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36497,75 +39780,52 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.tm___16800 = 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__C2527_VT)) failedCast(r0); - r0 = s.arg0.fields["sprites"]; - s.tmp_0 = r0; - r0 = pxsim_Array__push(s.tmp_0, s.arg1); - s.tmp_0 = game_currentScene__P2999_mk(s); - s.callLocIdx = 536; s.pc = 5; return s.tmp_0; - case 5: - r0 = s.retval; - r0 = r0.fields["tileMap"]; - s.tm___16800 = (r0); - s.tmp_0 = r0 = s.tm___16800; - r0 = pxsim_numops_toBool(s.tmp_0); - if (r0) { step = 1; continue; } - r0 = s.tmp_0; - { step = 2; continue; } - case 1: - s.tmp_1 = tiles_TileMap_isOnWall__P2758_mk(s); - s.tmp_1.arg0 = s.tm___16800; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 537; s.pc = 6; return s.tmp_1; - case 6: - r0 = s.retval; - case 2: - // jmp value (already in r0) + if (!checkSubtype(r0, particles_ParticleFactory__C21225_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___20070; + r0 = (s.arg2 + 128); 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); + r0 = (s.tmp_2 >> 8); + s.tmp_1 = r0; + r0 = (s.arg3 + 128); s.tmp_4 = r0; - r0 = (s.tmp_3).fields["flags"] = (s.tmp_4); - case 3: - case 4: + 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() } } } -ArcadePhysicsEngine_addSprite__P2536.info = {"start":2465,"length":220,"line":96,"column":4,"endLine":102,"endColumn":5,"fileName":"pxt_modules/game/physics.ts","functionName":"addSprite","argumentNames":["this","sprite"]} +particles_ParticleFactory_drawParticle__P21228.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 ArcadePhysicsEngine_addSprite__P2536_mk(s) { +function particles_ParticleFactory_drawParticle__P21228_mk(s) { checkStack(s.depth); return { - parent: s, fn: ArcadePhysicsEngine_addSprite__P2536, depth: s.depth + 1, + parent: s, fn: particles_ParticleFactory_drawParticle__P21228, 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___16800: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function tiles_TileMapData_constructor__P2718(s) { +function game_SplashDialog_drawTextCore__P20980(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36575,101 +39835,301 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: + s.scrollMax___36698 = undefined; + s.left___36741 = undefined; + s.ysub___36786 = undefined; + s.left___36797 = 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, tiles_TileMapData__C2717_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__P2722_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg4; - s.callLocIdx = 808; s.pc = 1; return s.tmp_0; - case 1: + if (!checkSubtype(r0, game_SplashDialog__C20970_VT)) failedCast(r0); + s.tmp_0 = Math_max__P18168_mk(s); + r0 = s.arg0.fields["maxOffset"]; + s.tmp_0.arg0 = r0; + r0 = s.arg0.fields["maxSubOffset"]; + s.tmp_0.arg1 = r0; + s.callLocIdx = 77; s.pc = 15; return s.tmp_0; + case 15: r0 = s.retval; - s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 0); + s.scrollMax___36698 = (r0); + r0 = s.arg0.fields["timer"]; s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_width"] = (s.tmp_1); + r0 = (s.tmp_1 > 0); + 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__P21040_mk(s); + s.callLocIdx = 78; s.pc = 16; return s.tmp_7; + case 16: + 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); + case 1: + case 2: + case 3: + case 4: + { step = 8; continue; } + case 5: s.tmp_0 = r0 = s.arg0; - r0 = pxsim.BufferMethods.getNumber(s.arg1, 4, 2); + r0 = s.tmp_0.fields["offset"]; + s.tmp_2 = r0; + r0 = (s.tmp_2 + 1); s.tmp_1 = r0; - r0 = (s.tmp_0).fields["_height"] = (s.tmp_1); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMapData_constructor__P2718.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__P2718_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMapData_constructor__P2718, 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__P2722(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_0).fields["offset"] = (s.tmp_1); + r0 = s.arg0.fields["offset"]; + s.tmp_1 = r0; + r0 = (s.tmp_1 >= s.scrollMax___36698); + s.tmp_0 = r0; + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 6; continue; } + r0 = (s.arg0).fields["offset"] = (s.scrollMax___36698); + r0 = (s.arg0).fields["timer"] = (2); + 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 = 80; 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___36741 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_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___36741; + 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 = 81; s.pc = 18; return s.tmp_0; + case 18: + r0 = s.retval; + { step = 10; continue; } + case 9: + s.tmp_0 = helpers_imagePrint__P20028_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 = 82; 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 = 83; s.pc = 20; return s.tmp_3; } + } + case 20: + r0 = s.retval; + s.tmp_2 = r0; + r0 = (10 + s.tmp_2); + s.tmp_1 = r0; + r0 = (s.tmp_1 + 2); + s.ysub___36786 = (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 = 84; s.pc = 21; return s.tmp_10; } } - r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMapData__C2717_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); - s.tmp_0 = r0 = s.arg0; - r0 = pxsim_Array__mk(); + 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); + s.tmp_5 = r0; + r0 = (s.tmp_2 - s.tmp_5); + s.left___36797 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_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___36797; + s.tmp_0.arg3 = s.ysub___36786; + 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 = 85; s.pc = 22; return s.tmp_0; + case 22: + r0 = s.retval; + { step = 12; continue; } + case 11: + s.tmp_0 = helpers_imagePrint__P20028_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; - r0 = (s.tmp_0).fields["cachedTileView"] = (s.tmp_1); + s.tmp_3 = Math_min__P18169_mk(s); + r0 = s.arg0.fields["offset"]; + s.tmp_3.arg0 = r0; + r0 = s.arg0.fields["maxSubOffset"]; + s.tmp_3.arg1 = r0; + s.callLocIdx = 86; 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___36786; + 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 = 87; s.pc = 23; return s.tmp_0; + case 23: + r0 = s.retval; + case 12: + case 13: + case 14: + s.tmp_0 = game_BaseDialog_drawBorder__P22944_mk(s); + s.tmp_0.arg0 = s.arg0; + s.callLocIdx = 88; s.pc = 25; return s.tmp_0; + case 25: + r0 = s.retval; r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMapData_scale__P2722.info = {"start":6640,"length":102,"line":226,"column":8,"endLine":229,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"scale","argumentNames":["this","s"]} +game_SplashDialog_drawTextCore__P20980.info = {"start":9958,"length":1616,"line":306,"column":8,"endLine":344,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"drawTextCore","argumentNames":["this"]} -function tiles_TileMapData_scale__P2722_mk(s) { +function game_SplashDialog_drawTextCore__P20980_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMapData_scale__P2722, depth: s.depth + 1, + parent: s, fn: game_SplashDialog_drawTextCore__P20980, 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, + scrollMax___36698: undefined, + left___36741: undefined, + ysub___36786: undefined, + left___36797: undefined, arg0: undefined, - arg1: undefined, } } -function tiles_TileMap_constructor__P2737(s) { +function game_BaseDialog_setText__P20956(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36685,42 +40145,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - r0 = (s.arg0).fields["_layer"] = (1); - s.tmp_0 = tiles_TileMap_scale__P2739_mk(s); - s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.arg1; - s.callLocIdx = 814; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = pxsim_pxtcore_mkAction(1, tiles_TileMap_inline__P16861); - 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__P2805_mk(s); - s.tmp_3.arg0 = -1; - s.tmp_3.arg1 = s.tmp_0; - s.tmp_3.arg2 = undefined; - s.callLocIdx = 816; s.pc = 2; return s.tmp_3; - case 2: - r0 = s.retval; - s.tmp_2 = r0; - r0 = (s.tmp_1).fields["renderable"] = (s.tmp_2); + if (!checkSubtype(r0, game_BaseDialog__C20941_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -tiles_TileMap_constructor__P2737.info = {"start":8927,"length":268,"line":300,"column":8,"endLine":308,"endColumn":9,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["this","scale"]} +game_BaseDialog_setText__P20956.info = {"start":2302,"length":77,"line":80,"column":8,"endLine":82,"endColumn":9,"fileName":"pxt_modules/game/textDialogs.ts","functionName":"setText","argumentNames":["this","rawString"]} -function tiles_TileMap_constructor__P2737_mk(s) { +function game_BaseDialog_setText__P20956_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_constructor__P2737, depth: s.depth + 1, + parent: s, fn: game_BaseDialog_setText__P20956, 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, } } @@ -36729,7 +40165,7 @@ function tiles_TileMap_constructor__P2737_mk(s) { -function tiles_TileMap_inline__P16861(s) { +function scene_Scene_data__P20906(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36741,37 +40177,30 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } - s.tmp_0 = tiles_TileMap_draw__P4873_mk(s); - s.tmp_0.arg0 = s.caps[0]; - s.tmp_0.arg1 = s.arg0; - s.tmp_0.arg2 = s.arg1; - s.callLocIdx = 815; s.pc = 1; return s.tmp_0; - case 1: - r0 = s.retval; - r0 = undefined; - return leave(s, r0) + r0 = s.arg0; + if (!checkSubtype(r0, scene_Scene__C20881_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; + return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_inline__P16861.info = {"start":9145,"length":25,"line":306,"column":16,"endLine":306,"endColumn":41,"fileName":"pxt_modules/game/tilemap.ts","functionName":"inline","argumentNames":["t","c"]} +scene_Scene_data__P20906.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__P20906.isGetter = true; -function tiles_TileMap_inline__P16861_mk(s) { +function scene_Scene_data__P20906_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_inline__P16861, depth: s.depth + 1, + parent: s, fn: scene_Scene_data__P20906, 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__P4873(s) { +function sprites_SpriteSet_toString__P20512(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -36781,333 +40210,53 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.bitmask___16872 = undefined; - s.offsetX___16878 = undefined; - s.offsetY___16883 = undefined; - s.x0___16888 = undefined; - s.xn___16895 = undefined; - s.y0___16912 = undefined; - s.yn___16919 = undefined; - s.x___16936 = undefined; - s.y___16942 = undefined; - s.index___16948 = undefined; - s.tile___16955 = undefined; - s.x___16991 = undefined; - s.xLine___16997 = undefined; - s.y___17023 = undefined; - s.yLine___17029 = 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__C2735_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; } - 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___16872 = (r0); - r0 = s.arg2.fields["drawOffsetX"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___16872); - s.offsetX___16878 = (r0); - r0 = s.arg2.fields["drawOffsetY"]; - s.tmp_0 = r0; - r0 = (s.tmp_0 & s.bitmask___16872); - s.offsetY___16883 = (r0); - s.tmp_0 = Math_max__P130_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 = 834; s.pc = 24; return s.tmp_0; - case 24: - r0 = s.retval; - s.x0___16888 = (r0); - s.tmp_0 = Math_min__P131_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 = 837; s.pc = 25; return s.tmp_0; - case 25: - r0 = s.retval; - s.xn___16895 = (r0); - s.tmp_0 = Math_max__P130_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 = 839; s.pc = 26; return s.tmp_0; - case 26: - r0 = s.retval; - s.y0___16912 = (r0); - s.tmp_0 = Math_min__P131_mk(s); - r0 = s.arg0.fields["_map"]; + if (!checkSubtype(r0, sprites_SpriteSet__C20501_VT)) failedCast(r0); + r0 = pxsim_String_.mkEmpty(); 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 = 842; s.pc = 27; return s.tmp_0; - case 27: - r0 = s.retval; - s.yn___16919 = (r0); - s.x___16936 = (s.x0___16888); - case 3: - r0 = (s.x___16936 <= s.xn___16895); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 8; continue; } - s.y___16942 = (s.y0___16912); - case 4: - r0 = (s.y___16942 <= s.yn___16919); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 7; continue; } - s.tmp_1 = tiles_TileMapData_getTile__P2723_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.x___16936; - s.tmp_1.arg2 = s.y___16942; - s.callLocIdx = 843; s.pc = 28; return s.tmp_1; - case 28: - r0 = s.retval; - s.index___16948 = (r0); - s.tmp_0 = tiles_TileMapData_getTileImage__P2726_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = s.index___16948; - s.callLocIdx = 844; s.pc = 29; return s.tmp_0; - case 29: - r0 = s.retval; - s.tile___16955 = (r0); - r0 = pxsim_numops_toBoolDecr(s.tile___16955); - if (!r0) { step = 5; continue; } - s.tmp_0 = r0 = s.arg1; - s.tmp_1 = r0 = s.tile___16955; - r0 = (s.x___16936 - s.x0___16888); + r0 = s.arg0.fields["_sprites"]; 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___16878); - s.tmp_2 = r0; - r0 = (s.y___16942 - s.y0___16912); - 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___16883); - 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___16942 + 1); - s.y___16942 = (r0); - { step = 4; continue; } - case 7: - r0 = (s.x___16936 + 1); - s.x___16936 = (r0); - { step = 3; continue; } - case 8: - r0 = pxsim_numops_toBoolDecr(globals.debug___2967); - if (!r0) { step = 21; continue; } - s.x___16991 = (s.x0___16888); - case 9: - r0 = (s.x___16991 <= s.xn___16895); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 14; continue; } - r0 = (s.x___16991 - s.x0___16888); - 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___16878); - s.xLine___16997 = (r0); - r0 = (s.xLine___16997 >= 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___16997; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - s.tmp_2 = r0; - r0 = (s.tmp_1 <= s.tmp_2); - case 11: - // jmp value (already in r0) + r0 = pxsim_Array__length(s.tmp_4); s.tmp_3 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_3); - if (!r0) { step = 12; continue; } - s.tmp_4 = helpers_imageDrawLine__P1958_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = s.xLine___16997; - s.tmp_4.arg2 = 0; - s.tmp_4.arg3 = s.xLine___16997; - r0 = pxsim_ImageMethods.height(s.arg1); - s.tmp_4.arg4 = r0; - s.tmp_4.arg5 = 1; - s.callLocIdx = 848; s.pc = 30; return s.tmp_4; - case 30: + 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; - case 12: - case 13: - r0 = (s.x___16991 + 1); - s.x___16991 = (r0); - { step = 9; continue; } - case 14: - s.y___17023 = (s.y0___16912); - case 15: - r0 = (s.y___17023 <= s.yn___16919); - s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 20; continue; } - r0 = (s.y___17023 - s.y0___16912); 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___16883); - s.yLine___17029 = (r0); - r0 = (s.yLine___17029 >= 0); + r0 = pxsim_String__concat(s.tmp_1, s.tmp_2); 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___17029; - r0 = pxsim_ImageMethods.height(globals.screen___2032); - 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__P1958_mk(s); - s.tmp_4.arg0 = s.arg1; - s.tmp_4.arg1 = 0; - s.tmp_4.arg2 = s.yLine___17029; - r0 = pxsim_ImageMethods.width(s.arg1); - s.tmp_4.arg3 = r0; - s.tmp_4.arg4 = s.yLine___17029; - s.tmp_4.arg5 = 1; - s.callLocIdx = 850; s.pc = 31; return s.tmp_4; - case 31: - r0 = s.retval; - case 18: - case 19: - r0 = (s.y___17023 + 1); - s.y___17023 = (r0); - { step = 15; continue; } - case 20: - case 21: - case 22: - case 23: - r0 = undefined; + r0 = pxsim_String__concat(s.tmp_0, " sprites"); return leave(s, r0) default: oops() } } } -tiles_TileMap_draw__P4873.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"]} +sprites_SpriteSet_toString__P20512.info = {"start":2586,"length":66,"line":97,"column":8,"endLine":99,"endColumn":9,"fileName":"pxt_modules/game/spriteset.ts","functionName":"toString","argumentNames":["this"]} -function tiles_TileMap_draw__P4873_mk(s) { +function sprites_SpriteSet_toString__P20512_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_draw__P4873, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_toString__P20512, 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___16872: undefined, - offsetX___16878: undefined, - offsetY___16883: undefined, - x0___16888: undefined, - xn___16895: undefined, - y0___16912: undefined, - yn___16919: undefined, - x___16936: undefined, - y___16942: undefined, - index___16948: undefined, - tile___16955: undefined, - x___16991: undefined, - xLine___16997: undefined, - y___17023: undefined, - yLine___17029: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function tiles_TileMap_scale__P2739(s) { +function sprites_SpriteSet_length__P20504(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37119,74 +40268,25 @@ switch (step) { if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); - s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_TileMap__C2735_VT)) failedCast(r0); - r0 = (s.arg0).fields["_scale"] = (s.arg1); - r0 = s.arg0.fields["_map"]; + if (!checkSubtype(r0, sprites_SpriteSet__C20501_VT)) failedCast(r0); + r0 = s.arg0.fields["_sprites"]; s.tmp_0 = r0; - r0 = pxsim_numops_toBoolDecr(s.tmp_0); - if (!r0) { step = 1; continue; } - s.tmp_1 = tiles_TileMapData_scale__P2722_mk(s); - r0 = s.arg0.fields["_map"]; - s.tmp_1.arg0 = r0; - s.tmp_1.arg1 = s.arg1; - s.callLocIdx = 817; s.pc = 3; return s.tmp_1; - case 3: - r0 = s.retval; - case 1: - case 2: - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -tiles_TileMap_scale__P2739.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__P2739_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: tiles_TileMap_scale__P2739, 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__P2740(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__C2735_VT)) failedCast(r0); - r0 = s.arg0.fields["_map"]; + r0 = pxsim_Array__length(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -tiles_TileMap_data__P2740.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__P2740.isGetter = true; +sprites_SpriteSet_length__P20504.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__P20504.isGetter = true; -function tiles_TileMap_data__P2740_mk(s) { +function sprites_SpriteSet_length__P20504_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_TileMap_data__P2740, depth: s.depth + 1, + parent: s, fn: sprites_SpriteSet_length__P20504, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + tmp_0: undefined, arg0: undefined, } } @@ -37194,7 +40294,7 @@ function tiles_TileMap_data__P2740_mk(s) { -function Sprite_toString__P2434(s) { +function Sprite_toString__P20472(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37209,7 +40309,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = pxsim_String_.mkEmpty(); s.tmp_9 = r0; r0 = s.arg0.fields["id"]; @@ -37227,7 +40327,7 @@ switch (step) { s.tmp_8 = r0; r0 = pxsim_String__concat(s.tmp_8, "("); s.tmp_7 = r0; - s.tmp_14 = Sprite_x__P2354_mk(s); + s.tmp_14 = Sprite_x__P20392_mk(s); s.tmp_14.arg0 = s.arg0; s.callLocIdx = 443; s.pc = 2; return s.tmp_14; case 2: @@ -37246,7 +40346,7 @@ switch (step) { s.tmp_6 = r0; r0 = pxsim_String__concat(s.tmp_6, ","); s.tmp_5 = r0; - s.tmp_17 = Sprite_y__P2356_mk(s); + s.tmp_17 = Sprite_y__P20394_mk(s); s.tmp_17.arg0 = s.arg0; s.callLocIdx = 444; s.pc = 4; return s.tmp_17; case 4: @@ -37265,7 +40365,7 @@ switch (step) { s.tmp_4 = r0; r0 = pxsim_String__concat(s.tmp_4, ")->("); s.tmp_3 = r0; - s.tmp_20 = Sprite_vx__P2358_mk(s); + s.tmp_20 = Sprite_vx__P20396_mk(s); s.tmp_20.arg0 = s.arg0; s.callLocIdx = 445; s.pc = 6; return s.tmp_20; case 6: @@ -37284,7 +40384,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_23 = Sprite_vy__P2360_mk(s); + s.tmp_23 = Sprite_vy__P20398_mk(s); s.tmp_23.arg0 = s.arg0; s.callLocIdx = 446; s.pc = 8; return s.tmp_23; case 8: @@ -37305,12 +40405,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_toString__P2434.info = {"start":34111,"length":93,"line":1066,"column":4,"endLine":1068,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"toString","argumentNames":["this"]} +Sprite_toString__P20472.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__P2434_mk(s) { +function Sprite_toString__P20472_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_toString__P2434, depth: s.depth + 1, + parent: s, fn: Sprite_toString__P20472, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -37343,7 +40443,7 @@ function Sprite_toString__P2434_mk(s) { -function Sprite___update__P2416(s) { +function Sprite___update__P20454(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37360,7 +40460,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = s.arg0.fields["lifespan"]; s.tmp_1 = r0; r0 = (s.tmp_1 !== undefined); @@ -37382,7 +40482,7 @@ switch (step) { r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 1; continue; } r0 = (s.arg0).fields["lifespan"] = (undefined); - s.tmp_0 = Sprite__destroyCore__P2429_mk(s); + s.tmp_0 = Sprite__destroyCore__P20467_mk(s); s.tmp_0.arg0 = s.arg0; s.callLocIdx = 380; s.pc = 11; return s.tmp_0; case 11: @@ -37400,7 +40500,7 @@ switch (step) { r0 = s.tmp_0; { step = 6; continue; } case 5: - s.tmp_2 = Sprite_isOutOfScreen__P2414_mk(s); + s.tmp_2 = Sprite_isOutOfScreen__P20452_mk(s); s.tmp_2.arg0 = s.arg0; s.tmp_2.arg1 = s.arg1; s.callLocIdx = 381; s.pc = 12; return s.tmp_2; @@ -37411,7 +40511,7 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 7; continue; } - s.tmp_4 = Sprite_destroy__P2428_mk(s); + s.tmp_4 = Sprite_destroy__P20466_mk(s); s.tmp_4.arg0 = s.arg0; s.tmp_4.arg1 = undefined; s.tmp_4.arg2 = undefined; @@ -37424,13 +40524,13 @@ switch (step) { s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); if (!r0) { step = 9; continue; } - s.tmp_1 = sprites_BaseSpriteSayRenderer__C2259_v1_4_mk(s); + s.tmp_1 = sprites_BaseSpriteSayRenderer__C20297_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__C2259_VT)) failedCast(s.tmp_1.arg0); + if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSpriteSayRenderer__C20297_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: @@ -37441,12 +40541,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite___update__P2416.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"]} +Sprite___update__P20454.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 Sprite___update__P2416_mk(s) { +function Sprite___update__P20454_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___update__P2416, depth: s.depth + 1, + parent: s, fn: Sprite___update__P20454, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -37463,7 +40563,7 @@ function Sprite___update__P2416_mk(s) { -function Sprite_isOutOfScreen__P2414(s) { +function Sprite_isOutOfScreen__P20452(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37473,15 +40573,15 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___17142 = undefined; - s.oy___17150 = undefined; + s.ox___35180 = undefined; + s.oy___35188 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 512); @@ -37495,7 +40595,7 @@ switch (step) { case 2: // jmp value (already in r0) s.tmp_2 = r0; - s.ox___17142 = (s.tmp_2); + s.ox___35180 = (s.tmp_2); r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 512); @@ -37509,14 +40609,14 @@ switch (step) { case 4: // jmp value (already in r0) s.tmp_2 = r0; - s.oy___17150 = (s.tmp_2); - s.tmp_3 = Sprite_right__P2401_mk(s); + s.oy___35188 = (s.tmp_2); + s.tmp_3 = Sprite_right__P20439_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 371; s.pc = 11; return s.tmp_3; case 11: r0 = s.retval; s.tmp_2 = r0; - r0 = (s.tmp_2 - s.ox___17142); + r0 = (s.tmp_2 - s.ox___35180); s.tmp_1 = r0; r0 = (s.tmp_1 < 0); s.tmp_0 = r0; @@ -37525,13 +40625,13 @@ switch (step) { r0 = s.tmp_0; { step = 6; continue; } case 5: - s.tmp_6 = Sprite_bottom__P2405_mk(s); + s.tmp_6 = Sprite_bottom__P20443_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 372; s.pc = 12; return s.tmp_6; case 12: r0 = s.retval; s.tmp_5 = r0; - r0 = (s.tmp_5 - s.oy___17150); + r0 = (s.tmp_5 - s.oy___35188); s.tmp_4 = r0; r0 = (s.tmp_4 < 0); case 6: @@ -37542,15 +40642,15 @@ switch (step) { r0 = s.tmp_7; { step = 8; continue; } case 7: - s.tmp_10 = Sprite_left__P2399_mk(s); + s.tmp_10 = Sprite_left__P20437_mk(s); s.tmp_10.arg0 = s.arg0; s.callLocIdx = 373; s.pc = 13; return s.tmp_10; case 13: r0 = s.retval; s.tmp_9 = r0; - r0 = (s.tmp_9 - s.ox___17142); + r0 = (s.tmp_9 - s.ox___35180); s.tmp_8 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); + r0 = pxsim_ImageMethods.width(globals.screen___20070); s.tmp_11 = r0; r0 = (s.tmp_8 > s.tmp_11); case 8: @@ -37561,15 +40661,15 @@ switch (step) { r0 = s.tmp_12; { step = 10; continue; } case 9: - s.tmp_15 = Sprite_top__P2403_mk(s); + s.tmp_15 = Sprite_top__P20441_mk(s); s.tmp_15.arg0 = s.arg0; s.callLocIdx = 374; s.pc = 14; return s.tmp_15; case 14: r0 = s.retval; s.tmp_14 = r0; - r0 = (s.tmp_14 - s.oy___17150); + r0 = (s.tmp_14 - s.oy___35188); s.tmp_13 = r0; - r0 = pxsim_ImageMethods.height(globals.screen___2032); + r0 = pxsim_ImageMethods.height(globals.screen___20070); s.tmp_16 = r0; r0 = (s.tmp_13 > s.tmp_16); case 10: @@ -37579,12 +40679,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_isOutOfScreen__P2414.info = {"start":17830,"length":358,"line":607,"column":4,"endLine":611,"endColumn":5,"fileName":"pxt_modules/game/sprite.ts","functionName":"isOutOfScreen","argumentNames":["this","camera"]} +Sprite_isOutOfScreen__P20452.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 Sprite_isOutOfScreen__P2414_mk(s) { +function Sprite_isOutOfScreen__P20452_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_isOutOfScreen__P2414, depth: s.depth + 1, + parent: s, fn: Sprite_isOutOfScreen__P20452, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -37604,8 +40704,8 @@ function Sprite_isOutOfScreen__P2414_mk(s) { tmp_15: undefined, tmp_16: undefined, tmp_17: undefined, - ox___17142: undefined, - oy___17150: undefined, + ox___35180: undefined, + oy___35188: undefined, arg0: undefined, arg1: undefined, } } @@ -37614,7 +40714,7 @@ function Sprite_isOutOfScreen__P2414_mk(s) { -function sprites_BaseSpriteSayRenderer_update__P2262(s) { +function sprites_BaseSpriteSayRenderer_update__P20300(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37632,17 +40732,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C20297_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_update__P2262.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"]} +sprites_BaseSpriteSayRenderer_update__P20300.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 sprites_BaseSpriteSayRenderer_update__P2262_mk(s) { +function sprites_BaseSpriteSayRenderer_update__P20300_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_update__P2262, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_update__P20300, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -37654,7 +40754,7 @@ function sprites_BaseSpriteSayRenderer_update__P2262_mk(s) { -function Sprite_data__P2377(s) { +function Sprite_data__P20415(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37670,205 +40770,18 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = (s.arg0).fields["_data"] = (s.arg1); r0 = undefined; return leave(s, r0) default: oops() } } } -Sprite_data__P2377.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 Sprite_data__P2377_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_data__P2377, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, -} } - - - - - -function Sprite_data__P2376(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__C2341_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; - 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_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["_data"]; - return leaveAccessor(s, r0) - default: oops() -} } } -Sprite_data__P2376.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__P2376.isGetter = true; - -function Sprite_data__P2376_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: Sprite_data__P2376, 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_BaseSprite___update__P2102(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, sprites_BaseSprite__C2094_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_BaseSprite___update__P2102.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 sprites_BaseSprite___update__P2102_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSprite___update__P2102, depth: s.depth + 1, - pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, - arg0: undefined, - arg1: undefined, - arg2: undefined, -} } - - - - - -function sprites_BaseSprite___draw__P2100(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__C2094_VT)) failedCast(r0); - s.tmp_1 = sprites_BaseSprite__C2094_v0_1_mk(s); - s.tmp_1.arg0 = s.arg0; - if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C2094_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__C2094_v2_2_mk(s); - s.tmp_2.arg0 = s.arg0; - s.tmp_2.arg1 = s.arg1; - if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C2094_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() -} } } -sprites_BaseSprite___draw__P2100.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 sprites_BaseSprite___draw__P2100_mk(s) { - checkStack(s.depth); - return { - parent: s, fn: sprites_BaseSprite___draw__P2100, 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__P2101(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__C2094_VT)) failedCast(r0); - r0 = undefined; - return leave(s, r0) - default: oops() -} } } -sprites_BaseSprite___drawCore__P2101.info = {"start":981,"length":36,"line":43,"column":8,"endLine":43,"endColumn":44,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__drawCore","argumentNames":["this","camera"]} +Sprite_data__P20415.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 sprites_BaseSprite___drawCore__P2101_mk(s) { +function Sprite_data__P20415_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___drawCore__P2101, depth: s.depth + 1, + parent: s, fn: Sprite_data__P20415, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -37878,7 +40791,7 @@ function sprites_BaseSprite___drawCore__P2101_mk(s) { -function sprites_BaseSprite___visible__P2097(s) { +function Sprite_data__P20414(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37893,18 +40806,38 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSprite__C2094_VT)) failedCast(r0); - r0 = true; - return leave(s, r0) + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + r0 = s.arg0.fields["_data"]; + 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_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["_data"]; + return leaveAccessor(s, r0) default: oops() } } } -sprites_BaseSprite___visible__P2097.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} +Sprite_data__P20414.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__P20414.isGetter = true; -function sprites_BaseSprite___visible__P2097_mk(s) { +function Sprite_data__P20414_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSprite___visible__P2097, depth: s.depth + 1, + parent: s, fn: Sprite_data__P20414, 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, } } @@ -37912,7 +40845,7 @@ function sprites_BaseSprite___visible__P2097_mk(s) { -function scene_BackgroundLayer_constructor__P2686(s) { +function sprites_BaseSprite___update__P20140(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -37926,79 +40859,31 @@ 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_BackgroundLayer__C2679_VT)) failedCast(r0); - s.tmp_0 = r0 = s.arg0; - s.tmp_2 = Math_max__P130_mk(s); - s.tmp_2.arg0 = 1; - s.tmp_2.arg1 = s.arg1; - s.callLocIdx = 794; s.pc = 7; return s.tmp_2; - case 7: - r0 = s.retval; - 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; } - 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: - 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: + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -scene_BackgroundLayer_constructor__P2686.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_BaseSprite___update__P20140.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 scene_BackgroundLayer_constructor__P2686_mk(s) { +function sprites_BaseSprite___update__P20140_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_BackgroundLayer_constructor__P2686, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___update__P20140, 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 scene_Camera_y__P2791(s) { +function sprites_BaseSprite___draw__P20138(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38010,39 +40895,54 @@ 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_Camera__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); + s.tmp_1 = sprites_BaseSprite__C20132_v0_1_mk(s); + s.tmp_1.arg0 = s.arg0; + if (!checkSubtype(s.tmp_1.arg0, sprites_BaseSprite__C20132_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_ImageMethods.height(globals.screen___2032); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) + r0 = pxsim_numops_toBoolDecr(s.tmp_0); + if (!r0) { step = 1; continue; } + s.tmp_2 = sprites_BaseSprite__C20132_v2_2_mk(s); + s.tmp_2.arg0 = s.arg0; + s.tmp_2.arg1 = s.arg1; + if (!checkSubtype(s.tmp_2.arg0, sprites_BaseSprite__C20132_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() } } } -scene_Camera_y__P2791.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__P2791.isGetter = true; +sprites_BaseSprite___draw__P20138.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 scene_Camera_y__P2791_mk(s) { +function sprites_BaseSprite___draw__P20138_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_y__P2791, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___draw__P20138, 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_Camera_x__P2790(s) { +function sprites_BaseSprite___drawCore__P20139(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38054,39 +40954,31 @@ 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_Camera__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - s.tmp_0 = r0; - r0 = pxsim_ImageMethods.width(globals.screen___2032); - s.tmp_2 = r0; - r0 = (s.tmp_2 >> 1); - s.tmp_1 = r0; - r0 = (s.tmp_0 + s.tmp_1); - return leaveAccessor(s, r0) + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); + r0 = undefined; + return leave(s, r0) default: oops() } } } -scene_Camera_x__P2790.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__P2790.isGetter = true; +sprites_BaseSprite___drawCore__P20139.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 scene_Camera_x__P2790_mk(s) { +function sprites_BaseSprite___drawCore__P20139_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_x__P2790, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___drawCore__P20139, 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_Scene_data__P2868(s) { +function sprites_BaseSprite___visible__P20135(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38101,18 +40993,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Scene__C2843_VT)) failedCast(r0); - r0 = s.arg0.fields["_data"]; - return leaveAccessor(s, r0) + if (!checkSubtype(r0, sprites_BaseSprite__C20132_VT)) failedCast(r0); + r0 = true; + return leave(s, r0) default: oops() } } } -scene_Scene_data__P2868.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__P2868.isGetter = true; +sprites_BaseSprite___visible__P20135.info = {"start":524,"length":57,"line":22,"column":8,"endLine":24,"endColumn":9,"fileName":"pxt_modules/game/basesprite.ts","functionName":"__visible","argumentNames":["this"]} -function scene_Scene_data__P2868_mk(s) { +function sprites_BaseSprite___visible__P20135_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Scene_data__P2868, depth: s.depth + 1, + parent: s, fn: sprites_BaseSprite___visible__P20135, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -38121,7 +41012,7 @@ function scene_Scene_data__P2868_mk(s) { -function controller_AnyButton_isPressed__P4734(s) { +function controller_AnyButton_isPressed__P22772(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38131,36 +41022,36 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ctrl___17272 = undefined; - s.b___17276 = undefined; - s.unnamed62___U2 = undefined; - s.unnamed63___U3 = undefined; + s.ctrl___35310 = undefined; + s.b___35314 = 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__C4726_VT)) failedCast(r0); - s.tmp_0 = controller__player1__P2128_mk(s); + if (!checkSubtype(r0, controller_AnyButton__C22764_VT)) failedCast(r0); + s.tmp_0 = controller__player1__P20166_mk(s); s.callLocIdx = 196; s.pc = 6; return s.tmp_0; case 6: r0 = s.retval; - s.ctrl___17272 = (r0); - s.b___17276 = (undefined); - r0 = s.ctrl___17272.fields["buttons"]; - s.unnamed62___U2 = (r0); - s.unnamed63___U3 = (0); + s.ctrl___35310 = (r0); + s.b___35314 = (undefined); + r0 = s.ctrl___35310.fields["buttons"]; + s.unnamed154___U2 = (r0); + s.unnamed155___U3 = (0); case 1: - s.tmp_0 = r0 = s.unnamed63___U3; - r0 = pxsim_Array__length(s.unnamed62___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.unnamed62___U2, s.unnamed63___U3); - s.b___17276 = (r0); - s.tmp_3 = controller_Button__C2189_v0_1_mk(s); - s.tmp_3.arg0 = s.b___17276; - if (!checkSubtype(s.tmp_3.arg0, controller_Button__C2189_VT)) failedCast(s.tmp_3.arg0); + r0 = pxsim_Array__getAt(s.unnamed154___U2, s.unnamed155___U3); + s.b___35314 = (r0); + s.tmp_3 = controller_Button__C20227_v0_1_mk(s); + s.tmp_3.arg0 = s.b___35314; + if (!checkSubtype(s.tmp_3.arg0, controller_Button__C20227_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: @@ -38172,31 +41063,31 @@ switch (step) { { step = 5; continue; } case 2: case 3: - r0 = (s.unnamed63___U3 + 1); - s.unnamed63___U3 = (r0); + r0 = (s.unnamed155___U3 + 1); + s.unnamed155___U3 = (r0); { step = 1; continue; } case 4: - s.unnamed62___U2 = (undefined); + s.unnamed154___U2 = (undefined); r0 = false; case 5: return leave(s, r0) default: oops() } } } -controller_AnyButton_isPressed__P4734.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__P22772.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__P4734_mk(s) { +function controller_AnyButton_isPressed__P22772_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_AnyButton_isPressed__P4734, depth: s.depth + 1, + parent: s, fn: controller_AnyButton_isPressed__P22772, 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___17272: undefined, - b___17276: undefined, - unnamed62___U2: undefined, - unnamed63___U3: undefined, + ctrl___35310: undefined, + b___35314: undefined, + unnamed154___U2: undefined, + unnamed155___U3: undefined, arg0: undefined, } } @@ -38204,7 +41095,7 @@ function controller_AnyButton_isPressed__P4734_mk(s) { -function controller_Button_toString__P2194(s) { +function controller_Button_toString__P20232(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38219,7 +41110,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, controller_Button__C2189_VT)) failedCast(r0); + if (!checkSubtype(r0, controller_Button__C20227_VT)) failedCast(r0); r0 = s.arg0.fields["_pressed"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); @@ -38259,12 +41150,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -controller_Button_toString__P2194.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__P20232.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__P2194_mk(s) { +function controller_Button_toString__P20232_mk(s) { checkStack(s.depth); return { - parent: s, fn: controller_Button_toString__P2194, depth: s.depth + 1, + parent: s, fn: controller_Button_toString__P20232, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38280,7 +41171,7 @@ function controller_Button_toString__P2194_mk(s) { -function sprites_BaseSpriteSayRenderer_constructor__P2260(s) { +function sprites_BaseSpriteSayRenderer_constructor__P20298(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38298,7 +41189,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C20297_VT)) failedCast(r0); r0 = (s.arg0).fields["text"] = (s.arg1); r0 = (s.arg0).fields["fgColor"] = (s.arg2); r0 = (s.arg0).fields["bgColor"] = (s.arg3); @@ -38306,12 +41197,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_constructor__P2260.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"]} +sprites_BaseSpriteSayRenderer_constructor__P20298.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__P2260_mk(s) { +function sprites_BaseSpriteSayRenderer_constructor__P20298_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P2260, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_constructor__P20298, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -38323,7 +41214,7 @@ function sprites_BaseSpriteSayRenderer_constructor__P2260_mk(s) { -function sprites_StaticObstacle_width__P2508(s) { +function sprites_StaticObstacle_width__P20546(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38338,20 +41229,20 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C2498_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_StaticObstacle__C20536_VT)) failedCast(r0); r0 = s.arg0.fields["image"]; s.tmp_0 = r0; r0 = pxsim_ImageMethods.width(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_width__P2508.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__P2508.isGetter = true; +sprites_StaticObstacle_width__P20546.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__P20546.isGetter = true; -function sprites_StaticObstacle_width__P2508_mk(s) { +function sprites_StaticObstacle_width__P20546_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_width__P2508, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_width__P20546, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -38361,7 +41252,7 @@ function sprites_StaticObstacle_width__P2508_mk(s) { -function sprites_StaticObstacle_height__P2507(s) { +function sprites_StaticObstacle_height__P20545(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38376,20 +41267,20 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C2498_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_StaticObstacle__C20536_VT)) failedCast(r0); r0 = s.arg0.fields["image"]; s.tmp_0 = r0; r0 = pxsim_ImageMethods.height(s.tmp_0); return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_height__P2507.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__P2507.isGetter = true; +sprites_StaticObstacle_height__P20545.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__P20545.isGetter = true; -function sprites_StaticObstacle_height__P2507_mk(s) { +function sprites_StaticObstacle_height__P20545_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_height__P2507, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_height__P20545, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -38399,7 +41290,7 @@ function sprites_StaticObstacle_height__P2507_mk(s) { -function sprites_StaticObstacle_y__P2506(s) { +function sprites_StaticObstacle_y__P20544(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38414,7 +41305,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C2498_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_StaticObstacle__C20536_VT)) failedCast(r0); r0 = s.arg0.fields["top"]; s.tmp_0 = r0; r0 = s.arg0.fields["image"]; @@ -38427,13 +41318,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_y__P2506.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__P2506.isGetter = true; +sprites_StaticObstacle_y__P20544.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__P20544.isGetter = true; -function sprites_StaticObstacle_y__P2506_mk(s) { +function sprites_StaticObstacle_y__P20544_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_y__P2506, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_y__P20544, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38446,7 +41337,7 @@ function sprites_StaticObstacle_y__P2506_mk(s) { -function sprites_StaticObstacle_x__P2505(s) { +function sprites_StaticObstacle_x__P20543(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38461,7 +41352,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_StaticObstacle__C2498_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_StaticObstacle__C20536_VT)) failedCast(r0); r0 = s.arg0.fields["left"]; s.tmp_0 = r0; r0 = s.arg0.fields["image"]; @@ -38474,13 +41365,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -sprites_StaticObstacle_x__P2505.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__P2505.isGetter = true; +sprites_StaticObstacle_x__P20543.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__P20543.isGetter = true; -function sprites_StaticObstacle_x__P2505_mk(s) { +function sprites_StaticObstacle_x__P20543_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_StaticObstacle_x__P2505, depth: s.depth + 1, + parent: s, fn: sprites_StaticObstacle_x__P20543, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38493,7 +41384,7 @@ function sprites_StaticObstacle_x__P2505_mk(s) { -function tiles_Location_top__P2701(s) { +function tiles_Location_top__P20739(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38508,10 +41399,10 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); r0 = s.arg0.fields["_row"]; s.tmp_0 = r0; - s.tmp_3 = tiles_Location_tileMap__P2695_mk(s); + s.tmp_3 = tiles_Location_tileMap__P20733_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 804; s.pc = 1; return s.tmp_3; case 1: @@ -38523,13 +41414,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_top__P2701.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__P2701.isGetter = true; +tiles_Location_top__P20739.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__P20739.isGetter = true; -function tiles_Location_top__P2701_mk(s) { +function tiles_Location_top__P20739_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_top__P2701, depth: s.depth + 1, + parent: s, fn: tiles_Location_top__P20739, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38542,7 +41433,7 @@ function tiles_Location_top__P2701_mk(s) { -function tiles_Location_left__P2700(s) { +function tiles_Location_left__P20738(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38557,10 +41448,10 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); r0 = s.arg0.fields["_col"]; s.tmp_0 = r0; - s.tmp_3 = tiles_Location_tileMap__P2695_mk(s); + s.tmp_3 = tiles_Location_tileMap__P20733_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 802; s.pc = 1; return s.tmp_3; case 1: @@ -38572,13 +41463,13 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_left__P2700.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__P2700.isGetter = true; +tiles_Location_left__P20738.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__P20738.isGetter = true; -function tiles_Location_left__P2700_mk(s) { +function tiles_Location_left__P20738_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_left__P2700, depth: s.depth + 1, + parent: s, fn: tiles_Location_left__P20738, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38591,7 +41482,7 @@ function tiles_Location_left__P2700_mk(s) { -function tiles_Location_y__P2699(s) { +function tiles_Location_y__P20737(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38601,26 +41492,26 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___17332 = undefined; + s.scale___35370 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P2695_mk(s); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P20733_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 800; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; s.tmp_0 = r0; r0 = s.tmp_0.fields["_scale"]; - s.scale___17332 = (r0); + s.scale___35370 = (r0); r0 = s.arg0.fields["_row"]; s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___17332); + r0 = (s.tmp_1 << s.scale___35370); s.tmp_0 = r0; - r0 = (s.scale___17332 - 1); + r0 = (s.scale___35370 - 1); s.tmp_3 = r0; r0 = (1 << s.tmp_3); s.tmp_2 = r0; @@ -38628,19 +41519,19 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_y__P2699.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__P2699.isGetter = true; +tiles_Location_y__P20737.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__P20737.isGetter = true; -function tiles_Location_y__P2699_mk(s) { +function tiles_Location_y__P20737_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_y__P2699, depth: s.depth + 1, + parent: s, fn: tiles_Location_y__P20737, 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___17332: undefined, + scale___35370: undefined, arg0: undefined, } } @@ -38648,7 +41539,7 @@ function tiles_Location_y__P2699_mk(s) { -function tiles_Location_x__P2698(s) { +function tiles_Location_x__P20736(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38658,26 +41549,26 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.scale___17348 = undefined; + s.scale___35386 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, tiles_Location__C2693_VT)) failedCast(r0); - s.tmp_1 = tiles_Location_tileMap__P2695_mk(s); + if (!checkSubtype(r0, tiles_Location__C20731_VT)) failedCast(r0); + s.tmp_1 = tiles_Location_tileMap__P20733_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 798; s.pc = 1; return s.tmp_1; case 1: r0 = s.retval; s.tmp_0 = r0; r0 = s.tmp_0.fields["_scale"]; - s.scale___17348 = (r0); + s.scale___35386 = (r0); r0 = s.arg0.fields["_col"]; s.tmp_1 = r0; - r0 = (s.tmp_1 << s.scale___17348); + r0 = (s.tmp_1 << s.scale___35386); s.tmp_0 = r0; - r0 = (s.scale___17348 - 1); + r0 = (s.scale___35386 - 1); s.tmp_3 = r0; r0 = (1 << s.tmp_3); s.tmp_2 = r0; @@ -38685,19 +41576,19 @@ switch (step) { return leaveAccessor(s, r0) default: oops() } } } -tiles_Location_x__P2698.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__P2698.isGetter = true; +tiles_Location_x__P20736.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__P20736.isGetter = true; -function tiles_Location_x__P2698_mk(s) { +function tiles_Location_x__P20736_mk(s) { checkStack(s.depth); return { - parent: s, fn: tiles_Location_x__P2698, depth: s.depth + 1, + parent: s, fn: tiles_Location_x__P20736, 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___17348: undefined, + scale___35386: undefined, arg0: undefined, } } @@ -38705,7 +41596,7 @@ function tiles_Location_x__P2698_mk(s) { -function particles_ShapeFactory_drawParticle__P3216(s) { +function particles_ShapeFactory_drawParticle__P21254(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38715,7 +41606,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.pImage___17367 = undefined; + s.pImage___35405 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -38724,8 +41615,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_ShapeFactory__C3213_VT)) failedCast(r0); - s.tmp_1 = Math_FastRandom_pickRandom__P3064_mk(s); + if (!checkSubtype(r0, particles_ShapeFactory__C21251_VT)) failedCast(r0); + s.tmp_1 = Math_FastRandom_pickRandom__P21102_mk(s); r0 = s.arg0.fields["galois"]; s.tmp_1.arg0 = r0; r0 = s.arg0.fields["sources"]; @@ -38735,12 +41626,12 @@ switch (step) { r0 = s.retval; s.tmp_0 = r0; r0 = pxsim_ImageMethods.clone(s.tmp_0); - s.pImage___17367 = (r0); + s.pImage___35405 = (r0); r0 = s.arg1.fields["color"]; s.tmp_0 = r0; - r0 = pxsim_ImageMethods.replace(s.pImage___17367, 15, s.tmp_0); - s.tmp_0 = r0 = globals.screen___2032; - s.tmp_1 = r0 = s.pImage___17367; + r0 = pxsim_ImageMethods.replace(s.pImage___35405, 15, s.tmp_0); + s.tmp_0 = r0 = globals.screen___20070; + s.tmp_1 = r0 = s.pImage___35405; r0 = s.arg0.fields["ox"]; s.tmp_4 = r0; r0 = (s.arg2 - s.tmp_4); @@ -38762,12 +41653,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -particles_ShapeFactory_drawParticle__P3216.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__P21254.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__P3216_mk(s) { +function particles_ShapeFactory_drawParticle__P21254_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_ShapeFactory_drawParticle__P3216, depth: s.depth + 1, + parent: s, fn: particles_ShapeFactory_drawParticle__P21254, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38779,7 +41670,7 @@ function particles_ShapeFactory_drawParticle__P3216_mk(s) { tmp_7: undefined, tmp_8: undefined, tmp_9: undefined, - pImage___17367: undefined, + pImage___35405: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -38790,7 +41681,7 @@ function particles_ShapeFactory_drawParticle__P3216_mk(s) { -function Math_FastRandom_pickRandom__P3064(s) { +function Math_FastRandom_pickRandom__P21102(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38806,7 +41697,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Math_FastRandom__C3059_VT)) failedCast(r0); + if (!checkSubtype(r0, Math_FastRandom__C21097_VT)) failedCast(r0); r0 = pxsim_numops_toBoolDecr(s.arg1); s.tmp_1 = r0; r0 = pxsim_Boolean__bang(s.tmp_1); @@ -38829,7 +41720,7 @@ switch (step) { case 3: case 4: s.tmp_4 = r0 = s.arg1; - s.tmp_6 = Math_FastRandom_randomRange__P3063_mk(s); + s.tmp_6 = Math_FastRandom_randomRange__P21101_mk(s); s.tmp_6.arg0 = s.arg0; s.tmp_6.arg1 = 0; r0 = pxsim_Array__length(s.arg1); @@ -38845,12 +41736,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Math_FastRandom_pickRandom__P3064.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__P21102.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__P3064_mk(s) { +function Math_FastRandom_pickRandom__P21102_mk(s) { checkStack(s.depth); return { - parent: s, fn: Math_FastRandom_pickRandom__P3064, depth: s.depth + 1, + parent: s, fn: Math_FastRandom_pickRandom__P21102, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38868,7 +41759,7 @@ function Math_FastRandom_pickRandom__P3064_mk(s) { -function particles_AreaFactory_drawParticle__P3204(s) { +function particles_AreaFactory_drawParticle__P21242(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38878,7 +41769,7 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.col___17413 = undefined; + s.col___35451 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -38887,7 +41778,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_AreaFactory__C3197_VT)) failedCast(r0); + if (!checkSubtype(r0, particles_AreaFactory__C21235_VT)) failedCast(r0); r0 = s.arg1.fields["lifespan"]; s.tmp_1 = r0; r0 = (s.tmp_1 > 500); @@ -38914,8 +41805,8 @@ switch (step) { case 4: // jmp value (already in r0) s.tmp_5 = r0; - s.col___17413 = (s.tmp_5); - s.tmp_0 = r0 = globals.screen___2032; + s.col___35451 = (s.tmp_5); + s.tmp_0 = r0 = globals.screen___20070; r0 = (s.arg2 + 128); s.tmp_2 = r0; r0 = (s.tmp_2 >> 8); @@ -38924,17 +41815,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___17413); + r0 = pxsim_ImageMethods.setPixel(s.tmp_0, s.tmp_1, s.tmp_3, s.col___35451); r0 = undefined; return leave(s, r0) default: oops() } } } -particles_AreaFactory_drawParticle__P3204.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__P21242.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__P3204_mk(s) { +function particles_AreaFactory_drawParticle__P21242_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_AreaFactory_drawParticle__P3204, depth: s.depth + 1, + parent: s, fn: particles_AreaFactory_drawParticle__P21242, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -38942,7 +41833,7 @@ function particles_AreaFactory_drawParticle__P3204_mk(s) { tmp_3: undefined, tmp_4: undefined, tmp_5: undefined, - col___17413: undefined, + col___35451: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -38953,7 +41844,7 @@ function particles_AreaFactory_drawParticle__P3204_mk(s) { -function particles_SprayFactory_drawParticle__P3194(s) { +function particles_SprayFactory_drawParticle__P21232(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -38971,8 +41862,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, particles_SprayFactory__C3191_VT)) failedCast(r0); - s.tmp_0 = r0 = globals.screen___2032; + if (!checkSubtype(r0, particles_SprayFactory__C21229_VT)) failedCast(r0); + s.tmp_0 = r0 = globals.screen___20070; r0 = (s.arg2 + 128); s.tmp_2 = r0; r0 = (s.tmp_2 >> 8); @@ -38986,12 +41877,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -particles_SprayFactory_drawParticle__P3194.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__P21232.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__P3194_mk(s) { +function particles_SprayFactory_drawParticle__P21232_mk(s) { checkStack(s.depth); return { - parent: s, fn: particles_SprayFactory_drawParticle__P3194, depth: s.depth + 1, + parent: s, fn: particles_SprayFactory_drawParticle__P21232, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39008,7 +41899,7 @@ function particles_SprayFactory_drawParticle__P3194_mk(s) { -function scene_Renderable___drawCore__P2803(s) { +function scene_Renderable___drawCore__P20841(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39024,10 +41915,10 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C2800_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Renderable__C20838_VT)) failedCast(r0); s.tmp_0 = if_handler_3_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = globals.screen___2032; + s.tmp_0.arg1 = globals.screen___20070; 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); @@ -39044,12 +41935,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Renderable___drawCore__P2803.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__P20841.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__P2803_mk(s) { +function scene_Renderable___drawCore__P20841_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___drawCore__P2803, depth: s.depth + 1, + parent: s, fn: scene_Renderable___drawCore__P20841, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -39060,7 +41951,7 @@ function scene_Renderable___drawCore__P2803_mk(s) { -function scene_Renderable___visible__P2802(s) { +function scene_Renderable___visible__P20840(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39075,7 +41966,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, scene_Renderable__C2800_VT)) failedCast(r0); + if (!checkSubtype(r0, scene_Renderable__C20838_VT)) failedCast(r0); s.tmp_0 = if_shouldBeVisible_1_mk(s); s.tmp_0.arg0 = s.arg0; if (!s.tmp_0.arg0.vtable.iface) { @@ -39092,12 +41983,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -scene_Renderable___visible__P2802.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__P20840.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__P2802_mk(s) { +function scene_Renderable___visible__P20840_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Renderable___visible__P2802, depth: s.depth + 1, + parent: s, fn: scene_Renderable___visible__P20840, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, arg0: undefined, @@ -39107,7 +41998,7 @@ function scene_Renderable___visible__P2802_mk(s) { -function Sprite___drawCore__P2415(s) { +function scene_Camera_top__P20832(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39117,24 +42008,94 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.ox___17453 = undefined; - s.oy___17461 = undefined; - s.l___17469 = undefined; - s.t___17475 = undefined; + if (s.lambdaArgs) { + s.arg0 = (s.lambdaArgs[0]); + s.lambdaArgs = null; + } + r0 = s.arg0; + if (!checkSubtype(r0, scene_Camera__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetY"]; + return leaveAccessor(s, r0) + default: oops() +} } } +scene_Camera_top__P20832.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__P20832.isGetter = true; + +function scene_Camera_top__P20832_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Camera_top__P20832, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function scene_Camera_left__P20830(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__C20819_VT)) failedCast(r0); + r0 = s.arg0.fields["_offsetX"]; + return leaveAccessor(s, r0) + default: oops() +} } } +scene_Camera_left__P20830.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__P20830.isGetter = true; + +function scene_Camera_left__P20830_mk(s) { + checkStack(s.depth); + return { + parent: s, fn: scene_Camera_left__P20830, depth: s.depth + 1, + pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, + arg0: undefined, +} } + + + + + +function Sprite___drawCore__P20453(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.ox___35491 = undefined; + s.oy___35499 = undefined; + s.l___35507 = undefined; + s.t___35513 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_0 = Sprite_drawSay__P4754_mk(s); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_0 = Sprite_drawSay__P22792_mk(s); s.tmp_0.arg0 = s.arg0; s.tmp_0.arg1 = s.arg1; s.callLocIdx = 375; s.pc = 8; return s.tmp_0; case 8: r0 = s.retval; - s.tmp_1 = Sprite_isOutOfScreen__P2414_mk(s); + s.tmp_1 = Sprite_isOutOfScreen__P20452_mk(s); s.tmp_1.arg0 = s.arg0; s.tmp_1.arg1 = s.arg1; s.callLocIdx = 376; s.pc = 9; return s.tmp_1; @@ -39159,7 +42120,7 @@ switch (step) { case 4: // jmp value (already in r0) s.tmp_4 = r0; - s.ox___17453 = (s.tmp_4); + s.ox___35491 = (s.tmp_4); r0 = s.arg0.fields["flags"]; s.tmp_1 = r0; r0 = (s.tmp_1 & 512); @@ -39173,42 +42134,42 @@ switch (step) { case 6: // jmp value (already in r0) s.tmp_2 = r0; - s.oy___17461 = (s.tmp_2); - s.tmp_2 = Sprite_left__P2399_mk(s); + s.oy___35499 = (s.tmp_2); + s.tmp_2 = Sprite_left__P20437_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 377; s.pc = 10; return s.tmp_2; case 10: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 - s.ox___17453); + r0 = (s.tmp_1 - s.ox___35491); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - s.l___17469 = (r0); - s.tmp_2 = Sprite_top__P2403_mk(s); + s.l___35507 = (r0); + s.tmp_2 = Sprite_top__P20441_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 378; s.pc = 11; return s.tmp_2; case 11: r0 = s.retval; s.tmp_1 = r0; - r0 = (s.tmp_1 - s.oy___17461); + r0 = (s.tmp_1 - s.oy___35499); s.tmp_0 = r0; r0 = pxsim.Math_.floor(s.tmp_0); - s.t___17475 = (r0); - s.tmp_0 = Sprite__C2341_v6_3_mk(s); + s.t___35513 = (r0); + s.tmp_0 = Sprite__C20379_v6_3_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___17469; - s.tmp_0.arg2 = s.t___17475; - if (!checkSubtype(s.tmp_0.arg0, Sprite__C2341_VT)) failedCast(s.tmp_0.arg0); + s.tmp_0.arg1 = s.l___35507; + s.tmp_0.arg2 = s.t___35513; + if (!checkSubtype(s.tmp_0.arg0, Sprite__C20379_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__P4755_mk(s); + s.tmp_0 = Sprite_drawDebug__P22793_mk(s); s.tmp_0.arg0 = s.arg0; - s.tmp_0.arg1 = s.l___17469; - s.tmp_0.arg2 = s.t___17475; - s.tmp_0.arg3 = s.ox___17453; - s.tmp_0.arg4 = s.oy___17461; + s.tmp_0.arg1 = s.l___35507; + s.tmp_0.arg2 = s.t___35513; + s.tmp_0.arg3 = s.ox___35491; + s.tmp_0.arg4 = s.oy___35499; s.callLocIdx = 379; s.pc = 13; return s.tmp_0; case 13: r0 = s.retval; @@ -39217,22 +42178,22 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite___drawCore__P2415.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__P20453.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__P2415_mk(s) { +function Sprite___drawCore__P20453_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___drawCore__P2415, depth: s.depth + 1, + parent: s, fn: Sprite___drawCore__P20453, 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___17453: undefined, - oy___17461: undefined, - l___17469: undefined, - t___17475: undefined, + ox___35491: undefined, + oy___35499: undefined, + l___35507: undefined, + t___35513: undefined, arg0: undefined, arg1: undefined, } } @@ -39241,7 +42202,7 @@ function Sprite___drawCore__P2415_mk(s) { -function Sprite_drawSprite__P4756(s) { +function Sprite_drawSprite__P22794(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39258,8 +42219,8 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); - s.tmp_3 = Sprite_isScaled__P4753_mk(s); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); + s.tmp_3 = Sprite_isScaled__P22791_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 471; s.pc = 3; return s.tmp_3; case 3: @@ -39273,20 +42234,20 @@ switch (step) { if (!r0) { step = 1; continue; } r0 = s.arg0.fields["_image"]; s.tmp_4 = r0; - r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___2032, s.tmp_4, s.arg1, s.arg2); + r0 = pxsim_ImageMethods.drawTransparentImage(globals.screen___20070, s.tmp_4, s.arg1, s.arg2); { step = 2; continue; } case 1: - s.tmp_0 = helpers_imageBlit__P1953_mk(s); - s.tmp_0.arg0 = globals.screen___2032; + s.tmp_0 = helpers_imageBlit__P19991_mk(s); + s.tmp_0.arg0 = globals.screen___20070; s.tmp_0.arg1 = s.arg1; s.tmp_0.arg2 = s.arg2; - s.tmp_1 = Sprite_width__P2397_mk(s); + s.tmp_1 = Sprite_width__P20435_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 472; s.pc = 5; return s.tmp_1; case 5: r0 = s.retval; s.tmp_0.arg3 = r0; - s.tmp_2 = Sprite_height__P2398_mk(s); + s.tmp_2 = Sprite_height__P20436_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 473; s.pc = 6; return s.tmp_2; case 6: @@ -39314,12 +42275,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawSprite__P4756.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__P22794.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__P4756_mk(s) { +function Sprite_drawSprite__P22794_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSprite__P4756, depth: s.depth + 1, + parent: s, fn: Sprite_drawSprite__P22794, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39335,7 +42296,7 @@ function Sprite_drawSprite__P4756_mk(s) { -function Sprite_drawDebug__P4755(s) { +function Sprite_drawDebug__P22793(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39345,9 +42306,9 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re switch (step) { case 0: - s.font___17499 = undefined; - s.tx___17503 = undefined; - s.ty___17505 = undefined; + s.font___35537 = undefined; + s.tx___35541 = undefined; + s.ty___35543 = undefined; if (s.lambdaArgs) { s.arg0 = (s.lambdaArgs[0]); s.arg1 = (s.lambdaArgs[1]); @@ -39357,17 +42318,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_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___17499 = (globals.font5___1980); - s.tx___17503 = (s.arg1); + s.font___35537 = (globals.font5___20018); + s.tx___35541 = (s.arg1); s.tmp_1 = r0 = s.arg2; - s.tmp_3 = Sprite_height__P2398_mk(s); + s.tmp_3 = Sprite_height__P20436_mk(s); s.tmp_3.arg0 = s.arg0; s.callLocIdx = 447; s.pc = 13; return s.tmp_3; case 13: @@ -39376,12 +42337,12 @@ switch (step) { r0 = (s.tmp_1 + s.tmp_2); s.tmp_0 = r0; r0 = (s.tmp_0 + 2); - s.ty___17505 = (r0); - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = globals.screen___2032; + s.ty___35543 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_mk(s); + s.tmp_0.arg0 = globals.screen___20070; r0 = pxsim_String_.mkEmpty(); s.tmp_3 = r0; - s.tmp_7 = Sprite_x__P2354_mk(s); + s.tmp_7 = Sprite_x__P20392_mk(s); s.tmp_7.arg0 = s.arg0; s.callLocIdx = 448; s.pc = 15; return s.tmp_7; case 15: @@ -39402,7 +42363,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_11 = Sprite_y__P2356_mk(s); + s.tmp_11 = Sprite_y__P20394_mk(s); s.tmp_11.arg0 = s.arg0; s.callLocIdx = 449; s.pc = 17; return s.tmp_11; case 17: @@ -39421,17 +42382,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___17503; - s.tmp_0.arg3 = s.ty___17505; + s.tmp_0.arg2 = s.tx___35541; + s.tmp_0.arg3 = s.ty___35543; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___17499; + s.tmp_0.arg5 = s.font___35537; s.tmp_0.arg6 = undefined; s.callLocIdx = 450; s.pc = 14; return s.tmp_0; case 14: r0 = s.retval; - s.tmp_0 = r0 = s.tx___17503; + s.tmp_0 = r0 = s.tx___35541; s.tmp_2 = if_charWidth_1_mk(s); - s.tmp_2.arg0 = s.font___17499; + s.tmp_2.arg0 = s.font___35537; if (!s.tmp_2.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_2.arg0, "charWidth"); } else { @@ -39444,8 +42405,8 @@ switch (step) { r0 = s.retval; s.tmp_1 = r0; r0 = (s.tmp_0 - s.tmp_1); - s.tx___17503 = (r0); - s.tmp_1 = Sprite_vx__P2358_mk(s); + s.tx___35541 = (r0); + s.tmp_1 = Sprite_vx__P20396_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 452; s.pc = 20; return s.tmp_1; case 20: @@ -39456,7 +42417,7 @@ switch (step) { r0 = s.tmp_0; { step = 2; continue; } case 1: - s.tmp_2 = Sprite_vy__P2360_mk(s); + s.tmp_2 = Sprite_vy__P20398_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 453; s.pc = 21; return s.tmp_2; case 21: @@ -39466,9 +42427,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___17505; + s.tmp_4 = r0 = s.ty___35543; s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___17499; + s.tmp_7.arg0 = s.font___35537; if (!s.tmp_7.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); } else { @@ -39483,10 +42444,10 @@ switch (step) { r0 = (s.tmp_6 + 2); s.tmp_5 = r0; r0 = (s.tmp_4 + s.tmp_5); - s.ty___17505 = (r0); - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - s.tmp_6 = Sprite_vx__P2358_mk(s); + s.ty___35543 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + s.tmp_6 = Sprite_vx__P20396_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 455; s.pc = 24; return s.tmp_6; case 24: @@ -39507,7 +42468,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_10 = Sprite_vy__P2360_mk(s); + s.tmp_10 = Sprite_vy__P20398_mk(s); s.tmp_10.arg0 = s.arg0; s.callLocIdx = 456; s.pc = 26; return s.tmp_10; case 26: @@ -39526,17 +42487,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___17503; - s.tmp_0.arg3 = s.ty___17505; + s.tmp_0.arg2 = s.tx___35541; + s.tmp_0.arg3 = s.ty___35543; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___17499; + s.tmp_0.arg5 = s.font___35537; s.tmp_0.arg6 = undefined; s.callLocIdx = 457; s.pc = 23; return s.tmp_0; case 23: r0 = s.retval; case 3: case 4: - s.tmp_1 = Sprite_ax__P2362_mk(s); + s.tmp_1 = Sprite_ax__P20400_mk(s); s.tmp_1.arg0 = s.arg0; s.callLocIdx = 458; s.pc = 28; return s.tmp_1; case 28: @@ -39547,7 +42508,7 @@ switch (step) { r0 = s.tmp_0; { step = 6; continue; } case 5: - s.tmp_2 = Sprite_ay__P2364_mk(s); + s.tmp_2 = Sprite_ay__P20402_mk(s); s.tmp_2.arg0 = s.arg0; s.callLocIdx = 459; s.pc = 29; return s.tmp_2; case 29: @@ -39557,9 +42518,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___17505; + s.tmp_4 = r0 = s.ty___35543; s.tmp_7 = if_charHeight_1_mk(s); - s.tmp_7.arg0 = s.font___17499; + s.tmp_7.arg0 = s.font___35537; if (!s.tmp_7.arg0.vtable.iface) { s.retval = pxsim_pxtrt.mapGetByString(s.tmp_7.arg0, "charHeight"); } else { @@ -39574,10 +42535,10 @@ switch (step) { r0 = (s.tmp_6 + 2); s.tmp_5 = r0; r0 = (s.tmp_4 + s.tmp_5); - s.ty___17505 = (r0); - s.tmp_0 = helpers_imagePrint__P1990_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - s.tmp_6 = Sprite_ax__P2362_mk(s); + s.ty___35543 = (r0); + s.tmp_0 = helpers_imagePrint__P20028_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + s.tmp_6 = Sprite_ax__P20400_mk(s); s.tmp_6.arg0 = s.arg0; s.callLocIdx = 461; s.pc = 32; return s.tmp_6; case 32: @@ -39598,7 +42559,7 @@ switch (step) { s.tmp_2 = r0; r0 = pxsim_String__concat(s.tmp_2, ","); s.tmp_1 = r0; - s.tmp_10 = Sprite_ay__P2364_mk(s); + s.tmp_10 = Sprite_ay__P20402_mk(s); s.tmp_10.arg0 = s.arg0; s.callLocIdx = 462; s.pc = 34; return s.tmp_10; case 34: @@ -39617,10 +42578,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___17503; - s.tmp_0.arg3 = s.ty___17505; + s.tmp_0.arg2 = s.tx___35541; + s.tmp_0.arg3 = s.ty___35543; s.tmp_0.arg4 = 1; - s.tmp_0.arg5 = s.font___17499; + s.tmp_0.arg5 = s.font___35537; s.tmp_0.arg6 = undefined; s.callLocIdx = 463; s.pc = 31; return s.tmp_0; case 31: @@ -39629,11 +42590,11 @@ switch (step) { case 8: case 9: case 10: - r0 = pxsim_numops_toBoolDecr(globals.debug___2967); + r0 = pxsim_numops_toBoolDecr(globals.debug___21005); if (!r0) { step = 11; continue; } - s.tmp_0 = helpers_imageDrawRect__P1959_mk(s); - s.tmp_0.arg0 = globals.screen___2032; - s.tmp_3 = game_Hitbox_left__P2216_mk(s); + s.tmp_0 = helpers_imageDrawRect__P19997_mk(s); + s.tmp_0.arg0 = globals.screen___20070; + s.tmp_3 = game_Hitbox_left__P20254_mk(s); r0 = s.arg0.fields["_hitbox"]; s.tmp_3.arg0 = r0; s.callLocIdx = 464; s.pc = 37; return s.tmp_3; @@ -39646,7 +42607,7 @@ switch (step) { s.tmp_1 = r0; r0 = (s.tmp_1 - s.arg3); s.tmp_0.arg1 = r0; - s.tmp_7 = game_Hitbox_top__P2217_mk(s); + s.tmp_7 = game_Hitbox_top__P20255_mk(s); r0 = s.arg0.fields["_hitbox"]; s.tmp_7.arg0 = r0; s.callLocIdx = 466; s.pc = 38; return s.tmp_7; @@ -39683,12 +42644,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawDebug__P4755.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__P22793.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__P4755_mk(s) { +function Sprite_drawDebug__P22793_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawDebug__P4755, depth: s.depth + 1, + parent: s, fn: Sprite_drawDebug__P22793, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39703,9 +42664,9 @@ function Sprite_drawDebug__P4755_mk(s) { tmp_10: undefined, tmp_11: undefined, tmp_12: undefined, - font___17499: undefined, - tx___17503: undefined, - ty___17505: undefined, + font___35537: undefined, + tx___35541: undefined, + ty___35543: undefined, arg0: undefined, arg1: undefined, arg2: undefined, @@ -39717,7 +42678,7 @@ function Sprite_drawDebug__P4755_mk(s) { -function Sprite_drawSay__P4754(s) { +function Sprite_drawSay__P22792(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39733,7 +42694,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_0); @@ -39752,23 +42713,23 @@ switch (step) { s.tmp_3 = r0; r0 = pxsim_numops_toBoolDecr(s.tmp_3); if (!r0) { step = 1; continue; } - s.tmp_6 = sprites_BaseSpriteSayRenderer__C2259_v0_4_mk(s); + s.tmp_6 = sprites_BaseSpriteSayRenderer__C20297_v0_4_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_6.arg0 = r0; - s.tmp_6.arg1 = globals.screen___2032; + s.tmp_6.arg1 = globals.screen___20070; s.tmp_6.arg2 = s.arg1; s.tmp_6.arg3 = s.arg0; - if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(s.tmp_6.arg0); + if (!checkSubtype(s.tmp_6.arg0, sprites_BaseSpriteSayRenderer__C20297_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__C2259_v2_1_mk(s); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C20297_v2_1_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0.arg0 = r0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(s.tmp_0.arg0); + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C20297_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: @@ -39778,13 +42739,13 @@ switch (step) { case 2: { step = 4; continue; } case 3: - s.tmp_0 = sprites_BaseSpriteSayRenderer__C2259_v0_4_mk(s); + s.tmp_0 = sprites_BaseSpriteSayRenderer__C20297_v0_4_mk(s); r0 = s.arg0.fields["sayRenderer"]; s.tmp_0.arg0 = r0; - s.tmp_0.arg1 = globals.screen___2032; + s.tmp_0.arg1 = globals.screen___20070; s.tmp_0.arg2 = s.arg1; s.tmp_0.arg3 = s.arg0; - if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(s.tmp_0.arg0); + if (!checkSubtype(s.tmp_0.arg0, sprites_BaseSpriteSayRenderer__C20297_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: @@ -39796,12 +42757,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite_drawSay__P4754.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__P22792.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__P4754_mk(s) { +function Sprite_drawSay__P22792_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite_drawSay__P4754, depth: s.depth + 1, + parent: s, fn: Sprite_drawSay__P22792, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39818,7 +42779,7 @@ function Sprite_drawSay__P4754_mk(s) { -function sprites_BaseSpriteSayRenderer_destroy__P2263(s) { +function sprites_BaseSpriteSayRenderer_destroy__P20301(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39833,17 +42794,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C20297_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_destroy__P2263.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__P20301.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__P2263_mk(s) { +function sprites_BaseSpriteSayRenderer_destroy__P20301_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P2263, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_destroy__P20301, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, } } @@ -39852,7 +42813,7 @@ function sprites_BaseSpriteSayRenderer_destroy__P2263_mk(s) { -function sprites_BaseSpriteSayRenderer_draw__P2261(s) { +function sprites_BaseSpriteSayRenderer_draw__P20299(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39870,17 +42831,17 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C2259_VT)) failedCast(r0); + if (!checkSubtype(r0, sprites_BaseSpriteSayRenderer__C20297_VT)) failedCast(r0); r0 = undefined; return leave(s, r0) default: oops() } } } -sprites_BaseSpriteSayRenderer_draw__P2261.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__P20299.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__P2261_mk(s) { +function sprites_BaseSpriteSayRenderer_draw__P20299_mk(s) { checkStack(s.depth); return { - parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P2261, depth: s.depth + 1, + parent: s, fn: sprites_BaseSpriteSayRenderer_draw__P20299, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, arg0: undefined, arg1: undefined, @@ -39892,7 +42853,7 @@ function sprites_BaseSpriteSayRenderer_draw__P2261_mk(s) { -function Sprite___visible__P2396(s) { +function Sprite___visible__P20434(s) { let r0 = s.r0, step = s.pc; s.pc = -1; @@ -39907,7 +42868,7 @@ switch (step) { s.lambdaArgs = null; } r0 = s.arg0; - if (!checkSubtype(r0, Sprite__C2341_VT)) failedCast(r0); + if (!checkSubtype(r0, Sprite__C20379_VT)) failedCast(r0); r0 = s.arg0.fields["flags"]; s.tmp_2 = r0; r0 = (s.tmp_2 & 128); @@ -39918,12 +42879,12 @@ switch (step) { return leave(s, r0) default: oops() } } } -Sprite___visible__P2396.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__P20434.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__P2396_mk(s) { +function Sprite___visible__P20434_mk(s) { checkStack(s.depth); return { - parent: s, fn: Sprite___visible__P2396, depth: s.depth + 1, + parent: s, fn: Sprite___visible__P20434, depth: s.depth + 1, pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null, tmp_0: undefined, tmp_1: undefined, @@ -39934,77 +42895,81 @@ function Sprite___visible__P2396_mk(s) { - -function scene_Camera_top__P2794(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__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetY"]; - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_top__P2794.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__P2794.isGetter = true; - -function scene_Camera_top__P2794_mk(s) { +function lambda_3_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_top__P2794, depth: s.depth + 1, + 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, + arg2: undefined, } } +function PhysicsEngine__C20549_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_handler_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 scene_Camera_left__P2792(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__C2781_VT)) failedCast(r0); - r0 = s.arg0.fields["_offsetX"]; - return leaveAccessor(s, r0) - default: oops() -} } } -scene_Camera_left__P2792.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__P2792.isGetter = true; -function scene_Camera_left__P2792_mk(s) { +function Sprite__C20379_v5_1_mk(s) { checkStack(s.depth); return { - parent: s, fn: scene_Camera_left__P2792, depth: s.depth + 1, + 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 Sprite__C20379_v4_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 PhysicsEngine__C2511_v4_2_mk(s) { +function if_id_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40019,7 +42984,7 @@ function PhysicsEngine__C2511_v4_2_mk(s) { } } -function if___update_3_mk(s) { +function game_SplashDialog__C20970_v1_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40031,11 +42996,10 @@ function if___update_3_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, - arg2: undefined, } } -function lambda_2_mk(s) { +function game_BaseDialog__C20941_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40046,11 +43010,10 @@ function lambda_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function PhysicsEngine__C2511_v3_1_mk(s) { +function controller_Button__C20227_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40078,7 +43041,7 @@ function if_handler_1_mk(s) { } } -function if_charHeight_1_mk(s) { +function lambda_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40089,10 +43052,11 @@ function if_charHeight_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_charWidth_1_mk(s) { +function PhysicsEngine__C20549_v4_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40103,10 +43067,11 @@ function if_charWidth_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_multiplier_1_mk(s) { +function if___update_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40117,10 +43082,12 @@ function if_multiplier_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, } } -function if_data_1_mk(s) { +function PhysicsEngine__C20549_v3_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40134,7 +43101,7 @@ function if_data_1_mk(s) { } } -function if_xOffset_1_mk(s) { +function if_charHeight_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40148,7 +43115,7 @@ function if_xOffset_1_mk(s) { } } -function if_yOffset_1_mk(s) { +function if_charWidth_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40162,7 +43129,7 @@ function if_yOffset_1_mk(s) { } } -function if___draw_2_mk(s) { +function if_multiplier_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40173,11 +43140,10 @@ function if___draw_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } -function if_z_1_mk(s) { +function if_data_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40191,7 +43157,7 @@ function if_z_1_mk(s) { } } -function if_id_1_mk(s) { +function if_xOffset_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40205,7 +43171,7 @@ function if_id_1_mk(s) { } } -function lambda_3_mk(s) { +function if_yOffset_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40216,12 +43182,10 @@ function lambda_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function controller_Button__C2189_v0_1_mk(s) { +function if___draw_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40232,10 +43196,11 @@ function controller_Button__C2189_v0_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_s_1_mk(s) { +function if_z_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40249,7 +43214,7 @@ function if_s_1_mk(s) { } } -function if_vx_1_mk(s) { +function if_id_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40263,7 +43228,7 @@ function if_vx_1_mk(s) { } } -function if_vy_1_mk(s) { +function if_s_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40277,7 +43242,7 @@ function if_vy_1_mk(s) { } } -function lambda_1_mk(s) { +function if_vx_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40291,7 +43256,7 @@ function lambda_1_mk(s) { } } -function if_condition_1_mk(s) { +function if_vy_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40305,7 +43270,7 @@ function if_condition_1_mk(s) { } } -function lambda_4_mk(s) { +function game_BaseDialog__C20941_v2_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40316,13 +43281,10 @@ function lambda_4_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, - arg3: undefined, } } -function if_effect_3_mk(s) { +function lambda_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40335,10 +43297,11 @@ function if_effect_3_mk(s) { arg0: undefined, arg1: undefined, arg2: undefined, + arg3: undefined, } } -function Sprite__C2341_v5_1_mk(s) { +function lambda_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40352,7 +43315,7 @@ function Sprite__C2341_v5_1_mk(s) { } } -function Sprite__C2341_v4_1_mk(s) { +function if_condition_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40366,7 +43329,7 @@ function Sprite__C2341_v4_1_mk(s) { } } -function if_sourceFactory_3_mk(s) { +function if_effect_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40382,7 +43345,7 @@ function if_sourceFactory_3_mk(s) { } } -function PhysicsEngine__C2511_v1_2_mk(s) { +function if_sourceFactory_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40394,10 +43357,11 @@ function PhysicsEngine__C2511_v1_2_mk(s) { tmp_4: undefined, arg0: undefined, arg1: undefined, + arg2: undefined, } } -function if_destroyHandler_1_mk(s) { +function PhysicsEngine__C20549_v1_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40408,10 +43372,11 @@ function if_destroyHandler_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, } } -function if_handler_2_mk(s) { +function if_destroyHandler_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40422,7 +43387,6 @@ function if_handler_2_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, } } @@ -40580,7 +43544,7 @@ function if_getText_1_mk(s) { } } -function PhysicsEngine__C2511_v2_4_mk(s) { +function PhysicsEngine__C20549_v2_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40654,36 +43618,6 @@ function if_z_2_mk(s) { } } -function PhysicsEngine__C2511_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 { @@ -40712,7 +43646,7 @@ function if_flags_1_mk(s) { } } -function particles_ParticleFactory__C3187_v0_2_mk(s) { +function particles_ParticleFactory__C21225_v0_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40727,7 +43661,7 @@ function particles_ParticleFactory__C3187_v0_2_mk(s) { } } -function particles_ParticleSource__C3151_v4_3_mk(s) { +function particles_ParticleSource__C21189_v4_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40785,7 +43719,7 @@ function if_height_1_mk(s) { } } -function particles_ParticleFactory__C3187_v1_4_mk(s) { +function if_handler_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40798,11 +43732,10 @@ function particles_ParticleFactory__C3187_v1_4_mk(s) { arg0: undefined, arg1: undefined, arg2: undefined, - arg3: undefined, } } -function if_handler_3_mk(s) { +function if_tileIndex_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40813,12 +43746,10 @@ function if_handler_3_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, - arg1: undefined, - arg2: undefined, } } -function if_tileIndex_1_mk(s) { +function if_left_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40832,7 +43763,7 @@ function if_tileIndex_1_mk(s) { } } -function if_left_1_mk(s) { +function if_top_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40846,7 +43777,7 @@ function if_left_1_mk(s) { } } -function if_top_1_mk(s) { +function particles_ParticleFactory__C21225_v1_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40857,10 +43788,13 @@ function if_top_1_mk(s) { tmp_3: undefined, tmp_4: undefined, arg0: undefined, + arg1: undefined, + arg2: undefined, + arg3: undefined, } } -function sprites_BaseSpriteSayRenderer__C2259_v1_4_mk(s) { +function sprites_BaseSpriteSayRenderer__C20297_v1_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40877,7 +43811,7 @@ function sprites_BaseSpriteSayRenderer__C2259_v1_4_mk(s) { } } -function sprites_BaseSprite__C2094_v0_1_mk(s) { +function sprites_BaseSprite__C20132_v0_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40891,7 +43825,7 @@ function sprites_BaseSprite__C2094_v0_1_mk(s) { } } -function sprites_BaseSprite__C2094_v2_2_mk(s) { +function sprites_BaseSprite__C20132_v2_2_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40920,7 +43854,7 @@ function if_shouldBeVisible_1_mk(s) { } } -function Sprite__C2341_v6_3_mk(s) { +function Sprite__C20379_v6_3_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40936,7 +43870,7 @@ function Sprite__C2341_v6_3_mk(s) { } } -function sprites_BaseSpriteSayRenderer__C2259_v0_4_mk(s) { +function sprites_BaseSpriteSayRenderer__C20297_v0_4_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -40953,7 +43887,7 @@ function sprites_BaseSpriteSayRenderer__C2259_v0_4_mk(s) { } } -function sprites_BaseSpriteSayRenderer__C2259_v2_1_mk(s) { +function sprites_BaseSpriteSayRenderer__C20297_v2_1_mk(s) { checkStack(s.depth); return { parent: s, fn: null, depth: s.depth + 1, @@ -41008,7 +43942,7 @@ function if_width_1_mk(s) { arg0: undefined, } } -const controller_Controller__C2134_VT = mkVTable({ +const controller_Controller__C20172_VT = mkVTable({ name: "Controller", numFields: 5, classNo: 16, @@ -41027,28 +43961,29 @@ const controller_Controller__C2134_VT = mkVTable({ "set/_id": null, "_connected": null, "set/_connected": null, - "_controlledSprites": controller_Controller__controlledSprites__P2139, - "set/_controlledSprites": controller_Controller__controlledSprites__P2140, - "id": controller_Controller_id__P2141, - "left": controller_Controller_left__P2143, - "right": controller_Controller_right__P2144, - "up": controller_Controller_up__P2145, - "down": controller_Controller_down__P2146, - "button": controller_Controller_button__P4725, - "connected": controller_Controller_connected__P2155, - "set/connected": controller_Controller_connected__P2156, - "__preUpdate": controller_Controller___preUpdate__P2162, - "__update": controller_Controller___update__P2163, + "_controlledSprites": controller_Controller__controlledSprites__P20177, + "set/_controlledSprites": controller_Controller__controlledSprites__P20178, + "id": controller_Controller_id__P20179, + "left": controller_Controller_left__P20181, + "right": controller_Controller_right__P20182, + "up": controller_Controller_up__P20183, + "down": controller_Controller_down__P20184, + "_moveSpriteInternal": controller_Controller__moveSpriteInternal__P20190, + "button": controller_Controller_button__P22763, + "connected": controller_Controller_connected__P20193, + "set/connected": controller_Controller_connected__P20194, + "__preUpdate": controller_Controller___preUpdate__P20200, + "__update": controller_Controller___update__P20201, }, }); -const controller_Button__C2189_VT = mkVTable({ +const controller_Button__C20227_VT = mkVTable({ name: "Button", numFields: 7, classNo: 17, lastSubtypeNo: 18, maxBgInstances: null, methods: { - "isPressed": controller_Button_isPressed__P2200, + "isPressed": controller_Button_isPressed__P20238, }, iface: { "_owner": null, @@ -41065,122 +44000,373 @@ const controller_Button__C2189_VT = mkVTable({ "set/_pressedElasped": null, "_repeatCount": null, "set/_repeatCount": null, - "handlerState": controller_Button_handlerState__P4728, - "toString": controller_Button_toString__P2194, - "raiseButtonUp": controller_Button_raiseButtonUp__P4729, - "raiseButtonDown": controller_Button_raiseButtonDown__P4730, - "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P4731, - "onEvent": controller_Button_onEvent__P2196, - "isPressed": controller_Button_isPressed__P2200, - "pressureLevel": controller_Button_pressureLevel__P2201, - "setPressed": controller_Button_setPressed__P2202, - "__update": controller_Button___update__P2203, - "runButtonEvents": controller_Button_runButtonEvents__P4732, - "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P4733, + "handlerState": controller_Button_handlerState__P22766, + "toString": controller_Button_toString__P20232, + "raiseButtonUp": controller_Button_raiseButtonUp__P22767, + "raiseButtonDown": controller_Button_raiseButtonDown__P22768, + "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P22769, + "onEvent": controller_Button_onEvent__P20234, + "isPressed": controller_Button_isPressed__P20238, + "pressureLevel": controller_Button_pressureLevel__P20239, + "setPressed": controller_Button_setPressed__P20240, + "__update": controller_Button___update__P20241, + "runButtonEvents": controller_Button_runButtonEvents__P22770, + "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P22771, + }, + toStringMethod: controller_Button_toString__P20232, +}); +const controller_AnyButton__C22764_VT = mkVTable({ + name: "AnyButton", + numFields: 7, + classNo: 18, + lastSubtypeNo: 18, + maxBgInstances: null, + methods: { + "isPressed": controller_AnyButton_isPressed__P22772, + }, + iface: { + "_owner": null, + "set/_owner": null, + "id": null, + "set/id": null, + "repeatDelay": null, + "set/repeatDelay": null, + "repeatInterval": null, + "set/repeatInterval": null, + "_pressed": null, + "set/_pressed": null, + "_pressedElasped": null, + "set/_pressedElasped": null, + "_repeatCount": null, + "set/_repeatCount": null, + "isPressed": controller_AnyButton_isPressed__P22772, + "handlerState": controller_Button_handlerState__P22766, + "toString": controller_Button_toString__P20232, + "raiseButtonUp": controller_Button_raiseButtonUp__P22767, + "raiseButtonDown": controller_Button_raiseButtonDown__P22768, + "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P22769, + "onEvent": controller_Button_onEvent__P20234, + "pressureLevel": controller_Button_pressureLevel__P20239, + "setPressed": controller_Button_setPressed__P20240, + "__update": controller_Button___update__P20241, + "runButtonEvents": controller_Button_runButtonEvents__P22770, + "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P22771, + }, +}); +const game_GameOverConfig__C21011_VT = mkVTable({ + name: "GameOverConfig", + numFields: 14, + classNo: 19, + lastSubtypeNo: 19, + maxBgInstances: null, + methods: { + }, + iface: { + "scoringType": null, + "set/scoringType": null, + "winEffect": null, + "set/winEffect": null, + "loseEffect": null, + "set/loseEffect": null, + "loseSound": null, + "set/loseSound": null, + "winSound": null, + "set/winSound": null, + "loseSoundLooping": null, + "set/loseSoundLooping": null, + "winSoundLooping": null, + "set/winSoundLooping": null, + "winMessage": null, + "set/winMessage": null, + "winMessageMultiplayer": null, + "set/winMessageMultiplayer": null, + "loseMessage": null, + "set/loseMessage": null, + "effectSetByUser": null, + "set/effectSetByUser": null, + "soundSetByUser": null, + "set/soundSetByUser": null, + "messageSetByUser": null, + "set/messageSetByUser": null, + "scoringTypeSetByUser": null, + "set/scoringTypeSetByUser": null, + "init": game_GameOverConfig_init__P21027, + }, +}); +const Math_FastRandom__C21097_VT = mkVTable({ + name: "FastRandom", + numFields: 2, + classNo: 20, + lastSubtypeNo: 20, + maxBgInstances: null, + methods: { + }, + iface: { + "lfsr": null, + "set/lfsr": null, + "seed": null, + "set/seed": null, + "next": Math_FastRandom_next__P21100, + "randomRange": Math_FastRandom_randomRange__P21101, + "pickRandom": Math_FastRandom_pickRandom__P21102, + }, +}); +const sprites_BaseSprite__C20132_VT = mkVTable({ + name: "BaseSprite", + numFields: 2, + classNo: 21, + lastSubtypeNo: 24, + maxBgInstances: null, + methods: { + "__visible": sprites_BaseSprite___visible__P20135, + "__draw": sprites_BaseSprite___draw__P20138, + "__drawCore": sprites_BaseSprite___drawCore__P20139, + "__update": sprites_BaseSprite___update__P20140, + }, + iface: { + "_z": null, + "set/_z": null, + "id": null, + "set/id": null, + "__visible": sprites_BaseSprite___visible__P20135, + "z": sprites_BaseSprite_z__P20136, + "set/z": sprites_BaseSprite_z__P20137, + "__draw": sprites_BaseSprite___draw__P20138, + "__drawCore": sprites_BaseSprite___drawCore__P20139, + "__update": sprites_BaseSprite___update__P20140, + }, +}); +const controller_ControlledSprite__C20168_VT = mkVTable({ + name: "ControlledSprite", + numFields: 4, + classNo: 25, + lastSubtypeNo: 25, + maxBgInstances: null, + methods: { + }, + iface: { + "_inputLastFrame": null, + "set/_inputLastFrame": null, + "s": null, + "set/s": null, + "vx": null, + "set/vx": null, + "vy": null, + "set/vy": null, + }, +}); +const Sprite__C20379_VT = mkVTable({ + name: "Sprite", + numFields: 30, + classNo: 22, + lastSubtypeNo: 22, + maxBgInstances: null, + methods: { + "__visible": Sprite___visible__P20434, + "__draw": sprites_BaseSprite___draw__P20138, + "__drawCore": Sprite___drawCore__P20453, + "__update": Sprite___update__P20454, + "setHitbox": Sprite_setHitbox__P20432, + "recalcSize": Sprite_recalcSize__P22790, + "drawSprite": Sprite_drawSprite__P22794, + }, + iface: { + "_z": null, + "set/_z": null, + "id": null, + "set/id": null, + "_x": null, + "set/_x": null, + "_y": null, + "set/_y": null, + "_vx": null, + "set/_vx": null, + "_vy": null, + "set/_vy": null, + "_ax": null, + "set/_ax": null, + "_ay": null, + "set/_ay": null, + "_fx": null, + "set/_fx": null, + "_fy": null, + "set/_fy": null, + "_sx": null, + "set/_sx": null, + "_sy": null, + "set/_sy": null, + "_width": null, + "set/_width": null, + "_height": null, + "set/_height": null, + "_data": null, + "set/_data": null, + "_kind": null, + "set/_kind": null, + "layer": null, + "set/layer": null, + "_lastX": null, + "set/_lastX": null, + "_lastY": null, + "set/_lastY": null, + "_action": null, + "set/_action": null, + "lifespan": null, + "set/lifespan": null, + "_image": null, + "set/_image": null, + "_obstacles": null, + "set/_obstacles": null, + "sayEndTime": null, + "set/sayEndTime": null, + "sayRenderer": null, + "set/sayRenderer": null, + "_hitbox": null, + "set/_hitbox": null, + "_overlappers": null, + "set/_overlappers": null, + "_kindsOverlappedWith": null, + "set/_kindsOverlappedWith": null, + "flags": null, + "set/flags": null, + "destroyHandler": null, + "set/destroyHandler": null, + "x": Sprite_x__P20392, + "set/x": Sprite_x__P20393, + "y": Sprite_y__P20394, + "set/y": Sprite_y__P20395, + "vx": Sprite_vx__P20396, + "set/vx": Sprite_vx__P20397, + "vy": Sprite_vy__P20398, + "set/vy": Sprite_vy__P20399, + "ax": Sprite_ax__P20400, + "set/ax": Sprite_ax__P20401, + "ay": Sprite_ay__P20402, + "set/ay": Sprite_ay__P20403, + "fx": Sprite_fx__P20404, + "set/fx": Sprite_fx__P20405, + "fy": Sprite_fy__P20406, + "set/fy": Sprite_fy__P20407, + "sx": Sprite_sx__P20408, + "sy": Sprite_sy__P20410, + "data": Sprite_data__P20414, + "set/data": Sprite_data__P20415, + "image": Sprite_image__P20428, + "setImage": Sprite_setImage__P20429, + "calcDimensionalHash": Sprite_calcDimensionalHash__P20430, + "resetHitbox": Sprite_resetHitbox__P20431, + "setHitbox": Sprite_setHitbox__P20432, + "isStatic": Sprite_isStatic__P20433, + "__visible": Sprite___visible__P20434, + "recalcSize": Sprite_recalcSize__P22790, + "isScaled": Sprite_isScaled__P22791, + "width": Sprite_width__P20435, + "height": Sprite_height__P20436, + "left": Sprite_left__P20437, + "set/left": Sprite_left__P20438, + "right": Sprite_right__P20439, + "set/right": Sprite_right__P20440, + "top": Sprite_top__P20441, + "set/top": Sprite_top__P20442, + "bottom": Sprite_bottom__P20443, + "set/bottom": Sprite_bottom__P20444, + "kind": Sprite_kind__P20445, + "setKind": Sprite_setKind__P20446, + "isOutOfScreen": Sprite_isOutOfScreen__P20452, + "__drawCore": Sprite___drawCore__P20453, + "__update": Sprite___update__P20454, + "setFlag": Sprite_setFlag__P20457, + "overlapsWith": Sprite_overlapsWith__P20458, + "clearObstacles": Sprite_clearObstacles__P20463, + "registerObstacle": Sprite_registerObstacle__P20464, + "destroy": Sprite_destroy__P20466, + "_destroyCore": Sprite__destroyCore__P20467, + "toString": Sprite_toString__P20472, + "drawSay": Sprite_drawSay__P22792, + "drawDebug": Sprite_drawDebug__P22793, + "drawSprite": Sprite_drawSprite__P22794, + "z": sprites_BaseSprite_z__P20136, + "set/z": sprites_BaseSprite_z__P20137, + "__draw": sprites_BaseSprite___draw__P20138, }, - toStringMethod: controller_Button_toString__P2194, + toStringMethod: Sprite_toString__P20472, }); -const controller_AnyButton__C4726_VT = mkVTable({ - name: "AnyButton", - numFields: 7, - classNo: 18, - lastSubtypeNo: 18, +const PhysicsEngine__C20549_VT = mkVTable({ + name: "PhysicsEngine", + numFields: 0, + classNo: 26, + lastSubtypeNo: 27, maxBgInstances: null, methods: { - "isPressed": controller_AnyButton_isPressed__P4734, + "addSprite": PhysicsEngine_addSprite__P20551, + "removeSprite": PhysicsEngine_removeSprite__P20552, + "moveSprite": PhysicsEngine_moveSprite__P20553, + "draw": PhysicsEngine_draw__P20554, + "move": PhysicsEngine_move__P20555, }, iface: { - "_owner": null, - "set/_owner": null, - "id": null, - "set/id": null, - "repeatDelay": null, - "set/repeatDelay": null, - "repeatInterval": null, - "set/repeatInterval": null, - "_pressed": null, - "set/_pressed": null, - "_pressedElasped": null, - "set/_pressedElasped": null, - "_repeatCount": null, - "set/_repeatCount": null, - "isPressed": controller_AnyButton_isPressed__P4734, - "handlerState": controller_Button_handlerState__P4728, - "toString": controller_Button_toString__P2194, - "raiseButtonUp": controller_Button_raiseButtonUp__P4729, - "raiseButtonDown": controller_Button_raiseButtonDown__P4730, - "raiseButtonRepeat": controller_Button_raiseButtonRepeat__P4731, - "onEvent": controller_Button_onEvent__P2196, - "pressureLevel": controller_Button_pressureLevel__P2201, - "setPressed": controller_Button_setPressed__P2202, - "__update": controller_Button___update__P2203, - "runButtonEvents": controller_Button_runButtonEvents__P4732, - "getOrCreateHandlerForEvent": controller_Button_getOrCreateHandlerForEvent__P4733, + "addSprite": PhysicsEngine_addSprite__P20551, + "removeSprite": PhysicsEngine_removeSprite__P20552, + "moveSprite": PhysicsEngine_moveSprite__P20553, + "draw": PhysicsEngine_draw__P20554, + "move": PhysicsEngine_move__P20555, }, }); -const game_GameOverConfig__C2973_VT = mkVTable({ - name: "GameOverConfig", - numFields: 14, - classNo: 19, - lastSubtypeNo: 19, +const sprites_SpriteSet__C20501_VT = mkVTable({ + name: "SpriteSet", + numFields: 1, + classNo: 28, + lastSubtypeNo: 28, maxBgInstances: null, methods: { }, iface: { - "scoringType": null, - "set/scoringType": null, - "winEffect": null, - "set/winEffect": null, - "loseEffect": null, - "set/loseEffect": null, - "loseSound": null, - "set/loseSound": null, - "winSound": null, - "set/winSound": null, - "loseSoundLooping": null, - "set/loseSoundLooping": null, - "winSoundLooping": null, - "set/winSoundLooping": null, - "winMessage": null, - "set/winMessage": null, - "winMessageMultiplayer": null, - "set/winMessageMultiplayer": null, - "loseMessage": null, - "set/loseMessage": null, - "effectSetByUser": null, - "set/effectSetByUser": null, - "soundSetByUser": null, - "set/soundSetByUser": null, - "messageSetByUser": null, - "set/messageSetByUser": null, - "scoringTypeSetByUser": null, - "set/scoringTypeSetByUser": null, - "init": game_GameOverConfig_init__P2989, + "_sprites": null, + "set/_sprites": null, + "length": sprites_SpriteSet_length__P20504, + "add": sprites_SpriteSet_add__P20506, + "remove": sprites_SpriteSet_remove__P20508, + "contains": sprites_SpriteSet_contains__P20509, + "toString": sprites_SpriteSet_toString__P20512, }, + toStringMethod: sprites_SpriteSet_toString__P20512, }); -const Math_FastRandom__C3059_VT = mkVTable({ - name: "FastRandom", - numFields: 2, - classNo: 20, - lastSubtypeNo: 20, +const game_Hitbox__C20246_VT = mkVTable({ + name: "Hitbox", + numFields: 6, + classNo: 29, + lastSubtypeNo: 29, maxBgInstances: null, methods: { }, iface: { - "lfsr": null, - "set/lfsr": null, - "seed": null, - "set/seed": null, - "next": Math_FastRandom_next__P3062, - "randomRange": Math_FastRandom_randomRange__P3063, - "pickRandom": Math_FastRandom_pickRandom__P3064, + "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__P20254, + "top": game_Hitbox_top__P20255, + "right": game_Hitbox_right__P20256, + "bottom": game_Hitbox_bottom__P20257, + "isValid": game_Hitbox_isValid__P20258, + "contains": game_Hitbox_contains__P20259, + "updateIfInvalid": game_Hitbox_updateIfInvalid__P20260, + "overlapsWith": game_Hitbox_overlapsWith__P20261, }, }); -const scene_Scene__C2843_VT = mkVTable({ +const scene_Scene__C20881_VT = mkVTable({ name: "Scene", numFields: 25, - classNo: 21, - lastSubtypeNo: 21, + classNo: 30, + lastSubtypeNo: 30, maxBgInstances: null, methods: { }, @@ -41235,18 +44421,130 @@ const scene_Scene__C2843_VT = mkVTable({ "set/_data": null, "previousScene": null, "set/previousScene": null, - "init": scene_Scene_init__P2867, - "data": scene_Scene_data__P2868, - "millis": scene_Scene_millis__P2869, - "addSprite": scene_Scene_addSprite__P2870, - "render": scene_Scene_render__P2872, + "init": scene_Scene_init__P20905, + "data": scene_Scene_data__P20906, + "millis": scene_Scene_millis__P20907, + "addSprite": scene_Scene_addSprite__P20908, + "render": scene_Scene_render__P20910, + }, +}); +const game_BaseDialog__C20941_VT = mkVTable({ + name: "BaseDialog", + numFields: 11, + classNo: 31, + lastSubtypeNo: 32, + maxBgInstances: null, + methods: { + "update": game_BaseDialog_update__P20955, + "setText": game_BaseDialog_setText__P20956, + "drawTextCore": game_BaseDialog_drawTextCore__P20957, + }, + 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__P20954, + "update": game_BaseDialog_update__P20955, + "setText": game_BaseDialog_setText__P20956, + "drawTextCore": game_BaseDialog_drawTextCore__P20957, + "drawCursorRow": game_BaseDialog_drawCursorRow__P20958, + "drawBorder": game_BaseDialog_drawBorder__P22944, + "fastFill": game_BaseDialog_fastFill__P22945, + "clearInterior": game_BaseDialog_clearInterior__P22946, + "drawPartial": game_BaseDialog_drawPartial__P22947, + "cursorRowHeight": game_BaseDialog_cursorRowHeight__P22948, + "textAreaWidth": game_BaseDialog_textAreaWidth__P22950, + "textAreaHeight": game_BaseDialog_textAreaHeight__P22951, + "setFont": game_BaseDialog_setFont__P22952, + }, +}); +const game_SplashDialog__C20970_VT = mkVTable({ + name: "SplashDialog", + numFields: 17, + classNo: 32, + lastSubtypeNo: 32, + maxBgInstances: null, + methods: { + "update": game_BaseDialog_update__P20955, + "setText": game_SplashDialog_setText__P20978, + "drawTextCore": game_SplashDialog_drawTextCore__P20980, + }, + 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__P22955, + "setText": game_SplashDialog_setText__P20978, + "setSubtext": game_SplashDialog_setSubtext__P20979, + "drawTextCore": game_SplashDialog_drawTextCore__P20980, + "resize": game_BaseDialog_resize__P20954, + "update": game_BaseDialog_update__P20955, + "drawCursorRow": game_BaseDialog_drawCursorRow__P20958, + "drawBorder": game_BaseDialog_drawBorder__P22944, + "fastFill": game_BaseDialog_fastFill__P22945, + "clearInterior": game_BaseDialog_clearInterior__P22946, + "drawPartial": game_BaseDialog_drawPartial__P22947, + "cursorRowHeight": game_BaseDialog_cursorRowHeight__P22948, + "textAreaWidth": game_BaseDialog_textAreaWidth__P22950, + "textAreaHeight": game_BaseDialog_textAreaHeight__P22951, + "setFont": game_BaseDialog_setFont__P22952, }, }); -const control_EventContext__C395_VT = mkVTable({ +const control_EventContext__C18433_VT = mkVTable({ name: "EventContext", numFields: 10, - classNo: 22, - lastSubtypeNo: 22, + classNo: 33, + lastSubtypeNo: 33, maxBgInstances: null, methods: { }, @@ -41271,41 +44569,117 @@ const control_EventContext__C395_VT = mkVTable({ "set/idleCallbacks": null, "runningCallbacks": null, "set/runningCallbacks": null, - "deltaTime": control_EventContext_deltaTime__P400, - "runCallbacks": control_EventContext_runCallbacks__P4441, - "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P4442, - "register": control_EventContext_register__P401, - "unregister": control_EventContext_unregister__P402, - "registerFrameHandler": control_EventContext_registerFrameHandler__P403, - "registerHandler": control_EventContext_registerHandler__P405, + "deltaTime": control_EventContext_deltaTime__P18438, + "runCallbacks": control_EventContext_runCallbacks__P22479, + "registerFrameCallbacks": control_EventContext_registerFrameCallbacks__P22480, + "register": control_EventContext_register__P18439, + "unregister": control_EventContext_unregister__P18440, + "registerFrameHandler": control_EventContext_registerFrameHandler__P18441, + "registerHandler": control_EventContext_registerHandler__P18443, }, }); -const PhysicsEngine__C2511_VT = mkVTable({ - name: "PhysicsEngine", - numFields: 0, +const control_FrameCallback__C18430_VT = mkVTable({ + name: "FrameCallback", + numFields: 2, + classNo: 34, + lastSubtypeNo: 34, + maxBgInstances: null, + methods: { + }, + iface: { + "order": null, + "set/order": null, + "handler": null, + "set/handler": null, + }, +}); +const particles_ParticleSource__C21189_VT = mkVTable({ + name: "ParticleSource", + numFields: 13, classNo: 23, - lastSubtypeNo: 24, + lastSubtypeNo: 23, + maxBgInstances: null, + methods: { + "__visible": sprites_BaseSprite___visible__P20135, + "__draw": particles_ParticleSource___draw__P21195, + "__drawCore": sprites_BaseSprite___drawCore__P20139, + "__update": sprites_BaseSprite___update__P20140, + "updateParticle": particles_ParticleSource_updateParticle__P23323, + }, + 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__P21195, + "_update": particles_ParticleSource__update__P21196, + "_prune": particles_ParticleSource__prune__P21197, + "setAcceleration": particles_ParticleSource_setAcceleration__P21198, + "setRelativeToCamera": particles_ParticleSource_setRelativeToCamera__P21200, + "enabled": particles_ParticleSource_enabled__P21201, + "set/enabled": particles_ParticleSource_enabled__P21202, + "destroy": particles_ParticleSource_destroy__P21203, + "clear": particles_ParticleSource_clear__P21204, + "setAnchor": particles_ParticleSource_setAnchor__P21205, + "setRate": particles_ParticleSource_setRate__P21206, + "setFactory": particles_ParticleSource_setFactory__P21208, + "updateParticle": particles_ParticleSource_updateParticle__P23323, + "drawParticle": particles_ParticleSource_drawParticle__P23324, + "__visible": sprites_BaseSprite___visible__P20135, + "z": sprites_BaseSprite_z__P20136, + "set/z": sprites_BaseSprite_z__P20137, + "__drawCore": sprites_BaseSprite___drawCore__P20139, + "__update": sprites_BaseSprite___update__P20140, + }, +}); +const control_EventHandler__C22474_VT = mkVTable({ + name: "EventHandler", + numFields: 4, + classNo: 35, + lastSubtypeNo: 35, maxBgInstances: null, methods: { - "addSprite": PhysicsEngine_addSprite__P2513, - "removeSprite": PhysicsEngine_removeSprite__P2514, - "moveSprite": PhysicsEngine_moveSprite__P2515, - "draw": PhysicsEngine_draw__P2516, - "move": PhysicsEngine_move__P2517, }, iface: { - "addSprite": PhysicsEngine_addSprite__P2513, - "removeSprite": PhysicsEngine_removeSprite__P2514, - "moveSprite": PhysicsEngine_moveSprite__P2515, - "draw": PhysicsEngine_draw__P2516, - "move": PhysicsEngine_move__P2517, + "src": null, + "set/src": null, + "value": null, + "set/value": null, + "handler": null, + "set/handler": null, + "flags": null, + "set/flags": null, + "register": control_EventHandler_register__P22475, + "unregister": control_EventHandler_unregister__P22476, }, }); -const scene_Camera__C2781_VT = mkVTable({ +const scene_Camera__C20819_VT = mkVTable({ name: "Camera", numFields: 10, - classNo: 25, - lastSubtypeNo: 25, + classNo: 36, + lastSubtypeNo: 36, maxBgInstances: null, methods: { }, @@ -41330,44 +44704,23 @@ const scene_Camera__C2781_VT = mkVTable({ "set/shakeDuration": null, "shakeAmplitude": null, "set/shakeAmplitude": null, - "offsetX": scene_Camera_offsetX__P2786, - "set/offsetX": scene_Camera_offsetX__P2787, - "offsetY": scene_Camera_offsetY__P2788, - "set/offsetY": scene_Camera_offsetY__P2789, - "x": scene_Camera_x__P2790, - "y": scene_Camera_y__P2791, - "left": scene_Camera_left__P2792, - "top": scene_Camera_top__P2794, - "isUpdated": scene_Camera_isUpdated__P2797, - "update": scene_Camera_update__P2798, - }, -}); -const control_EventHandler__C4436_VT = mkVTable({ - name: "EventHandler", - numFields: 4, - classNo: 26, - lastSubtypeNo: 26, - 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__P4437, - "unregister": control_EventHandler_unregister__P4438, + "offsetX": scene_Camera_offsetX__P20824, + "set/offsetX": scene_Camera_offsetX__P20825, + "offsetY": scene_Camera_offsetY__P20826, + "set/offsetY": scene_Camera_offsetY__P20827, + "x": scene_Camera_x__P20828, + "y": scene_Camera_y__P20829, + "left": scene_Camera_left__P20830, + "top": scene_Camera_top__P20832, + "isUpdated": scene_Camera_isUpdated__P20835, + "update": scene_Camera_update__P20836, }, }); -const scene_Background__C2669_VT = mkVTable({ +const scene_Background__C20707_VT = mkVTable({ name: "Background", numFields: 4, - classNo: 27, - lastSubtypeNo: 27, + classNo: 37, + lastSubtypeNo: 37, maxBgInstances: null, methods: { }, @@ -41380,14 +44733,16 @@ const scene_Background__C2669_VT = mkVTable({ "set/camera": null, "_layers": null, "set/_layers": null, - "draw": scene_Background_draw__P2678, + "image": scene_Background_image__P20713, + "set/image": scene_Background_image__P20714, + "draw": scene_Background_draw__P20716, }, }); -const scene_BackgroundLayer__C2679_VT = mkVTable({ +const scene_BackgroundLayer__C20717_VT = mkVTable({ name: "BackgroundLayer", numFields: 6, - classNo: 28, - lastSubtypeNo: 28, + classNo: 38, + lastSubtypeNo: 38, maxBgInstances: null, methods: { }, @@ -41404,175 +44759,14 @@ const scene_BackgroundLayer__C2679_VT = mkVTable({ "set/alignX": null, "alignY": null, "set/alignY": null, - "draw": scene_BackgroundLayer_draw__P2687, - }, -}); -const sprites_BaseSprite__C2094_VT = mkVTable({ - name: "BaseSprite", - numFields: 2, - classNo: 29, - lastSubtypeNo: 32, - maxBgInstances: null, - methods: { - "__visible": sprites_BaseSprite___visible__P2097, - "__draw": sprites_BaseSprite___draw__P2100, - "__drawCore": sprites_BaseSprite___drawCore__P2101, - "__update": sprites_BaseSprite___update__P2102, - }, - iface: { - "_z": null, - "set/_z": null, - "id": null, - "set/id": null, - "__visible": sprites_BaseSprite___visible__P2097, - "z": sprites_BaseSprite_z__P2098, - "set/z": sprites_BaseSprite_z__P2099, - "__draw": sprites_BaseSprite___draw__P2100, - "__drawCore": sprites_BaseSprite___drawCore__P2101, - "__update": sprites_BaseSprite___update__P2102, - }, -}); -const Sprite__C2341_VT = mkVTable({ - name: "Sprite", - numFields: 30, - classNo: 30, - lastSubtypeNo: 30, - maxBgInstances: null, - methods: { - "__visible": Sprite___visible__P2396, - "__draw": sprites_BaseSprite___draw__P2100, - "__drawCore": Sprite___drawCore__P2415, - "__update": Sprite___update__P2416, - "setHitbox": Sprite_setHitbox__P2394, - "recalcSize": Sprite_recalcSize__P4752, - "drawSprite": Sprite_drawSprite__P4756, - }, - iface: { - "_z": null, - "set/_z": null, - "id": null, - "set/id": null, - "_x": null, - "set/_x": null, - "_y": null, - "set/_y": null, - "_vx": null, - "set/_vx": null, - "_vy": null, - "set/_vy": null, - "_ax": null, - "set/_ax": null, - "_ay": null, - "set/_ay": null, - "_fx": null, - "set/_fx": null, - "_fy": null, - "set/_fy": null, - "_sx": null, - "set/_sx": null, - "_sy": null, - "set/_sy": null, - "_width": null, - "set/_width": null, - "_height": null, - "set/_height": null, - "_data": null, - "set/_data": null, - "_kind": null, - "set/_kind": null, - "layer": null, - "set/layer": null, - "_lastX": null, - "set/_lastX": null, - "_lastY": null, - "set/_lastY": null, - "_action": null, - "set/_action": null, - "lifespan": null, - "set/lifespan": null, - "_image": null, - "set/_image": null, - "_obstacles": null, - "set/_obstacles": null, - "sayEndTime": null, - "set/sayEndTime": null, - "sayRenderer": null, - "set/sayRenderer": null, - "_hitbox": null, - "set/_hitbox": null, - "_overlappers": null, - "set/_overlappers": null, - "_kindsOverlappedWith": null, - "set/_kindsOverlappedWith": null, - "flags": null, - "set/flags": null, - "destroyHandler": null, - "set/destroyHandler": null, - "x": Sprite_x__P2354, - "set/x": Sprite_x__P2355, - "y": Sprite_y__P2356, - "set/y": Sprite_y__P2357, - "vx": Sprite_vx__P2358, - "set/vx": Sprite_vx__P2359, - "vy": Sprite_vy__P2360, - "set/vy": Sprite_vy__P2361, - "ax": Sprite_ax__P2362, - "set/ax": Sprite_ax__P2363, - "ay": Sprite_ay__P2364, - "set/ay": Sprite_ay__P2365, - "fx": Sprite_fx__P2366, - "set/fx": Sprite_fx__P2367, - "fy": Sprite_fy__P2368, - "set/fy": Sprite_fy__P2369, - "sx": Sprite_sx__P2370, - "sy": Sprite_sy__P2372, - "data": Sprite_data__P2376, - "set/data": Sprite_data__P2377, - "image": Sprite_image__P2390, - "setImage": Sprite_setImage__P2391, - "calcDimensionalHash": Sprite_calcDimensionalHash__P2392, - "resetHitbox": Sprite_resetHitbox__P2393, - "setHitbox": Sprite_setHitbox__P2394, - "isStatic": Sprite_isStatic__P2395, - "__visible": Sprite___visible__P2396, - "recalcSize": Sprite_recalcSize__P4752, - "isScaled": Sprite_isScaled__P4753, - "width": Sprite_width__P2397, - "height": Sprite_height__P2398, - "left": Sprite_left__P2399, - "set/left": Sprite_left__P2400, - "right": Sprite_right__P2401, - "set/right": Sprite_right__P2402, - "top": Sprite_top__P2403, - "set/top": Sprite_top__P2404, - "bottom": Sprite_bottom__P2405, - "set/bottom": Sprite_bottom__P2406, - "kind": Sprite_kind__P2407, - "setKind": Sprite_setKind__P2408, - "isOutOfScreen": Sprite_isOutOfScreen__P2414, - "__drawCore": Sprite___drawCore__P2415, - "__update": Sprite___update__P2416, - "setFlag": Sprite_setFlag__P2419, - "overlapsWith": Sprite_overlapsWith__P2420, - "clearObstacles": Sprite_clearObstacles__P2425, - "registerObstacle": Sprite_registerObstacle__P2426, - "destroy": Sprite_destroy__P2428, - "_destroyCore": Sprite__destroyCore__P2429, - "toString": Sprite_toString__P2434, - "drawSay": Sprite_drawSay__P4754, - "drawDebug": Sprite_drawDebug__P4755, - "drawSprite": Sprite_drawSprite__P4756, - "z": sprites_BaseSprite_z__P2098, - "set/z": sprites_BaseSprite_z__P2099, - "__draw": sprites_BaseSprite___draw__P2100, + "draw": scene_BackgroundLayer_draw__P20725, }, - toStringMethod: Sprite_toString__P2434, }); -const tiles_TileMap__C2735_VT = mkVTable({ +const tiles_TileMap__C20773_VT = mkVTable({ name: "TileMap", numFields: 5, - classNo: 33, - lastSubtypeNo: 33, + classNo: 39, + lastSubtypeNo: 39, maxBgInstances: null, methods: { }, @@ -41587,29 +44781,29 @@ const tiles_TileMap__C2735_VT = mkVTable({ "set/renderable": null, "handlerState": null, "set/handlerState": null, - "scale": tiles_TileMap_scale__P2738, - "set/scale": tiles_TileMap_scale__P2739, - "data": tiles_TileMap_data__P2740, - "offsetX": tiles_TileMap_offsetX__P2741, - "offsetY": tiles_TileMap_offsetY__P2742, - "areaWidth": tiles_TileMap_areaWidth__P2743, - "areaHeight": tiles_TileMap_areaHeight__P2744, - "layer": tiles_TileMap_layer__P2745, - "enabled": tiles_TileMap_enabled__P2747, - "getTile": tiles_TileMap_getTile__P2749, - "getTileIndex": tiles_TileMap_getTileIndex__P2750, - "draw": tiles_TileMap_draw__P4873, - "isObstacle": tiles_TileMap_isObstacle__P2756, - "getObstacle": tiles_TileMap_getObstacle__P2757, - "isOnWall": tiles_TileMap_isOnWall__P2758, - "getTileImage": tiles_TileMap_getTileImage__P2759, + "scale": tiles_TileMap_scale__P20776, + "set/scale": tiles_TileMap_scale__P20777, + "data": tiles_TileMap_data__P20778, + "offsetX": tiles_TileMap_offsetX__P20779, + "offsetY": tiles_TileMap_offsetY__P20780, + "areaWidth": tiles_TileMap_areaWidth__P20781, + "areaHeight": tiles_TileMap_areaHeight__P20782, + "layer": tiles_TileMap_layer__P20783, + "enabled": tiles_TileMap_enabled__P20785, + "getTile": tiles_TileMap_getTile__P20787, + "getTileIndex": tiles_TileMap_getTileIndex__P20788, + "draw": tiles_TileMap_draw__P22911, + "isObstacle": tiles_TileMap_isObstacle__P20794, + "getObstacle": tiles_TileMap_getObstacle__P20795, + "isOnWall": tiles_TileMap_isOnWall__P20796, + "getTileImage": tiles_TileMap_getTileImage__P20797, }, }); -const tiles_TileMapData__C2717_VT = mkVTable({ +const tiles_TileMapData__C20755_VT = mkVTable({ name: "TileMapData", numFields: 7, - classNo: 34, - lastSubtypeNo: 34, + classNo: 40, + lastSubtypeNo: 40, maxBgInstances: null, methods: { }, @@ -41628,66 +44822,28 @@ const tiles_TileMapData__C2717_VT = mkVTable({ "set/_width": null, "_height": null, "set/_height": null, - "width": tiles_TileMapData_width__P2719, - "height": tiles_TileMapData_height__P2720, - "scale": tiles_TileMapData_scale__P2721, - "set/scale": tiles_TileMapData_scale__P2722, - "getTile": tiles_TileMapData_getTile__P2723, - "getTileImage": tiles_TileMapData_getTileImage__P2726, - "isWall": tiles_TileMapData_isWall__P2728, - "isOutsideMap": tiles_TileMapData_isOutsideMap__P2729, - }, -}); -const control_FrameCallback__C392_VT = mkVTable({ - name: "FrameCallback", - numFields: 2, - classNo: 35, - lastSubtypeNo: 35, - maxBgInstances: null, - methods: { - }, - iface: { - "order": null, - "set/order": null, - "handler": null, - "set/handler": null, - }, -}); -const control_PollEvent__C4415_VT = mkVTable({ - name: "PollEvent", - numFields: 6, - classNo: 36, - lastSubtypeNo: 36, - maxBgInstances: null, - methods: { - }, - iface: { - "eid": null, - "set/eid": null, - "vid": null, - "set/vid": null, - "start": null, - "set/start": null, - "timeOut": null, - "set/timeOut": null, - "condition": null, - "set/condition": null, - "once": null, - "set/once": null, + "width": tiles_TileMapData_width__P20757, + "height": tiles_TileMapData_height__P20758, + "scale": tiles_TileMapData_scale__P20759, + "set/scale": tiles_TileMapData_scale__P20760, + "getTile": tiles_TileMapData_getTile__P20761, + "getTileImage": tiles_TileMapData_getTileImage__P20764, + "isWall": tiles_TileMapData_isWall__P20766, + "isOutsideMap": tiles_TileMapData_isOutsideMap__P20767, }, }); -const ArcadePhysicsEngine__C2527_VT = mkVTable({ +const ArcadePhysicsEngine__C20565_VT = mkVTable({ name: "ArcadePhysicsEngine", numFields: 6, - classNo: 24, - lastSubtypeNo: 24, + classNo: 27, + lastSubtypeNo: 27, maxBgInstances: null, methods: { - "addSprite": ArcadePhysicsEngine_addSprite__P2536, - "removeSprite": ArcadePhysicsEngine_removeSprite__P2537, - "moveSprite": ArcadePhysicsEngine_moveSprite__P2541, - "draw": ArcadePhysicsEngine_draw__P2538, - "move": ArcadePhysicsEngine_move__P2539, + "addSprite": ArcadePhysicsEngine_addSprite__P20574, + "removeSprite": ArcadePhysicsEngine_removeSprite__P20575, + "moveSprite": ArcadePhysicsEngine_moveSprite__P20579, + "draw": ArcadePhysicsEngine_draw__P20576, + "move": ArcadePhysicsEngine_move__P20577, }, iface: { "sprites": null, @@ -41702,31 +44858,31 @@ const ArcadePhysicsEngine__C2527_VT = mkVTable({ "set/minSingleStep": null, "maxSingleStep": null, "set/maxSingleStep": null, - "maxSpeed": ArcadePhysicsEngine_maxSpeed__P2529, - "set/maxSpeed": ArcadePhysicsEngine_maxSpeed__P2530, - "minStep": ArcadePhysicsEngine_minStep__P2531, - "set/minStep": ArcadePhysicsEngine_minStep__P2532, - "maxStep": ArcadePhysicsEngine_maxStep__P2533, - "set/maxStep": ArcadePhysicsEngine_maxStep__P2534, - "addSprite": ArcadePhysicsEngine_addSprite__P2536, - "removeSprite": ArcadePhysicsEngine_removeSprite__P2537, - "draw": ArcadePhysicsEngine_draw__P2538, - "move": ArcadePhysicsEngine_move__P2539, - "createMovingSprite": ArcadePhysicsEngine_createMovingSprite__P4797, - "spriteCollisions": ArcadePhysicsEngine_spriteCollisions__P4798, - "screenEdgeCollisions": ArcadePhysicsEngine_screenEdgeCollisions__P4799, - "tilemapCollisions": ArcadePhysicsEngine_tilemapCollisions__P4800, - "tilemapOverlaps": ArcadePhysicsEngine_tilemapOverlaps__P4801, - "moveSprite": ArcadePhysicsEngine_moveSprite__P2541, - "canResolveClipping": ArcadePhysicsEngine_canResolveClipping__P4802, - "constrain": ArcadePhysicsEngine_constrain__P4803, + "maxSpeed": ArcadePhysicsEngine_maxSpeed__P20567, + "set/maxSpeed": ArcadePhysicsEngine_maxSpeed__P20568, + "minStep": ArcadePhysicsEngine_minStep__P20569, + "set/minStep": ArcadePhysicsEngine_minStep__P20570, + "maxStep": ArcadePhysicsEngine_maxStep__P20571, + "set/maxStep": ArcadePhysicsEngine_maxStep__P20572, + "addSprite": ArcadePhysicsEngine_addSprite__P20574, + "removeSprite": ArcadePhysicsEngine_removeSprite__P20575, + "draw": ArcadePhysicsEngine_draw__P20576, + "move": ArcadePhysicsEngine_move__P20577, + "createMovingSprite": ArcadePhysicsEngine_createMovingSprite__P22835, + "spriteCollisions": ArcadePhysicsEngine_spriteCollisions__P22836, + "screenEdgeCollisions": ArcadePhysicsEngine_screenEdgeCollisions__P22837, + "tilemapCollisions": ArcadePhysicsEngine_tilemapCollisions__P22838, + "tilemapOverlaps": ArcadePhysicsEngine_tilemapOverlaps__P22839, + "moveSprite": ArcadePhysicsEngine_moveSprite__P20579, + "canResolveClipping": ArcadePhysicsEngine_canResolveClipping__P22840, + "constrain": ArcadePhysicsEngine_constrain__P22841, }, }); -const sprites_SpriteMap__C2446_VT = mkVTable({ +const sprites_SpriteMap__C20484_VT = mkVTable({ name: "SpriteMap", numFields: 5, - classNo: 37, - lastSubtypeNo: 37, + classNo: 41, + lastSubtypeNo: 41, maxBgInstances: null, methods: { }, @@ -41741,24 +44897,47 @@ const sprites_SpriteMap__C2446_VT = mkVTable({ "set/columnCount": null, "buckets": null, "set/buckets": null, - "neighbors": sprites_SpriteMap_neighbors__P2448, - "overlaps": sprites_SpriteMap_overlaps__P2449, - "draw": sprites_SpriteMap_draw__P2450, - "resizeBuckets": sprites_SpriteMap_resizeBuckets__P2451, - "clear": sprites_SpriteMap_clear__P2452, - "key": sprites_SpriteMap_key__P4760, - "insertAtKey": sprites_SpriteMap_insertAtKey__P4761, - "insertAABB": sprites_SpriteMap_insertAABB__P2453, - "mergeAtKey": sprites_SpriteMap_mergeAtKey__P4762, - "toString": sprites_SpriteMap_toString__P2454, + "neighbors": sprites_SpriteMap_neighbors__P20486, + "overlaps": sprites_SpriteMap_overlaps__P20487, + "draw": sprites_SpriteMap_draw__P20488, + "resizeBuckets": sprites_SpriteMap_resizeBuckets__P20489, + "clear": sprites_SpriteMap_clear__P20490, + "key": sprites_SpriteMap_key__P22798, + "insertAtKey": sprites_SpriteMap_insertAtKey__P22799, + "insertAABB": sprites_SpriteMap_insertAABB__P20491, + "mergeAtKey": sprites_SpriteMap_mergeAtKey__P22800, + "toString": sprites_SpriteMap_toString__P20492, + }, + toStringMethod: sprites_SpriteMap_toString__P20492, +}); +const control_PollEvent__C22453_VT = mkVTable({ + name: "PollEvent", + numFields: 6, + classNo: 42, + lastSubtypeNo: 42, + maxBgInstances: null, + methods: { + }, + iface: { + "eid": null, + "set/eid": null, + "vid": null, + "set/vid": null, + "start": null, + "set/start": null, + "timeOut": null, + "set/timeOut": null, + "condition": null, + "set/condition": null, + "once": null, + "set/once": null, }, - toStringMethod: sprites_SpriteMap_toString__P2454, }); -const scene_systemMenu_PauseMenu__C3095_VT = mkVTable({ +const scene_systemMenu_PauseMenu__C21133_VT = mkVTable({ name: "PauseMenu", numFields: 7, - classNo: 38, - lastSubtypeNo: 38, + classNo: 43, + lastSubtypeNo: 43, maxBgInstances: null, methods: { }, @@ -41777,19 +44956,19 @@ const scene_systemMenu_PauseMenu__C3095_VT = mkVTable({ "set/scrollOffset": null, "generator": null, "set/generator": null, - "show": scene_systemMenu_PauseMenu_show__P3097, - "onUpdate": scene_systemMenu_PauseMenu_onUpdate__P3098, - "setSelection": scene_systemMenu_PauseMenu_setSelection__P3099, - "drawText": scene_systemMenu_PauseMenu_drawText__P3100, - "dispose": scene_systemMenu_PauseMenu_dispose__P3101, - "updateScrollTarget": scene_systemMenu_PauseMenu_updateScrollTarget__P5200, + "show": scene_systemMenu_PauseMenu_show__P21135, + "onUpdate": scene_systemMenu_PauseMenu_onUpdate__P21136, + "setSelection": scene_systemMenu_PauseMenu_setSelection__P21137, + "drawText": scene_systemMenu_PauseMenu_drawText__P21138, + "dispose": scene_systemMenu_PauseMenu_dispose__P21139, + "updateScrollTarget": scene_systemMenu_PauseMenu_updateScrollTarget__P23238, }, }); -const scene_systemMenu_MenuOption__C3087_VT = mkVTable({ +const scene_systemMenu_MenuOption__C21125_VT = mkVTable({ name: "MenuOption", numFields: 8, - classNo: 39, - lastSubtypeNo: 39, + classNo: 44, + lastSubtypeNo: 44, maxBgInstances: null, methods: { }, @@ -41810,20 +44989,20 @@ const scene_systemMenu_MenuOption__C3087_VT = mkVTable({ "set/getText": null, "action": null, "set/action": null, - "show": scene_systemMenu_MenuOption_show__P3089, - "position": scene_systemMenu_MenuOption_position__P3090, - "setOffset": scene_systemMenu_MenuOption_setOffset__P3091, - "setTheme": scene_systemMenu_MenuOption_setTheme__P3092, - "setState": scene_systemMenu_MenuOption_setState__P3093, - "dispose": scene_systemMenu_MenuOption_dispose__P3094, - "updateCard": scene_systemMenu_MenuOption_updateCard__P5199, + "show": scene_systemMenu_MenuOption_show__P21127, + "position": scene_systemMenu_MenuOption_position__P21128, + "setOffset": scene_systemMenu_MenuOption_setOffset__P21129, + "setTheme": scene_systemMenu_MenuOption_setTheme__P21130, + "setState": scene_systemMenu_MenuOption_setState__P21131, + "dispose": scene_systemMenu_MenuOption_dispose__P21132, + "updateCard": scene_systemMenu_MenuOption_updateCard__P23237, }, }); -const effects_ParticleEffect__C3262_VT = mkVTable({ +const effects_ParticleEffect__C21300_VT = mkVTable({ name: "ParticleEffect", numFields: 3, - classNo: 40, - lastSubtypeNo: 41, + classNo: 45, + lastSubtypeNo: 46, maxBgInstances: null, methods: { }, @@ -41834,15 +45013,15 @@ const effects_ParticleEffect__C3262_VT = mkVTable({ "set/defaultRate": null, "defaultLifespan": null, "set/defaultLifespan": null, - "start": effects_ParticleEffect_start__P3264, - "destroy": effects_ParticleEffect_destroy__P3265, + "start": effects_ParticleEffect_start__P21302, + "destroy": effects_ParticleEffect_destroy__P21303, }, }); -const effects_ImageEffect__C3290_VT = mkVTable({ +const effects_ImageEffect__C21328_VT = mkVTable({ name: "ImageEffect", numFields: 4, - classNo: 42, - lastSubtypeNo: 42, + classNo: 47, + lastSubtypeNo: 47, maxBgInstances: null, methods: { }, @@ -41855,132 +45034,21 @@ const effects_ImageEffect__C3290_VT = mkVTable({ "set/fastRandom": null, "times": null, "set/times": null, - "applyTo": effects_ImageEffect_applyTo__P3292, - "change": effects_ImageEffect_change__P3293, - }, -}); -const game_Hitbox__C2208_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__P2216, - "top": game_Hitbox_top__P2217, - "right": game_Hitbox_right__P2218, - "bottom": game_Hitbox_bottom__P2219, - "isValid": game_Hitbox_isValid__P2220, - "contains": game_Hitbox_contains__P2221, - "updateIfInvalid": game_Hitbox_updateIfInvalid__P2222, - "overlapsWith": game_Hitbox_overlapsWith__P2223, - }, -}); -const particles_ParticleSource__C3151_VT = mkVTable({ - name: "ParticleSource", - numFields: 13, - classNo: 31, - lastSubtypeNo: 31, - maxBgInstances: null, - methods: { - "__visible": sprites_BaseSprite___visible__P2097, - "__draw": particles_ParticleSource___draw__P3157, - "__drawCore": sprites_BaseSprite___drawCore__P2101, - "__update": sprites_BaseSprite___update__P2102, - "updateParticle": particles_ParticleSource_updateParticle__P5285, - }, - 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__P3157, - "_update": particles_ParticleSource__update__P3158, - "_prune": particles_ParticleSource__prune__P3159, - "setAcceleration": particles_ParticleSource_setAcceleration__P3160, - "setRelativeToCamera": particles_ParticleSource_setRelativeToCamera__P3162, - "enabled": particles_ParticleSource_enabled__P3163, - "set/enabled": particles_ParticleSource_enabled__P3164, - "destroy": particles_ParticleSource_destroy__P3165, - "clear": particles_ParticleSource_clear__P3166, - "setAnchor": particles_ParticleSource_setAnchor__P3167, - "setRate": particles_ParticleSource_setRate__P3168, - "setFactory": particles_ParticleSource_setFactory__P3170, - "updateParticle": particles_ParticleSource_updateParticle__P5285, - "drawParticle": particles_ParticleSource_drawParticle__P5286, - "__visible": sprites_BaseSprite___visible__P2097, - "z": sprites_BaseSprite_z__P2098, - "set/z": sprites_BaseSprite_z__P2099, - "__drawCore": sprites_BaseSprite___drawCore__P2101, - "__update": sprites_BaseSprite___update__P2102, + "applyTo": effects_ImageEffect_applyTo__P21330, + "change": effects_ImageEffect_change__P21331, }, }); -const sprites_SpriteSet__C2463_VT = mkVTable({ - name: "SpriteSet", - numFields: 1, - classNo: 44, - lastSubtypeNo: 44, - maxBgInstances: null, - methods: { - }, - iface: { - "_sprites": null, - "set/_sprites": null, - "length": sprites_SpriteSet_length__P2466, - "add": sprites_SpriteSet_add__P2468, - "remove": sprites_SpriteSet_remove__P2470, - "contains": sprites_SpriteSet_contains__P2471, - "toString": sprites_SpriteSet_toString__P2474, - }, - toStringMethod: sprites_SpriteSet_toString__P2474, -}); -const scene_Renderable__C2800_VT = mkVTable({ +const scene_Renderable__C20838_VT = mkVTable({ name: "Renderable", numFields: 4, - classNo: 32, - lastSubtypeNo: 32, + classNo: 24, + lastSubtypeNo: 24, maxBgInstances: null, methods: { - "__visible": scene_Renderable___visible__P2802, - "__draw": sprites_BaseSprite___draw__P2100, - "__drawCore": scene_Renderable___drawCore__P2803, - "__update": sprites_BaseSprite___update__P2102, + "__visible": scene_Renderable___visible__P20840, + "__draw": sprites_BaseSprite___draw__P20138, + "__drawCore": scene_Renderable___drawCore__P20841, + "__update": sprites_BaseSprite___update__P20140, }, iface: { "_z": null, @@ -41991,19 +45059,19 @@ const scene_Renderable__C2800_VT = mkVTable({ "set/handler": null, "shouldBeVisible": null, "set/shouldBeVisible": null, - "__visible": scene_Renderable___visible__P2802, - "__drawCore": scene_Renderable___drawCore__P2803, - "z": sprites_BaseSprite_z__P2098, - "set/z": sprites_BaseSprite_z__P2099, - "__draw": sprites_BaseSprite___draw__P2100, - "__update": sprites_BaseSprite___update__P2102, + "__visible": scene_Renderable___visible__P20840, + "__drawCore": scene_Renderable___drawCore__P20841, + "z": sprites_BaseSprite_z__P20136, + "set/z": sprites_BaseSprite_z__P20137, + "__draw": sprites_BaseSprite___draw__P20138, + "__update": sprites_BaseSprite___update__P20140, }, }); -const controller_ButtonHandler__C2183_VT = mkVTable({ +const controller_ButtonHandler__C20221_VT = mkVTable({ name: "ButtonHandler", numFields: 2, - classNo: 45, - lastSubtypeNo: 45, + classNo: 48, + lastSubtypeNo: 48, maxBgInstances: null, methods: { }, @@ -42014,11 +45082,11 @@ const controller_ButtonHandler__C2183_VT = mkVTable({ "set/callback": null, }, }); -const controller_ButtonEventHandlerState__C2185_VT = mkVTable({ +const controller_ButtonEventHandlerState__C20223_VT = mkVTable({ name: "ButtonEventHandlerState", numFields: 3, - classNo: 46, - lastSubtypeNo: 46, + classNo: 49, + lastSubtypeNo: 49, maxBgInstances: null, methods: { }, @@ -42031,11 +45099,11 @@ const controller_ButtonEventHandlerState__C2185_VT = mkVTable({ "set/system": null, }, }); -const effects_ScreenEffect__C3266_VT = mkVTable({ +const effects_ScreenEffect__C21304_VT = mkVTable({ name: "ScreenEffect", numFields: 5, - classNo: 41, - lastSubtypeNo: 41, + classNo: 46, + lastSubtypeNo: 46, maxBgInstances: null, methods: { }, @@ -42050,34 +45118,34 @@ const effects_ScreenEffect__C3266_VT = mkVTable({ "set/source": null, "sceneDefaultRate": null, "set/sceneDefaultRate": null, - "start": effects_ParticleEffect_start__P3264, - "destroy": effects_ParticleEffect_destroy__P3265, + "start": effects_ParticleEffect_start__P21302, + "destroy": effects_ParticleEffect_destroy__P21303, }, }); -const particles_ParticleFactory__C3187_VT = mkVTable({ +const particles_ParticleFactory__C21225_VT = mkVTable({ name: "ParticleFactory", numFields: 0, - classNo: 47, - lastSubtypeNo: 51, + classNo: 50, + lastSubtypeNo: 54, maxBgInstances: null, methods: { - "createParticle": particles_ParticleFactory_createParticle__P3189, - "drawParticle": particles_ParticleFactory_drawParticle__P3190, + "createParticle": particles_ParticleFactory_createParticle__P21227, + "drawParticle": particles_ParticleFactory_drawParticle__P21228, }, iface: { - "createParticle": particles_ParticleFactory_createParticle__P3189, - "drawParticle": particles_ParticleFactory_drawParticle__P3190, + "createParticle": particles_ParticleFactory_createParticle__P21227, + "drawParticle": particles_ParticleFactory_drawParticle__P21228, }, }); -const particles_SprayFactory__C3191_VT = mkVTable({ +const particles_SprayFactory__C21229_VT = mkVTable({ name: "SprayFactory", numFields: 3, - classNo: 48, - lastSubtypeNo: 51, + classNo: 51, + lastSubtypeNo: 54, maxBgInstances: null, methods: { - "createParticle": particles_SprayFactory_createParticle__P3193, - "drawParticle": particles_SprayFactory_drawParticle__P3194, + "createParticle": particles_SprayFactory_createParticle__P21231, + "drawParticle": particles_SprayFactory_drawParticle__P21232, }, iface: { "speed": null, @@ -42086,21 +45154,21 @@ const particles_SprayFactory__C3191_VT = mkVTable({ "set/minAngle": null, "spread": null, "set/spread": null, - "createParticle": particles_SprayFactory_createParticle__P3193, - "drawParticle": particles_SprayFactory_drawParticle__P3194, - "setSpeed": particles_SprayFactory_setSpeed__P3195, - "setDirection": particles_SprayFactory_setDirection__P3196, + "createParticle": particles_SprayFactory_createParticle__P21231, + "drawParticle": particles_SprayFactory_drawParticle__P21232, + "setSpeed": particles_SprayFactory_setSpeed__P21233, + "setDirection": particles_SprayFactory_setDirection__P21234, }, }); -const particles_AreaFactory__C3197_VT = mkVTable({ +const particles_AreaFactory__C21235_VT = mkVTable({ name: "AreaFactory", numFields: 8, - classNo: 49, - lastSubtypeNo: 51, + classNo: 52, + lastSubtypeNo: 54, maxBgInstances: null, methods: { - "createParticle": particles_AreaFactory_createParticle__P3203, - "drawParticle": particles_AreaFactory_drawParticle__P3204, + "createParticle": particles_AreaFactory_createParticle__P21241, + "drawParticle": particles_AreaFactory_drawParticle__P21242, }, iface: { "speed": null, @@ -42119,21 +45187,21 @@ const particles_AreaFactory__C3197_VT = mkVTable({ "set/maxLifespan": null, "galois": null, "set/galois": null, - "createParticle": particles_AreaFactory_createParticle__P3203, - "drawParticle": particles_AreaFactory_drawParticle__P3204, - "setSpeed": particles_SprayFactory_setSpeed__P3195, - "setDirection": particles_SprayFactory_setDirection__P3196, + "createParticle": particles_AreaFactory_createParticle__P21241, + "drawParticle": particles_AreaFactory_drawParticle__P21242, + "setSpeed": particles_SprayFactory_setSpeed__P21233, + "setDirection": particles_SprayFactory_setDirection__P21234, }, }); -const particles_ShapeFactory__C3213_VT = mkVTable({ +const particles_ShapeFactory__C21251_VT = mkVTable({ name: "ShapeFactory", numFields: 11, - classNo: 50, - lastSubtypeNo: 51, + classNo: 53, + lastSubtypeNo: 54, maxBgInstances: null, methods: { - "createParticle": particles_ShapeFactory_createParticle__P3217, - "drawParticle": particles_ShapeFactory_drawParticle__P3216, + "createParticle": particles_ShapeFactory_createParticle__P21255, + "drawParticle": particles_ShapeFactory_drawParticle__P21254, }, iface: { "speed": null, @@ -42158,22 +45226,22 @@ const particles_ShapeFactory__C3213_VT = mkVTable({ "set/ox": null, "oy": null, "set/oy": null, - "addShape": particles_ShapeFactory_addShape__P3215, - "drawParticle": particles_ShapeFactory_drawParticle__P3216, - "createParticle": particles_ShapeFactory_createParticle__P3217, - "setSpeed": particles_SprayFactory_setSpeed__P3195, - "setDirection": particles_SprayFactory_setDirection__P3196, + "addShape": particles_ShapeFactory_addShape__P21253, + "drawParticle": particles_ShapeFactory_drawParticle__P21254, + "createParticle": particles_ShapeFactory_createParticle__P21255, + "setSpeed": particles_SprayFactory_setSpeed__P21233, + "setDirection": particles_SprayFactory_setDirection__P21234, }, }); -const particles_ConfettiFactory__C3218_VT = mkVTable({ +const particles_ConfettiFactory__C21256_VT = mkVTable({ name: "ConfettiFactory", numFields: 11, - classNo: 51, - lastSubtypeNo: 51, + classNo: 54, + lastSubtypeNo: 54, maxBgInstances: null, methods: { - "createParticle": particles_ShapeFactory_createParticle__P3217, - "drawParticle": particles_ShapeFactory_drawParticle__P3216, + "createParticle": particles_ShapeFactory_createParticle__P21255, + "drawParticle": particles_ShapeFactory_drawParticle__P21254, }, iface: { "speed": null, @@ -42198,18 +45266,18 @@ const particles_ConfettiFactory__C3218_VT = mkVTable({ "set/ox": null, "oy": null, "set/oy": null, - "addShape": particles_ShapeFactory_addShape__P3215, - "drawParticle": particles_ShapeFactory_drawParticle__P3216, - "createParticle": particles_ShapeFactory_createParticle__P3217, - "setSpeed": particles_SprayFactory_setSpeed__P3195, - "setDirection": particles_SprayFactory_setDirection__P3196, + "addShape": particles_ShapeFactory_addShape__P21253, + "drawParticle": particles_ShapeFactory_drawParticle__P21254, + "createParticle": particles_ShapeFactory_createParticle__P21255, + "setSpeed": particles_SprayFactory_setSpeed__P21233, + "setDirection": particles_SprayFactory_setDirection__P21234, }, }); -const particles_Particle__C3132_VT = mkVTable({ +const particles_Particle__C21170_VT = mkVTable({ name: "Particle", numFields: 8, - classNo: 52, - lastSubtypeNo: 52, + classNo: 55, + lastSubtypeNo: 55, maxBgInstances: 200, methods: { }, @@ -42232,11 +45300,11 @@ const particles_Particle__C3132_VT = mkVTable({ "set/color": null, }, }); -const music_Playable__C1911_VT = mkVTable({ +const music_Playable__C19949_VT = mkVTable({ name: "Playable", numFields: 1, - classNo: 53, - lastSubtypeNo: 54, + classNo: 56, + lastSubtypeNo: 57, maxBgInstances: null, methods: { }, @@ -42245,11 +45313,11 @@ const music_Playable__C1911_VT = mkVTable({ "set/stopped": null, }, }); -const music_MelodyPlayable__C1916_VT = mkVTable({ +const music_MelodyPlayable__C19954_VT = mkVTable({ name: "MelodyPlayable", numFields: 2, - classNo: 54, - lastSubtypeNo: 54, + classNo: 57, + lastSubtypeNo: 57, maxBgInstances: null, methods: { }, @@ -42260,11 +45328,11 @@ const music_MelodyPlayable__C1916_VT = mkVTable({ "set/melody": null, }, }); -const music_Melody__C1626_VT = mkVTable({ +const music_Melody__C19664_VT = mkVTable({ name: "Melody", numFields: 2, - classNo: 55, - lastSubtypeNo: 55, + classNo: 58, + lastSubtypeNo: 58, maxBgInstances: null, methods: { }, @@ -42273,15 +45341,15 @@ const music_Melody__C1626_VT = mkVTable({ "set/_text": null, "_player": null, "set/_player": null, - "toString": music_Melody_toString__P1635, + "toString": music_Melody_toString__P19673, }, - toStringMethod: music_Melody_toString__P1635, + toStringMethod: music_Melody_toString__P19673, }); -const MovingSprite__C2525_VT = mkVTable({ +const MovingSprite__C20563_VT = mkVTable({ name: "MovingSprite", numFields: 7, - classNo: 56, - lastSubtypeNo: 56, + classNo: 59, + lastSubtypeNo: 59, maxBgInstances: null, methods: { }, @@ -42302,11 +45370,11 @@ const MovingSprite__C2525_VT = mkVTable({ "set/yStep": null, }, }); -const tiles_Location__C2693_VT = mkVTable({ +const tiles_Location__C20731_VT = mkVTable({ name: "Location", numFields: 2, - classNo: 57, - lastSubtypeNo: 57, + classNo: 60, + lastSubtypeNo: 60, maxBgInstances: null, methods: { }, @@ -42315,21 +45383,21 @@ const tiles_Location__C2693_VT = mkVTable({ "set/_row": null, "_col": null, "set/_col": null, - "tileMap": tiles_Location_tileMap__P2695, - "column": tiles_Location_column__P2696, - "row": tiles_Location_row__P2697, - "x": tiles_Location_x__P2698, - "y": tiles_Location_y__P2699, - "left": tiles_Location_left__P2700, - "top": tiles_Location_top__P2701, - "tileSet": tiles_Location_tileSet__P2704, + "tileMap": tiles_Location_tileMap__P20733, + "column": tiles_Location_column__P20734, + "row": tiles_Location_row__P20735, + "x": tiles_Location_x__P20736, + "y": tiles_Location_y__P20737, + "left": tiles_Location_left__P20738, + "top": tiles_Location_top__P20739, + "tileSet": tiles_Location_tileSet__P20742, }, }); -const sprites_StaticObstacle__C2498_VT = mkVTable({ +const sprites_StaticObstacle__C20536_VT = mkVTable({ name: "StaticObstacle", numFields: 5, - classNo: 58, - lastSubtypeNo: 58, + classNo: 61, + lastSubtypeNo: 61, maxBgInstances: null, methods: { }, @@ -42344,22 +45412,22 @@ const sprites_StaticObstacle__C2498_VT = mkVTable({ "set/top": null, "left": null, "set/left": null, - "x": sprites_StaticObstacle_x__P2505, - "y": sprites_StaticObstacle_y__P2506, - "height": sprites_StaticObstacle_height__P2507, - "width": sprites_StaticObstacle_width__P2508, + "x": sprites_StaticObstacle_x__P20543, + "y": sprites_StaticObstacle_y__P20544, + "height": sprites_StaticObstacle_height__P20545, + "width": sprites_StaticObstacle_width__P20546, }, }); -const sprites_BaseSpriteSayRenderer__C2259_VT = mkVTable({ +const sprites_BaseSpriteSayRenderer__C20297_VT = mkVTable({ name: "BaseSpriteSayRenderer", numFields: 3, - classNo: 59, - lastSubtypeNo: 59, + classNo: 62, + lastSubtypeNo: 62, maxBgInstances: null, methods: { - "draw": sprites_BaseSpriteSayRenderer_draw__P2261, - "update": sprites_BaseSpriteSayRenderer_update__P2262, - "destroy": sprites_BaseSpriteSayRenderer_destroy__P2263, + "draw": sprites_BaseSpriteSayRenderer_draw__P20299, + "update": sprites_BaseSpriteSayRenderer_update__P20300, + "destroy": sprites_BaseSpriteSayRenderer_destroy__P20301, }, iface: { "text": null, @@ -42368,13 +45436,13 @@ const sprites_BaseSpriteSayRenderer__C2259_VT = mkVTable({ "set/fgColor": null, "bgColor": null, "set/bgColor": null, - "draw": sprites_BaseSpriteSayRenderer_draw__P2261, - "update": sprites_BaseSpriteSayRenderer_update__P2262, - "destroy": sprites_BaseSpriteSayRenderer_destroy__P2263, + "draw": sprites_BaseSpriteSayRenderer_draw__P20299, + "update": sprites_BaseSpriteSayRenderer_update__P20300, + "destroy": sprites_BaseSpriteSayRenderer_destroy__P20301, }, }); -const breakpoints = setupDebugger(1, []) +const breakpoints = setupDebugger(1, ["protagonist___37136"]) -return _main___P18028 +return _main___P37203 }) diff --git a/assets/version.txt b/assets/version.txt index bd52db8..6c6aa7c 100644 --- a/assets/version.txt +++ b/assets/version.txt @@ -1 +1 @@ -0.0.0 \ No newline at end of file +0.1.0 \ No newline at end of file diff --git a/pxt.json b/pxt.json index adbb0e5..3180870 100644 --- a/pxt.json +++ b/pxt.json @@ -1,5 +1,6 @@ { "name": "HelloWorld", + "version": "0.1.0", "description": "", "dependencies": { "device": "*",